/* ================================================
   VARIABLES GLOBALES COREDUCACIÓN
   ================================================ */
:root {
    --primary-color:  #9E1F63;
    --primary-dark:   #7A1850;
    --primary-light:  #C46F94;
    --primary-gradient: linear-gradient(135deg, #D14A22, #9E1F63);

    --secondary-color: #F15A29;
    --secondary-dark: #D14A22;
    --secondary-light: #F58A5E;

    --accent-color: #86104F;
    --accent-light: #C68CA3;

    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;

    --dark-color: #212529;
    --light-color: #ffffff;
    --body-bg: #f8f9fa;
    --navbar-bg: #ffffff;
    --footer-bg: #1a1a2e;
    --footer-secondary-bg: #16213e;

    --card-shadow: 0 10px 30px rgba(158, 31, 99, 0.15);
    --transition: all 0.3s ease;
    --border-radius: 12px;
    --header-height: 80px;
    --topbar-height: 35px;
    --font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* ================================================
   ESTILOS GENERALES
   ================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--body-bg);
    color: #495057;
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
    padding-top: calc(var(--header-height) + var(--topbar-height));
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ================================================
   TOP BAR FIJO
   ================================================ */
.top-mini-menu {
    background-color: #9E1F63;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1002;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    overflow: hidden;
}

.top-mini-menu.hidden {
    transform: translateY(-100%);
}

.top-mini-menu .container {
    width: 100%;
}

.top-mini-menu .row {
    flex-wrap: nowrap !important;
    align-items: center;
    margin: 0;
    width: 100%;
    min-width: 0;
}

.top-mini-menu .col-md-8 {
    flex: 1 1 0% !important;
    max-width: 100% !important;
    min-width: 0;
    padding: 0 0.25rem;
    overflow: hidden;
}

.top-mini-menu .col-md-4 {
    flex: 0 0 auto !important;
    width: auto !important;
    padding: 0 0.25rem;
}

.mini-menu-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    white-space: nowrap;
}

.mini-menu-links::-webkit-scrollbar {
    display: none;
}

.mini-menu-links li {
    flex-shrink: 0;
}

.mini-menu-links li a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.2s ease;
    font-weight: 400;
    white-space: nowrap;
    border-radius: 3px;
    font-size: clamp(0.5rem, 1.1vw, 0.8rem);
    padding: 0.2rem clamp(0.12rem, 0.55vw, 0.5rem);
}

.mini-menu-links li a:hover {
    color: var(--secondary-color);
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.mini-menu-links li a i {
    font-size: clamp(0.48rem, 0.9vw, 0.72rem);
    flex-shrink: 0;
}

.social-contact-links {
    display: flex;
    gap: 0.3rem;
    justify-content: flex-end;
    align-items: center;
}

.social-mini-link {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
    background-color: rgba(255,255,255,0.15);
    width: clamp(18px, 2vw, 26px);
    height: clamp(18px, 2vw, 26px);
    font-size: clamp(0.6rem, 0.9vw, 0.75rem);
    flex-shrink: 0;
}

.social-mini-link:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* ================================================
   HEADER / NAVBAR
   ================================================ */
header.navbar {
    background-color: var(--navbar-bg) !important;
    box-shadow: 0 4px 20px rgba(158, 31, 99, 0.15);
    padding: 1rem 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    right: 0;
    border-bottom: 3px solid var(--primary-color);
    transition: top 0.3s ease;
    min-height: var(--header-height);
    display: flex;
    align-items: center;
}

header.navbar.top-bar-hidden {
    top: 0;
}

.navbar > .container {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    position: relative;
}

/* ================================================
   LOGO Y BRANDING
   ================================================ */
.navbar-brand {
    display: flex;
    align-items: center;
    padding: 0.375rem 0;
    text-decoration: none;
    margin-right: 1rem;
    transition: var(--transition);
    flex-shrink: 0;
}

.logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
    filter: drop-shadow(0 2px 4px rgba(158, 31, 99, 0.2));
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
    margin-left: 0.75rem;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.1;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    display: inline-block;
    white-space: nowrap;
}

.logo-subtitle {
    font-size: 0.8rem;
    color: #555;
    white-space: nowrap;
}

.navbar-brand:hover .logo-img {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(158, 31, 99, 0.3));
}

