/* --- RESET & BASIC SETUP --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #000;
    color: #fff;
    overflow: hidden; 
    height: 100dvh; 
    width: 100vw;
}

/* --- CONTAINER --- */
.story-container {
    width: 100%;
    height: 100dvh; 
    max-width: 550px; 
    margin: 0 auto;
    position: relative;
    background: #000;
    box-shadow: 0 0 50px rgba(0,0,0,0.9);
}

/* --- SCROLL WRAPPER --- */
.slides-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: hidden; 
    overflow-y: hidden;
    scroll-behavior: smooth;
}

/* --- SLIDE SETUP --- */
.slide {
    flex: 0 0 100%; 
    height: 100%;
    position: relative;
    overflow: hidden;
}

.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; 
    z-index: 1;
}

/* --- DARK OVERLAY & GRADIENT --- */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
        rgba(0,0,0,0.1) 0%, 
        rgba(0,0,0,0.4) 40%, 
        rgba(0,0,0,0.95) 90%);
    z-index: 2;
    pointer-events: none; 
}

/* --- CONTENT BOX --- */
.content {
    position: absolute;
    bottom: 40px; 
    left: 50%;
    transform: translateX(-50%);
    width: 92%; 
    max-height: 85%; 
    z-index: 3;
    background: transparent; 
    padding: 10px;
    opacity: 0;
    transform: translate(-50%, 30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
}

.slide.active .content {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* --- TYPOGRAPHY --- */
h2 {
    font-size: 22px; 
    line-height: 1.3;
    margin-bottom: 12px;
    text-transform: uppercase;
    font-weight: 800;
    color: #DA251D;
    text-align: center;
    text-shadow: 2px 2px 4px #000;
    width: 100%;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(218, 37, 29, 0.4);
}

p {
    font-size: 15px;
    line-height: 1.6;
    color: #fff;
    text-align: justify; 
    font-weight: 400; 
    margin-bottom: 12px;
    text-shadow: 1px 1px 2px #000;
}

/* --- CHARTS STYLING --- */
.chart-container {
    width: 100%;
    height: 220px;
    margin: 15px 0;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 5px;
    border-bottom: 1px solid rgba(255,255,255,0.3);
}

.bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}
.bar {
    width: 70%;
    background: linear-gradient(to top, #DA251D, #ff5e57);
    border-radius: 4px 4px 0 0;
    height: 0;
    transition: height 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}
.active .bar { height: var(--h); }
.bar-value {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    font-weight: bold;
    color: #fff;
}
.bar-year {
    font-size: 10px;
    margin-top: 5px;
    color: #ccc;
}

.svg-chart {
    width: 100%;
    height: 200px;
    overflow: visible;
}
.chart-line {
    fill: none;
    stroke: #DA251D;
    stroke-width: 3;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 2s ease-in-out;
}
.active .chart-line {
    stroke-dashoffset: 0;
}
.dot {
    fill: #fff;
    stroke: #DA251D;
    stroke-width: 2;
    opacity: 0;
    transition: opacity 0.5s ease 1.5s;
}
.active .dot { opacity: 1; }

/* --- PROGRESS UI --- */
.progress-container {
    position: absolute; 
    top: 2.5cm; 
    left: 15px; 
    right: 15px;
    display: flex; 
    gap: 5px; 
    z-index: 50;
}
.progress-item {
    flex: 1;
    height: 3px;
    background: rgba(255,255,255,0.25);
    border-radius: 2px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    width: 0%;
    background: #DA251D;
    transition: width 0.3s linear;
}

/* --- CONTROLS --- */
.top-controls { 
    position: absolute; 
    top: calc(2.5cm + 15px); 
    right: 15px; 
    z-index: 60; 
}
.control-btn { 
    background: rgba(0,0,0,0.5); 
    border: 1px solid rgba(255,255,255,0.2); 
    color: #fff; 
    width: 38px; 
    height: 38px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    backdrop-filter: blur(5px); 
    cursor: pointer; 
}

/* --- NAVIGATION --- */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    background: rgba(0, 0, 0, 0.1);
    color: #fff;
    border: none;
    width: 50px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    outline: none;
}
.nav-prev { left: 0; }
.nav-next { right: 0; }
.nav-btn i { opacity: 0.3; transition: opacity 0.3s; font-size: 24px;}
.nav-btn:hover i { opacity: 1; }

@media (min-width: 768px) {
    h2 { font-size: 24px; }
    p { font-size: 16px; }
}