/* ------------------------------------------------------------------
   Portal ITESCO Campus Coatzacoalcos — estilos basados en ITESCO
   ------------------------------------------------------------------ */

:root {
    --azul-tecnm: #1b396a;
    --azul-tecnm-claro: #2b508c;
    /* Guinda oficial del Gobierno de México, tomado de coacalco.tecnm.mx */
    --guinda: #611232;
    --guinda-claro: #7a1a40;
    --gris-fondo: #efefef;
    --texto: #333;
    --ancho-contenido: 85%;
}

body {
    font-family: Roboto, "Open Sans", "Segoe UI", Arial, sans-serif;
    color: var(--texto);
    overflow-x: hidden;
}

a {
    text-decoration: none;
}

/* ---------- Barra guinda de gob.mx ---------- */
.barra-gobmx {
    background-color: var(--guinda);
    min-height: 62px;
    display: flex;
    align-items: center;
    padding: .5rem 0;
}

.barra-gobmx .marca-gobmx img {
    height: 34px;
    width: auto;
    display: block;
}

.barra-gobmx .enlaces-gobmx {
    list-style: none;
    display: flex;
    align-items: center;
    gap: .35rem;
    margin: 0;
    padding: 0;
}

.barra-gobmx .enlaces-gobmx a {
    color: #fff;
    font-size: .88rem;
    padding: .4rem .85rem;
    display: inline-flex;
    align-items: center;
    border-radius: 3px;
}

.barra-gobmx .enlaces-gobmx a:hover {
    background: rgba(255, 255, 255, .14);
}

/* ---------- Cabecera con plecas y accesibilidad ---------- */
.cabecera {
    background: #fff;
    padding: .85rem 1rem;
    border-bottom: 1px solid #e6e6e6;
}

.cabecera .plecas img {
    max-height: 46px;
    width: auto;
    margin-right: 1.5rem;
}

.cabecera .plecas a:last-child img {
    margin-right: 0;
}

/* Fila de iconos: MT, Buzón, Calendario, banderas, Débil Visual, A+ A- A */
.cabecera .accesos {
    gap: .45rem;
}

.cabecera .accesos img {
    height: 28px;
    width: 28px;
    object-fit: contain;
    display: block;
}

.cabecera .accesos a {
    display: inline-flex;
    align-items: center;
    border-radius: 50%;
    transition: transform .15s;
}

.cabecera .accesos a:hover {
    transform: scale(1.12);
}

.cabecera .accesos .bandera img {
    height: 26px;
    width: 26px;
}

.cabecera .accesos .icono-accesibilidad {
    margin-left: .5rem;
}

.btn-accesibilidad {
    background: none;
    border: 0;
    color: var(--azul-tecnm);
    font-weight: 600;
    font-size: .95rem;
    line-height: 1;
    padding: .2rem .35rem;
    display: inline-flex;
    align-items: center;
}

.btn-accesibilidad:hover {
    color: var(--guinda);
}

/* Modo alto contraste (botón ◐) */
body.contraste {
    filter: invert(1) hue-rotate(180deg);
}

body.contraste img,
body.contraste iframe {
    filter: invert(1) hue-rotate(180deg);
}

/* ---------- Menús ---------- */
.menu-secundario {
    border-bottom: 1px solid #e6e6e6;
}

.menu-secundario .nav-link {
    color: var(--azul-tecnm) !important;
    font-size: .85rem;
    font-weight: 300;
    padding: .5rem .9rem;
}

.menu-principal {
    background-color: var(--azul-tecnm);
}

.menu-principal .nav-link {
    color: #fff !important;
    font-weight: 300;
    font-size: .95rem;
    padding: .7rem 1rem;
}

.menu-principal .nav-link:hover,
.menu-principal .nav-link.active {
    background-color: rgba(255, 255, 255, .12);
}

.menu-principal .dropdown-menu {
    background-color: var(--azul-tecnm);
    border: 0;
    border-radius: 0;
    margin-top: 0;
}

.menu-principal .dropdown-item {
    color: #fff;
    font-size: .9rem;
    white-space: normal;
    max-width: 340px;
}

.menu-principal .dropdown-item:hover,
.menu-principal .dropdown-item:focus {
    background-color: var(--azul-tecnm-claro);
    color: #fff;
}

/* Submenús de segundo nivel */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -.4rem;
}

.dropdown-submenu > a::after {
    display: inline-block;
    float: right;
    content: "›";
    font-size: 1.1rem;
    line-height: 1;
}

.dropdown-submenu > a.dropdown-toggle::after {
    border: 0;
}

@media (min-width: 1200px) {
    .dropdown-submenu:hover > .dropdown-menu {
        display: block;
    }
}

@media (max-width: 1199.98px) {
    .dropdown-submenu > .dropdown-menu {
        position: static;
        left: 0;
        padding-left: 1rem;
    }

    .dropdown-submenu:hover > .dropdown-menu {
        display: block;
    }
}

/* ---------- Carrusel principal ---------- */
.carrusel-principal .carousel-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* ---------- Bloques de contenido ---------- */
.bloque {
    width: var(--ancho-contenido);
    margin: 2rem auto;
    padding: 1.5rem 1rem 2rem;
}

.bloque-gris {
    background-color: var(--gris-fondo);
}

.titulo-seccion {
    text-align: center;
    color: var(--azul-tecnm);
    font-weight: 300;
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}

/* ---------- Avisos ---------- */
.rejilla-avisos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.tarjeta-aviso img {
    width: 100%;
    height: auto;
    display: block;
    background: #fff;
}

.boton-aviso {
    display: block;
    width: 100%;
    text-align: center;
    background-color: #e9e9e9;
    color: var(--azul-tecnm);
    border-radius: 5px;
    font-size: 13px;
    padding: 6px 24px;
    transition: all .2s;
}

