
/* 1. VARIABLES Y RESET BÁSICO */
:root {
    --navy-900: #0c2151;
    --navy-700: #1c3f7c;
    --navy-500: #2f63b6;
    --navy-300: #5a86d6;
    --neutral-900: #1f2333;
    --neutral-700: #3c435c;
    --neutral-200: #e5e8f2;
    --neutral-100: #f5f7fc;
    --accent-gold: #f5b041;
    --shadow-soft: 0 24px 54px rgba(12, 33, 81, 0.16);
}

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

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

body {
    font-family: 'Montserrat', Arial, sans-serif;
    background-color: #f5f7fc;
    color: var(--neutral-900);
}

/* 2. HEADER / TOP BAR */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 18px 48px;
    background-color: rgba(255,255,255,0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(12, 33, 81, 0.08);
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logo {
    width: 52px;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

.brand-text {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--navy-900);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

/* 3. MENÚ HAMBURGUESA */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    border: none;
    background: var(--navy-900);
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 24px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 999px;
}

.menu-toggle:hover {
    transform: translateY(-2px);
    background: var(--navy-700);
}

/* 4. NAVEGACIÓN PRINCIPAL */
.main-nav ul {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
    font-weight: 600;
}

.main-nav a {
    color: var(--navy-900);
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    position: relative;
    padding-bottom: 6px;
    transition: color 0.3s ease;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: var(--navy-500);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--navy-500);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    transform: scaleX(1);
}

/* 5. DROPDOWN DEL MENÚ */
.has-dropdown {
    position: relative;
}

.dropdown {
    position: absolute;
    top: 110%;
    left: 0;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(12, 33, 81, 0.16);
    border-radius: 12px;
    padding: 14px 18px;
    display: none;
    flex-direction: column;
    gap: 10px;
    min-width: 160px;
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
    display: flex;
}

.dropdown a {
    color: var(--navy-900);
    font-weight: 500;
    font-size: 0.9rem;
}

.dropdown a:hover {
    color: var(--navy-500);
}

.has-dropdown.open .dropdown {
    display: flex;
}

/* 6. SELECTOR DE IDIOMA */
.language-switcher {
    position: relative;
}

.language-select {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--navy-900);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(12, 33, 81, 0.12);
    border-radius: 999px;
    padding: 6px 16px;
    cursor: pointer;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    border: none;
    outline: none;
}

.language-select:hover {
    box-shadow: 0 8px 20px rgba(12, 33, 81, 0.2);
    transform: translateY(-1px);
}

.language-flag {
    width: 24px;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 0 0 1px rgba(12, 33, 81, 0.12);
}

.language-caret {
    font-size: 0.75rem;
    color: var(--navy-700);
}

.language-menu {
    position: absolute;
    right: 0;
    margin-top: 8px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(12, 33, 81, 0.25);
    padding: 10px;
    list-style: none;
    display: none;
    min-width: 200px;
    z-index: 50;
}

.language-switcher.open .language-menu {
    display: block;
}

.language-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    color: var(--navy-900);
    transition: background 0.2s ease, color 0.2s ease;
}

.language-option img {
    width: 22px;
    height: 16px;
    border-radius: 4px;
    box-shadow: 0 0 0 1px rgba(12, 33, 81, 0.12);
}

.language-option:hover,
.language-option.active {
    background: rgba(47, 99, 182, 0.12);
    color: var(--navy-700);
}

.language-select:focus-visible,
.language-option:focus-visible {
    outline: 2px solid var(--navy-500);
    outline-offset: 2px;
}

/* 7. CONTENIDO PRINCIPAL (PÁGINA) */
.page-content {
    padding: 80px 48px;
    text-align: center;
    background: #ffffff;
}

.page-content h1 {
    font-size: clamp(2.4rem, 5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--navy-900);
    margin-bottom: 24px;
}

/* 8. ANIMACIÓN DE CONSTRUCCIÓN */
.construction-animation {
    text-align: center;
    margin: 32px auto 16px;
}

