
/* 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;
    }
}





/* ============================================
   SECCIÓN DE MISIONARIOS
   ============================================ */
.missionaries-section {
    padding: 64px 24px 128px;
    background-color: #ffffff;
    position: relative;
    min-height: 100vh;
    height: auto;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    padding: 24px 32px;
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.missionaries-title {
    background-color: var(--navy-700);
    margin-bottom: 80px;
}

.title-overlay {
    position: absolute;
    inset: 0;
    background-color: #07345D;
    z-index: 1;
}

.section-title h2 {
    position: relative;
    z-index: 10;
    color: #ffffff;
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    font-family: 'Montserrat', Arial, sans-serif;
}

/* Grid de Misionarios */
.missionaries-grid {
    display: flex;
    justify-content: center;
    align-items: stretch; /* asegura alturas consistentes */
    gap: 80px;
    max-width: 1200px;
    margin: 32px auto 0;
}

.missionary-card {
    text-align: center;
    flex: 1 1 0;
    max-width: 520px;
}

.missionary-image {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4; /* proporción uniforme para todas las fotos */
    overflow: hidden;
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    background-color: var(--neutral-200);
    margin-bottom: 24px;
}

.missionary-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top; /* Prioriza el rostro en el recorte */
}

.placeholder-image {
    background: linear-gradient(135deg, var(--neutral-300) 0%, var(--neutral-200) 100%);
}

.missionary-card h3 {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    font-weight: 700;
    color: var(--navy-900);
    margin-bottom: 8px;
    font-family: 'Montserrat', Arial, sans-serif;
    line-height: 1.8;
}

.missionary-card p {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--neutral-700);
    font-family: 'Montserrat', Arial, sans-serif;
    line-height: 1.8;
}

/* Título de Diretoria Nacional - Superpuesto */
.directoria-title-wrapper {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -48px;
    z-index: 20;
}

.directoria-title {
    background-color: var(--neutral-900);
    min-width: 400px;
    box-shadow: 0 24px 54px #0C1D2C;
}

.directoria-title .title-overlay {
    background-color: #0C1D2C;
}

/* ============================================
   SECCIÓN DE DIRETORIA NACIONAL
   ============================================ */
.directoria-section {
    padding: 112px 24px 80px;
    background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-700) 100%);
}

/* ============================================
   CARRUSEL
   ============================================ */
.carousel-wrapper {
    position: relative;
    max-width: 100%;
    height: 50vh;
    margin: 0 auto;
}

.carousel-container {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 24px;
    height: 50vh;
    padding: 0 64px;
    position: relative;
}

.carousel-card {
    transition: all 700ms cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.carousel-card-inner {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.3);
    background-color: #ffffff;
}

.carousel-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top; /* Muestra la parte superior del retrato */
    transition: transform 700ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ajuste tonal para Willington Toro, alineado con el retrato de Pr. Franklin */
.carousel-card img[src*="Willington Toro"] {
    filter: saturate(0.82) contrast(1.05) brightness(0.94);
}

.carousel-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, var(--navy-900) 0%, transparent 100%);
    padding: 24px;
    padding-top: 80px;
    transition: opacity 700ms cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-card-content h3 {
    color: #ffffff;
    text-align: center;
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    font-weight: 700;
    margin-bottom: 4px;
    font-family: 'Montserrat', Arial, sans-serif;
    line-height: 1.8;
}

.carousel-card-content p {
    color: var(--neutral-200);
    text-align: center;
    font-size: 1.05rem;
    font-family: 'Montserrat', Arial, sans-serif;
    line-height: 1.8;
}

/* Estados del carrusel */
.carousel-card.center {
    z-index: 10;
}

/* ============================================
   CONTROLES DEL CARRUSEL
   ============================================ */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    box-shadow: 0 8px 24px #07345D;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--navy-900);
    z-index: 50;
}

