:root{
    --bg:#f7f9fb;
    --surface:#ffffff;
    --brand:#07264a;
    --accent:#ffd166;
    --muted:#6b7280;
    --container:1100px;
    --radius:10px;
}

/* Responsive: en este archivo los cambios para móvil/tablet están en los bloques @media */

*{box-sizing:border-box}
body{
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    margin: 0;
    background: var(--bg);
    color: #14213d;
    -webkit-font-smoothing:antialiased;
}

/* Utilidad para accesibilidad */
.visually-hidden {
    position: absolute !important;
    height: 1px; width: 1px; overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

a{ color: var(--brand); text-decoration: none }
a:hover{ text-decoration: underline }

.sidebar {
    position: fixed;
    top: 100px;
    width: 80px;
    max-height: calc(100vh - 200px);
    background: transparent;
    padding: 20px 0;
    overflow: hidden;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 300ms ease;
}

.sidebar h3 {
    color: var(--brand);
    font-size: 0.9rem;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: none;
}

.sidebar-left {
    left: 0;
    padding-left: 15px;
}

.sidebar-right {
    right: 0;
    padding-right: 15px;
}

/* Menu colapsado por defecto */
.sidebar::before {
    content: '⋮';
    font-size: 24px;
    color: var(--brand);
    opacity: 0.6;
    position: absolute;
    top: 10px;
    transition: opacity 300ms ease;
}

.sidebar:hover::before {
    opacity: 0;
}

.important-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 300ms ease;
}

.sidebar:hover .important-links {
    max-height: 500px;
    opacity: 1;
}

.important-links li {
    margin: 0;
}

.important-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 8px;
    transition: all 300ms ease;
    text-decoration: none;
}

.important-links img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.important-links a:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(7, 38, 74, 0.2);
}

/* PANTALLA COMPLETA: Sidebars siempre abiertos */
@media (min-width: 1800px) {
    .sidebar {
        width: 120px;
    }

    .sidebar::before {
        display: none;
    }

    .important-links {
        max-height: 500px;
        opacity: 1;
    }

    .sidebar:hover .important-links {
        max-height: 500px;
        opacity: 1;
    }

    .important-links a {
        width: 80px;
        height: 80px;
    }

    .important-links img {
        width: 70px;
        height: 70px;
    }
}

/* Responsive: breakpoint para pantallas medianas/pequeñas (ajusta sidebar y tamaños) */
@media (max-width: 1200px) {
    .sidebar {
        width: 70px;
        padding: 15px 0;
    }
    
    .important-links a {
        width: 45px;
        height: 45px;
    }
    
    .important-links img {
        width: 35px;
        height: 35px;
    }
}

/* Responsive móvil: sidebar compacto con redes sociales desplegables y header/nav ajustado */
@media (max-width: 768px) {
    .nav-mobile {
        display: flex;
    }

    .nav-desktop {
        display: none !important;
    }

    .sidebar {
        display: flex;
        top: 94px;
        width: 52px;
        max-height: 52px;
        padding: 6px 0;
        border-radius: 12px;
        background: transparent;
        border: none;
        box-shadow: none;
        overflow: hidden;
    }

    .sidebar::before {
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 22px;
        opacity: 0.8;
    }

    .important-links {
        gap: 8px;
        max-height: 0;
        opacity: 0;
        margin-top: 28px;
    }

    .sidebar:hover,
    .sidebar:active,
    .sidebar:focus-within {
        max-height: 320px;
    }

    .sidebar.is-open {
        max-height: 320px;
    }

    .sidebar:hover .important-links,
    .sidebar:active .important-links,
    .sidebar:focus-within .important-links {
        max-height: 260px;
        opacity: 1;
    }

    .sidebar.is-open .important-links {
        max-height: 260px;
        opacity: 1;
    }

    .sidebar.is-open::before {
        opacity: 0;
    }

    .important-links a {
        width: 36px;
        height: 36px;
    }

    .important-links img {
        width: 26px;
        height: 26px;
    }

    .sidebar-left {
        left: 6px;
        padding-left: 0;
    }

    .sidebar-right {
        right: 6px;
        left: auto;
        padding-right: 0;
    }

    header {
        flex-direction: column;
        justify-content: center;
        min-height: auto;
        padding: 16px 0;
    }

    .header-inner {
        flex-direction: column;
        justify-content: center;
    }

    .logo {
        justify-content: center;
    }

    .hamburger-menu {
        display: none;
    }
}

header {
    position: relative;
    display: flex;
    min-height: 72px;
    justify-content: center;
    align-items: center;
    padding: 12px 0;
    overflow: visible;
    background: linear-gradient(180deg, rgba(7,38,74,0.06), transparent);
    z-index: 1000;
}

header > *, header .logo, header nav{ position: relative; z-index: 1 }

