:root {
    --primary: #1a3a6b;
    --accent: #f5a623;
    --accent2: #e06b2d;
    --blue-light: #2e6bc4;
    --text-dark: #1a2340;
    --text-muted: #555;
    --card-bg: #fff;
    --section-bg: #f4f7fc;
    --text-white: #ffffff;
    --yellow-light: #f5a623;
}

* { box-sizing: border-box; }

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, .navbar-brand {
    font-family: 'Poppins', sans-serif;
}

.subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.mini-hero {
    height: auto;
    background: var(--primary);
}

/* HERO SECTION CON IMAGEN DE FONDO */
.hero-section {
    position: relative;
    min-height: auto;
    padding: 120px 0 10px 0; 
    overflow: hidden;
}

.hero-section::before {
    content: "";
    position: absolute;
    top: -20%;
    left: 0;
    width: 100%;
    height: 120%;
     background-image: linear-gradient(#002e6b70), url('../imagen/institucion/fondo.webp'); 
    /* background-image: url('../imagen/institucion/fondo.webp'); */
    background-size: cover;
    background-position: center;
    z-index: -2;
    transform: translateY(0);
    transition: transform 0.1s linear;
}

.hero-section::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.5),
        rgba(0,0,0,0)
    );
    z-index: 1;
}

/* NAVBAR */
.container {
    margin: 5px auto;
}
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999 !important;
    transform: translateZ(0);
    padding: 10px 0;
    transition: all 0.4s ease;
    background: transparent;
    box-shadow: none;
}

.navbar.scrolled {
    background: linear-gradient(135deg, #0d1f45 0%, #1a3a6b 50%, #1e4fa0 100%);
    padding: 12px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

.navbar-brand img {
    height: 80px;
    width: 200px;
    transition: all 0.3s ease;
}

.navbar-nav{
    padding: 8px 10px;
}

.navbar.scrolled .navbar-brand img {
    height: 60px;
    width: 160px;
}

.nav-link {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--text-white) !important;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
    padding: 6px 16px !important;
    transition: color .2s;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 90%;
    height: 4px;
    margin: 0 5%;
    background-color: var(--yellow-light);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.navbar.scrolled .nav-link::after {
    height: 4px;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.nav-link:hover,
.nav-link.active { color: var(--yellow-light) !important; }

.btn-outline-register {
    background: transparent;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    border-radius: 25px;
    padding: 5px 22px;
    border: 4px solid rgba(255, 255, 255, 0.6);
    transition: all .2s;
}

.btn-outline-register:hover {
    background: rgba(255,255,255,.2);
    color: #ffffff;
    border-color: #fff;
}

.btn-login {
    background: white;
    color: var(--primary);
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    border-radius: 25px;
    padding: 5px 22px;
    border: none;
    transition: all .2s;
}

.btn-login:hover {
    background: var(--primary);
    color: #ffffff;
    transform: translateY(-2px);
}

.dropdown-item {
    color: var(--primary);
}

.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-left: 0.1rem;
    display: none;
}

.dropdown-submenu .dropdown-menu.show {
    display: block;
}

.navbar-toggler {
    border-color: #ffffff !important;
    background-color: rgba(0, 0, 0, 0.1);
    outline: none !important;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.5) !important;
}
.navbar.menu-open {
    background: linear-gradient(135deg, #0d1f45 0%, #1a3a6b 50%, #1e4fa0 100%);
}

/* FOOTER */
footer {
    background: var(--primary);
    padding: 50px 0 25px;
    color: #c8d9f5;
}

footer .brand-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    color: #fff;
}

footer .tagline { font-size: .65rem; color: #8aabdf; }
footer a { color: #9dc2ff; text-decoration: none; transition: color 0.3s; }
footer a:hover { color: var(--accent); }
.footer-icon { color: white; margin-right: 10px; }

.social-link {
    display: flex;
    align-items: center;    
    font-size: 1.4rem;    
    transition: all 0.3s;
}

.social-link:hover {
    transform: translateX(5px);
}

.social-link i { font-size: 1.3rem; }

.footer-divider {
    border-top: 1px solid rgba(255,255,255,.12);
    margin: 30px 0 20px;
}

.footer-copy {
    text-align: center;
    font-size: .85rem;
    color: #8aabdf;
}

/* Estilos del Modal de Login */
.modal-login {
    max-width: 650px;
    width: 95%;
}
 
.login-card {
    border: none;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    min-height: 380px;
    box-shadow: 0 32px 80px rgba(26, 58, 107, 0.25);
}
.login-form-panel {
    flex: 1;
    background: white;
    padding: 36px 36px 32px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-y: auto;
}
 
.login-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(26, 58, 107, 0.07);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s, transform 0.2s;
    z-index: 10;
}
 
.login-close-btn:hover {
    background: rgba(26, 58, 107, 0.14);
    transform: scale(1.1);
}
 
.login-tabs {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #eef0f6;
    padding-bottom: 0;
}
 
.login-tab-btn {
    background: none;
    border: none;
    padding: 10px 16px 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: color 0.25s;
    white-space: nowrap;
}
 
.login-tab-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--blue-light));
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}
 
