:root { --azul-uab: #003366;
    --azul-secundario: #001f3f; 
    --rojo-uab: #d32f2f; 
    --azul-visitante: #005f73; 
    --blanco: #ffffff; 
    --gris-fondo: #f8f9fa; 
    --oro: #FFD700; 
    --plata: #C0C0C0; 
    --bronce: #CD7F32; }
    

/* ANIMACIÓN A PRUEBA DE FALLOS: Se ejecuta automáticamente al cambiar a display:block */
@keyframes fadeInUp { 
0% { opacity: 0; transform: translateY(20px); } 
100% { opacity: 1; transform: translateY(0); } 
}
.section-animate { 
animation: fadeInUp 0.5s ease-out forwards; 
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; scroll-behavior: smooth; }

/* Botones y Formularios */
.btn-save { background: var(--azul-uab); color: white; border: none; padding: 15px; width: 100%; border-radius: 8px; font-weight: bold; cursor: pointer; transition: 0.3s; font-size: 1.15rem;}
.btn-save:hover { background: var(--azul-secundario); }
.form-group { margin-bottom: 22px; text-align: left; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 1.1rem; color: #333;}
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 15px; border: 1px solid #ddd; border-radius: 8px; outline: none; font-family: inherit; font-size: 1.15rem; transition: 0.3s; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--azul-uab); box-shadow: 0 0 5px rgba(0,51,102,0.2); }

/* Navbar */
.navbar { display: flex; justify-content: space-between; align-items: center; padding: 20px 8%; background: var(--azul-uab); position: fixed; top: 0; width: 100%; z-index: 1000; color: white; }
.logo { font-weight: 800; letter-spacing: 0.5px; font-size: 1rem; max-width: 400px; line-height: 1.3; }
.nav-links { display: flex; list-style: none; gap: 25px; align-items: center; }
.nav-links a { text-decoration: none; color: white; font-size: 1rem; font-weight: 600; }
.nav-links a.active { border-bottom: 3px solid var(--rojo-uab); padding-bottom: 5px; }
.btn-logout { background: none; border: 1px solid white; color: white; padding: 8px 12px; border-radius: 5px; cursor: pointer; transition: 0.3s; font-size: 1.1rem;}

/* Estructura de módulos */
.module-section { padding: 100px 6% 50px; background: var(--gris-fondo); min-height: 100vh; }
.header-module { display: block; margin-bottom: 30px; text-align: left; }
.header-module h2 { font-size: 2.5rem; color: var(--azul-uab); margin-bottom: 5px; }
.header-module h2 i { color: var(--rojo-uab); } 
.form-card { background: white; padding: 30px; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); margin-bottom: 20px; display: block; }
.form-card h3 { color: var(--azul-uab); border-bottom: 3px solid var(--rojo-uab); padding-bottom: 12px; margin-bottom: 20px; text-align: left; font-size: 1.5rem;}
.admin-layout { display: flex; justify-content: center; text-align: center; }
.form-container { width: 100%; max-width: 900px; text-align: left; }
.text-center { text-align: center; }

/* =========================================
ANIMACIONES Y TAMAÑOS DEL BANNER (HERO)
========================================= */
.hero-3-column-layout {
display: flex;
justify-content: center;
align-items: center;
gap: 40px;
}

/* 🔥 PC: TAMAÑO GIGANTE Y ESCUDOS AMPLIADOS 🔥 */
.main-circle {
width: 240px; 
height: 240px;
border: 5px solid var(--rojo-uab, #d32f2f);
background: #fff;
border-radius: 50%;
box-shadow: 0 10px 25px rgba(0,0,0,0.5);
display: flex;
justify-content: center;
align-items: center;
margin: 0 auto;
}
.institutional-shield {
max-width: 210px; /* Aumentado drásticamente para llenar el círculo */
max-height: 210px; /* Aumentado drásticamente para llenar el círculo */
width: 100%;
height: 100%;
object-fit: contain;
}

/* =========================================
🔥 LINKS Y EFECTOS PARA LOS LOGOS DEL LOGIN 🔥
========================================= */
.institutional-logos-overlay {
display: flex;
gap: 25px; 
align-items: center;
position: absolute;
top: 30px; 
right: 40px; 
z-index: 10;
}
.logo-link {
display: inline-block;
transition: transform 0.3s ease;
border-radius: 50%;
}
.logo-link:hover {
transform: scale(1.15) translateY(-5px);
}
.overlay-logo {
border-radius: 50%;
box-shadow: 0 6px 16px rgba(0,0,0,0.6); 
width: 100px; 
height: 100px; 
object-fit: cover;
background-color: transparent; /* CORRECCIÓN: Fondo transparente para evitar el círculo blanco */
}

/* ==========================================================================
📱 ADAPTACIÓN PARA CELULARES (DISEÑO RESPONSIVO)
========================================================================== */
@media screen and (max-width: 768px) {
.login-card { padding: 25px 20px; width: 95%; margin: 20px auto; }
.app-title-login { font-size: 1.4rem; }
.btn-login { padding: 15px; font-size: 1.1rem; }

.navbar { flex-direction: column; padding: 12px 5%; gap: 10px; }
.logo { font-size: 0.85rem; text-align: center; }
.nav-links { 
    width: 100%; 
    overflow-x: auto; 
    white-space: nowrap; 
    padding-bottom: 5px; 
    justify-content: flex-start;
}

.institutional-logos-overlay {
    top: 15px !important;
    right: 15px !important;
    gap: 10px !important;
}
.overlay-logo {
    width: 60px !important;
    height: 60px !important;
}

.hero { padding-top: 120px; } 
.hero-3-column-layout {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 30px !important;
}
.hero-side-logo {
    display: flex;
    justify-content: center;
    width: 100%;
}
.main-circle { 
    width: 250px !important; 
    height: 250px !important; 
    border-width: 6px !important; 
    margin: 0 auto !important;
    padding: 15px !important;
}
.institutional-shield {
    max-width: 220px !important; /* Aumentado para que el escudo se vea imponente en móvil */
    max-height: 220px !important; /* Aumentado para que el escudo se vea imponente en móvil */
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}
.hero-center-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}
.hero-center-content h1.text-floating { 
    font-size: 3.2rem !important; 
    line-height: 1.1 !important;
    margin-bottom: 10px !important;
}
.slogan { 
    font-size: 1.1rem !important; 
    margin-bottom: 25px !important;
}
.location-box {
    padding: 15px !important; 
    width: 100% !important;
    max-width: 350px !important;
}
.location-box i { font-size: 1.2rem; }
.location-box p { font-size: 0.9rem; }

.module-section { padding-top: 140px; padding-left: 4%; padding-right: 4%; }
.header-module h2 { font-size: 1.7rem; }
.info-card-item { padding: 20px; }
.info-card-item h3 { font-size: 1.4rem; }
.form-card { padding: 20px 15px; }
.form-group label { font-size: 1rem; }
.form-group input, .form-group select, .form-group textarea { padding: 12px; font-size: 1rem; }

.tabs-admin-center { overflow-x: auto; white-space: nowrap; justify-content: flex-start; padding-bottom: 5px; }
.tab-btn { padding: 10px 15px; font-size: 1rem; }

#tab-proyectos > div[style] { grid-template-columns: 1fr !important; }

.dash-header-verde { font-size: 1.1rem; }
.ranking-table th, .ranking-table td { padding: 12px; font-size: 0.95rem; }
}

@media screen and (max-width: 480px) {
.hero-center-content h1.text-floating { font-size: 2.6rem !important; }
.main-circle { width: 220px !important; height: 220px !important; }
.institutional-shield { max-width: 190px !important; max-height: 190px !important; }
.app-title-login { font-size: 1.25rem; }
}

@media screen and (max-height: 600px) and (orientation: landscape) {
header, #main-header { position: relative !important; }
.module-section, .hero { padding-top: 20px !important; }
.navbar { padding: 5px 2% !important; }
.logo { font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ==========================================================================
MENÚ HAMBURGUESA Y BARRA INTELIGENTE
========================================================================== */
#main-header { transition: top 0.3s ease-in-out; width: 100%; position: sticky; top: 0; z-index: 1000; }
.menu-toggle { display: none; color: white; font-size: 1.8rem; cursor: pointer; }

@media screen and (max-width: 1024px) {
.navbar { flex-direction: row; justify-content: space-between; align-items: center; position: relative; }
.logo { font-size: 0.75rem; text-align: left; width: 80%; }
.menu-toggle { display: block; }
.nav-links { 
    display: none !important; 
    flex-direction: column; 
    position: absolute;
    top: 100%; 
    left: 0;
    width: 100%;
    background-color: var(--azul-uab);
    padding: 10px 0;
    box-shadow: 0 10px 15px rgba(0,0,0,0.3);
}
.nav-links.active { display: flex !important; }
.nav-links li { width: 100%; text-align: center; margin: 5px 0; }
}

/* ==========================================================================
🖨️ HOJA DE ESTILOS DE IMPRESIÓN 
========================================================================== */
@media print {
header, #main-header, .menu-toggle, .nav-links, .btn-save, .tabs-admin-center, .header-module { display: none !important; }
body { background: white !important; color: black !important; }
.container, .form-card {
    width: 100% !important; max-width: 100% !important; padding: 0 !important; margin: 0 !important;
    box-shadow: none !important; background: transparent !important; border: none !important;
}
}

/* =========================================
ANIMACIONES GLOBALES
========================================= */
@keyframes floatText {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-10px); } 
}
@keyframes coinSpinAndFloat {
0% { transform: perspective(1000px) translateY(0) rotateY(0deg); }
50% { transform: perspective(1000px) translateY(-15px) rotateY(180deg); }
100% { transform: perspective(1000px) translateY(0) rotateY(360deg); }
}
.text-floating { animation: floatText 4s ease-in-out infinite; display: inline-block; }
.text-floating-delayed { animation: floatText 4s ease-in-out infinite; animation-delay: 1s; display: inline-block; }

@keyframes coinSpinOnly {
0% { transform: perspective(1000px) rotateY(0deg); }
50% { transform: perspective(1000px) rotateY(180deg); }
100% { transform: perspective(1000px) rotateY(360deg); }
}
.logo-spin-float { animation: coinSpinOnly 12s linear infinite !important; }

/* =========================================
SCROLL VERTICAL
========================================= */
.scroll-tabla-proyectos {
max-height: 250px; overflow-y: auto; overflow-x: auto;  
border: 1px solid #eee; border-radius: 8px; margin-bottom: 25px; background-color: white;
}
.scroll-tabla-proyectos table thead th { position: sticky; top: 0; z-index: 10; background-color: var(--azul-uab); color: white; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.scroll-tabla-proyectos::-webkit-scrollbar { width: 8px; height: 8px; }
.scroll-tabla-proyectos::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
.scroll-tabla-proyectos::-webkit-scrollbar-thumb { background: #888; border-radius: 4px; }
.scroll-tabla-proyectos::-webkit-scrollbar-thumb:hover { background: #555; }

.scroll-dash-tabla { max-height: 220px; overflow-y: auto; overflow-x: auto; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; }
.scroll-dash-tabla table thead th { position: sticky; top: 0; z-index: 10; background-color: #2c2c2c; color: #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.scroll-dash-tabla::-webkit-scrollbar { width: 8px; height: 8px; }
.scroll-dash-tabla::-webkit-scrollbar-track { background: #333; border-radius: 0 0 8px 0; }
.scroll-dash-tabla::-webkit-scrollbar-thumb { background: #666; border-radius: 4px; }
.scroll-dash-tabla::-webkit-scrollbar-thumb:hover { background: #888; }

.btn-download { display: inline-block; background-color: var(--azul-uab); color: white !important; padding: 12px 20px; border-radius: 8px; text-decoration: none; font-weight: bold; text-align: center; transition: all 0.3s ease; width: 100%; box-sizing: border-box; border: none; }
.btn-download:hover { background-color: var(--azul-secundario); color: white !important; }

/* ==========================================================================
PARCHE DE CORRECCIONES MODO OSCURO
========================================================================== */
@media screen {
table tbody tr:hover, table tbody tr:hover td, table tbody tr:hover th, .table-hover > tbody > tr:hover > * { background-color: rgba(255, 255, 255, 0.15) !important; box-shadow: inset 0 0 0 9999px transparent !important; color: #ffffff !important; }
.ranking-table tbody tr td, .table-responsive tbody tr td { color: #ffffff !important; }
.ranking-table td b, .ranking-table td strong, .table-responsive td b, .table-responsive td strong { color: #ffffff !important; }
.text-success { color: #00e676 !important; font-weight: bold !important; }
.text-info, .text-primary, .ranking-table td span, .table-responsive td span { color: #4db8ff !important; font-weight: bold !important; }
.module-section > h3, .dashboard-oscuro h3, .admin-layout h3, .form-container h3, h3 { color: #ffffff !important; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
}

html, body { width: 100%; max-width: 100%; overflow-x: hidden !important; margin: 0 !important; padding: 0 !important; }
.modern-login-container, .hero, .module-section { width: 100% !important; max-width: 100% !important; box-sizing: border-box !important; }
.modern-form-wrapper, .login-card, .form-card, .hero-scroll-container { max-width: 100% !important; box-sizing: border-box !important; }

.navbar, header, #main-header { position: fixed !important; top: 0 !important; left: 0 !important; width: 100% !important; z-index: 999999 !important; transform: translateY(0) !important; }
.fade-scroll { opacity: 0 !important; transform: translateY(50px) scale(0.95) !important; transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1) !important; will-change: opacity, transform; }
.fade-scroll.is-visible { opacity: 1 !important; transform: translateY(0) scale(1) !important; }

#main-content h1, #main-content h2, #main-content h3, .form-card h1, .form-card h2, .form-card h3, header h1, header h2, header h3 { color: #ffffff !important; text-shadow: none !important; }
div[id*="votar"] h1, div[id*="votar"] h2, div[id*="votacion"] h1, div[id*="votacion"] h2, div[class*="votar"] h1, div[class*="votar"] h2, div[class*="votacion"] h1, div[class*="votacion"] h2, form[id*="vot"] h1, form[id*="vot"] h2, div[style*="background: white"] h1, div[style*="background: #fff"] h1, div[style*="background-color: white"] h1, div[style*="background-color: #fff"] h1 { color: var(--rojo-uab, #d32f2f) !important; }
div[id*="votar"] h1 i, div[class*="votar"] h1 i, div[id*="votacion"] h1 i, div[class*="votacion"] h1 i, div[style*="background: white"] h1 i, div[style*="background-color: white"] h1 i { color: var(--rojo-uab, #d32f2f) !important; }

#main-content .btn-outline, #main-content .btn-secondary, #main-content .btn-light, #main-content a[href*="login"], #main-content a[href*="inicio"], #main-content button[onclick*="login"], #main-content button[onclick*="inicio"], .form-card button:last-of-type, .form-card a:last-of-type { background-color: #0056b3 !important; color: #ffffff !important; border: none !important; padding: 14px 20px !important; border-radius: 8px !important; font-weight: bold !important; font-size: 1.1rem !important; text-align: center !important; display: block !important; width: 100% !important; margin-top: 15px !important; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15) !important; transition: all 0.2s ease-in-out !important; text-decoration: none !important; cursor: pointer !important; }
#main-content .btn-outline:hover, #main-content .btn-secondary:hover, #main-content .btn-light:hover, #main-content button:last-of-type:hover, .form-card button:last-of-type:hover, .form-card a:last-of-type:hover { background-color: #004a99 !important; color: #ffffff !important; transform: translateY(-2px) !important; box-shadow: 0 6px 14px rgba(0, 86, 179, 0.35) !important; }

button:disabled, button[disabled], input[type="submit"]:disabled, .btn:disabled, .btn.disabled, #main-content button:disabled, .form-card button:disabled, div[class*="vot"] button:disabled { background-color: #004a99 !important; color: #ffffff !important; border: 1px solid #003366 !important; opacity: 0.95 !important; visibility: visible !important; display: block !important; width: 100% !important; cursor: not-allowed !important; box-shadow: none !important; transform: none !important; }
button:disabled i, button[disabled] i, .btn:disabled i, .form-card button:disabled i { color: #ffffff !important; display: inline-block !important; margin-right: 8px !important; visibility: visible !important; opacity: 1 !important; }

#main-content table button, #main-content table a, #main-content table .btn, #main-content td button, #main-content td a, #main-content td .btn, .form-card table button, .form-card table a, .form-card td button, .form-card td a, div[class*="table"] button, div[class*="table"] a, tr button, tr a { display: inline-block !important; width: auto !important; min-width: 85px !important; max-width: 125px !important; padding: 6px 12px !important; font-size: 0.85rem !important; font-weight: bold !important; margin: 3px 4px !important; border-radius: 6px !important; line-height: 1.2 !important; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important; text-align: center !important; vertical-align: middle !important; }
#main-content table button i, #main-content table a i, #main-content td button i, #main-content td a i, tr button i, tr a i { display: inline !important; margin-right: 5px !important; margin-bottom: 0px !important; font-size: 0.85rem !important; }
#main-content button[onclick*="ctualizar"], #main-content button[onclick*="load"], .form-card button[onclick*="ctualizar"], button[onclick*="window.cargar"] { display: inline-block !important; width: auto !important; min-width: 160px !important; max-width: 240px !important; padding: 8px 18px !important; font-size: 0.95rem !important; margin-bottom: 15px !important; }

.logo { display: flex !important; align-items: center !important; gap: 18px !important; max-width: 700px !important; }
.logo-nav { width: 85px !important; height: auto !important; border-radius: 50% !important; box-shadow: 0 4px 8px rgba(0,0,0,0.4) !important; flex-shrink: 0 !important; background-color: white !important; }

@media screen and (max-width: 768px) {
.logo-nav { width: 55px !important; }
.logo { gap: 10px !important; }
.module-section { padding-top: 170px !important; }
.hero { padding-top: 150px !important;  }
}

.module-section { padding-top: 150px !important; }
.hero { padding-top: 130px !important; }

.tabs-admin-center .tab-btn { font-size: 1.1rem !important; padding: 12px 20px !important; margin-bottom: 0 !important; min-width: auto !important; height: auto !important; vertical-align: middle !important; }
@media screen and (max-width: 768px) { .tabs-admin-center .tab-btn { font-size: 0.95rem !important; padding: 10px 15px !important; } }