.tarjeta-aviso a:hover .boton-aviso {
    background: linear-gradient(to bottom, var(--azul-tecnm) 5%, #f9f9f9 100%);
    color: #fff;
}

/* ---------- Noticias ---------- */
.rejilla-noticias {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.tarjeta-noticia {
    background: #fff;
    border: 1px solid #e2e2e2;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tarjeta-noticia > a img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}

.tarjeta-noticia:hover > a img {
    transform: scale(1.04);
}

.tarjeta-noticia .cuerpo {
    padding: .9rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.tarjeta-noticia .fecha {
    color: #777;
    font-size: .75rem;
    margin-bottom: .35rem;
}

.tarjeta-noticia h3 {
    font-size: .92rem;
    line-height: 1.4;
    font-weight: 400;
    flex: 1;
}

.tarjeta-noticia h3 a {
    color: var(--texto);
}

.tarjeta-noticia h3 a:hover {
    color: var(--azul-tecnm);
}

.leer-mas,
.enlace-ver-mas {
    color: var(--azul-tecnm);
    font-weight: 600;
    font-size: .8rem;
    letter-spacing: .5px;
    margin-top: .6rem;
}

.leer-mas:hover,
.enlace-ver-mas:hover {
    text-decoration: underline;
}

.enlace-ver-mas {
    font-size: 1rem;
}

/* ---------- Nota informativa ---------- */
.nota .titulo-nota {
    color: var(--azul-tecnm);
    font-size: 1.9rem;
    font-weight: 400;
    margin-bottom: .5rem;
}

.nota .fecha-nota {
    color: #777;
    font-weight: 600;
}

.nota .portada-nota {
    width: 100%;
    max-width: 900px;
    height: auto;
    display: block;
    margin: 1.5rem auto;
}

.nota .cuerpo-nota {
    max-width: 900px;
    margin: 0 auto;
    text-align: justify;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Contenido redactado con el editor del panel */
.contenido-rico h2 {
    font-size: 1.4rem;
    color: var(--azul-tecnm);
    margin: 1.5rem 0 .75rem;
}

.contenido-rico h3 {
    font-size: 1.15rem;
    color: var(--azul-tecnm);
    margin: 1.25rem 0 .6rem;
}

.contenido-rico p {
    margin-bottom: 1rem;
}

.contenido-rico ul,
.contenido-rico ol {
    margin: 0 0 1rem 1.5rem;
}

.contenido-rico blockquote {
    border-left: 4px solid var(--azul-tecnm);
    padding-left: 1rem;
    color: #555;
    font-style: italic;
}

.contenido-rico a {
    color: var(--azul-tecnm);
    text-decoration: underline;
}

.contenido-rico .ql-align-center {
    text-align: center;
}

.contenido-rico .ql-align-right {
    text-align: right;
}

.contenido-rico .ql-align-justify {
    text-align: justify;
}

.galeria {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: .75rem;
}

.galeria img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
}

/* ---------- Enlaces con logotipo ---------- */
.rejilla-enlaces {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    align-items: center;
}

.rejilla-enlaces img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform .2s, filter .2s;
}

.rejilla-enlaces a:hover img {
    transform: translateY(-3px);
    filter: brightness(1.05);
}

.rejilla-interes {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

/* ---------- Pie ---------- */
.pie-institucional {
    background-color: var(--azul-tecnm);
    color: #fff;
    padding: 3rem 2rem 1.5rem;
    margin-top: 2rem;
}

.pie-institucional a {
    color: #fff;
}

.pie-institucional a:hover {
    text-decoration: underline;
}

.pie-institucional .redes img {
    height: 30px;
    width: auto;
}

.pie-institucional hr {
    border-color: #fff;
    opacity: .15;
    margin: 1.5rem 0;
}

.pie-legal {
    font-size: .9rem;
}

/* ---------- Traductor de Google ---------- */
/* El widget se oculta: las banderas del encabezado son el control visible. */
#google_translate_element {
    display: none;
}

.goog-te-banner-frame,
.skiptranslate {
    display: none !important;
}

body {
    top: 0 !important;
}

/* ---------- Pie guinda de gob.mx ---------- */
.pie-gobmx {
    background-color: var(--guinda);
    color: #fff;
    padding: 2.5rem 2rem 2rem;
    font-size: .88rem;
}

.pie-gobmx h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: .75rem;
}

.pie-gobmx a {
    color: #fff;
}

.pie-gobmx a:hover {
    text-decoration: underline;
}

.pie-gobmx ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pie-gobmx ul li {
    margin-bottom: .45rem;
    line-height: 1.35;
}

.pie-gobmx .logo-pie {
    width: 190px;
    max-width: 100%;
    height: auto;
}

.pie-gobmx .redes-gobmx {
    display: flex;
    gap: .6rem;
    align-items: center;
}

.pie-gobmx .redes-gobmx img {
    height: 24px;
    width: 24px;
    object-fit: contain;
}

/* ---------- Responsivo ---------- */
@media (max-width: 991.98px) {
    :root {
        --ancho-contenido: 94%;
    }

    .cabecera .plecas img {
        max-height: 34px;
        margin-right: .75rem;
    }

    .cabecera .accesos img {
        height: 24px;
        width: 24px;
    }

    .titulo-seccion {
        font-size: 1.6rem;
    }
}

@media (max-width: 575.98px) {
    .barra-gobmx .enlaces-gobmx a {
        padding: .35rem .5rem;
        font-size: .8rem;
    }

    .cabecera .accesos {
        justify-content: center;
        flex-wrap: wrap;
    }
}
