/* ============================================
   PROYECTO NOG 28027159 - STYLES v2.0
   ============================================ */

:root {
    --primary: #f97316;
    --primary-dark: #ea580c;
    --primary-light: #fdba74;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #334155;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --blue: #3b82f6;
    --purple: #8b5cf6;
    --teal: #14b8a6;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 80px;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes progressFill { from { width: 0%; } }
@keyframes chartSpin {
    from { transform: rotate(-90deg) scale(0.8); opacity: 0; }
    to { transform: rotate(-90deg) scale(1); opacity: 1; }
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.animate-in { opacity: 0; animation: fadeInUp 0.6s ease-out forwards; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.hidden { display: none !important; }

/* ============================================
   HEADER CON MENÚ DE NAVEGACIÓN
   ============================================ */
.header {
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid var(--border);
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

.header.scrolled {
    box-shadow: 0 4px 30px rgba(0,0,0,0.4);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    padding: 0 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.logo-text h1 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.logo-text span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Menú Desktop */
.main-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.25s ease;
    position: relative;
}

.nav-link i {
    font-size: 0.875rem;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.nav-link.active {
    color: var(--primary);
    background: rgba(249, 115, 22, 0.1);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

/* Menú Móvil */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    flex-direction: column;
    gap: 0.25rem;
    backdrop-filter: blur(20px);
}

.mobile-nav.active {
    display: flex;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.25s ease;
}

.mobile-nav-link:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.mobile-nav-link.active {
    color: var(--primary);
    background: rgba(249, 115, 22, 0.1);
}

.badge {
    background: rgba(249, 115, 22, 0.15);
    color: var(--primary);
    padding: 0.4rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(249, 115, 22, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.badge i { font-size: 0.7rem; }

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    padding: 3rem 0;
    background: linear-gradient(180deg, var(--bg-dark) 0%, #0f172a 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-content h2 {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
    max-width: 500px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 10px 40px rgba(249, 115, 22, 0.1);
}

.stat-icon {
    width: 42px;
    height: 42px;
    background: rgba(249, 115, 22, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    color: var(--primary);
    font-size: 1.1rem;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-card {
    position: relative;
    width: 100%;
    max-width: 340px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.75rem;
    text-align: center;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: -15px;
    right: -15px;
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.15;
    filter: blur(30px);
}

.hero-card-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.hero-card-percentage {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.hero-card-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.hero-card-dates {
    margin-top: 1.25rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ============================================
   PORTADA CON IMAGEN - TEXTO SOBRE FOTO
   ============================================ */
.hero {
    position: relative;
    width: 100%;
    height: 500px;
    min-height: 400px;
    overflow: hidden;
    background-color: var(--bg-dark);
}

/* Contenedor de la imagen de fondo */
.hero-image-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* La imagen ocupa todo el espacio */
.hero-image-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    filter: brightness(0.4) contrast(0.9);
}

/* Overlay oscuro encima de la imagen */
.hero-image-overlay-dark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    z-index: 2;
}

/* Overlay gradiente para profundidad */
.hero-image-overlay-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, 
        rgba(15, 23, 42, 0.5) 0%, 
        rgba(15, 23, 42, 0.7) 50%, 
        rgba(15, 23, 42, 0.9) 100%);
    z-index: 3;
}

/* Contenedor del texto - centrado sobre la imagen */
.hero .container {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.875rem;
    padding: 2rem 1rem;
    max-width: 800px;
}

/* Badge de entidad */
.hero-image-badge-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 9999px;
    padding: 0.5rem 1.25rem;
}

.hero-image-badge-shield {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    color: white;
}

.hero-image-badge-top span {
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

/* Título */
.hero-image-title {
    font-size: 2.00rem;
    font-weight: 800;
    line-height: 1.15;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.02em;
    max-width: 700px;
    margin: 0.25rem 0;
}

/* Ubicación */
.hero-image-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    color: #fdba74;
    font-weight: 500;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

.hero-image-location i {
    color: var(--primary);
}

/* Info en fila */
.hero-image-info-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-image-info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.hero-image-info-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.hero-image-info-value {
    font-size: 1rem;
    font-weight: 700;
    color: white;
}

.hero-image-info-value.status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #34d399;
    font-size: 0.9rem;
}

.hero-image-info-value.status i {
    font-size: 0.6rem;
    animation: pulse 2s infinite;
}

.hero-image-info-divider {
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
}

/* Flecha scroll */
.hero-image-scroll {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.hero-image-scroll:hover {
    color: var(--primary);
}

.hero-image-scroll-arrow {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounceDown 2s infinite;
}

.hero-image-scroll-arrow i {
    font-size: 0.875rem;
    color: var(--primary);
}

@keyframes bounceDown {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(6px); opacity: 0.6; }
}

/* ============================================
   PROGRESS SECTION (Timeline Funcional)
   ============================================ */
.progress-section {
    padding: 2.5rem 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.progress-title {
    font-size: 1.15rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.progress-title i { color: var(--primary); }

.progress-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.progress-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.progress-meta strong { color: var(--text-primary); }

.progress-bar-container {
    background: var(--bg-dark);
    border-radius: 9999px;
    height: 14px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    border-radius: 9999px;
    position: relative;
    transition: width 1.5s ease-out;
    width: 0%;
}

.progress-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: pulse 2s infinite;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-top: 0.6rem;
    font-size: 0.85rem;
}

.progress-info span:first-child { color: var(--text-muted); }

.progress-percentage {
    font-weight: 700;
    color: var(--primary);
}

/* ============================================
   UBICACIÓN CON MAPA
   ============================================ */
.location-section {
    padding: 3rem 0;
    background: linear-gradient(180deg, var(--bg-dark) 0%, #0f172a 100%);
}

.map-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.map-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    height: 400px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    filter: grayscale(0.3) contrast(1.1);
}

.map-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.map-info-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    transition: all 0.3s ease;
}

.map-info-item:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

.map-info-item i {
    color: var(--primary);
    font-size: 1.1rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
    width: 20px;
}

.map-info-item div { display: flex; flex-direction: column; }

.map-info-item strong {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.2rem;
}

.map-info-item span {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ============================================
   GALERÍA COMPACTA (Masonry)
   ============================================ */
.gallery-section {
    padding: 3rem 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.gallery-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.gallery-filter {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.4rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
}

.gallery-filter:hover, .gallery-filter.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.gallery-item {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.gallery-item-img {
    aspect-ratio: 4/3;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.gallery-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-item-img img {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: white;
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    background: rgba(249, 115, 22, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item-info {
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gallery-item-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.gallery-item-date i { color: var(--primary); font-size: 0.7rem; }

.gallery-item-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(249, 115, 22, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.section-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.25);
    flex-shrink: 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* ============================================
   RESUMEN FINANCIERO
   ============================================ */
.financial-section {
    padding: 3rem 0;
    background: linear-gradient(180deg, var(--bg-dark) 0%, #0f172a 100%);
}

.financial-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.financial-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.financial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.financial-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.financial-card:hover::before { opacity: 1; }

.financial-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.financial-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
}

.bg-blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.bg-green { background: linear-gradient(135deg, #10b981, #059669); }
.bg-orange { background: linear-gradient(135deg, #f97316, #ea580c); }
.bg-purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

.financial-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.financial-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
    letter-spacing: -0.02em;
}

.financial-trend {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding-top: 0.6rem;
    border-top: 1px solid var(--border);
}

.financial-trend.positive { color: var(--success); }
.financial-trend.warning { color: var(--warning); }

.financial-progress-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.75rem;
}

.financial-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.875rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.financial-progress-percent {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--success);
}

.financial-progress-bar-bg {
    background: var(--bg-dark);
    border-radius: 9999px;
    height: 14px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.financial-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), #34d399);
    border-radius: 9999px;
    transition: width 1.5s ease-out;
    width: 0%;
    position: relative;
}

.financial-progress-bar-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: pulse 2s infinite;
}

.financial-progress-legend {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* ============================================
   CATEGORÍAS DE INVERSIÓN
   ============================================ */
.categories-section {
    padding: 3rem 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.categories-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 1.5rem;
}

.categories-chart-card,
.categories-table-card {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.75rem;
}

.chart-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.chart-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.donut-chart {
    width: 200px;
    height: 200px;
}

.chart-segment {
    transition: all 0.3s ease;
    cursor: pointer;
}

.chart-segment:hover {
    stroke-width: 35;
    filter: drop-shadow(0 0 8px rgba(249, 115, 22, 0.5));
}

.chart-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    background: rgba(255,255,255,0.02);
}

.legend-color {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

.legend-text { color: var(--text-secondary); }

.legend-percent {
    margin-left: auto;
    font-weight: 600;
    color: var(--text-primary);
}

/* Table */
.table-responsive { overflow-x: auto; }

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 0.875rem 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 0.875rem 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.data-table tbody tr { transition: background 0.2s ease; }
.data-table tbody tr:hover { background: rgba(249, 115, 22, 0.03); }
.data-table tbody tr:last-child td { border-bottom: none; }

.table-category {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.table-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.table-amount {
    font-family: 'Inter', monospace;
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
    white-space: nowrap;
}

.table-percent {
    font-weight: 600;
    color: var(--primary);
}

.table-total td {
    background: rgba(249, 115, 22, 0.05);
    font-weight: 600;
    color: var(--text-primary);
}

.table-total .table-amount { color: var(--primary); }

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
}

.status-badge::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.status-active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}
.status-active::before { background: var(--success); }

.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}
.status-pending::before { background: var(--warning); }

/* ============================================
   RENGLONES DEL CONTRATO
   ============================================ */
.renglones-section {
    padding: 3rem 0;
    background: linear-gradient(180deg, var(--bg-dark) 0%, #0f172a 100%);
}

.renglones-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    overflow: hidden;
}

.renglones-table th {
    background: rgba(249, 115, 22, 0.05);
}

.renglon-num {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.mini-progress {
    background: var(--bg-dark);
    border-radius: 9999px;
    height: 6px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.mini-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    border-radius: 9999px;
    transition: width 1.2s ease;
}

.mini-progress-text {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* ============================================
   INFORMACIÓN DEL CONTRATO (TABS)
   ============================================ */
.contract-section {
    padding: 3rem 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.contract-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.4rem;
    width: fit-content;
}

.contract-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
}

.contract-tab:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.03);
}

.contract-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.contract-tab i { font-size: 0.875rem; }

.contract-tabs-content { position: relative; }

.contract-tab-panel {
    display: none;
    animation: fadeInUp 0.4s ease;
}

.contract-tab-panel.active { display: block; }

.contract-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.contract-info-item {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.contract-info-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.info-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.info-value {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.info-value.highlight {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
}

/* ============================================
   PIE DE PÁGINA
   ============================================ */
.footer-main {
    background: #020617;
    border-top: 1px solid var(--border);
}

.footer-top { padding: 3rem 0 2.5rem; }

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 2.5rem;
}

.footer-col { display: flex; flex-direction: column; }

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.footer-brand h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-brand span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.footer-social {
    display: flex;
    gap: 0.6rem;
}

.social-link {
    width: 36px;
    height: 36px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.footer-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-links a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary);
    transform: translateX(4px);
}

.footer-links i { font-size: 0.65rem; color: var(--primary); }

.footer-contact {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.footer-contact i {
    color: var(--primary);
    margin-top: 0.15rem;
    flex-shrink: 0;
    width: 16px;
    font-size: 0.875rem;
}

.footer-bottom {
    background: rgba(0,0,0,0.3);
    border-top: 1px solid var(--border);
    padding: 1.25rem 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-bottom-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-bottom-links a:hover { color: var(--primary); }

.separator { color: var(--border); }

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox.active { display: flex; }

.lightbox-img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 8px;
    object-fit: contain;
    transition: opacity 0.2s ease;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: white;
    font-size: 1.75rem;
    cursor: pointer;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 1.75rem;
    cursor: pointer;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.lightbox-nav:hover { background: rgba(255,255,255,0.2); }
.lightbox-prev { left: 2rem; }
.lightbox-next { right: 2rem; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1100px) {
    .main-nav { display: none; }
    .mobile-menu-btn { display: flex; }
    .header-content { padding: 0 1rem; }
    .badge { display: none; }
}

@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .financial-grid { grid-template-columns: repeat(2, 1fr); }
    .categories-grid { grid-template-columns: 1fr; }
    .map-wrapper { grid-template-columns: 1fr; }
    .gallery-masonry { grid-template-columns: repeat(3, 1fr); }
    .contract-info-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    body { padding-top: 65px; }
    .hero-content h2 { font-size: 2rem; }
    .stats-grid { grid-template-columns: 1fr; }
    .progress-header { flex-direction: column; align-items: flex-start; }
    .progress-meta { flex-direction: column; gap: 0.4rem; }
    .financial-grid { grid-template-columns: 1fr; }
    .gallery-masonry { grid-template-columns: repeat(2, 1fr); }
    .contract-info-grid { grid-template-columns: 1fr; }
    .contract-tabs { width: 100%; }
    .contract-tab { flex: 1; justify-content: center; padding: 0.6rem; font-size: 0.8rem; }
    .contract-tab span { display: none; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer-bottom-content { flex-direction: column; text-align: center; }
    .lightbox-nav { display: none; }
    .section-header { flex-direction: column; text-align: center; gap: 0.75rem; }
    .data-table { font-size: 0.75rem; }
    .data-table th, .data-table td { padding: 0.6rem 0.5rem; }
    .renglon-num { width: 28px; height: 28px; font-size: 0.7rem; }
    .map-container { height: 280px; }
}

@media (max-width: 480px) {
    .container { padding: 0 1rem; }
    .hero { padding: 1.5rem 0; }
    .hero-content h2 { font-size: 1.5rem; }
    .financial-card { padding: 1.25rem; }
    .financial-value { font-size: 1.25rem; }
    .categories-chart-card, .categories-table-card, .renglones-card { padding: 1.25rem; }
    .gallery-masonry { grid-template-columns: 1fr; }
    .gallery-item-img { aspect-ratio: 16/9; }
}

/* ============================================
   LOGO DE LA MUNICIPALIDAD EN HERO
   ============================================ */
.hero-municipality-logo {
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: center;
}

.hero-municipality-img {
    width: 140px;
    height: 140px;
    object-fit: contain;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.5));
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 4px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.hero-municipality-img:hover {
    transform: scale(1.05);
}

.hero-municipality-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .hero-municipality-img {
        width: 100px;
        height: 100px;
    }
    .hero-municipality-name {
        font-size: 0.9rem;
    }
}