/* ============================================= */
/* RESET & GLOBALS               */
/* ============================================= */
:root {
    --primary-color: #0d47a1; /* Azul profundo del mar */
    --secondary-color: #f5f5f5; /* Gris claro */
    --accent-color: #ff6f00; /* Naranja para CTAs */
    --text-color: #333;
    --light-text-color: #fff;
    --border-radius: 8px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Roboto', sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-secondary);
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.2;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 40px;
}

.content-section {
    padding: 80px 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--light-text-color);
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-primary);
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: #e65100;
    transform: translateY(-3px);
}

/* Language display logic */
.language-container[data-lang="es"] .en,
.language-container[data-lang="en"] .es {
    display: none;
}

/* ============================================= */
/* HEADER (VERSIÓN FINAL REFORZADA)        */
/* ============================================= */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: top 0.3s ease;
    border-bottom: 1px solid #e0e0e0;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    max-width: 1300px;
    margin: 0 auto;
    gap: 20px; /* Espacio entre las 3 secciones principales */
}

/* --- Logo (Izquierda) --- */
.logo {
    display: flex;
    align-items: center;
    color: var(--primary-color);
    flex-shrink: 0; /* NO se encoge */
}

.logo img {
    height: 110px;
    margin-right: 10px;
}

.logo span {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 1.5rem;
}

/* --- Navegación (Centro) --- */
.main-nav {
    flex-grow: 1; /* Ocupa el espacio sobrante */
    display: flex;
    justify-content: center; /* Centra los links dentro de su espacio */
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 35px;
}

.main-nav .nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

.main-nav .nav-link:hover {
    color: var(--primary-color);
}

.main-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.main-nav .nav-link:hover::after {
    width: 100%;
}
.header {
    /* ... otros estilos como background, padding, etc. ... */
    height: 80px; /* <-- AÑADE ESTA LÍNEA. Ajusta el valor a tu gusto. */
    display: flex; /* Mejora proactiva para alinear el logo verticalmente */
    align-items: center; /* Centra el logo y los links verticalmente */
}

/* --- Controles (Derecha) --- */
.header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0; /* NO se encoge */
}

/* ============================================= */
/* SWITCH DE IDIOMA (VERSIÓN FINAL CON ESPACIADO CORREGIDO) */
/* ============================================= */
.language-switch {
    position: relative;
    width: 64px;
    height: 32px;
    border-radius: 16px;
    background-color: var(--secondary-color);
    border: 1px solid #ddd;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.language-switch-checkbox {
    display: none;
}

.language-switch-label {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.language-switch-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 26px;
    height: 26px;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 2; /* El slider va por encima del texto */
}

/* Contenedor que da espacio a cada letra */
.language-switch-inner {
    display: flex;
    justify-content: space-around; /* Distribuye el espacio */
    width: 100%;
    z-index: 1; /* El texto va por debajo del slider */
}

.language-switch-inner::before,
.language-switch-inner::after {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 12px;
    transition: color 0.3s ease;
}

.language-switch-inner::before {
    content: 'ES';
    color: var(--primary-color);
}

.language-switch-inner::after {
    content: 'EN';
    color: #a0a0a0;
}

/* Estado Activo (EN) */
.language-switch-checkbox:checked + .language-switch-label .language-switch-slider {
    transform: translateX(32px); /* Distancia de movimiento corregida */
}

.language-switch-checkbox:checked + .language-switch-label .language-switch-inner::before {
    color: #a0a0a0; /* ES se vuelve inactivo */
}

.language-switch-checkbox:checked + .language-switch-label .language-switch-inner::after {
    color: var(--primary-color); /* EN se vuelve activo */
}

/* ============================================= */
/* HERO SECTION                 */
/* ============================================= */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--light-text-color);
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://webtotal.com.mx/wp-content/uploads/2025/10/fpys.png') no-repeat center center/cover;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    font-family: var(--font-secondary);
}


/* ============================================= */
/* ABOUT US & PROCESSES              */
/* ============================================= */
.about-us-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-us-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}
.about-us-content h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}
.about-us-content p {
    margin-bottom: 15px;
}

