/* --- CONFIGURACIÓN GENERAL Y FUENTES --- */
body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--soft-bg);
    color: var(--gray-dark);
    margin: 0;
}

.text-muted {
    --bs-text-opacity: 1;
    color: var(--gray) !important;
}

.text-primary {
    --bs-text-opacity: 1;
    color: var(--black) !important;
}

.text-warning {
    --bs-text-opacity: 1;
    color: var(--blue-deep) !important;
}

/* --- NAVEGACIÓN RESPONSIVA --- */
.content-nav-bar {
    width: 100%;
    background: white;
    padding: 0 10px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.nav-pills-modern {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    width: 100%;
}

.nav-pills-modern button {
    flex: 0 1 auto;
    padding: 12px 15px !important;
    font-size: 0.85rem !important;
    white-space: nowrap;
    margin: 5px 0;
    background: transparent;
    border: none;
    font-weight: 700;
    color: var(--gray-middle);
    text-transform: uppercase;
    transition: 0.3s;
    border-bottom: 4px solid transparent;
}

.nav-pills-modern button.active {
    color: var(--primary-blue);
    /* Se recomienda definir la variable --programa-color en tu HTML o usar un color fijo */
    border-bottom: 4px solid var(--programa-color, #007bff);
}

/* --- TABLAS --- */
.table td {
    vertical-align: middle !important;
}

.monto-texto {
    display: block;
    white-space: nowrap;
    line-height: 1;
}

.table-responsive {
    display: block;
    width: 100%;
}

/* --- TITULOS --- */
.titulo-principal {
    font-weight: 700 !important;
    letter-spacing: -0.5px;
    color: var(--black) !important;
}

/* --- PREMIUM HERO --- */
.premium-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    color: white;
    overflow: hidden;
    background-size: cover;
    background-image: var(--hero-bg); /* Usa la variable definida arriba */
    background-position: center;
    background-attachment: scroll;
    background-color: #000; /* Fondo de seguridad */
}

.premium-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            rgba(0, 8, 20, 0.95) 0%,
            rgba(0, 8, 20, 0.70) 50%,
            rgba(0, 8, 20, 0.40) 100%);
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
    padding-top: 80px;
}

.hero-tag {
    background: var(--accent-gold);
    color: var(--deep-blue);
    padding: 5px 15px;
    font-weight: 800;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-bottom: 15px;
    display: inline-block;
}

.hero-title {
    font-weight: 900;
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    line-height: 1.1;
    margin-bottom: 20px;
}

/* --- ESTADÍSTICAS HERO --- */
.hero-stats {
    display: flex;
    gap: 15px;
    margin-top: 40px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.1);
     
    backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);

    padding: 12px 20px;
    border-radius: 4px;
    /* Ajuste: Borde izquierdo dinámico vía variable */
    border-left: 4px solid var(--programa-color, #ffd700);
}

.stat-number {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--programa-color, #ffd700);
    line-height: 1;
}

.stat-text {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

/* --- BOTONES --- */
.btn-premium {
    background: var(--programa-color, #007bff) !important;
    color: white !important;
    padding: 18px 40px;
    font-weight: 800;
    border-radius: 50px;
    border: none;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-premium:hover {
    transform: translateY(-5px);
    filter: brightness(1.2);
}

/* --- ANIMACIONES --- */
.fade-in-up {
    animation: fadeInUp 0.6s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- MEDIA QUERIES (RESPONSIVE) --- */
@media (max-width: 767px) {
    #inversion .bg-white {
        padding: 1rem !important;
        border-radius: 15px !important;
    }

    #inversion h3 {
        font-size: 1.25rem !important;
        margin-bottom: 1rem !important;
    }

    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        font-size: 0.8rem !important;
    }

    .table th,
    .table td {
        padding: 8px 4px !important;
        white-space: normal !important;
    }
}

@media (max-width: 576px) {
    .nav-pills-modern button {
        padding: 8px 10px !important;
        font-size: 0.75rem !important;
    }

    .fs-5 {
        font-size: 0.9rem !important;
    }
}