@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ==========================================
   VARIABLES DE ENTORNO UNIFICADAS
   ========================================== */
:root {
    --color-primary: #1a2a6c; 
    --color-accent: #b38e5d;  
    --color-danger: #e74c3c;
    --color-success: #27ae60;
    --color-white: #ffffff;
    --color-info-dark: #5a6a7a;
    --color-background: #f0f2f5;
    --color-dark: #2c3e50;
    --card-bg: #ffffff;
    
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    --card-border-radius: 1.2rem;
    --border-radius-1: 0.4rem;
    --border-radius-2: 0.8rem;
    --border-radius-3: 1.2rem;

    /* Footer específico de trámites */
    --footer-bg: linear-gradient(180deg, #052f91 0%, #020617 100%);
    --footer-text: #ffffff;
    --light-muted: #cbd5e1;
}

/* Variables para Tema Obscuro */
[data-theme="dark"] {
    --color-background: #0f172a;
    --color-dark: #f8fafc;
    --color-info-dark: #94a3b8;
    --card-bg: #1e293b;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Estilos Generales Base */
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--color-background);
    color: var(--color-dark);
    transition: background-color 0.3s, color 0.3s;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

.navbar-brand img {
    height: 50px;
}

/* Contenedores de Gaceta */
.card-panel {
    background-color: var(--card-bg);
    border-radius: var(--card-border-radius);
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(0,0,0,0.05);
    height: 100%;
}

.scroll-container {
    max-height: 350px;
    overflow-y: auto;
}

#rectangle {
    width: 14px;
    height: 14px;
    background-color: var(--color-success);
    display: inline-block;
    border-radius: var(--border-radius-1);
    vertical-align: middle;
}

/* Calendario jQuery UI adaptado al sistema de diseño */
.ui-datepicker {
    width: 100% !important;
    max-width: 320px;
    margin: 0 auto;
    border: none !important;
    background: transparent !important;
}

.Highlighted a {
    background-color: var(--color-success) !important;
    background-image: none !important;
    color: white !important;
    font-weight: bold !important;
    border-radius: 50%;
    text-align: center;
}

/* Elementos interactivos */
.list-group-item-action {
    background-color: var(--card-bg);
    color: var(--color-dark);
    cursor: pointer;
    transition: all 0.2s;
}

.list-group-item-action:hover {
    background-color: rgba(0,0,0,0.04);
}

[data-theme="dark"] .list-group-item-action:hover {
    background-color: rgba(255,255,255,0.04);
}

/* Estilos para Datepicker en Modo Obscuro */
[data-theme="dark"] .ui-datepicker-header {
    background: #334155 !important;
    color: #fff !important;
}
[data-theme="dark"] .ui-state-default {
    background: #1e293b !important;
    color: #cbd5e1 !important;
    border: 1px solid #475569 !important;
}
[data-theme="dark"] .ui-state-active {
    background: var(--color-primary) !important;
    color: #fff !important;
}

[data-theme="dark"] .ui-datepicker-prev {
    background:  #fff !important;
}
[data-theme="dark"] .ui-datepicker-next {
    background:  #fff !important;
}
[data-theme="dark"] .ui-datepicker-calendar thead th,
[data-theme="dark"] .ui-datepicker-calendar thead th span {
    color: #ffffff !important;
}

[data-theme="dark"] .text-muted {
    color: #fff !important;
}

.pie-pagina {
    background: var(--footer-bg);
    color: var(--footer-text);
    margin-top: auto;
    border-top: 4px solid var(--color-accent);
    width: 100%;
}

.container-footer-wrap {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr 1fr;
    gap: 50px;
    padding: 40px 0;
}

.brand-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.logo-footer-escudo {
    height: 80px;
    width: auto;
    object-fit: contain;
    margin-bottom: 12px;
}

.brand-column h5 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: #ffffff;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 8px;
    color: #ffffff;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 35px;
    height: 3px;
    background-color: var(--color-accent);
    border-radius: 2px;
}

.footer-text-item {
    font-size: 0.9rem;
    margin-bottom: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.5;
    color: #cbd5e1;
}

.text-accent {
    color: var(--color-accent);
}

.text-light-muted {
    color: #94a3b8;
}

.redes-container {
    display: flex;
    gap: 12px;
}

.redes-container a {
    color: var(--footer-text);
    background-color: rgba(255,255,255,0.06);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    text-decoration: none;
}

.redes-container a:hover {
    background-color: var(--color-accent);
    transform: translateY(-3px);
    color: white;
}

.footer-copy {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
    color: #94a3b8;
}

/* Ajustes Responsivos del Footer */
@media screen and (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    .footer-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .footer-text-item { justify-content: center; }
    .redes-container { justify-content: center; }
    .brand-column { align-items: center; }
}

/* ==========================================
   BOTÓN FLOTANTE: CAMBIO DE TEMA
   ========================================== */
.theme-switch {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    z-index: 9999;
    transition: all 0.3s ease;
}

.theme-switch:hover {
    transform: scale(1.1) rotate(15deg);
    background-color: var(--color-accent);
}

[data-theme="dark"] .theme-switch {
    background-color: #334155;
    color: #f1f5f9;
}

/* ==========================================
   ESTILOS ADICIONALES: NOTAS ACLARATORIAS
   ========================================== */
.nota-aclaratoria {
    font-size: 0.78rem;
    font-weight: 500;
    padding: 6px 12px;
    background-color: rgba(179, 142, 93, 0.1); /* Tono suave basado en el color acento */
    border-left: 3px solid var(--color-accent);
    border-radius: 0 var(--border-radius-1) var(--border-radius-1) 0;
    color: var(--color-dark);
    line-height: 1.3;
}

[data-theme="dark"] .nota-aclaratoria {
    background-color: rgba(179, 142, 93, 0.15);
    color: #e2e8f0;
}