.processes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.process-card {
    background-color: #fff;
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.process-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.process-card .process-image {
    height: 180px;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.process-card .process-image img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.process-card h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    min-height: 3.6rem; /* Ensures consistent height for 2 lines */
}

/* ============================================= */
/* QUOTES SECTION                */
/* ============================================= */
.quotes-section {
    padding: 100px 0;
    background: linear-gradient(rgba(13, 71, 161, 0.8), rgba(13, 71, 161, 0.8)), url('../img/quotes-bg.jpg') no-repeat center center/cover;
    background-attachment: fixed;
    color: var(--light-text-color);
}

.quote-card {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.quote-icon {
    font-size: 4rem;
    font-family: serif;
    color: var(--accent-color);
    line-height: 1;
}

.quote-card p {
    font-size: 1.5rem;
    font-style: italic;
    font-family: var(--font-primary);
}


/* ============================================= */
/* CONTACT SECTION                */
/* ============================================= */
.contact-section {
    background-color: var(--secondary-color);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: flex-start;
}

.contact-info h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.contact-info ul {
    list-style: none;
    margin-top: 20px;
}
.contact-info li {
    margin-bottom: 15px;
}
.contact-info li strong {
    color: var(--primary-color);
}

.contact-form form {
    background-color: #fff;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--font-secondary);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}


/* ============================================= */
/* FOOTER                    */
/* ============================================= */
.main-footer {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    text-align: center;
    padding: 30px 0;
}


/* ============================================= */
/* SCROLL ANIMATIONS                */
/* ============================================= */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* ============================================= */
/* MODAL Y BOTÓN DE ADMIN                  */
/* ============================================= */
.admin-login-button {
    background: transparent;
    border: 2px solid var(--light-text-color);
    color: var(--light-text-color);
    padding: 10px 20px;
    border-radius: 50px;
    font-family: var(--font-primary);
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.admin-login-button:hover {
    background-color: var(--light-text-color);
    color: var(--primary-color);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 1;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background-color: #fff;
    padding: 40px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
    transform: scale(1);
    transition: transform 0.3s ease;
}

.modal-overlay.hidden .modal-content {
    transform: scale(0.9);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2.5rem;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
}

.modal-content h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.modal-content p {
    margin-bottom: 30px;
    color: #666;
}

.google-login-button {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 12px 25px;
    border: 1px solid #ddd;
    background-color: #fff;
    border-radius: 50px;
    font-family: var(--font-secondary);
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.google-login-button:hover {
    border-color: #ccc;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.google-icon {
    width: 20px;
    height: 20px;
}


/* ============================================= */
/* RESPONSIVENESS                */
/* ============================================= */
@media (max-width: 992px) {
    .about-us-grid, .contact-grid {
        grid-template-columns: 1fr;
    }
    .about-us-image {
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none; /* Ocultamos la navegación de escritorio */
    }
    
    .mobile-menu-toggle {
        display: block; /* Mostramos el botón de hamburguesa */
    }

    /* Estilos para el menú desplegable (antes oculto) */
    .main-nav.active {
        display: flex; /* Se muestra al hacer clic */
        position: fixed;
        top: 0;
        right: 0;
        width: 70%;
        height: 100vh;
        background-color: #fff;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }

    .main-nav.active ul {
        flex-direction: column;
        text-align: center;
        gap: 25px;
    }
    
    .main-nav.active .nav-link {
        font-size: 1.3rem;
    }

    .mobile-menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .mobile-menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Ajustes adicionales para el header en móvil */
    .header-container {
        justify-content: space-between;
    }
    .logo span {
        display: none; /* Opcional: ocultar el texto del logo en móvil */
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .hero p {
        font-size: 1.1rem;
    }
}
/* ============================================= */
/* ANIMACIONES ADICIONALES                 */
/* ============================================= */

/* --- Keyframes para las animaciones --- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* --- Aplicación de animaciones a elementos clave --- */

/* Animación de entrada para el contenido del Hero */
.hero-content h1 {
    animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-content p {
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-content .cta-button {
    animation: fadeInUp 1s ease-out 0.9s both;
}

/* Animación sutil para los botones de llamada a la acción */
.cta-button:hover,
.google-login-button:hover,
.admin-login-button:hover {
    animation: pulse 1.5s infinite;
}

/* Animación para el modal al aparecer */
.modal-overlay:not(.hidden) .modal-content {
    animation: fadeInUp 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) both;
}
/* Estilos para el logo en la sección de contacto */
.contact-logo {
    max-width: 180px;  /* <-- AJUSTA ESTE VALOR SEGÚN NECESITES */
    display: block;
    margin: 20px auto;
}