/* ============================================
   RESET & VARIABLES
   ============================================ */
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --color-de-fondo: white;
    --color-principal: #1c73a1;
    --color-azul-oscuro: #364450;
    --color-secundario: #606060;
    --font: 'Montserrat', sans-serif;
    --color-main-gris: #f6f8fb;
}

/* ============================================
   BASE
   ============================================ */
body {
    background-color: var(--color-de-fondo);
    color: var(--color-principal);
    font-family: var(--font);
    overflow-x: hidden;
    min-height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
}

body::-webkit-scrollbar { display: none; }

main { flex: 1; }

hr {
    color: var(--color-secundario);
    background-color: var(--color-secundario);
}

img { max-width: 100%; height: auto; }

/* ============================================
   HEADER & BARRA DE REDES
   ============================================ */
#barraSola {
    display: flex;
    width: 100vw;
    height: 4vh;
}

.menuRedes {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 3vw;
    width: 100vw;
    height: 3vh;
}

.menuRedes ul {
    display: flex;
    margin-right: 1vw;
    gap: 6px;
}

.menuRedes li { list-style: none; }

.menuRedes a {
    color: var(--color-principal);
    text-decoration: none;
}

/* ============================================
   BARRA PRINCIPAL DEL MENÚ
   ============================================ */
#menuBar {
    display: flex;
    align-items: center;
    font-weight: 900;
    width: 100vw;
    padding: 0 2vw;
    position: relative;
}

.logo {
    width: 35vw;
    height: auto;
    max-width: 500px;
}

/* ============================================
   HAMBURGUESA (oculta en desktop)
   ============================================ */
.hamburguesa {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
    z-index: 1001;
}

.hamburguesa span {
    display: block;
    width: 26px;
    height: 2px;
    background-color: var(--color-principal);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Animación X al abrir */
.hamburguesa.abierto span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburguesa.abierto span:nth-child(2) {
    opacity: 0;
}
.hamburguesa.abierto span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   NAVEGACIÓN DESKTOP
   ============================================ */
#menuSuperior {
    display: flex;
    margin-left: auto;
    flex: 1;
    min-width: 0;
}

#menuSuperior > ul {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    width: 100%;
    flex-wrap: nowrap;
    list-style: none;
}

#menuSuperior > ul > li {
    list-style: none;
    flex-shrink: 1;
    text-align: center;
}

#menuSuperior > ul > li > a {
    text-decoration: none;
    color: var(--color-secundario);
    white-space: nowrap;
    font-size: clamp(0.75rem, 0.9vw, 1rem);
    font-weight: 900;
}

/* ============================================
   DROPDOWN / SUBMENÚ DESKTOP
   ============================================ */
.nav__item--dropdown {
    position: relative;
}

.nav__submenu {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    background-color: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 200px;
    z-index: 200;
    display: block;
    list-style: none;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.nav__submenu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid white;
}

.nav__item--dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 12px;
}

.nav__item--dropdown:hover .nav__submenu {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.nav__submenu li { width: 100%; }

.nav__submenu li a {
    display: block;
    padding: 10px 20px;
    color: var(--color-secundario);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
    text-align: left;
}

.nav__submenu li a:hover {
    background-color: var(--color-main-gris);
    color: var(--color-principal);
}

/* ============================================
   BARRA SEPARADORA
   ============================================ */
.contenedorBarraSeparadora {
    width: 100%;
    height: 4vh;
}

.separadorImg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================
   HERO / SECCIÓN SUPERIOR
   ============================================ */
#contenedorSuperior {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 3vw;
    width: 100vw;
    height: 80vh;
}

#contenedorTextoArriba {
    display: flex;
    flex-direction: column;
    text-align: start;
    width: 45vw;
}

#textoCarruselEncabezado { font-size: 4.5vw; }

#textoCarruselNormal {
    font-size: 1.3vw;
    color: var(--color-secundario);
    padding-top: 2.5vh;
}

.negritas { font-weight: bold; }

#contenedorSuperiorImagenes {
    width: 50vw;
    align-items: center;
}

#contenedorBoton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-top: 4vh;
    width: 18vw;
}

#contenedorBoton p {
    color: white;
    font-size: 1.4vw;
    font-weight: bold;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    white-space: nowrap;
}

#contenedorBoton a {
    display: block;
    width: 100%;
}

#imagenBoton {
    display: block;
    width: 100%;
    height: auto;
}