.login-tab-btn.active {
    color: var(--primary);
}
 
.login-tab-btn.active::after {
    transform: scaleX(1);
}
 
.login-field {
    margin-bottom: 18px;
}
 
.login-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 7px;
    font-family: 'Poppins', sans-serif;
}
 
.login-input-group {
    display: flex;
    align-items: center;
    border: 1.5px solid #dde2ee;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.25s, box-shadow 0.25s;
    background: #f8fafc;
}
 
.login-input-group:focus-within {
    border-color: var(--blue-light);
    box-shadow: 0 0 0 3px rgba(46, 107, 196, 0.12);
    background: white;
}
 
.login-input-icon {
    padding: 0 14px;
    color: #94a3b8;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: color 0.25s;
}
 
.login-input-group:focus-within .login-input-icon {
    color: var(--blue-light);
}
 
.login-input-group input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 11px 4px;
    font-size: 0.9rem;
    color: var(--text-dark);
    font-family: 'Open Sans', sans-serif;
    outline: none;
}
 
.login-input-group input::placeholder {
    color: #b0bac8;
}
 
.login-eye-btn {
    background: none;
    border: none;
    padding: 0 14px;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.2s;
    flex-shrink: 0;
}
 
.login-eye-btn:hover {
    color: var(--primary);
}
 
.login-row-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    margin-top: -4px;
}
 
.login-check {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.82rem;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}
 
.login-check input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--primary);
    cursor: pointer;
}
 
.login-link {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent2);
    text-decoration: none;
    transition: color 0.2s;
}
 
.login-link:hover {
    color: var(--primary);
}
 
.btn-login-submit {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--blue-light) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.25s, transform 0.2s, box-shadow 0.25s;
    letter-spacing: 0.2px;
}
 
.btn-login-submit:hover {
    opacity: 0.92;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26, 58, 107, 0.3);
}
 
.btn-login-submit:active {
    transform: translateY(0);
}
 
.recovery-header {
    text-align: center;
    margin-bottom: 24px;
}
 
.recovery-header h5 {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}
 
.recovery-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 768px) {    
    html, body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }

    .row {
        margin-right: 0;
        margin-left: 0;
    }

    .container {
        padding-right: 15px;
        padding-left: 15px;           
    }

    .nav-link::after {
        width: 100%;
        left: 0;
        margin: 0 0;
    }

    .navbar {
        padding: 10px;
    }

    .navbar-brand img {
        height: 60px;
        width: 140px;
    }

    .navbar.scrolled .navbar-brand img {
        height: 48px;
        width: 120px;
    }
    .hero-section {
        padding: 90px 0 10px 0; 
    }

        .login-card {
        flex-direction: column;
        border-radius: 20px;
        min-height: unset;
    }
 
    .login-brand-panel {
        width: 100%;
        padding: 28px 24px 24px;
    }
 
    .brand-logo {
        max-width: 120px;
        margin-bottom: 16px;
    }
 
    .brand-title { font-size: 1.3rem; }
 
    .brand-sub,
    .brand-badges { display: none; }
 
    .brand-circle-1 {
        width: 180px;
        height: 180px;
        top: -50px;
        right: -50px;
    }
 
    .login-form-panel {
        padding: 24px 20px 28px;
    }
 
    .login-close-btn.d-none { display: flex !important; }
    .login-close-btn.d-lg-none { display: none !important; }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .dropdown-submenu:hover .dropdown-menu {
        display: block;
    }

    .nav-link {
        font-size: 0.8rem;
        padding: 6px 8px !important;
    }
    
    .btn-login {
        font-size: 0.78rem;
        padding: 7px 14px;
    }

    .navbar-brand img {
        height: 60px;
        width: 140px;
    }

    .navbar.scrolled .navbar-brand img {
        height: 48px;
        width: 120px;
    }

    .navbar-nav {
        gap: 0 !important;
        padding: 4px;
    }
    
    .hero-section {
        padding: 100px 0 10px 0; 
    }
}

@media (min-width: 1200px) and (max-width: 1350px) {
    .nav-link {
        font-size: 0.85rem;
        padding: 6px 10px !important;
    }    
    .btn-login {
        font-size: 0.82rem;
        padding: 8px 18px;
    }

    .navbar-nav {
        gap: 0 !important;
    }
}

 