.construction-cars {
    display: flex;
    justify-content: center;
    gap: 26px;
    margin-bottom: 12px;
}

.truck {
    font-size: 2.6rem;
    display: inline-flex;
    animation: drive 4s linear infinite;
}

.truck-one {
    animation-delay: 0s;
}

.truck-two {
    animation-delay: 0.3s;
}

.truck-three {
    animation-delay: 0.6s;
}

.construction-text {
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--navy-900);
}

@keyframes drive {
    0% {
        transform: translateY(0) translateX(-4px);
    }
    50% {
        transform: translateY(-3px) translateX(4px);
    }
    100% {
        transform: translateY(0) translateX(-4px);
    }
}

/* 9. FOOTER */
.site-footer {
    background: var(--navy-900);
    padding: 42px 80px 32px;
    color: #ffffff;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 28px;
}

.footer-contact {
    display: flex;
    align-items: center;
    gap: 18px;
    font-weight: 500;
}

.footer-contact img {
    width: 64px;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

.footer-email {
    height: 1rem;
    color: transparent;
    user-select: none;
}

.footer-contact h3,
.footer-social h3 {
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: #ffffff;
}

.footer-social {
    text-align: right;
}

.social-icons {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
}

.social-icons a {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    display: grid;
    place-items: center;
    text-decoration: none;
    transition: transform 0.3s ease, background 0.3s ease;
}

.social-icons svg {
    width: 24px;
    height: 24px;
}

.social-icons a:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.3);
}

.footer-bottom {
    text-align: center;
    margin-top: 28px;
    font-size: 0.9rem;
    letter-spacing: 0.12em;
}

/* 10. RESPONSIVE DESIGN */