/* ============================================
   EJES RECTORES
   ============================================ */
#contenedorSegundoEspacio {
    margin: 3vh 3vw 5vh;
    display: grid;
}

.contenedorCartas {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2%;
    justify-items: center;
}

.carta { border-radius: 15px; }

.tituloSeccion {
    font-size: 2vw;
    font-weight: bold;
    text-align: center;
    margin-bottom: 2vh;
    margin-top: 4vh;
    color: var(--color-principal);
}

/* ============================================
   NOTICIAS / FEED
   ============================================ */
.noticiasFeed {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 10vh 0;
    gap: 4vw;
}

/* ============================================
   BANNER
   ============================================ */
.banner {
    width: 100vw;
    height: auto;
    padding: 5%;
}

.banner img {
    width: 100%;
    border-radius: 10px;
}

/* ============================================
   CARRUSEL DE COLEGIOS
   ============================================ */
.contenedorCarrusel2 {
    width: 90vw;
    height: 50vh;
    margin: 4vh auto 0;
    display: flex;
    overflow-x: hidden;
}

.contenedorCarrusel2::-webkit-scrollbar { display: none; }

.trackCarrusel2 {
    display: flex;
    width: max-content;
    animation: spin2 100s infinite linear;
}

.carrusel2 {
    display: flex;
    align-items: center;
    gap: 1.5vw;
    padding-right: 1.5vw;
}

