/* static/main/css/base.css */

/* CSS Variables */
:root {
    --primary-color: #005D99; /* Azul ISTT */
    --secondary-color: #A3C947; /* Verde ISTT */
    --accent-color: #F7D038; /* Amarillo ISTT */
    --highlight-color: #009FD9; /* Azul Claro ISTT */
    --dark-color: #1f2937;
    --light-color: #f8fafc;
    --text-dark: #374151;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    background-attachment: fixed;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(37, 99, 235, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(197, 218, 136, 0.05) 0%, transparent 50%),
        linear-gradient(45deg, transparent 45%, rgba(16, 185, 129, 0.01) 50%, transparent 55%);
    background-size: 400px 400px, 300px 300px, 200px 200px;
    background-position: 0 0, 100px 100px, 0 0;
    pointer-events: none;
    z-index: -1;
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0% { background-position: 0 0, 100px 100px, 0 0; }
    50% { background-position: 50px 50px, 150px 150px, 25px 25px; }
    100% { background-position: 0 0, 100px 100px, 0 0; }
}

/* Header Styles */
.site-header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    padding: 1.5rem 0;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.site-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="white" opacity="0.1"><polygon points="0,0 1000,0 1000,100 0,80"/></svg>');
    pointer-events: none;
}

.header-content {
    position: relative;
    z-index: 2;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 1.5rem;
}

.logo-brand {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

.logo-img {
    height: 80px;
    width: auto;
    transition: var(--transition);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.logo-img:hover {
    transform: scale(1.05);
}

.site-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.95rem; /* Incremento del 30% desde 1.5rem */
    color: var(--dark-color);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    margin: 0;
    line-height: 1.3;
}

.social-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: white;
}

.social-link img {
    height: 22px;
    width: 22px;
}

/* Navigation Styles */
.main-nav {
    background: var(--primary-color);
    padding: 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.2rem;
}

.navbar-nav {
    gap: 0.25rem;
    width: 100%;
    justify-content: space-around;
}

.nav-item {
    flex: 1;
    text-align: center;
}

