/* =============================================
   INDICADORES — Red de Salud Aguaytía
   ============================================= */

/* ===== Hero =====
   Sin imagen se ve el degradado azul. Si el panel (Diseno del sitio)
   tiene una imagen para esta pagina, el div .ind-hero-bg la pinta y
   .franja-con-img agrega el velo --hero-velo para leer el texto. */
.ind-hero {
    position: relative;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #1e3a5f 0%, #0a1628 100%);
}

.ind-hero-bg {
    position: absolute;
    inset: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.ind-hero.franja-con-img::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(10, 22, 40, var(--hero-velo, 0.4));
}

.ind-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.ind-hero-content h1 {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.5rem;
}

.ind-hero-content p {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 0.95rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* ===== Sección ===== */
.ind-section {
    padding: 2.5rem 2rem;
    background: #f8fafc;
    min-height: 60vh;
}

.ind-container {
    max-width: 1100px;
    margin: 0 auto;
}

/* ===== Buscador ===== */
.ind-search {
    position: relative;
    margin-bottom: 1.5rem;
}

.ind-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #94a3b8;
    pointer-events: none;
}

.ind-search input {
    box-sizing: border-box;
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.8rem;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 0.9rem;
    color: #1e293b;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ind-search input::placeholder {
    color: #94a3b8;
}

.ind-search input:focus {
    border-color: #1e3a5f;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

/* ===== Filtros ===== */
.ind-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.ind-filter {
    padding: 0.5rem 1rem;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: #64748b;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.ind-filter:hover {
    color: #1e3a5f;
    border-color: #1e3a5f;
}

.ind-filter.active {
    color: #ffffff;
    background: #1e3a5f;
    border-color: #1e3a5f;
}

/* ===== Grid ===== */
.ind-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
}

/* ===== Tarjeta ===== */
.ind-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    text-decoration: none;
    transition: box-shadow 0.3s, transform 0.3s;
}

.ind-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.ind-card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 58, 95, 0.08);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.ind-card-icon svg {
    width: 20px;
    height: 20px;
    color: #1e3a5f;
}

.ind-card h3 {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.4rem;
}

.ind-card p {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 0.78rem;
    color: #64748b;
    margin: 0 0 1rem;
    flex: 1;
}

.ind-card-tag {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    color: #1e3a5f;
    background: rgba(30, 58, 95, 0.08);
    border-radius: 6px;
    align-self: flex-start;
}

/* ===== Tarjeta SIS (tablero Power BI) =====
   Logo propio: el mismo recuadro, pero con degradado azul→verde para
   distinguirla del resto de indicadores. */
.ind-card--sis .ind-card-icon {
    background: linear-gradient(135deg, #1e3a5f 0%, #0d9488 100%);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
    transition: box-shadow 0.3s, transform 0.3s;
}

.ind-card--sis:hover .ind-card-icon {
    box-shadow: 0 6px 18px rgba(13, 148, 136, 0.42);
    transform: scale(1.05);
}

.ind-card--sis .ind-card-icon svg {
    color: #ffffff;
}

.ind-card--sis .ind-card-tag {
    color: #0f766e;
    background: rgba(13, 148, 136, 0.12);
}

/* Aviso de que se abre fuera del sitio (tablero externo) */
.ind-card-ext {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 16px;
    height: 16px;
    color: #94a3b8;
    opacity: 0.6;
    transition: opacity 0.3s, color 0.3s;
}

.ind-card--sis:hover .ind-card-ext {
    color: #0d9488;
    opacity: 1;
}

/* ===== Sin resultados ===== */
.ind-empty {
    text-align: center;
    padding: 4rem 2rem;
}

.ind-empty svg {
    width: 48px;
    height: 48px;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.ind-empty p {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 0.9rem;
    color: #94a3b8;
    margin: 0;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .ind-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .ind-hero {
        height: 220px;
    }

    .ind-hero-content h1 {
        font-size: 1.6rem;
    }

    .ind-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ind-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
    }
}

@media (max-width: 480px) {
    .ind-grid {
        grid-template-columns: 1fr;
    }
}