.cartasCarrusel2 {
    width: 30vw;
    height: 35vh;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cartasCarrusel2 img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes spin2 {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ============================================
   CARRUSEL DE PATROCINADORES
   ============================================ */
.contenedorCarrusel {
    width: 90vw;
    height: 50vh;
    margin: 4vh auto;
    display: flex;
    overflow-x: hidden;
}

.contenedorCarrusel::-webkit-scrollbar { display: none; }

.contenedorCarrusel {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.carrusel {
    display: flex;
    align-items: center;
    gap: 2vw;
    padding-right: 2vw;
    animation: spin 35s infinite linear;
}

.cartasCarrusel {
    min-width: calc((100vw - 4vw) / 2);
    height: 85%;
    flex-shrink: 0;
}

.cartasCarrusel img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes spin {
    from { translate: 0; }
    to   { translate: -100%; }
}

/* ============================================
   ESTADÍSTICAS
   ============================================ */
.contenedorinfoAbajo {
    background-image: url(../public/FONDO-DATOS-COLEGIOS-FEMCIC.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    width: 100vw;
    height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contenedorInfo {
    display: flex;
    justify-content: space-around;
    width: 80%;
}

.contenederTexto {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.infoEncabezado {
    font-size: 3.5em;
    font-weight: 800;
    color: cornflowerblue;
}

.infoTexto {
    font-size: 1.2em;
    color: whitesmoke;
}

/* ============================================
   CONTACTO
   ============================================ */
.inicioContacto {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 5%;
    gap: 3vw;
}

.textoContacto {
    display: flex;
    flex-direction: column;
    gap: 5vh;
}

.textoContacto h2 {
    font-size: 3em;
    font-weight: 800;
}

.textoContacto p {
    color: var(--color-secundario);
    font-size: 1.5em;
    font-weight: 600;
}

.form-container { max-width: 850px; }

form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

input, textarea {
    width: 100%;
    border: none;
    background: #f4f4f4;
    padding: 18px 20px;
    font-size: 16px;
    color: #333;
    outline: none;
    font-family: var(--font);
}

input::placeholder, textarea::placeholder { color: #b5b5b5; }

textarea {
    resize: vertical;
    min-height: 180px;
}

.btnformContacto {
    align-self: flex-end;
    background: #0078d7;
    color: white;
    border: none;
    padding: 16px 40px;
    font-size: 18px;
    cursor: pointer;
    transition: .3s;
    font-family: var(--font);
}

.contenedor-mapa {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 400px;
    margin: 0 auto 5vh;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.contenedor-mapa iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* ============================================
   NOSOTROS
   ============================================ */
#historia {
    font-size: 2em;
    padding-bottom: 1vh;
    font-weight: 800;
}

#mainNosotros {
    background-color: #f6f8fb;
    color: var(--color-secundario);
    padding: 10vh 3vw 10vh;
}

.contenedorNosotrosSuperior { width: 100%; }

.textoJustificado {
    width: 100%;
    text-align: justify;
    font-size: clamp(0.98rem, 1vw, 2rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.textoJustificado span { font-weight: 800; }

.nosotrosParte1 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3vw;
    align-items: stretch;
}

.nosotrosParte1 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nosotrosParte2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3vw;
    margin: 10vh 0 10vh;
}

.textoNormalVM { text-align: justify; }

.contenedorM {
    display: grid;
    grid-template-columns: 0.5fr 2fr;
    background-color: #edf2f8;
    padding: 5vh 2vw;
    border-radius: 30px;
}

.contenedorV {
    display: grid;
    grid-template-columns: 0.5fr 2fr;
    background-color: #f0f4f3;
    padding: 5vh 2vw;
    border-radius: 30px;
}

.textoVM { color: var(--color-azul-oscuro); }

.VM {
    font-size: 2em;
    font-weight: 900;
    margin-bottom: 2vh;
}

/* ============================================
   CONSEJO
   ============================================ */

/* ============================================
   CONSEJO (PLANTILLA ADAPTATIVA)
   ============================================ */
.conetenedorFondoTarjetasConsejo {
    width: 100%;
    min-height: 70vh; /* Asegura un buen alto visual en desktop */
    background-image: url(../public/TARJETA-FONDO-FEMCIC.jpg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6vh 2vw;
    gap: 3vh;
    color: var(--color-azul-oscuro);
    text-align: center;
}

.imgConsejo {
    width: 15vw;
    min-width: 220px;
    max-width: 280px;
    height: auto;
    object-fit: contain;
}

.textoConsejo {
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
    justify-content: center;
    gap: 1vh;
    width: 100%;
    max-width: 800px;
    padding: 0 2vw;
}

.consejoNombreNegritas {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-principal);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.consejoApellidoNegritas {
    font-size: 2.6rem;
    font-weight: 600;
    line-height: 1.2;
}

.parrafoContexto {
    font-size: 1.3rem;
    color: var(--color-secundario);
    margin-top: 0.5vh;
}

.barraConsejo {
    width: 100%;
    height: 4px;
    background-color: var(--color-principal);
    border-radius: 2px;
    margin: 1vh auto;
}

.telCorreoConsejo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1vw;
    width: 100%;
    max-width: 700px;
}

.textImgTC {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 600;
}

.TCImg {
    width: 24px; /* Un tamaño fijo evita que desaparezca en celular */
    height: 24px;
    object-fit: contain;
}

/* ============================================
   KIT DE INTEGRACIÓN
   ============================================ */
.kitIntegracion {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 5vh 3vw;
    gap: 2vh;
}

.imagenesKit { width: 100%; height: auto; }

/* ============================================
   ESTATUTO
   ============================================ */
.contenedorEstatutoFondo {
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url(../public/FONDO-DATOS-COLEGIOS-FEMCIC.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 80vh;
}

.tituloEstatuto {
    padding: 5vh 2vw;
    font-size: 2em;
    font-weight: 800;
    text-align: center;
}

.estatutoDescargar {
    background-color: var(--color-principal);
    color: white;
    padding: 2vh 2vw;
    text-decoration: none;
    border: none;
    border-radius: 10px;
    font-family: var(--font);
    font-weight: 700;
}

/* ============================================
   CALENDARIO
   ============================================ */
.contenedorCalendario {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3vw;
}

.contenedorCalendario img {
    width: 100%;
    height: auto;
}

/* ============================================
   REGIONES
   ============================================ */
video {
    align-content: center;
    justify-self: center;
    max-width: 80%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* ============================================
   REVISTAS
   ============================================ */
.encabezadoRevistas {
    font-size: 4rem;
    text-align: center;
    padding: 10vh 2vw;
}

.encabezadoRevistas span { font-weight: 800; }

.gridRevistas {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3vw;
    width: 100%;
    padding: 0 10vw 10vh;
}

.gridRevistas img {
    width: 100%;
    height: auto;
}

.cartaRevista {
    display: flex;
    flex-direction: column;
    gap: 6vh;
}

.gridTextoR {
    display: grid;
    grid-template-columns: 1fr 4fr;
    margin: 0 0.5vw;
    text-align: center;
}

.numeroRevista {
    background-color: var(--color-azul-oscuro);
    color: white;
    padding: 1vh 1vw;
    font-size: 3rem;
    font-weight: 800;
}

.textoLeerR {
    color: white;
    background-color: var(--color-principal);
    font-size: 1.5rem;
    padding-right: 1.5vw;
    align-content: center;
}

#ultimaRevista { grid-column: 2; }

.linkTexto { text-decoration: none; }

.mainColorGris {
    background-color: var(--color-main-gris);
    padding-bottom: 10vh;
}

/* ============================================
   SERVICIOS
   ============================================ */
.contenedorTodo {
    width: 100vw;
    display: grid;
    grid-template-columns: 4fr 1fr;
    align-items: start;
}

.contenedorizquierdaLibro {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5vh;
    padding: 4vh 3vw;
}

.contenedorAbajoDeLibro {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 2fr;
    align-items: center;
    padding: 5vh 3vw;
    gap: 2vw;
}

.contenedorimgArenceles { width: 30vw; }
.contenedorimgArenceles img, .contendeorImgAranceles2 img { width: 100%; }

.textoAranceles {
    display: flex;
    flex-direction: column;
    gap: 2vh;
}

.textoAranceles h2 { font-size: 2.5em; }

.textoAranceles p {
    color: var(--color-secundario);
    font-size: 1.5em;
}

.imagenesEncabezadoPie {
    display: flex;
    flex-direction: column;
    gap: 60vh;
    height: fit-content;
    align-self: flex-start;
    align-items: center;
    padding: 2vh 1vw;
    position: sticky;
    top: 2vh;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    display: grid;
    grid-template-columns: 1fr 3fr 1fr;
    align-items: center;
    justify-items: center;
    background-color: var(--color-azul-oscuro);
    width: 100%;
    height: 28vh;
    padding: 0 2vw;
}

.contenedorGeneralInfo {
    color: white;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4vw;
}

.encabezadoInfo {
    font-size: 1.3vw;
    font-weight: bolder;
    margin: 5vh 0 3.5vh;
}

.linkInfo { color: white; }
.linkInfo ul { list-style: none; }
.linkInfo a { text-decoration: none; color: white; }
.linkInfo li { font-size: 0.8vw; margin-bottom: 2vh; }

#logoPie { max-width: 200px; width: 100%; }

#contenedormenuRedesPie ul {
    display: flex;
    margin-top: 12vh;
    gap: 1vw;
}

#contenedormenuRedesPie li { list-style: none; }
#contenedormenuRedesPie a { text-decoration: none; }

/* ============================================
   BOTONES VARIOS
   ============================================ */
#btnContactanos {
    color: white;
    background-color: var(--color-principal);
    font-weight: bolder;
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
}

/* ============================================
   RESPONSIVE — TABLET (max 900px)
   ============================================ */
@media (max-width: 900px) {

    /* Header */
    #barraSola { height: 2vh; }
    .menuRedes { height: auto; padding: 6px 16px; }

    /* ESTO CENTRA EL LOGO Y DEJA LA HAMBURGUESA A LA IZQ */
    #menuBar {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        padding: 15px 4vw;
    }

    .hamburguesa {
        display: flex;
        justify-self: start; 
        grid-column: 1;
        z-index: 1002;
        margin-left: 0;
    }

    .logo {
        justify-self: center; 
        grid-column: 2;
        width: auto;
        height: 75px; 
        max-width: 320px; 
    }

    #menuSuperior {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: white;
        z-index: 1000;
        flex-direction: column;
        justify-content: flex-start; 
        align-items: stretch;
        overflow-y: auto;
        padding-top: 110px; 
    }

    #menuSuperior.abierto { display: flex; }

    #menuSuperior > ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
        padding: 20px 0;
    }

    #menuSuperior > ul > li {
        width: 100%;
        border-bottom: 1px solid var(--color-main-gris);
    }

    #menuSuperior > ul > li > a {
        display: block;
        padding: 16px 24px;
        font-size: 1rem;
        white-space: normal;
        text-align: left;
        color: var(--color-azul-oscuro);
    }
    
    #menuSuperior > ul > li > a:active,
    #menuSuperior > ul > li > a:hover {
        background-color: var(--color-main-gris);
        color: var(--color-principal);
    }

    .nav__item--dropdown::after { display: none; }

    /* RESET COERCITIVO DEL SUBMENÚ EN MÓVIL */
    .nav__submenu {
        position: static !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        transform: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        min-width: unset !important;
        background-color: #f6f8fb !important;
        display: none;
        transition: none !important;
    }

    .nav__submenu::before { display: none !important; }

    .nav__item--dropdown.submenu-abierto .nav__submenu {
        display: block !important;
    }

    /* MATA EL EFECTO HOVER DE ESCRITORIO QUE DESPLAZABA LOS TEXTOS FUERA DE LA PANTALLA */
    #menuSuperior .nav__item--dropdown:hover .nav__submenu {
        position: static !important;
        transform: none !important;
        visibility: visible !important;
        opacity: 1 !important;
        display: none; 
    }
    #menuSuperior .nav__item--dropdown.submenu-abierto:hover .nav__submenu {
        display: block !important;
    }

    /* ESTADO NORMAL DE LOS ENLACES INTERNOS */
    #menuSuperior .nav__submenu li a {
        display: block !important;
        padding: 14px 36px !important;
        font-size: 0.95rem !important;
        color: #364450 !important; 
        background-color: #f6f8fb !important; 
        border-bottom: 1px solid #e0e6ef !important;
        white-space: normal !important; 
        transition: none !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* HOVER INDIVIDUAL REPARADO (RESPETA LA VISIBILIDAD) */
    #menuSuperior .nav__submenu li a:hover,
    #menuSuperior .nav__submenu li a:active,
    #menuSuperior .nav__submenu li:hover > a {
        background-color: #1c73a1 !important; 
        color: #ffffff !important; 
    }

    .nav__item--dropdown > a::after {
        content: ' ▾';
        font-size: 0.75rem;
        color: var(--color-principal);
    }

    /* Hero */
    #contenedorSuperior {
        flex-direction: column;
        height: auto;
        padding: 4vh 5vw;
        gap: 4vh;
    }

    #contenedorTextoArriba {
        width: 100%;
        text-align: center;
        align-items: center;
    }

    #textoCarruselEncabezado { font-size: 7vw; }
    #textoCarruselNormal { font-size: 3.5vw; }

    #contenedorSuperiorImagenes { width: 85%; }

    #contenedorBoton {
        width: 45vw;
        margin-top: 3vh;
    }

    #contenedorBoton p { font-size: 3.5vw; }

    /* Ejes rectores */
    .contenedorCartas {
        grid-template-columns: repeat(3, 1fr);
        justify-content: center;
    }

    /* Centra la última fila si queda con menos de 3 */
    .contenedorCartas img:last-child:nth-child(3n - 1) {
        grid-column: 3;
    }
    .contenedorCartas img:last-child:nth-child(3n - 2) {
        grid-column: 1;
    }

    .tituloSeccion { font-size: 4vw; }

    /* Noticias */
    .noticiasFeed {
        flex-direction: column;
        align-items: center;
        padding: 5vh 4vw;
        gap: 4vh;
    }

    .noticiasFeed iframe {
    
        max-width: 480px;
        min-width: 280px;
        display: block;
        margin: 0 auto !important;
    }

    .noticiasFeed .instagram-media {
        width: 100% !important;
        max-width: 480px;
        min-width: 280px;
        margin: 0 auto !important;
    }

    /* Carruseles */
    .cartasCarrusel2 { width: 60vw; height: 25vh; }
    
    /* Patrocinadores más pequeños en Tablet */
    .contenedorCarrusel { height: 20vh; margin: 2vh auto; }

    .carrusel {
        gap: 6vw;
        padding-right: 6vw;
    }

    .cartasCarrusel {
        min-width: 35vw;
        max-width: 35vw;  /* ← evita que se expandan y solapen */
        height: 100%;
    }

    /* Stats */
    .contenedorinfoAbajo { height: auto; padding: 5vh 3vw; }
    .contenedorInfo { flex-direction: column; gap: 3vh; align-items: center; }
    .infoEncabezado { font-size: 2.5em; }
    .infoTexto { font-size: 1em; }

    /* Contacto */
    .inicioContacto { grid-template-columns: 1fr; gap: 5vh; }
    .textoContacto h2 { font-size: 2em; }
    .textoContacto p { font-size: 1.1em; }
    .btnformContacto { align-self: stretch; text-align: center; }

    /* Mapa */
    .contenedor-mapa { height: 280px; }

    /* Nosotros */
    #mainNosotros { padding: 6vh 5vw; }
    .nosotrosParte1 {
        grid-template-columns: 1fr;
        gap: 3vh;
    }
    .nosotrosParte1 img { max-height: 300px; object-fit: cover; }
    .nosotrosParte2 {
        grid-template-columns: 1fr;
        margin: 5vh 0;
        gap: 3vh;
    }
    .contenedorM, .contenedorV {
        grid-template-columns: 80px 1fr;
        padding: 3vh 4vw;
    }
    .VM { font-size: 1.5em; }

    /* Revistas */
    .encabezadoRevistas { font-size: 2.5rem; padding: 5vh 4vw; }
    .gridRevistas {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 4vw 6vh;
        gap: 4vw;
    }
    #ultimaRevista { grid-column: auto; }

    /* Servicios */
    .contenedorTodo { grid-template-columns: 1fr; }
    .imagenesEncabezadoPie { display: none; }
    .contenedorimgArenceles { width: 70vw; }
    .contenedorAbajoDeLibro {
        grid-template-columns: 1fr;
        padding: 4vh 5vw;
        gap: 3vh;
    }
    .textoAranceles h2 { font-size: 1.8em; }
    .textoAranceles p { font-size: 1.1em; }

    /* Footer */
    footer {
        grid-template-columns: 1fr;
        height: auto;
        padding: 5vh 6vw;
        gap: 4vh;
        text-align: center;
    }

    .contenedorGeneralInfo {
        grid-template-columns: 1fr;
        gap: 3vh;
        text-align: left;
    }

    .encabezadoInfo { font-size: 1rem; margin: 2vh 0 1.5vh; }
    .linkInfo li { font-size: 0.85rem; }

    #logoPie { margin: 0 auto; }

    #contenedormenuRedesPie ul {
        margin-top: 0;
        justify-content: center;
        gap: 12px;
    }

    /* Video regiones */
    video { max-width: 100%; }