.carousel-control:hover {
    background-color: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

.carousel-control.prev {
    left: 0;
}

.carousel-control.next {
    right: 0;
}

/* ============================================
   INDICADORES DEL CARRUSEL
   ============================================ */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator:hover {
    background-color: rgba(255, 255, 255, 0.6);
}

.carousel-indicator.active {
    width: 32px;
    border-radius: 999px;
    background-color: #ffffff;
}

/* ============================================
   RESPONSIVE DESIGN - MEDIA QUERIES
   ============================================ */

/* Tablets grandes y Desktop pequeño (hasta 1024px) */
@media screen and (max-width: 1024px) {
    .missionaries-section {
        padding: 48px 20px 100px;
    }

    .missionaries-grid {
        gap: 48px;
        max-width: 900px;
    }

    .missionary-image {
        height: 45vh;
    }

    .directoria-title {
        min-width: 320px;
    }

    .carousel-container {
        padding: 0 48px;
    }

    .carousel-control {
        width: 48px;
        height: 48px;
    }
}

/* Tablets (hasta 768px) */
@media screen and (max-width: 768px) {
    .missionaries-section {
        padding: 40px 16px 80px;
    }

    .missionaries-title {
        margin-bottom: 60px;
    }

    .section-title {
        padding: 20px 24px;
        border-radius: 12px;
    }

    .section-title h2 {
        font-size: clamp(2.2rem, 5vw, 2.6rem);
        letter-spacing: 0.08em;
    }

    /* Grid de misioneros en columna */
    .missionaries-grid {
        flex-direction: column;
        gap: 40px;
        align-items: center;
    }

    .missionary-card {
        max-width: 400px;
        width: 100%;
    }

    .missionary-image {
        height: 50vh;
        min-height: 280px;
    }

    /* Título de directoria */
    .directoria-title-wrapper {
        bottom: -40px;
    }

    .directoria-title {
        min-width: 280px;
    }

    .directoria-section {
        padding: 88px 16px 60px;
    }

    /* Carrusel */
    .carousel-wrapper {
        height: 45vh;
        min-height: 320px;
    }

    .carousel-container {
        height: 45vh;
        padding: 0 32px;
        gap: 16px;
    }

    .carousel-card-content {
        padding: 16px;
        padding-top: 60px;
    }

    .carousel-card-content h3 {
        font-size: clamp(1rem, 3vw, 1.2rem);
    }

    .carousel-card-content p {
        font-size: 0.8rem;
    }

    .carousel-control {
        width: 44px;
        height: 44px;
    }

    .carousel-indicators {
        margin-top: 32px;
        gap: 6px;
    }

    .carousel-indicator {
        width: 10px;
        height: 10px;
    }

    .carousel-indicator.active {
        width: 28px;
    }
}

/* Móviles (hasta 480px) */
@media screen and (max-width: 480px) {
    .missionaries-section {
        padding: 32px 12px 60px;
    }

    .missionaries-title {
        margin-bottom: 48px;
    }

    .section-title {
        padding: 16px 20px;
        border-radius: 10px;
    }

    .section-title h2 {
        font-size: clamp(2rem, 5vw, 2.4rem);
        letter-spacing: 0.08em;
    }

    .missionaries-grid {
        gap: 32px;
    }

    .missionary-card {
        max-width: 100%;
    }

    .missionary-image {
        height: 50vh;
        min-height: 250px;
        border-radius: 12px;
        margin-bottom: 16px;
    }

    .missionary-card h3 {
        font-size: clamp(1rem, 4vw, 1.1rem);
        margin-bottom: 6px;
    }

    .missionary-card p {
        font-size: 0.9rem;
    }

    /* Título de directoria */
    .directoria-title-wrapper {
        bottom: -32px;
        width: calc(100% - 24px);
        left: 12px;
        transform: none;
    }

    .directoria-title {
        min-width: auto;
        width: 100%;
    }

    .directoria-section {
        padding: 72px 12px 48px;
    }

    /* Carrusel en móvil */
    .carousel-wrapper {
        height: auto;
        min-height: 400px;
    }

    .carousel-container {
        height: auto;
        min-height: 400px;
        padding: 0 16px;
        gap: 12px;
    }

    .carousel-card-content {
        padding: 12px 16px;
        padding-top: 50px;
    }

    .carousel-card-content h3 {
        font-size: 1rem;
        margin-bottom: 2px;
    }

    .carousel-card-content p {
        font-size: 0.75rem;
    }

    /* Controles del carrusel más pequeños */
    .carousel-control {
        width: 40px;
        height: 40px;
        box-shadow: 0 4px 16px rgba(7, 52, 93, 0.4);
    }

    .carousel-control.prev {
        left: 4px;
    }

    .carousel-control.next {
        right: 4px;
    }

    .carousel-indicators {
        margin-top: 24px;
        gap: 5px;
    }

    .carousel-indicator {
        width: 8px;
        height: 8px;
    }

    .carousel-indicator.active {
        width: 24px;
    }
}

/* Móviles pequeños (hasta 360px) */
@media screen and (max-width: 360px) {
    .missionaries-section {
        padding: 24px 8px 48px;
    }

    .section-title {
        padding: 12px 16px;
    }

    .section-title h2 {
        font-size: 1.2rem;
    }

    .missionary-image {
        height: 50vh;
        min-height: 220px;
    }

    .carousel-wrapper {
        min-height: 350px;
    }

    .carousel-container {
        min-height: 350px;
        padding: 0 12px;
    }

    .carousel-control {
        width: 36px;
        height: 36px;
    }

    .directoria-section {
        padding: 64px 8px 40px;
    }
}

