/* Paleta de colores institucional (azul dominante, rojo como acento mínimo) */
:root {
    /* Colores base */
    --red: #c8102e;
    --red-light: #e63946;
    --red-dark: #930018;

    --blue: #0d3b66;           /* Azul institucional */
    --blue-light: #2a6f97;     /* Azul secundario */
    --blue-dark: #062a4f;      /* Azul profundo */

    --yellow: #ffd100;         /* Acento dorado */

    --white: #ffffff;
    --black: #000000;

    /* Colores principales para componentes: azul dominante */
    --primary-color: var(--blue);
    --primary-light: var(--blue-light);
    --primary-dark: var(--blue-dark);
    --primary-gradient: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary-color) 50%, var(--primary-light) 100%);
    --primary-gradient-size: 300% 300%;

    /* Color secundario: soporte azul y acento dorado */
    --secondary-color: var(--blue-light);
    --secondary-light: #4e9fd1;
    --secondary-dark: #1f5678;
    --accent-color: var(--yellow);
    --accent-light: #ffe066;
    --accent-dark: #e6b800;

    /* Neutros */
    --bg-dark: #0b0b0b;
    --muted: #e6e6e6;

    /* Colores de estado */
    --success-color: #16a34a;
    --warning-color: var(--accent-color);
    --error-color: #b00020; /* rojo como acento para errores */
    --info-color: var(--blue-light);

    /* Texto */
    --text-on-primary: var(--white);
    --text-default: #111827;

    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.15), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.18), 0 4px 6px -2px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.14);
    /* Grosor uniforme para subrayado de navegación */
    --nav-underline-thickness: 3px;

    /* Variables Bootstrap para armonizar componentes */
    --bs-primary: var(--primary-color);
    --bs-secondary: var(--secondary-color);
    --bs-warning: var(--accent-color);
    --bs-link-color: var(--primary-color);
    --bs-link-hover-color: var(--primary-light);
}

/* Sobrescribir colores de Bootstrap */
.bg-primary {
    background: var(--primary-gradient) !important;
    background-size: var(--primary-gradient-size);
    color: var(--text-on-primary) !important;
    animation: primaryGradient 8s ease infinite;
}

@keyframes primaryGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.btn-primary {
    /* Botones principales: rojo predominante con texto blanco */
    background: var(--primary-gradient);
    background-size: var(--primary-gradient-size);
    border-color: var(--primary-dark);
    color: var(--text-on-primary);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
    will-change: transform;
}

.btn-primary:hover {
    background-position: 100% 50%;
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 30px rgba(200,30,45,0.18);
    filter: saturate(1.05) brightness(1.03);
}

.btn-secondary {
    /* Botón secundario: variantes de azul institucional */
    background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--secondary-light) 100%);
    border-color: var(--secondary-dark);
    color: var(--text-on-primary);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-light) 100%);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

.text-accent {
    color: var(--accent-color) !important;
}

.bg-accent {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-light) 100%) !important;
    color: white !important;
}

/* Estilos para el modal de noticias */
#newsModal .modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

#newsModal .modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    border-bottom: none;
    padding: 1.5rem 2rem;
}

#newsModal .modal-title {
    font-weight: 600;
    font-size: 1.5rem;
    margin: 0;
}

#newsModal .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

#newsModal .btn-close:hover {
    opacity: 1;
}

#newsModal .modal-body {
    padding: 2rem;
    background-color: var(--white);
    color: var(--text-default);
}

#newsModal .news-image img {
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}

#newsModal .news-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--muted);
}

#newsModal .news-meta .badge {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-light) 100%);
    color: var(--black);
}

#newsModal .news-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--gray-700);
    text-align: justify;
}

#newsModal .news-content p {
    margin-bottom: 1.5rem;
}

#newsModal .modal-footer {
    background-color: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    padding: 1.5rem 2rem;
}

#newsModal .modal-footer .btn {
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