header::before{
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("https://vanguardia.com.mx/binrepository/2048x1366/0c0/0d0/down-right/11604/RHWB/img_0091_0_VG3571252_MG565271.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: none;
    transition: filter 260ms ease, transform 260ms ease;
    will-change: filter, transform;
    pointer-events: none;
    z-index: 0;
}

header:hover::before{
    filter: blur(6px);
    transform: scale(1.02);
}

.header-inner{ max-width: var(--container); margin: 0 auto; padding: 0 20px; display:flex; align-items:center; justify-content:space-between }

.logo{ display:flex; align-items:center; gap:12px; text-decoration: none; color: #ac0303 }
.logo img{ border-radius:8px }
.logo:hover,
.logo:focus,
.logo .Nombre { text-decoration: none; }

/* Navegación principal */
nav{ display:flex; gap:18px }

.nav-menu {
    display: flex;
    gap: 18px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    font-weight: 600;
    color: #ffffff;
    padding: 8px 10px;
    border-radius: 8px;
    transition: color 180ms ease, background 180ms ease;
    text-decoration: none;
    display: block;
}

nav a:hover {
    color: #ec130c;
    background: rgba(0, 0, 0, 0.329);
}

nav a:focus {   
    outline: 3px solid rgba(131, 236, 222, 0.863);
    outline-offset: 3px;
}

/* Items con dropdown */
.nav-item-dropdown {
    position: relative;
}

.nav-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    list-style: none;
    margin: 8px 0 0 0;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 200ms ease, visibility 200ms ease, transform 200ms ease;
    z-index: 10000;
}

.nav-item-dropdown:hover .nav-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-submenu li {
    margin: 0;
}

.nav-submenu a {
    display: block;
    padding: 10px 16px;
    color: var(--brand);
    text-decoration: none;
    font-weight: 500;
    transition: background 150ms ease, color 150ms ease;
    border-left: 3px solid transparent;
}

.nav-submenu a:hover {
    background: rgba(7, 38, 74, 0.08);
    border-left-color: var(--accent);
    color: #ec130c;
    padding-left: 14px;
}

/* Botón Hamburguesa */
.hamburger-menu {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    gap: 6px;
    z-index: 1001;
}

.hamburger-menu span {
    width: 25px;
    height: 3px;
    background: var(--brand);
    border-radius: 2px;
    transition: all 300ms ease;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Menú móvil tipo navegador */
.nav-mobile {
    display: none;
    align-items: center;
    gap: 12px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(7,38,74,0.98), rgba(55,47,119,0.98));
    padding: 16px;
    z-index: 1001;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.2);
    backdrop-filter: blur(8px);
}