/* Tablet y pantallas medianas */
@media (max-width: 1200px) {
    .top-bar {
        padding: 16px 28px;
    }

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

    .footer-social {
        text-align: center;
    }

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

/* Móvil grande */
@media (max-width: 900px) {
    .menu-toggle {
        display: flex;
    }
    
    .top-bar {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 12px;
    }

    .menu-toggle {
        order: 3;
        justify-self: end;
    }

    .brand {
        order: 1;
        justify-self: start;
    }

    .language-switcher {
        order: 2;
        justify-self: center;
    }

    .language-select {
        padding: 6px 14px;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        right: 48px;
        background: #ffffff;
        box-shadow: 0 24px 48px rgba(12, 33, 81, 0.18);
        padding: 24px;
        border-radius: 18px;
        display: none;
        width: clamp(260px, 70vw, 320px);
        max-width: 90vw;
    }

    .main-nav.open {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }

    .has-dropdown {
        position: relative;
        width: 100%;
    }

    .has-dropdown .dropdown {
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        background: #ffffff;
        border-radius: 18px;
        padding: 16px 18px;
        box-shadow: 0 20px 40px rgba(12, 33, 81, 0.18);
        display: none;
        flex-direction: column;
        gap: 12px;
        width: 100%;
        z-index: 12;
    }

    .has-dropdown.open .dropdown {
        display: flex;
    }

    .has-dropdown .dropdown a {
        font-size: 1rem;
        padding: 8px 0;
    }

    .page-content {
        padding: 60px 28px;
    }
}

/* Móvil mediano */
@media (max-width: 700px) {
    .top-bar {
        padding: 14px 22px;
        gap: 16px;
    }

    .brand-text {
        font-size: 0.75rem;
        letter-spacing: 0.08em;
    }

    .language-switcher {
        justify-self: center;
    }

    .language-switcher .language-menu {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }

    .language-select {
        font-size: 0.85rem;
    }

    .page-content {
        padding: 48px 20px;
    }

    .site-footer {
        padding: 32px 24px;
    }
}

/* Móvil pequeño */
@media (max-width: 480px) {
    .main-nav {
        right: 20px;
        left: 20px;
    }

    .language-switcher .language-menu {
        width: min(240px, 90vw);
    }

    .page-content {
        padding: 40px 16px;
    }
}

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

        body {
            font-family: 'Montserrat', Arial, sans-serif;
            min-height: 100vh;
        }

        main {
            min-height: 100vh;
            padding: 0;
            background-image: var(--main-bg-image);
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            background-attachment: fixed;
            background-color: var(--main-bg-color);
        }

        :root {
            --main-bg-image: url('../../../assets/images/photos/quem-somos/departamentos/Rectangle196.png');
            --main-bg-color: #003366;
            --card-bg-image: url('../../../assets/images/photos/quem-somos/departamentos/Group143.png');
            --card-bg-color: white;
            --button-color: #4A9ECC;
            --button-hover-color: #6BB6DD;
        }

        /* ========================================
           SECCIÓN OSCURA - DISCIPULADO
           ======================================== */
        
        .dark-section {
            width: 100%;
            background-color: var(--main-bg-image);
            padding: 60px 20px;
        }

        .section-title {
            text-align: center;
            color: white;
            font-size: 2.6rem;
            font-weight: 800;
            text-transform: uppercase;
            margin-bottom: 40px;
            letter-spacing: 0.08em;
            font-family: 'Montserrat', Arial, sans-serif;
            line-height: 1.8;
        }

        .discipulado-container {
            max-width: 1400px;
            margin: 0 auto;
            background-color: white;
            border-radius: 15px;
            padding: 40px;
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
            
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
            gap: 40px;
        }

        .discipulado-item {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .discipulado-item h3 {
            font-size: clamp(1.1rem, 2vw, 1.3rem);
            font-weight: 700;
            color: var(--section-dark-bg);
            margin-bottom: 10px;
            font-family: 'Montserrat', Arial, sans-serif;
            line-height: 1.8;
        }

        .discipulado-item p {
            font-size: 1.12rem;
            line-height: 1.8;
            color: var(--neutral-700);
            text-align: justify;
            font-family: 'Montserrat', Arial, sans-serif;
        }

            .btn-join {
            display: inline-block;
            padding: 15px 30px;
            background-color: var(--button-color);
            color: white;
            text-decoration: none;
            border-radius: 8px;
            font-weight: 600;
            font-size: 0.95rem;
            text-align: center;
            transition: background-color 0.3s ease;
            font-family: 'Montserrat', Arial, sans-serif;
            line-height: 1.8;
            align-self: center;      /* 🔥 Centra el botón dentro de la columna */
            margin-top: auto;        /* 🔥 Lo empuja hacia abajo */
        }

        .btn-join:hover {
            background-color: var(--button-hover-color);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(74, 158, 204, 0.4);
        }

        /* ========================================
           SECCIÓN DEPARTAMENTOS - CENTRADO VERTICAL
           ======================================== */
        
        .departamentos-section {
            width: 100%;
            background-color: var(--section-dark-bg);
            padding: 60px 20px;
        }

        /* CAMBIO PRINCIPAL: Grid de una sola columna centrada */
        .grid-container {
            max-width: 1400px;
            margin: 0 auto;
            
            /* UNA SOLA COLUMNA - Los contenedores se apilan verticalmente */
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 30px;
        }

        /* Wrapper con ancho completo para mantener la estructura */
        .card-wrapper {
            width: 100%;
            max-width: 1400px;
            padding: 15px;
        }

        /* ========================================
           ESTILOS DE LAS TARJETAS
           ======================================== */
        
        .card {
            background-image: var(--card-bg-image);
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            background-color: var(--card-bg-color);
            
            width: 100%;
            padding: 40px;
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
            position: relative;
            min-height: 350px;
            border-radius: 15px;
            overflow: hidden;
            
            display: grid;
            grid-template-columns: 1fr 300px;
            gap: 40px;
            align-items: start;
        }

        .card-content {
            display: flex;
            flex-direction: column;
            gap: 20px;
            z-index: 2;
        }

        .title {
            font-size: 2.6rem;
            font-weight: 800;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            line-height: 1.8;
            word-wrap: break-word;
            font-family: 'Montserrat', Arial, sans-serif;
            color: var(--navy-900);
        }

        .text-content {
            font-size: 1.2rem;
            line-height: 1.8;
            color: var(--neutral-700);
            text-align: justify;
            max-width: 100%;
            font-family: 'Montserrat', Arial, sans-serif;
        }

        .images-container {
            position: relative;
            display: flex;
            flex-direction: column;
            gap: 15px;
            align-items: center;
            justify-content: center;
            min-height: 300px;
            z-index: 1;
        }

        .image-placeholder {
            background: linear-gradient(135deg, #d0d0d0 0%, #e8e8e8 100%);
            border: 1px solid #bbb;
            flex-shrink: 0;
            position: relative;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            border-radius: 10px;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            cursor: pointer;
            width: 100%;
            max-width: 250px;
            background-color: #f1f1f1;
        }

        /* Imágenes reales */
        .image-placeholder.has-photo {
            background-size: cover;
            background-position: center 15%; /* leve ajuste arriba para evitar cortes sin cambiar tamaño */
            background-repeat: no-repeat;
            background-color: #f1f1f1;
        }

        .image-placeholder.has-photo::before {
            display: none;
        }

        .image-placeholder:hover {
            transform: scale(1.05);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
            z-index: 10;
        }

        .image-placeholder::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 35px;
            height: 35px;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23999" stroke-width="2"><rect x="3" y="3" width="18" height="18" rx="2"/><circle cx="8.5" cy="8.5" r="1.5"/><path d="M21 15l-5-5L5 21"/></svg>') center/contain no-repeat;
        }

        .image-1 {
            width: 100%;
            max-width: 250px;
            height: 150px;
            position: relative;
        }

        .image-2 {
            width: 100%;
            max-width: 250px;
            height: 150px;
            position: relative;
        }

        .image-3 {
            width: 100%;
            max-width: 250px;
            height: 180px;
            position: relative;
        }

        /* ========================================
           MEDIA QUERIES - RESPONSIVE
           ======================================== */
        
        @media (max-width: 1200px) {
            .discipulado-container {
                grid-template-columns: 1fr;
            }
        }
        
        @media (max-width: 1024px) {
            .section-title {
                font-size: 2.6rem;
            }
            
            .card {
                padding: 35px;
                grid-template-columns: 1fr 250px;
                gap: 30px;
                min-height: 350px;
            }

            .title {
                font-size: 2.2rem;
            }

            .text-content {
                font-size: 1.12rem;
            }

            .images-container {
                min-height: 300px;
            }

            .image-1, .image-2 {
                max-width: 220px;
                height: 130px;
            }

            .image-3 {
                max-width: 220px;
                height: 150px;
            }
        }

        @media (max-width: 700px) {
            main {
                padding: 0;
            }
            
            .dark-section, .departamentos-section {
                padding: 40px 15px;
            }
            
            .section-title {
                font-size: 2.2rem;
                margin-bottom: 30px;
            }
            
            .discipulado-container {
                padding: 25px;
                grid-template-columns: 1fr;
                gap: 30px;
            }
            
            .discipulado-item h3 {
                font-size: clamp(1.1rem, 2vw, 1.3rem);
            }
            
            .discipulado-item p {
                font-size: 1.05rem;
            }

            .card-wrapper {
                padding: 10px;
            }

            .card {
                padding: 25px 20px;
                min-height: auto;
                grid-template-columns: 1fr;
                gap: 20px;
                border-radius: 10px;
            }

            .title {
                font-size: 2.2rem;
            }

            .text-content {
                font-size: 1.12rem;
            }

            .card-content {
                gap: 15px;
            }

            .images-container {
                flex-direction: row;
                flex-wrap: wrap;
                gap: 10px;
                min-height: auto;
            }

            .image-1, .image-2, .image-3 {
                width: 150px;
                max-width: 150px;
                aspect-ratio: 3 / 4;
            }
        }