#newsModal .modal-footer .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Animación de entrada del modal */
#newsModal.fade .modal-dialog {
    transition: transform 0.4s ease-out;
    transform: translate(0, -50px);
}

#newsModal.show .modal-dialog {
    transform: none;
}

/* Responsive para el modal */
@media (max-width: 768px) {
    #newsModal .modal-body {
        padding: 1.5rem;
    }
    
    #newsModal .modal-header {
        padding: 1rem 1.5rem;
    }
    
    #newsModal .modal-title {
        font-size: 1.25rem;
    }
    
    #newsModal .news-content {
        font-size: 1rem;
    }
}

/* Oscurecer fondo de modales para resaltar popup */
.modal-backdrop.show { opacity: 0.7; }

/* Estilos generales */
body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-default);
    background-color: #fff;
}

/* Navegación mejorada */
.navbar {
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(6px);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%) !important;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none !important; /* Evita subrayado nativo inconsistente */
}

.nav-link:hover {
    /* Asegurar contraste en hover: texto blanco sobre fondo rojo/azul según navbar */
    color: var(--text-on-primary) !important;
    transform: translateY(-1px);
}

/* Más visibilidad: fondo sutil y subrayado animado */
.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    /* acercar el subrayado al texto */
    bottom: -2px;
    height: var(--nav-underline-thickness);
    background: var(--white);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.22s ease;
    border-radius: 2px;
}

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

.nav-link.active {
    color: var(--secondary-color) !important;
    font-weight: 600;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-xl);
    border-radius: 12px;
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    color: var(--text-on-primary);
    transform: translateX(5px);
}

/* Tarjetas mejoradas */
.card {
    border: none;
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Foto de perfil reutilizable */
.profile-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-block;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-header {
    border-bottom: none;
    font-weight: 600;
    padding: 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Hero section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 50%, rgba(255,209,0,0.06) 100%);
    color: var(--text-on-primary);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 10% 20%, rgba(255,255,255,0.04), transparent 10%), radial-gradient(circle at 90% 80%, rgba(0,0,0,0.04), transparent 15%);
    pointer-events: none;
}

.hero-section::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 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

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

/* Secciones */
.section-title {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 2rem;

/* E&S modal-like overlay (entrada/salida) */
.es-overlay-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 10950;
    opacity: 0;
    transition: opacity 0.35s ease;
    display: none;
}
.es-overlay-backdrop.show { display: block; opacity: 1; }

.es-overlay {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.98);
    z-index: 11000;
    width: min(1100px, 92%);
    max-width: 1100px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    background: var(--white);
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.35s ease;
    display: none;
}
.es-overlay.show { display: block; opacity: 1; transform: translate(-50%, -50%) scale(1); }

.es-overlay .es-body { padding: 1.25rem 1.75rem; display:flex; gap:1rem; align-items:center; }
.es-overlay .es-icon { width:140px; height:140px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:72px; color:#fff; box-shadow: var(--shadow-md); }
.es-overlay.entrada .es-icon { background: linear-gradient(90deg,#00d09c,#00a86b); }
.es-overlay.salida .es-icon { background: linear-gradient(90deg,#ff5f6d,#ff9966); }
.es-overlay.error .es-icon { background: linear-gradient(90deg,#7b2ff7,#f107a3); }
.es-overlay .es-content { flex:1; }
.es-overlay .es-title { font-size:1.6rem; font-weight:700; margin-bottom:0.25rem; }
.es-overlay .es-sub { color: #555; font-size:1rem; }

@media (max-width: 768px) {
    .es-overlay .es-body { padding: 1rem; gap:.75rem; }
    .es-overlay .es-icon { width:100px; height:100px; font-size:44px; }
    .es-overlay .es-title { font-size:1.25rem; }
}
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
    border-radius: 2px;
}

/* Botones mejorados */
.btn {
    border-radius: 12px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

/* Lista de grupos mejorada */
.list-group-item {
    border: none;
    border-radius: 8px !important;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
    background: #fff;
    box-shadow: var(--shadow-sm);
    color: var(--text-default);
}

.list-group-item:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    transform: translateX(6px);
    box-shadow: var(--shadow-md);
    color: var(--text-on-primary);
}

.list-group-item.list-group-item-action:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: var(--text-on-primary);
}

/* Badges mejorados */
.badge {
    border-radius: 20px;
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.badge.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%) !important;
}

.badge.bg-secondary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%) !important;
}

/* Formularios mejorados */
.form-control {
    border-radius: 12px;
    border: 2px solid var(--gray-200);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 138, 0.25);
}

.input-group-text {
    border-radius: 12px 0 0 12px;
    border: 2px solid var(--gray-200);
    border-right: none;
    background: var(--gray-50);
    color: var(--primary-color);
}

/* Bordes azules ligeros para formularios de contacto y login */
#contactForm .form-control,
.auth-form .form-control,
#contactForm .form-select,
.auth-form .form-select {
    border-color: var(--primary-color);
    border-width: 1px;
}

/* Tabs mejorados */
.nav-tabs .nav-link {
    border-radius: 12px 12px 0 0;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.7);
    margin-right: 0.5rem;
}

.nav-tabs .nav-link.active {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
}

/* Footer mejorado */
footer {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%) !important;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--accent-color) 100%);
}