.nav-mobile-display {
    flex: 1;
    overflow: hidden;
    text-align: center;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.nav-mobile-item {
    display: block;
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 300ms ease;
    opacity: 0;
    position: absolute;
    pointer-events: none;
}

.nav-mobile-item.active {
    opacity: 1;
    position: relative;
    pointer-events: all;
    background: rgba(255,255,255,0.15);
    animation: slideIn 300ms ease forwards;
}

@keyframes slideIn {
    from {
        transform: scale(0.8) translateY(5px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.nav-mobile-prev,
.nav-mobile-next {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255,255,255,0.2);
    color: #ffffff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 300ms ease;
    font-weight: bold;
    flex-shrink: 0;
}

.nav-mobile-prev:hover,
.nav-mobile-next:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.nav-mobile-prev:active,
.nav-mobile-next:active {
    transform: scale(0.95);
}

/* Estilos responsivos para el menú móvil */
@media (max-width: 600px) {
    .nav-mobile {
        padding: 12px;
        gap: 10px;
    }

    .nav-mobile-item {
        font-size: 0.95rem;
        padding: 6px 12px;
    }

    .nav-mobile-prev,
    .nav-mobile-next {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    header {
        flex-direction: column;
        justify-content: center;
        min-height: auto;
        padding: 20px 0;
    }

    .header-inner {
        width: 100%;
        padding: 0 15px;
        flex-direction: column;
        justify-content: center;
    }

    .logo {
        gap: 8px;
        justify-content: center;
    }

    .logo img {
        width: 48px;
        height: 48px;
    }

    .logo .Nombre {
        font-size: 1.2rem;
    }

    nav { 
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 300ms ease;
    }
    
    nav.nav-open {
        max-height: 500px;
    }
    
    .nav-submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        max-height: 0;
        overflow: hidden;
        transition: opacity 200ms ease, max-height 200ms ease;
        box-shadow: none;
        margin: 0;
        padding: 0;
        background: #ffffff;
    }
    
    .nav-item-dropdown.active .nav-submenu {
        max-height: 300px;
        padding: 8px 0;
    }
    
    .nav-item-dropdown:hover .nav-submenu {
        opacity: 0;
        visibility: hidden;
        max-height: 0;
    }
    
    .nav-submenu a {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

/* ============================================
   MAIN CONTENT & FOOTER
   ============================================ */

main{ max-width:var(--container); margin:28px auto; padding:0 20px }
main h1{ font-size:2rem; margin:0 0 8px; letter-spacing: -0.02em }
main p{ color:var(--muted); margin:0 0 12px }

/* FOOTER STYLES */
.site-footer{
    background: #372f77;
    color: #f1f5f9;
    padding: 36px 20px 18px;
    font-size: 0.95rem;
    transition: background 300ms ease, color 300ms ease, box-shadow 300ms ease;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
}

.site-footer.footer-gated {
    opacity: 0;
    transform: translateY(34px) scale(0.985);
    filter: blur(10px);
    pointer-events: none;
    transition:
        opacity 440ms cubic-bezier(0.2, 0.9, 0.2, 1),
        transform 560ms cubic-bezier(0.2, 0.9, 0.2, 1),
        filter 440ms ease,
        background 300ms ease,
        color 300ms ease,
        box-shadow 300ms ease;
}

.site-footer.footer-gated .footer-col,
.site-footer.footer-gated .footer-bottom {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 360ms ease, transform 420ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.site-footer.footer-gated.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
    pointer-events: auto;
}

.site-footer.footer-gated.is-visible .footer-col,
.site-footer.footer-gated.is-visible .footer-bottom {
    opacity: 1;
    transform: translateY(0);
}

.site-footer.footer-gated.is-visible .footer-col:nth-child(1) {
    transition-delay: 80ms;
}

.site-footer.footer-gated.is-visible .footer-col:nth-child(2) {
    transition-delay: 140ms;
}

.site-footer.footer-gated.is-visible .footer-bottom {
    transition-delay: 190ms;
}

@media (prefers-reduced-motion: reduce) {
    .site-footer.footer-gated,
    .site-footer.footer-gated .footer-col,
    .site-footer.footer-gated .footer-bottom {
        transition: none;
        transform: none;
        filter: none;
    }
}

.site-footer:hover{
    background: #000000;
    color: #ffffff;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
}

.site-footer .container{
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.15fr 1.45fr 1fr;
    gap: 24px;
    align-items: start;
}

.site-footer .footer-map-col iframe {
    width: 100%;
    min-height: 220px;
    border: 0;
    border-radius: 10px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.site-footer h3{
    margin: 0 0 8px 0;
    font-size: 1.05rem;
    color: #ffffff;
    transition: color 300ms ease;
}

.site-footer:hover h3{
    color: #372f77;
}

.site-footer p,
.site-footer a,
.site-footer li{
    color: #ffffff;
    margin: 0 0 6px 0;
    transition: color 300ms ease;
}

.site-footer:hover p,
.site-footer:hover a,
.site-footer:hover li{
    color: #ffffff;
}

.site-footer a:hover{
    color: #c50f0f; 
}

.site-footer .footer-col ul{
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer .brand{
    display:flex;
    align-items:center;
    gap:10px;
}

.site-footer .footer-brand-copy {
    text-align: center;
}

.site-footer .brand-motto {
    color: #c50f0f;
    font-weight: 700;
    margin: 0;
    text-align: center;
}

.site-footer:hover .brand-motto {
    color: #c50f0f;
}

.site-footer .brand img{
    width:56px; height:56px; object-fit:contain; border-radius:8px; background:#372f77;
    transition: background 300ms ease;
}

.site-footer:hover .brand img{
    background: #000000;
}

.site-footer .contact small{
    display:block;
    color:#cbd8e6;
}

.site-footer .social-links a{
    display:inline-block;
    margin-right:8px;
    color:#dfe7ef;
    text-decoration:none;
    font-weight:600;
}

.site-footer .footer-bottom{
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: 20px;
    padding-top: 14px;
    text-align: center;
    font-size: 0.9rem;
    color: #bfcfe0;
}

@media (max-width: 800px){
    .site-footer .container{
        grid-template-columns: 1fr;
        text-align: left;
    }

    .site-footer .footer-map-col iframe {
        min-height: 210px;
    }

    .site-footer .brand img{ 
        width:48px; height:48px 
    }
}

@media (max-width: 600px){
    main {
        padding: 0 15px;
        margin: 20px auto;
    }

    main h1 {
        font-size: 1.5rem;
    }

    main p {
        font-size: 0.95rem;
    }

    .site-footer {
        padding: 24px 15px 12px;
        font-size: 0.9rem;
    }

    .site-footer .brand {
        flex-direction: column;
        text-align: center;
    }

    .site-footer .brand img {
        width: 40px;
        height: 40px;
    }

    .site-footer h3 {
        margin-top: 16px;
        margin-bottom: 8px;
    }

    .site-footer .contact {
        font-size: 0.9rem;
        margin-top: 16px;
    }

    .site-footer .footer-bottom {
        font-size: 0.85rem;
    }
}