.nav-link {
    font-weight: 500;
    font-size: 0.9rem;
    padding: 1rem 0.75rem !important;
    color: rgba(255,255,255,0.9) !important;
    transition: var(--transition);
    position: relative;
    border-radius: 8px;
    margin: 0.25rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.nav-link i {
    font-size: 0.85rem;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover,
.nav-link:focus {
    color: white !important;
    background: rgba(255,255,255,0.1);
    transform: translateY(-1px);
}

.nav-link:hover::before,
.nav-item.active .nav-link::before {
    width: 80%;
}

.nav-item.active .nav-link {
    color: white !important;
    background: rgba(255,255,255,0.15);
}

/* Dropdown Styles */
.dropdown-menu {
    background: white;
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    margin-top: 0.5rem;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.3s ease;
    min-width: 200px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 500;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-item:hover {
    background: var(--accent-color);
    color: var(--dark-color);
}

/* .dropdown-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(4px);
} */

.dropdown-item i {
    width: 16px;
    color: var(--primary-color);
    transition: var(--transition);
}

.dropdown-item:hover i {
    color: white;
}

/* Submenu Styles */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-menu {
    position: absolute;
    top: 0;
    left: 100%;
    margin-left: 0.5rem;
    min-width: 200px;
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Footer Styles */
.footer {
    background: var(--primary-color);
    /* background: linear-gradient(135deg, var(--dark-color) 0%, #1f2937 100%); */
    color: rgba(255,255,255,0.8);
    padding: 3rem 0 1.5rem;
    margin-top: auto;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.footer-social-link:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-link {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.footer-link:hover {
    color: var(--accent-color);
}

.footer-copyright {
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
}

/* Page Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.page-loader.active {
    opacity: 1;
    visibility: visible;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
.nav-link:focus,
.dropdown-item:focus,
.footer-link:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Mobile Optimizations */
@media (max-width: 1199.98px) {
    .site-title {
        font-size: 1.6rem;
    }
    
    .nav-link {
        font-size: 0.85rem;
        padding: 0.9rem 0.5rem !important;
    }
}

@media (max-width: 991.98px) {
    .site-header {
        padding: 1rem 0;
    }
    
    .logo-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .logo-brand {
        justify-content: center;
    }
    
    .logo-img {
        height: 60px;
    }
    
    .site-title {
        font-size: 1.4rem;
    }
    
    .social-links {
        justify-content: center;
        gap: 0.75rem;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
    }
    
    .navbar-nav {
        padding: 1rem 0;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .nav-item {
        text-align: left;
    }
    
    .nav-link {
        justify-content: flex-start;
        padding: 0.75rem 1rem !important;
    }
    
    .dropdown-menu {
        position: static !important;
        transform: none !important;
        box-shadow: none;
        background: rgba(255,255,255,0.95);
        margin: 0.5rem 0;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 575.98px) {
    .site-title {
        font-size: 1.2rem;
    }
    
    .logo-img {
        height: 50px;
    }
    
    .nav-link {
        font-size: 0.8rem;
    }
}

/* Estilos adicionales para iconos del menú */

/* Mejoras para iconos en el menú principal */
.nav-link i {
    font-size: 0.9rem;
    width: 18px;
    text-align: center;
    transition: var(--transition);
}

.nav-link:hover i {
    transform: scale(1.1);
    color: var(--accent-color);
}

/* Estilos específicos para iconos del dropdown */
.dropdown-item i {
    width: 20px;
    font-size: 0.9rem;
    color: var(--primary-color);
    transition: var(--transition);
    margin-right: 0.5rem;
}

.dropdown-item:hover i {
    color: var(--dark-color);
    transform: translateX(2px);
}

/* Animaciones para iconos activos */
.nav-item.active .nav-link i {
    color: var(--accent-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Iconos específicos con colores temáticos */
.dropdown-item:hover .fa-scroll,
.dropdown-item:hover .fa-compass {
    color: var(--secondary-color);
}

.dropdown-item:hover .fa-microscope,
.dropdown-item:hover .fa-flask {
    color: var(--highlight-color);
}

.dropdown-item:hover .fa-heart,
.dropdown-item:hover .fa-handshake {
    color: #e74c3c;
}

.dropdown-item:hover .fa-laptop-code,
.dropdown-item:hover .fa-cogs {
    color: #9b59b6;
}

/* Efectos especiales para iconos de servicios TI */
.dropdown-item[href*="siga"] i,
.dropdown-item[href*="siage"] i,
.dropdown-item[href*="eva"] i,
.dropdown-item[href*="repositorio"] i,
.dropdown-item[href*="biblioteca"] i {
    background: linear-gradient(135deg, var(--primary-color), var(--highlight-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hover effects para enlaces externos */
.dropdown-item[target="_blank"]:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--highlight-color));
    color: white;
    transform: translateX(4px);
}

.dropdown-item[target="_blank"]:hover i {
    color: white;
    transform: translateX(2px) rotate(5deg);
}

/* Indicador visual para enlaces externos */
.dropdown-item[target="_blank"]::after {
    content: '\f35d'; /* Font Awesome external-link-alt */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 0.7rem;
    margin-left: auto;
    opacity: 0.6;
    transition: var(--transition);
}

.dropdown-item[target="_blank"]:hover::after {
    opacity: 1;
    color: white;
}

/* Responsivo para iconos */
@media (max-width: 991.98px) {
    .nav-link i {
        font-size: 1rem;
        width: 20px;
    }
    
    .dropdown-item i {
        width: 22px;
        font-size: 1rem;
    }
}

@media (max-width: 575.98px) {
    .nav-link i {
        font-size: 0.9rem;
        width: 18px;
    }
    
    .dropdown-item i {
        width: 18px;
        font-size: 0.85rem;
    }
}

/* Animación de carga para iconos */
@keyframes iconFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-link i,
.dropdown-item i {
    animation: iconFadeIn 0.3s ease-out;
}

.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
    border-radius: 0 6px 6px 6px;
}

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

.dropdown-submenu > a:after {
    display: block;
    content: " ";
    float: right;
    width: 0;
    height: 0;
    border-color: transparent;
    border-style: solid;
    border-width: 5px 0 5px 5px;
    border-left-color: #cccccc;
    margin-top: 5px;
    margin-right: -10px;
}

.dropdown-submenu:hover > a:after {
    border-left-color: #555;
}

.dropdown-submenu.pull-left {
    float: none;
}

.dropdown-submenu.pull-left > .dropdown-menu {
    left: -100%;
    margin-left: 10px;
    border-radius: 6px 0 6px 6px;
}

/* Para móviles */
@media (max-width: 767px) {
    .dropdown-submenu .dropdown-menu {
        position: static !important;
        float: none;
        width: auto;
        margin-top: 0;
        background-color: transparent;
        border: 0;
        box-shadow: none;
        border-radius: 0;
    }
    
    .dropdown-submenu > a:after {
        display: none;
    }
}