﻿/* Am adăugat #performance-chart la începutul majorității selectorilor 
   pentru a crește specificitatea și a anula orice conflict. */

#performance-chart {
    width: 100%;
    max-width: 800px;
    background-color: #0a0a0a;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);

    margin-top: 30px;
}

    #performance-chart .infographic-header {
        display: flex;
        justify-content: space-between;
        margin-bottom: 20px;
        padding: 0 5%;
    }

    #performance-chart .header-title {
        width: 48%;
        text-align: center;
    }

        #performance-chart .header-title h3 {
            margin: 0;
            font-size: 1.3em;
            font-weight: 700;
        }

        #performance-chart .header-title.apacks h3 {
            color: #e50914;
        }

        #performance-chart .header-title.competitor h3 {
            color: #d9534f;
        }

    #performance-chart .chart-area {
        width: 100%;
        position: relative;
    }

    #performance-chart .chart-svg {
        width: 100%;
        overflow: visible;
    }

    #performance-chart .axis-line {
        stroke: #888888;
        stroke-width: 1;
    }

    #performance-chart .axis-label {
        font-family: 'Poppins', sans-serif;
        font-size: 15px !important;
        fill: #bbbbbb;
    }

    #performance-chart .y-axis-icon {
        opacity: 0.7;
    }

    #performance-chart .performance-line {
        fill: none;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    #performance-chart .apacks-line {
        stroke: #e50914;
        stroke-width: 4;
    }

    #performance-chart .competitor-line {
        stroke: #d9534f;
        stroke-width: 2;
        stroke-dasharray: 4 4;
    }

    #performance-chart .fill-area {
        opacity: 0;
    }

    #performance-chart .apacks-fill {
        fill: url(#apacksGradient);
    }

    #performance-chart .competitor-fill {
        fill: url(#competitorGradient);
    }

    #performance-chart #apacksGradient stop[offset="0%"] {
        stop-color: #e50914;
        stop-opacity: 0.6;
    }

    #performance-chart #apacksGradient stop[offset="100%"] {
        stop-color: #8b0000;
        stop-opacity: 0.2;
    }

    #performance-chart #competitorGradient stop[offset="0%"] {
        stop-color: #d9534f;
        stop-opacity: 0.4;
    }

    #performance-chart #competitorGradient stop[offset="100%"] {
        stop-color: #d9534f;
        stop-opacity: 0.1;
    }

    #performance-chart .line-label {
        font-family: 'Poppins', sans-serif;
        font-size: 14px;
        font-weight: 700;
        text-anchor: end;
        opacity: 0;
    }

    #performance-chart .apacks-label {
        fill: #e50914;
    }

    #performance-chart .competitor-label {
        fill: #d9534f;
    }

    #performance-chart.start-animation .apacks-line {
        stroke-dasharray: 1000;
        stroke-dashoffset: 1000;
        animation: draw-line 1s ease-out forwards;
    }

    #performance-chart.start-animation .competitor-line {
        stroke-dasharray: 1000;
        stroke-dashoffset: 1000;
        animation: draw-line 1.2s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
        animation-delay: 0.1s;
    }

    #performance-chart.start-animation .fill-area {
        animation: fill-up 0.7s ease-in-out forwards;
        animation-delay: 0.3s;
    }

    #performance-chart.start-animation .line-label {
        animation: fade-in-label 0.5s ease-in forwards;
        animation-delay: 1.2s;
    }

@keyframes draw-line {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes fill-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in-label {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 600px) {
    #performance-chart {
        padding: 16px;
    }

        #performance-chart .header-title h3 {
            font-size: 0.9em;
        }

        #performance-chart .axis-label {
            font-size: 10px;
        }

        #performance-chart .line-label {
            font-size: 12px;
        }
}

/* ========================================================================== */
/* SECȚIUNEA TITLULUI PENTRU DURATA JAR - LAYOUT CENTRAT (ACTUALIZAT) */
/* ========================================================================== */

/* Containerul principal al întregii secțiuni (titlu + grafic) */
.comparison-group-durata {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centrează orizontal blocurile de conținut */
    width: 100%;
    font-family: 'Poppins', sans-serif;
    padding-top: 10px;
    padding-right: 20px;
    padding-bottom: 30px;
    padding-left: 20px;
    background-color: #0a0a0a;
    text-align: center; /* Asigură centrarea textului pentru subtitlu (h3) */
    border-bottom: 1px solid #2a2a2a;
    margin-top:0px;
}

/* Container pentru întregul bloc de titlu (rândul de sus + subtitlu) */
.header-content-durata {
    max-width: 800px;
    width: 100%;
    margin-bottom: 20px;
}

/* Container pentru rândul: [icon] [text h1/h2] */
.title-container-durata {
    display: flex;
    align-items: center; /* Aliniază vertical icon-ul și blocul de text */
    justify-content: center; /* Centrează acest rând în containerul său */
    gap: 15px;
    margin-bottom: 10px; /* Spațiu până la subtitlu */
}

    .title-container-durata .icon-cronometru {
        width: 40px;
        height: auto;
        fill: #ffffff;
        flex-shrink: 0;
    }

    .title-container-durata svg {
        width: 40px;
        height: auto;
        fill: #ffffff;
        flex-shrink: 0;
    }

/* Container pentru stiva de text (h1 și h2) */
.title-text-stack {
    text-align: left; /* Aliniază textul la stânga, relativ la pictogramă */
}

.hero-title-durata {
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    line-height: 0.7; /* Micșorează spațiul alocat rândului de text */
}

.group-title-durata {
    margin: 0;
}

.highlight-red-durata {
    color: #e50914;
    font-size: 1.2rem;
    font-weight: 700;
}

/* Stilul subtitlului (h3), acum centrat corect */
.group-subtitle-durata {
    color: #bbbbbb;
    font-size: 1rem;
    font-weight: 400;
    margin: 0;
    padding: 0 10px;
}