.navbar-brand:hover {
    text-decoration: none;
}

/* ================================================
   NAVEGACIÓN
   ================================================ */
.navbar-toggler {
    padding: 0.25rem 0.5rem;
    border-color: rgba(158, 31, 99, 0.3);
    display: none;
    align-self: center;
    order: 3;
    margin: 0 0 0 auto;
    background-color: transparent;
    border: 1px solid rgba(158, 31, 99, 0.3);
    border-radius: 8px;
    transition: var(--transition);
    flex-shrink: 0;
}

.navbar-toggler-icon {
    width: 1.5em;
    height: 1.5em;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28158, 31, 99, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.navbar-toggler:hover {
    border-color: rgba(158, 31, 99, 0.5);
    background-color: rgba(158, 31, 99, 0.1);
    transform: scale(1.05);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(158, 31, 99, 0.25);
    border-color: rgba(158, 31, 99, 0.5);
    outline: none;
}

.navbar-nav .nav-link {
    color: #495057 !important;
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: var(--transition);
    position: relative;
    display: flex;
    align-items: center;
    border-radius: 8px;
    margin: 0 2px;
    white-space: nowrap;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    background-color: rgba(158, 31, 99, 0.05);
    transform: translateY(-2px);
}

.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
    background-color: rgba(158, 31, 99, 0.1);
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 25px;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.navbar-nav .nav-link i {
    margin-right: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ================================================
   DROPDOWN
   ================================================ */
.dropdown-menu {
    border: none;
    box-shadow: 0 8px 25px rgba(158, 31, 99, 0.15);
    border-radius: 12px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
    color: #495057;
}

.dropdown-item:hover {
    background-color: rgba(158, 31, 99, 0.05);
    color: var(--primary-color);
}

.dropdown-item i {
    color: var(--primary-color);
    opacity: 0.7;
}

.dropdown-divider {
    margin: 0.5rem 0;
    border-color: rgba(158, 31, 99, 0.1);
}

.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
    display: none;
    position: absolute;
}

.dropdown-submenu:hover > .dropdown-menu {
    display: block;
}

/* ================================================
   CONTENIDO PRINCIPAL
   ================================================ */
main {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    flex-direction: column;
}

/* ================================================
   BOTÓN BACK TO TOP
   ================================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(158, 31, 99, 0.3);
    z-index: 99;
    opacity: 0;
    transition: var(--transition);
    transform: translateY(20px);
    text-decoration: none;
    font-size: 1.1rem;
}

.back-to-top.active {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--accent-color));
    transform: translateY(-3px) scale(1.1);
    color: white;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(158, 31, 99, 0.4);
}

/* ================================================
   FOOTER
   ================================================ */
.footer-coreducacion {
    background: var(--footer-bg);
    color: white;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

.footer-coreducacion::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
}

.footer-main {
    padding: 3rem 0 1rem;
    position: relative;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-institutional {
    padding-right: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.footer-logo-container {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary-color);
}

.footer-logo-img {
    max-width: 50px;
    max-height: 50px;
    filter: brightness(1.2);
}

.footer-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: white;
}

.footer-tagline {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin: 0;
    font-weight: 500;
}

.footer-description {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.social-networks {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.1rem;
}

.social-link:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
    color: white;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 25px rgba(251, 125, 58, 0.4);
}

.footer-section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid rgba(251, 125, 58, 0.3);
    padding-bottom: 0.5rem;
}

.footer-links-column {
    display: flex;
    flex-direction: column;
}

.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links-list li {
    margin-bottom: 0.75rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
}

.footer-link:hover {
    color: var(--secondary-color);
    padding-left: 0.5rem;
    text-decoration: none;
}

.footer-link i {
    font-size: 0.8rem;
    opacity: 0.7;
    width: 16px;
}

.contact-foter {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(251, 125, 58, 0.2);
}

.contact-itemfooter {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: var(--transition);
}

.contact-itemfooter:last-child {
    margin-bottom: 0;
}

.contact-itemfooter:hover {
    background: rgba(255, 255, 255, 0.05);
}