/* Ajustes Consejo/Presidente en Tablet */
    .conetenedorFondoTarjetasConsejo { min-height: 55vh; padding: 5vh 4vw; }
    .consejoApellidoNegritas { font-size: 2rem; }
    .parrafoContexto { font-size: 1.1rem; }
    .telCorreoConsejo { flex-direction: column; }
}

/* ============================================
   RESPONSIVE — MÓVIL (max 480px)
   ============================================ */
@media (max-width: 480px) {

    /* LOGO MÁS GRANDE EN MÓVIL */
    .logo {
        width: auto;
        height: 55px; 
        max-width: 250px; 
    }

    #textoCarruselEncabezado { font-size: 8.5vw; }
    #textoCarruselNormal { font-size: 4vw; }
    #contenedorBoton { width: 55vw; }
    #contenedorBoton p { font-size: 4vw; }

    .contenedorCartas {
        grid-template-columns: repeat(2, 1fr);
        justify-content: center;
    }

/* Si el último queda solo en fila de 2, lo centra */
    .contenedorCartas img:last-child:nth-child(odd) {
        grid-column: 1 / -1;
        max-width: 50%;
        justify-self: center;
    }

    .tituloSeccion { font-size: 5vw; }

    .cartasCarrusel2 { width: 80vw; height: 20vh; }

    /* Patrocinadores más pequeños en Móvil */
    .contenedorCarrusel {
    height: 15vh;
    }

    .carrusel {
        gap: 8vw;
        padding-right: 8vw; 
    }

    .cartasCarrusel {
        min-width: 40vw;
        max-width: 40vw;   /* ← esto evita el solapamiento */
        height: 100%;
    }

    .encabezadoRevistas { font-size: 1.8rem; }
    .gridRevistas { grid-template-columns: 1fr; padding: 0 6vw 5vh; }
    .numeroRevista { font-size: 2rem; }
    .textoLeerR { font-size: 1rem; }

    .contenedorimgArenceles { width: 90vw; }

    .infoEncabezado { font-size: 2em; }

    .tituloEstatuto { font-size: 1.5em; }
    .contenedorEstatutoFondo { height: 50vh; }

    .VM { font-size: 1.2em; }
    .contenedorM, .contenedorV {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .contenedorM img, .contenedorV img {
        width: 60px;
        margin: 0 auto 2vh;
    }

    /* Ajustes Consejo/Presidente en Móvil */
    .conetenedorFondoTarjetasConsejo { min-height: auto; padding: 6vh 5vw; }
    .consejoNombreNegritas { font-size: 1.2rem; }
    .consejoApellidoNegritas { font-size: 1.7rem; }
    .parrafoContexto { font-size: 1rem; }
    .textImgTC { flex-direction: column; gap: 6px; font-size: 0.95rem; }
}