/* 
 * Estilos dinámicos para la sección de Problemática del Agua
 * Mejora visual con iconos, animaciones y mejor estructura
 */

/* === CONTENEDOR DE PROBLEMAS === */
.problems-list {
    margin-top: 1.5rem;
}

.problem-item {
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid #0093dd;
    margin-bottom: 1rem !important;
}

.problem-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 147, 221, 0.15);
}

/* === ICONOS DE PROBLEMAS === */
.problem-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #0093dd, #0074bb);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 147, 221, 0.3);
    transition: all 0.3s ease;
}

.problem-icon i {
    color: #ffffff !important;
    font-size: 24px !important;
}

.problem-item:hover .problem-icon {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 147, 221, 0.4);
}

/* === CONTENIDO DE PROBLEMAS === */
.problem-content h6 {
    color: #ffffff !important;  /* Cambiado a blanco para contraste */
    font-size: 1.1rem !important;
    margin-bottom: 0.5rem !important;
}

.problem-content p {
    color: rgba(255, 255, 255, 0.8) !important;  /* Blanco semi-transparente */
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
}

/* === CAJA DE CONSECUENCIAS === */
.bg-light.rounded {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.1)) !important;  /* Fondo más claro */
    border: 1px solid rgba(255, 255, 255, 0.3) !important;  /* Borde blanco semi-transparente */
    transition: all 0.3s ease;
}

.bg-light.rounded:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.15)) !important;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

.bg-light.rounded h6 {
    color: #ffffff !important;  /* Cambiado a blanco */
    font-size: 1.2rem !important;
}

.bg-light.rounded h6 i {
    color: #ffffff !important;  /* Cambiado a blanco */
}

.bg-light.rounded p {
    color: rgba(255, 255, 255, 0.9) !important;  /* Blanco semi-transparente para el texto */
}

/* === IMAGEN PRINCIPAL === */
#problematica-valle .img-fluid {
    border-radius: 12px !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s ease;
}

#problematica-valle .img-fluid:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2) !important;
}

/* === TÍTULO DE SECCIÓN === */
#problematica-valle h4.fw-bold {
    color: #ffffff !important;  /* Cambiado a blanco para contraste */
    font-size: 1.8rem !important;
    margin-bottom: 1.5rem !important;
    position: relative;
}

#problematica-valle h4.fw-bold::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #0093dd, #0074bb);
    border-radius: 2px;
}

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

.problem-item {
    animation: fadeInUp 0.6s ease-out;
}

.problem-item:nth-child(1) { animation-delay: 0.1s; }
.problem-item:nth-child(2) { animation-delay: 0.2s; }
.problem-item:nth-child(3) { animation-delay: 0.3s; }
.problem-item:nth-child(4) { animation-delay: 0.4s; }
.problem-item:nth-child(5) { animation-delay: 0.5s; }
.problem-item:nth-child(6) { animation-delay: 0.6s; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .problem-icon {
        width: 45px;
        height: 45px;
    }
    
    .problem-icon i {
        font-size: 20px !important;
    }
    
    .problem-content h6 {
        font-size: 1rem !important;
    }
    
    .problem-content p {
        font-size: 0.9rem !important;
    }
    
    #problematica-valle h4.fw-bold {
        font-size: 1.5rem !important;
        text-align: center;
    }
    
    #problematica-valle h4.fw-bold::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .problem-item {
        padding: 12px;
    }
    
    .problem-item:hover {
        transform: none;
    }
}

@media (max-width: 576px) {
    .problems-list {
        margin-top: 1rem;
    }
    
    .problem-item {
        padding: 10px;
        margin-bottom: 0.8rem !important;
    }
    
    .problem-icon {
        width: 40px;
        height: 40px;
        margin-right: 0.8rem !important;
    }
      .problem-icon i {
        font-size: 18px !important;
    }
}

/* === FORZAR TEXTO BLANCO EN TODA LA SECCIÓN === */
#problematica-valle .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

#problematica-valle p.text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

#problematica-valle strong {
    color: #ffffff !important;
    font-weight: 700 !important;
}

/* === ESTADÍSTICAS EN COLUMNA IZQUIERDA === */
.stats-cards {
    margin-top: 1.5rem;
}

.stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.15));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 147, 221, 0.2);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.stat-icon i {
    font-size: 24px;
    color: #0093dd !important;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff !important;
    margin: 0;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8) !important;
    margin: 0;
    margin-top: 5px;
}