.contact-iconfooter {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.contact-detailsfoter h6 {
    color: white;
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.contact-detailsfoter p,
.contact-detailsfoter a {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.4;
    text-decoration: none;
}

.contact-detailsfoter a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    background: var(--footer-secondary-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
}

.copyright-info {
    text-align: center;
}

.copyright-text {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.institutional-text {
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.legal-links {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.legal-links a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.legal-links a:hover {
    color: white;
    text-decoration: underline;
}

/* ================================================
   ELEMENTOS ADICIONALES
   ================================================ */
.text-gradient-primary {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.bg-gradient-primary {
    background: var(--primary-gradient);
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--accent-color));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(158, 31, 99, 0.3);
}

.card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 15px rgba(158, 31, 99, 0.08);
    border-radius: var(--border-radius);
}

.card:hover {
    box-shadow: 0 8px 30px rgba(158, 31, 99, 0.12);
    transform: translateY(-2px);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(158, 31, 99, 0.25);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn:focus,
.form-control:focus,
.navbar-toggler:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

@media (min-width: 992px) and (max-width: 1199px) {
    .navbar-nav .nav-link {
        padding: 0.75rem 0.7rem;
        font-size: 0.88rem;
    }
    .logo-text { font-size: 1.5rem; }
    .logo-img  { height: 52px; }
}

@media (min-width: 769px) and (max-width: 991px) {
    :root {
        --header-height: 70px;
        --topbar-height: 30px;
    }

    body {
        padding-top: calc(var(--header-height) + var(--topbar-height));
    }

    .top-mini-menu {
        height: var(--topbar-height);
    }

    header.navbar {
        top: var(--topbar-height);
        padding: 0.8rem 0;
    }

    .mini-menu-links li a {
        font-size: 0.6rem;
        padding: 0.12rem 0.22rem;
        gap: 0;
        letter-spacing: -0.01em;
    }

    .mini-menu-links li a i {
        display: none;
    }

    .social-mini-link {
        width: 20px;
        height: 20px;
        font-size: 0.6rem;
    }

    .navbar-toggler {
        display: flex;
        height: 40px;
        width: 40px;
        align-items: center;
        justify-content: center;
        padding: 0;
        background-color: rgba(158, 31, 99, 0.1);
        border: 1px solid rgba(158, 31, 99, 0.3);
    }

    .navbar-collapse {
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--navbar-bg);
        padding: 1.5rem;
        box-shadow: 0 5px 20px rgba(158, 31, 99, 0.2);
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
        border-top: 2px solid rgba(158, 31, 99, 0.2);
        z-index: 999;
    }

    .navbar-nav .nav-link {
        padding: 1rem 0;
        border-bottom: 1px solid rgba(158, 31, 99, 0.1);
        border-radius: 0;
        margin: 0;
        transform: none !important;
    }

    .navbar-nav .nav-link:last-child { border-bottom: none; }

    .logo-img     { height: 52px; }
    .logo-text    { font-size: 1.5rem; }
    .logo-subtitle{ font-size: 0.75rem; }

    .dropdown-submenu > .dropdown-menu {
        top: 100%;
        left: 0;
    }
}

@media (min-width: 769px) and (max-width: 900px) {

    .mini-menu-links {
        justify-content: space-between;
        width: 100%;
    }

    .mini-menu-links li {
        flex: 1 1 auto;
        text-align: center;
    }

    .mini-menu-links li a {
        font-size: clamp(0.45rem, 1.05vw, 0.6rem);
        padding: 0.08rem 0.08rem;
        gap: 0;
        letter-spacing: -0.03em;
        justify-content: center;
        white-space: nowrap;
    }

    .mini-menu-links li a i {
        display: none !important;
    }

    .social-contact-links {
        gap: 0.15rem;
    }

    .social-mini-link {
        width: 18px;
        height: 18px;
        font-size: 0.52rem;
        flex-shrink: 0;
    }

    .top-mini-menu .col-md-8 {
        flex: 1 1 0% !important;
        max-width: calc(100% - 85px) !important;
        padding: 0 0.1rem;
        overflow: hidden;
    }

    .top-mini-menu .col-md-4 {
        flex: 0 0 85px !important;
        max-width: 85px !important;
        padding: 0 0.1rem;
    }
}

@media (min-width: 576px) and (max-width: 768px) {
    :root {
        --header-height: 65px;
        --topbar-height: 26px;
    }

    body {
        padding-top: calc(var(--header-height) + var(--topbar-height));
    }

    .top-mini-menu {
        height: var(--topbar-height);
    }

    header.navbar {
        top: var(--topbar-height);
        padding: 0.7rem 0;
    }

    .mini-menu-links li a {
        font-size: 0.56rem;
        padding: 0.12rem 0.22rem;
        gap: 0;
    }

    .mini-menu-links li a i {
        display: none;
    }

    .social-mini-link {
        width: 18px;
        height: 18px;
        font-size: 0.55rem;
    }

    .navbar-toggler {
        display: flex;
        height: 38px;
        width: 38px;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    .navbar-collapse {
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--navbar-bg);
        padding: 1.5rem;
        box-shadow: 0 5px 20px rgba(158, 31, 99, 0.2);
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
        border-top: 2px solid rgba(158, 31, 99, 0.2);
        z-index: 999;
    }

    .navbar-nav .nav-link {
        padding: 0.9rem 0;
        border-bottom: 1px solid rgba(158, 31, 99, 0.1);
        border-radius: 0;
        margin: 0;
    }

    .logo-img     { height: 45px; }
    .logo-text    { font-size: 1.3rem; }
    .logo-subtitle{ font-size: 0.7rem; }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .footer-institutional {
        grid-column: span 2;
        text-align: center;
        padding-right: 0;
    }
    .footer-logo     { justify-content: center; }
    .social-networks { justify-content: center; }
}

@media (max-width: 575px) {
    :root {
        --header-height: 58px;
        --topbar-height: 22px;
    }

    body {
        padding-top: calc(var(--header-height) + var(--topbar-height));
    }

    .top-mini-menu {
        height: var(--topbar-height);
    }

    header.navbar {
        top: var(--topbar-height);
        padding: 0.5rem 0;
    }

    .mini-menu-links li a {
        font-size: 0.48rem;
        padding: 0.1rem 0.18rem;
        gap: 0;
    }

    .mini-menu-links li a i {
        display: none;
    }

    .social-mini-link {
        width: 16px;
        height: 16px;
        font-size: 0.5rem;
    }

    .navbar-brand {
        flex: 1;
        max-width: calc(100% - 44px);
        margin-right: 0;
    }

    .navbar-toggler {
        display: flex;
        height: 34px;
        width: 34px;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    .navbar-collapse {
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--navbar-bg);
        padding: 1rem;
        box-shadow: 0 5px 20px rgba(158, 31, 99, 0.2);
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
        border-top: 2px solid rgba(158, 31, 99, 0.2);
        z-index: 999;
    }

    .navbar-nav .nav-link {
        padding: 0.85rem 0;
        border-bottom: 1px solid rgba(158, 31, 99, 0.1);
        border-radius: 0;
        margin: 0;
    }

    .logo-img     { height: 36px; }
    .logo-text    { font-size: 1.1rem; }
    .logo-subtitle{ font-size: 0.62rem; }

    .back-to-top {
        width: 42px;
        height: 42px;
        bottom: 18px;
        right: 18px;
        font-size: 0.95rem;
    }

    .footer-main { padding: 1.5rem 0 1rem; }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    .footer-institutional {
        grid-column: span 1;
        padding-right: 0;
    }
    .footer-logo     { justify-content: center; }
    .social-networks { justify-content: center; }
    .legal-links {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }
    .footer-logo-text { font-size: 1.2rem; }
    .footer-tagline   { font-size: 0.78rem; }
    .social-link { width: 40px; height: 40px; font-size: 1rem; }
}

@media (max-width: 374px) {
    :root {
        --header-height: 52px;
        --topbar-height: 20px;
    }

    .mini-menu-links li a {
        font-size: 0.42rem;
        padding: 0.08rem 0.14rem;
    }

    .logo-img     { height: 30px; }
    .logo-text    { font-size: 0.95rem; }
    .logo-subtitle{ font-size: 0.55rem; }
}

@media (prefers-contrast: high) {
    .navbar { border-bottom: 4px solid var(--primary-color); }
    .navbar-nav .nav-link { font-weight: 600; }
}

@media (prefers-reduced-motion: reduce) {
    .navbar-brand .logo-img,
    .navbar-nav .nav-link,
    .back-to-top,
    .top-mini-menu { transition: none; }
}