/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    font-family: 'Martel Sans', sans-serif;
    background-color: #ffffff;
    overflow-x: hidden;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* Layout principal - ocupa toda la altura */
.layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

/* Header */
header {
    background-color: #ffffff;
    padding: 15px 40px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
    z-index: 1000;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0; /* Evita que el header se contraiga */
}

/* Logo */
.logo-imagen {
    height: 60px;
    width: auto;
    max-width: 280px;
    object-fit: contain;
    display: block;
}

#logo {
    text-decoration: none;
    display: inline-block;
}

/* Navegación */
.navinicio ul {
    list-style: none;
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.navainicio {
    text-decoration: none;
    color: white;
    background-color: #4A90E2;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
    display: inline-block;
}

.navainicio:hover {
    background-color: #357ABD;
}

/* Clase active para navainicio */
.navainicio.active {
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgb(11 37 69 / 58%);
    background: linear-gradient(180deg, #2c5a8f 0%, #0b2545 100%);
}

/* Mantener el color activo en hover cuando esté activo */
.navainicio.active:hover {
    background: linear-gradient(180deg, #2c5a8f 0%, #0b2545 100%) !important;
    color: #ffffff !important;
}

/* Ajuste para el contenido */
.seccion-Principal {
    width: 100vw;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box;
    flex: 1; /* Ocupa todo el espacio disponible entre header y footer */
    min-height: 0; /* Permite que el contenido dicte la altura mínima */
    margin-bottom: 0;
    padding-bottom: 0;
}

/* ==================== FOOTER MEJORADO ==================== */
.footer-inicio {
    background: #0b2545;
    color: #fff;
    width: 100%;
    flex-shrink: 0;
    margin-top: auto;
    border-top: 3px solid #d4af37;
}

.footer-contenido {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-columna {
    display: flex;
    flex-direction: column;
}

.footer-titulo {
    color: #d4af37;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-descripcion {
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Redes sociales */
.footer-social {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.social-link::before {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: #1f2937;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 10;
}

.social-link:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

.social-link:hover {
    background: #d4af37;
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.social-icon {
    width: 20px !important;
    height: 20px !important;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* Enlaces del footer */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
}

.footer-links a::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #d4af37;
    transition: width 0.3s ease;
}

.footer-links a:hover {
    color: #d4af37;
    transform: translateX(4px);
}

.footer-links a:hover::before {
    width: 100%;
}

/* Newsletter */
.footer-newsletter-texto {
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.newsletter-form {
    display: flex;
    gap: 8px;
}

.newsletter-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s ease;
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.newsletter-input:focus {
    outline: none;
    border-color: #d4af37;
    background: rgba(255, 255, 255, 0.08);
}

.newsletter-btn {
    padding: 12px 24px;
    background: #d4af37;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.newsletter-btn:hover {
    background: #c19b2e;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.newsletter-btn:active {
    transform: translateY(0);
}

/* Footer Bottom */
.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px 20px;
}

.footer-bottom-contenido {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-copyright {
    color: #94a3b8;
    font-size: 14px;
    margin: 0;
}

.footer-copyright strong {
    color: #d4af37;
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-legal a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: #d4af37;
}

.footer-separator {
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .footer-contenido {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 40px 20px 30px;
    }

    .footer-bottom-contenido {
        flex-direction: column;
        text-align: center;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-btn {
        width: 100%;
    }

    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .footer-titulo {
        font-size: 16px;
    }

    .footer-descripcion,
    .footer-newsletter-texto,
    .footer-links a {
        font-size: 13px;
    }

    .social-link {
        width: 36px;
        height: 36px;
    }

    .social-icon {
        width: 18px !important;
        height: 18px !important;
    }
}

/* ==================== MENU HAMBURGUESA ==================== */
#menu-hamburguesa {
    display: none;
    margin-left: auto;
    /* Asegura que esté alineado a la derecha en desktop */
    position: relative;
}

/* Media queries ya definidos en la sección del footer */

@media (max-width: 768px) {
  
  #menu-hamburguesa {
    display: block;
    margin-left: auto;
    position: relative; /* Mantén relative para que respete el flex del header */
    right: 0;
    top: 0;
    z-index: 1100;
    }
  .navinicio ul {
    display: none;
    flex-direction: column;
    align-items: stretch; /* Cambia a stretch */
    gap: 16px; /* Un poco más de espacio */
    padding: 24px 16px 24px 16px; /* Padding lateral */
    margin: 0;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    border-radius: 0 0 16px 16px;
    width: 100vw;
    position: absolute;
    top: 70px;
    left: 0;
    z-index: 1000;
  }

  .navinicio ul.menu-visible {
    display: flex;
    animation: slideDown 0.3s;
  }

  .navainicio {
    width: 100%; /* Ocupa todo el ancho */
    margin: 0;
    display: block;
    text-align: center;
    font-size: 1.1rem;
    box-sizing: border-box;
    padding: 16px 0; /* Padding uniforme */
    border-radius: 8px;
  }

  /* Ajustes para móviles */
  body {
    min-height: 100vh;
  }
}

@media (max-width: 480px) {
  body {
    min-height: 100vh;
  }
}

@media (min-width: 1360px) and (max-width: 1370px) and (max-height: 770px) {
  html, body {
    font-size: 13px !important;
  }
  header {
    height: 56px !important;
    padding: 8px 18px !important;
  }
  .logo-imagen {
    height: 45px !important;
    max-width: 210px !important;
  }
  .navainicio {
    font-size: 12px !important;
    padding: 7px 12px !important;
  }
  
  /* Formularios y contenedores: permitir ancho amplio en 1366x768 */
  .form-page,
  .form-content,
  .form-form-container,
  .form-form {
    max-width: 95vw !important; /* llenar casi todo el ancho del viewport en 1366x768 */
    width: 100% !important;
    padding: 10px !important;
    margin: 0 auto !important;
    box-sizing: border-box;
  }
  .main-title,
  .main-title-secondary {
    font-size: 1.5rem !important;
  }
  .main-subtitle {
    font-size: 0.95rem !important;
  }
  .form-title {
    font-size: 1.2rem !important;
    margin-bottom: 18px !important;
  }
  .form-input,
  .form-button {
    font-size: 0.95rem !important;
    padding: 8px 10px !important;
  }
  .form-button {
    margin-top: 0.7rem !important;
    margin-bottom: 1.2rem !important;
  }
}