/* Story Section Styling */
.story-section {
    position: relative;
    background: var(--bg-color);
    overflow: hidden;
    padding: 4rem 0 6rem;
    margin-top: -2rem;
}

/* Dark mode for story section */
[data-theme="dark"] .story-section {
    background: #000000;
    color: #ffffff;
}

[data-theme="dark"] .story-section .section-title,
[data-theme="dark"] .story-section .section-subtitle,
[data-theme="dark"] .story-section .section-tag {
    color: #ffffff;
}

[data-theme="dark"] .timeline-content,
[data-theme="dark"] .highlight-card {
    background: #1a1a2e;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .timeline-content p,
[data-theme="dark"] .highlight-card p {
    color: #e0e0e0;
}

[data-theme="dark"] .timeline-content h3,
[data-theme="dark"] .highlight-card h3 {
    color: #ffffff;
}

.story-section .particles-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.6;
}

.story-section .container {
    position: relative;
    z-index: 1;
}

.story-section .container {
    position: relative;
    z-index: 2;
}

.story-section .section-header {
    text-align: center;
    margin: 0 auto 4rem;
    max-width: 800px;
    position: relative;
    z-index: 1;
    padding: 0 2rem;
}

.story-section .section-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-weight: 600;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.story-section .section-title {
    font-size: 3.8rem;
    margin: 1rem 0 1.5rem;
    color: var(--text-primary);
    position: relative;
    display: block;
    line-height: 1.2;
}

.story-section .section-subtitle {
    font-size: 1.7rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
    font-weight: 400;
    opacity: 0.9;
}

.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 3rem;
}

.section-divider span {
    display: block;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    margin: 0 1.5rem;
}

.section-divider i {
    color: var(--primary);
    font-size: 1.8rem;
    background: rgba(var(--primary-rgb), 0.1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

/* Timeline Styling */
.story-timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto 5rem;
    padding: 0 5%;
    width: 100%;
    box-sizing: border-box;
}

.story-timeline::before {
    content: '';
    position: absolute;
    width: 4px;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 10px;
}

.timeline-item {
    padding: 0 4rem 5rem;
    position: relative;
    width: 50%;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-sizing: border-box;
    min-height: 200px;
    display: flex;
    align-items: flex-start;
    will-change: transform, opacity;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 0;
    text-align: right;
    justify-content: flex-end;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 4rem;
    text-align: left;
    justify-content: flex-start;
}

.timeline-badge {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    right: -30px;
    color: rgb(255, 255, 255);
    font-size: 2rem;
    box-shadow: 0 10px 30px rgba(var(--primary-rgb), 0.3);
    transition: all 0.3s ease;
    z-index: 2;
    flex-shrink: 0;
}

.timeline-item:nth-child(even) .timeline-badge {
    left: -30px;
    right: auto;
}

.timeline-content {
    background: var(--card-bg);
    padding: 3.5rem 3rem;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
    transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    will-change: transform, box-shadow, background;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    transition: all 0.3s ease;
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: auto;
    right: 0;
}

.timeline-content h3 {
    font-size: 2.2rem;
    margin: 0 0 1.5rem;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
    line-height: 1.3;
}

.timeline-content p {
    color: var(--text-secondary);
    margin: 0;
    position: relative;
    z-index: 1;
    line-height: 1.7;
    font-size: 1.6rem;
}

.timeline-item:hover .timeline-badge {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(var(--primary-rgb), 0.4);
}

.timeline-item:hover .timeline-content {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
    background: var(--card-bg-hover);
}

/* Highlights Section */
.story-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin: 5rem auto 0;
    max-width: 1200px;
    padding: 0 2rem;
    box-sizing: border-box;
}

.highlight-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 4.5rem 3.5rem;
    text-align: center;
    transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    will-change: transform, box-shadow, background;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Dark mode styles */
[data-theme="dark"] .highlight-card {
    background: #1a1a2e;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .highlight-card:hover {
    background: #1f2a4a;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.highlight-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: all 0.3s ease;
}

.highlight-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
    background: var(--card-bg-hover);
}

.highlight-card:hover::before {
    opacity: 1;
}

.highlight-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 3rem;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1), rgba(var(--secondary-rgb), 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.2rem;
    color: var(--primary);
    transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    flex-shrink: 0;
    will-change: transform, box-shadow;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.highlight-card:hover .highlight-icon {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    transform: rotateY(180deg);
}

.highlight-card h3 {
    font-size: 2.4rem;
    margin: 0 0 1.8rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.highlight-card p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.6rem;
    margin: 0;
    max-width: 320px;
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Animation delays */
[data-aos-delay='100'] { transition-delay: 0.1s; }
[data-aos-delay='200'] { transition-delay: 0.2s; }
[data-aos-delay='300'] { transition-delay: 0.3s; }
[data-aos-delay='400'] { transition-delay: 0.4s; }

/* Custom AOS animations */
[data-aos] {
    pointer-events: none;
}

[data-aos].aos-animate {
    pointer-events: auto;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .story-section {
        padding: 5rem 0 7rem;
        margin-top: -3rem;
    }
    
    .story-highlights {
        padding: 0 5%;
    }
}

@media (max-width: 992px) {
    .story-timeline {
        padding: 0 2rem 0 8rem;
    }
    
    .story-timeline::before {
        left: 4rem;
    }
    
    .timeline-item {
        width: 100%;
        padding: 0 0 5rem 0;
        text-align: left;
        justify-content: flex-start;
    }
    
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0;
        text-align: left;
        padding-left: 0;
        padding-right: 0;
        justify-content: flex-start;
    }
    
    .timeline-badge {
        left: -2.5rem !important;
        right: auto !important;
        top: 0;
        transform: none;
    }
    
    .timeline-content {
        max-width: 100%;
    }
    
    .timeline-content::before {
        left: 0 !important;
        right: auto !important;
    }
}

@media (max-width: 768px) {
    .story-timeline {
        padding: 0 2rem 0 6rem;
    }
    
    .timeline-badge {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
        left: -2rem !important;
    }
    
    .timeline-content {
        padding: 2.5rem;
    }
    
    .timeline-content h3 {
        font-size: 2rem;
        margin-bottom: 1.2rem;
    }
    .story-section {
        padding: 4rem 0 6rem;
        margin-top: -2rem;
    }
    
    .story-section .section-header {
        margin-bottom: 5rem;
    }
    
    .story-highlights {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin: 5rem auto 0;
        padding: 0 2rem;
        gap: 3rem;
    }
    
    .highlight-card {
        padding: 4rem 3rem;
    }
    
    .story-section .section-title {
        font-size: 3.4rem;
    }
    
    .story-section .section-subtitle {
        font-size: 1.7rem;
        margin-bottom: 2.5rem;
    }
    
    .highlight-icon {
        width: 80px;
        height: 80px;
        font-size: 2.8rem;
        margin-bottom: 2.5rem;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Add animation to timeline items when they come into view */
.timeline-item.animate {
    animation: fadeInUp 0.6s ease forwards;
}

/* Add animation delay to each timeline item */
.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.3s; }
.timeline-item:nth-child(3) { animation-delay: 0.5s; }