/* Marca: logo del escudo en navbar (neutralizado) */
.brand-logo {
  display: none !important;
  height: 40px;
  width: 40px;
  object-fit: contain;
}

/* Símbolos: contenedor fijo para imágenes */
.symbol-box {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Símbolos: imágenes de bandera y escudo */
.symbol-img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.card-header {
    border-bottom: none;
    font-weight: 600;
    padding: 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Hero section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 50%, rgba(255,209,0,0.06) 100%);
    color: var(--text-on-primary);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 10% 20%, rgba(255,255,255,0.04), transparent 10%), radial-gradient(circle at 90% 80%, rgba(0,0,0,0.04), transparent 15%);
    pointer-events: none;
}

.hero-section::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 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

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

/* Secciones */
.section-title {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
    border-radius: 2px;
}

/* Botones mejorados */
.btn {
    border-radius: 12px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

/* Lista de grupos mejorada */
.list-group-item {
    border: none;
    border-radius: 8px !important;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
    background: #fff;
    box-shadow: var(--shadow-sm);
    color: var(--text-default);
}

.list-group-item:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    transform: translateX(6px);
    box-shadow: var(--shadow-md);
    color: var(--text-on-primary);
}

.list-group-item.list-group-item-action:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: var(--text-on-primary);
}

/* Badges mejorados */
.badge {
    border-radius: 20px;
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.badge.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%) !important;
}

.badge.bg-secondary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%) !important;
}

/* Formularios mejorados */
.form-control {
    border-radius: 12px;
    border: 2px solid var(--gray-200);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 138, 0.25);
}

.input-group-text {
    border-radius: 12px 0 0 12px;
    border: 2px solid var(--gray-200);
    border-right: none;
    background: var(--gray-50);
    color: var(--primary-color);
}

/* Tabs mejorados */
.nav-tabs .nav-link {
    border-radius: 12px 12px 0 0;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.7);
    margin-right: 0.5rem;
}

.nav-tabs .nav-link.active {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
}

/* Footer mejorado */
footer {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%) !important;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--accent-color) 100%);
}

/* Iconos sociales */
.social-links a {
    display: inline-block;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    text-align: center;
    line-height: 50px;
    transition: all 0.3s ease;
    margin-right: 1rem;
}

.social-links a:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--shadow-lg);
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
}

/* Efectos de hover para elementos interactivos */
.stretched-link::after {
    transition: all 0.3s ease;
}

.card:hover .stretched-link::after {
    background: rgba(30, 58, 138, 0.05);
}

