:root {
    --clyfsa-blue: #004A99;
    --clyfsa-yellow: #FFD700;
    --soft-gray: #F8FAFC;
    --clyfsa-soft: #015673;
}
body { font-family: 'Inter', sans-serif; overflow-x: hidden; }
.bg-clyfsa { background-color: var(--clyfsa-blue); }
.text-clyfsa { color: var(--clyfsa-blue); }
.btn-primary { 
    background-color: var(--clyfsa-yellow); 
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }

/* Efecto de Vidrio Esmerilado (Glassmorphism) para el Nav */
.nav-glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.hero-video-overlay {
    background: linear-gradient(75deg, rgba(0,74,153,0.9) 0%, rgba(0,74,153,0.4) 100%);
}
.service-card {
            transition: all 0.5s ease;
            filter: grayscale(100%);
}
.service-card:hover {
    filter: grayscale(0%);
    transform: scale(1.02);
}
/*CHART*/
.chart {
    color: #ffffff;
    font-family: 'Arial', sans-serif;
    padding: 20px;
    position: relative;
}

.chart-row {
    margin-bottom: 40px;
}

.chart-with-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: center;
}

.chart-item {
    flex: 1;
    min-width: 400px; /* Ensure charts don't get too small */
    
}

.chart-subtitle {
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
}

.chart #chart-container-1{
    width: 100%;
    height: 500px;
    max-width: 1500px; /* Limit width for the second chart */
}
.chart #chart-container-2 {
    width: 100%;
    height: 500px;
    max-width: 1000px; /* Limit width for the second chart */
}

.chart .info-box {
    flex: 0 0 300px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    border: 1px solid #ffffff;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.6;
    opacity: 1; /* Always visible since it's part of the layout */
}
/* Responsive adjustments */
@media (max-width: 768px) {
    .chart-with-info {
        flex-direction: column;
    }

    .chart-item {
        max-width: 100%;
    }

    .chart .info-box {
        flex: 1;
        max-width: 100%;
    }
}
.modal-active { overflow: hidden; }
#galleryModal { 
    transition: opacity 0.4s ease, visibility 0.4s ease;
    background: rgba(0, 51, 102, 0.95); /* Azul CLYFSA con transparencia */
    backdrop-filter: blur(10px);
}
.gallery-img { max-height: 70vh; object-fit: contain; }
.solution-content {
    display: none;
    animation: slideIn 0.5s ease forwards;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.card-active {
    border-color: var(--clyfsa-blue) !important;
    box-shadow: 0 20px 40px rgba(0,74,153,0.1);
}

/* Chart: responsive height (echarts needs an explicit container height) */
#mainChart { height: 340px; }
@media (min-width: 640px) { #mainChart { height: 420px; } }
@media (min-width: 768px) { #mainChart { height: 500px; } }

/* On touch devices there is no hover, so the "Impacto" gallery cards would
   stay grayscale forever. Show them in full color there instead. */
@media (hover: none) {
    .service-card { filter: grayscale(0%); }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