/* === ALERTA CRÍTICA === */
.alert-box {
    background: linear-gradient(135deg, #dc3545, #c82333);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.alert-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.alert-icon i {
    font-size: 24px;
    color: #ffffff !important;
    animation: pulse 2s infinite;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff !important;
    margin: 0 0 8px 0;
}

.alert-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9) !important;
    margin: 0;
    line-height: 1.4;
}

/* Animación de pulso para la alerta */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* === COMPONENTES ADICIONALES COLUMNA IZQUIERDA === */

/* Tarjeta de Consumo Diario */
.consumption-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.consumption-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.consumption-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.consumption-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.consumption-icon i {
    color: white;
    font-size: 18px;
}

.consumption-title {
    color: #ffffff !important;
    font-weight: 600;
    margin: 0;
    font-size: 1.1rem;
}

.consumption-visual {
    text-align: center;
}

.consumption-meter {
    position: relative;
    width: 100%;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 40px;
    overflow: hidden;
    margin-bottom: 10px;
}

.meter-fill {
    position: relative;
    height: 100%;
    background: linear-gradient(90deg, #007bff, #28a745);
    border-radius: 40px;
    width: 85%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fillMeter 2s ease-out;
}

.meter-value {
    color: white;
    font-weight: bold;
    font-size: 1.4rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.consumption-text {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 0.9rem;
    margin: 0;
}

/* Indicadores Críticos */
.indicators-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.indicators-title {
    color: #ffffff !important;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1.1rem;
    text-align: center;
}

.indicator-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 0;
}

.indicator-label {
    display: flex;
    align-items: center;
    min-width: 140px;
    margin-right: 10px;
}

.indicator-label i {
    font-size: 16px;
    margin-right: 8px;
}

.indicator-label span {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.85rem;
    font-weight: 500;
}

.indicator-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin: 0 10px;
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1.5s ease-out;
    animation: fillBar 2s ease-out;
}

.bar-fill.danger {
    background: linear-gradient(90deg, #dc3545, #ff6b6b);
}

.bar-fill.warning {
    background: linear-gradient(90deg, #ffc107, #ffdd57);
}

.bar-fill.info {
    background: linear-gradient(90deg, #17a2b8, #5bc0de);
}

.indicator-value {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 0.8rem;
    font-weight: 500;
    min-width: 80px;
    text-align: right;
}

/* Animaciones */
@keyframes fillMeter {
    0% { width: 0; }
    100% { width: 85%; }
}

@keyframes fillBar {
    0% { width: 0; }
    100% { width: inherit; }
}

/* Responsive para componentes adicionales */
@media (max-width: 768px) {
    .consumption-card,
    .indicators-section {
        padding: 15px;
        margin-top: 1rem;
    }
    
    .consumption-title,
    .indicators-title {
        font-size: 1rem !important;
    }
    
    .meter-value {
        font-size: 1.2rem;
    }
    
    .indicator-label {
        min-width: 120px;
    }
    
    .indicator-label span {
        font-size: 0.8rem !important;
    }
    
    .indicator-value {
        font-size: 0.75rem !important;
        min-width: 70px;
    }
}

@media (max-width: 576px) {
    .indicator-item {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 10px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 8px;
        margin-bottom: 8px;
    }
    
    .indicator-label {
        justify-content: center;
        margin-bottom: 8px;
        min-width: auto;
    }
    
    .indicator-bar {
        margin: 5px 0;
    }
    
    .indicator-value {
        text-align: center;
        min-width: auto;
    }
    
    .consumption-meter {
        height: 60px;
    }
    
    .meter-value {
        font-size: 1.1rem;
    }
}

/* === ICONOS ULTRA GRANDES PARA ESTADÍSTICAS === */
.icon-ultra-large {
    font-size: 5rem !important;
    line-height: 1;
}

/* Efecto de superposición para gota con diagonal */
.icon-with-overlay {
    position: relative;
    display: inline-block;
}

.icon-overlay {
    position: absolute;
    top: 10%;
    right: 10%;
    font-size: 2rem !important;
    background: #2c3e50;
    border-radius: 50%;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    color: #ffffff !important;
}

/* Mejoras adicionales para los contadores */
.counter-icon {
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.counter-box:hover .counter-icon {
    transform: scale(1.1);
}

/* Responsive para iconos ultra grandes */
@media (max-width: 768px) {
    .icon-ultra-large {
        font-size: 3.5rem !important;
    }
    
    .icon-overlay {
        font-size: 1.5rem !important;
        padding: 1px;
    }
}

@media (max-width: 576px) {
    .icon-ultra-large {
        font-size: 3rem !important;
    }
    
    .icon-overlay {
        font-size: 1.2rem !important;
    }
}