/* Mejoras de accesibilidad */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Indicadores de carga */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* --- Admin Theme --- */
.admin-page {
  min-height: 100vh;
  padding-top: 2rem;
  padding-bottom: 2rem;
  background: linear-gradient(135deg, var(--primary-color, #d90429) 0%, var(--primary-light, #ffd600) 100%);
}

.admin-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.admin-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.15);
}

.admin-header-title {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.table-admin thead th {
  background-color: #f7f7f7;
  font-weight: 600;
}

.admin-actions .btn {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.admin-actions .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.12);
}

/* --- Descargas Page --- */
.desc-hero h1 { letter-spacing: .5px; }
.desc-card .card-title { font-weight: 600; }
.desc-card .btn { border-radius: .5rem; }
.desc-type-pill { letter-spacing: .8px; }

/* styles.css - estilos globales del sitio */
/* Nota: Este archivo fue ajustado para soportar símbolos con imágenes y controlar tamaños */

/* Reset de logotipo si se usa imagen */
.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

/* Contenedor fijo y centrado para símbolos (bandera/escudo) */
.symbol-box {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #f8f9fa;
  border-radius: .5rem;
}

/* Imágenes de símbolos: escalan sin deformarse dentro de .symbol-box */
.symbol-img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Utilidad: justificar texto con alternativa centrada si no se soporta justificado fino */
.justify-or-center {
  text-align: justify;
  text-justify: inter-word;
}
@supports not (text-justify: inter-word) {
  .justify-or-center { text-align: center; }
}

/* Responsive: ajustar altura de los símbolos en pantallas pequeñas */
@media (max-width: 768px) {
  .symbol-box { height: 180px; }
}
@media (max-width: 576px) {
  .symbol-box { height: 150px; }
}
@media (max-width: 420px) {
  .symbol-box { height: 130px; }
}

/* Responsive: botones del himno apilados y de ancho completo en móvil */
.audio-btns { flex-wrap: wrap; }
@media (max-width: 576px) {
  .audio-btns { gap: .5rem; }
  .audio-btns .btn { width: 100%; }
}

.nav-tabs .nav-link.active {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
}

/* Footer mejorado */
footer {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%) !important;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--accent-color) 100%);
}

/* Marca: logo del escudo en navbar (neutralizado) */
.brand-logo {
  display: none !important;
  height: 40px;
  width: 40px;
  object-fit: contain;
}

/* Símbolos: contenedor fijo para imágenes */
.symbol-box {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Símbolos: imágenes de bandera y escudo */
.symbol-img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.card-header {
    border-bottom: none;
    font-weight: 600;
    padding: 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Hero section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 50%, rgba(255,209,0,0.06) 100%);
    color: var(--text-on-primary);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 10% 20%, rgba(255,255,255,0.04), transparent 10%), radial-gradient(circle at 90% 80%, rgba(0,0,0,0.04), transparent 15%);
    pointer-events: none;
}

.hero-section::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 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

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

/* Secciones */
.section-title {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
    border-radius: 2px;
}

/* Botones mejorados */
.btn {
    border-radius: 12px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

/* Lista de grupos mejorada */
.list-group-item {
    border: none;
    border-radius: 8px !important;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
    background: #fff;
    box-shadow: var(--shadow-sm);
    color: var(--text-default);
}

.list-group-item:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    transform: translateX(6px);
    box-shadow: var(--shadow-md);
    color: var(--text-on-primary);
}

.list-group-item.list-group-item-action:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: var(--text-on-primary);
}

/* Badges mejorados */
.badge {
    border-radius: 20px;
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.badge.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%) !important;
}

.badge.bg-secondary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%) !important;
}

/* Formularios mejorados */
.form-control {
    border-radius: 12px;
    border: 2px solid var(--gray-200);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 138, 0.25);
}

.input-group-text {
    border-radius: 12px 0 0 12px;
    border: 2px solid var(--gray-200);
    border-right: none;
    background: var(--gray-50);
    color: var(--primary-color);
}

/* Tabs mejorados */
.nav-tabs .nav-link {
    border-radius: 12px 12px 0 0;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.7);
    margin-right: 0.5rem;
}

.nav-tabs .nav-link.active {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
}

/* Footer mejorado */
footer {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%) !important;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--accent-color) 100%);
}

/* Marca: logo del escudo en navbar (neutralizado) */
.brand-logo {
  display: none !important;
  height: 40px;
  width: 40px;
  object-fit: contain;
}

/* Símbolos: contenedor fijo para imágenes */
.symbol-box {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Símbolos: imágenes de bandera y escudo */
.symbol-img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.card-header {
    border-bottom: none;
    font-weight: 600;
    padding: 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Hero section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 50%, rgba(255,209,0,0.06) 100%);
    color: var(--text-on-primary);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 10% 20%, rgba(255,255,255,0.04), transparent 10%), radial-gradient(circle at 90% 80%, rgba(0,0,0,0.04), transparent 15%);
    pointer-events: none;
}

.hero-section::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 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

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

/* Secciones */
.section-title {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
    border-radius: 2px;
}

/* Botones mejorados */
.btn {
    border-radius: 12px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

/* Lista de grupos mejorada */
.list-group-item {
    border: none;
    border-radius: 8px !important;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
    background: #fff;
    box-shadow: var(--shadow-sm);
    color: var(--text-default);
}

.list-group-item:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    transform: translateX(6px);
    box-shadow: var(--shadow-md);
    color: var(--text-on-primary);
}

.list-group-item.list-group-item-action:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: var(--text-on-primary);
}

/* Badges mejorados */
.badge {
    border-radius: 20px;
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.badge.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%) !important;
}

.badge.bg-secondary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%) !important;
}

/* Formularios mejorados */
.form-control {
    border-radius: 12px;
    border: 2px solid var(--gray-200);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 138, 0.25);
}

.input-group-text {
    border-radius: 12px 0 0 12px;
    border: 2px solid var(--gray-200);
    border-right: none;
    background: var(--gray-50);
    color: var(--primary-color);
}

/* Tabs mejorados */
.nav-tabs .nav-link {
    border-radius: 12px 12px 0 0;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.7);
    margin-right: 0.5rem;
}

.nav-tabs .nav-link.active {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
}

/* Footer mejorado */
footer {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%) !important;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--accent-color) 100%);
}

/* Iconos sociales */
.social-links a {
    display: inline-block;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    text-align: center;
    line-height: 50px;
    transition: all 0.3s ease;
    margin-right: 1rem;
}

.social-links a:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--shadow-lg);
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
}

/* Efectos de hover para elementos interactivos */
.stretched-link::after {
    transition: all 0.3s ease;
}

.card:hover .stretched-link::after {
    background: rgba(30, 58, 138, 0.05);
}

/* Mejoras de accesibilidad */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Indicadores de carga */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* --- Admin Theme --- */
.admin-page {
  min-height: 100vh;
  padding-top: 2rem;
  padding-bottom: 2rem;
  background: linear-gradient(135deg, var(--primary-color, #d90429) 0%, var(--primary-light, #ffd600) 100%);
}

.admin-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.admin-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.15);
}

.admin-header-title {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.table-admin thead th {
  background-color: #f7f7f7;
  font-weight: 600;
}

.admin-actions .btn {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.admin-actions .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.12);
}

/* --- Descargas Page --- */
.desc-hero h1 { letter-spacing: .5px; }
.desc-card .card-title { font-weight: 600; }
.desc-card .btn { border-radius: .5rem; }
.desc-type-pill { letter-spacing: .8px; }

/* styles.css - estilos globales del sitio */
/* Nota: Este archivo fue ajustado para soportar símbolos con imágenes y controlar tamaños */

/* Reset de logotipo si se usa imagen */
.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

/* Contenedor fijo y centrado para símbolos (bandera/escudo) */
.symbol-box {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #f8f9fa;
  border-radius: .5rem;
}

/* Imágenes de símbolos: escalan sin deformarse dentro de .symbol-box */
.symbol-img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}