:root {
    --primary-purple: #6836CB;
    --text-primary: #ffffff;
    --gradient-primary: linear-gradient(135deg, #6836CB, #A06AFF);
}

body {
    background: #0a0a0a;
    color: white;
    font-family: 'Poppins', sans-serif;
}

.story-section {
    padding: 12rem 0 0 0;
    background: #0a0a0a;
}

/* Mobile specific padding */
@media (max-width: 768px) {
    .story-section {
        padding: 9rem 0 0 0;
    }
}

.story-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 6rem;
}

.story-text {
    order: 1;
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease;
}

.story-media {
    order: 2;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease;
}

.story-grid:nth-child(even) .story-text {
    order: 2;
    transform: translateX(50px);
}

.story-grid:nth-child(even) .story-media {
    order: 1;
    transform: translateX(-50px);
}

.story-grid.visible .story-text,
.story-grid.visible .story-media {
    opacity: 1;
    transform: translateX(0);
}

.story-number {
    font-size: 1rem;
    color: #6836CB;
    font-weight: 600;
    margin-bottom: 1rem;
}

.story-heading {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: white;
}

.story-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
}

.story-description a {
    color: var(--primary-purple);
    text-decoration: none;
    transition: color 0.3s ease;
}

.story-description a:hover {
    color: #A06AFF;
    text-decoration: underline;
}

.media-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.5s ease;
    max-width: 260px;
    margin: 0 auto;
}

.media-container:hover {
    transform: scale(1.05);
}

.media-container img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 20px;
}

.video-container {
    position: relative;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    max-width: 260px;
    margin: 0 auto;
    cursor: pointer;
    aspect-ratio: 9/16;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.video-play-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.video-play-button i {
    font-size: 24px;
    color: white;
    margin-left: 4px;
}

.video-container.playing .video-play-button {
    opacity: 0;
    pointer-events: none;
}

.gallery-section {
    padding: 0rem 0;
    background: #0a0a0a;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #6836CB, #8C52FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    justify-items: center;
}

.gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    max-width: 260px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(50px) rotateX(15deg) rotateY(15deg);
    perspective: 1000px;
    transform-style: preserve-3d;
}

.gallery-item.loaded {
    opacity: 1;
    transform: translateY(0) rotateX(0) rotateY(0);
}

.gallery-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.gallery-item img {
    width: 100%;
    object-fit: cover;
    border-radius: 20px;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    z-index: 1;
}

.gallery-item img.loading {
    opacity: 0;
    filter: blur(10px);
}

.gallery-item img.loaded {
    opacity: 1;
    filter: blur(0);
}

.gallery-item:hover img {
    filter: brightness(1.05);
}

.gallery-item {
    will-change: transform;
}

/* Lightbox Modal Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    z-index: 1001;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    z-index: 1001;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.back-button {
    top: 30px !important;
    left: 30px !important;
    z-index: 1000 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    transform: none !important;
}


@media (max-width: 768px) {
    .story-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .story-grid:nth-child(even) .story-text {
        order: 1;
    }

    .story-grid:nth-child(even) .story-media {
        order: 2;
    }

    .story-heading {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }

    .section-title {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }

    /* Story media mobile optimization */
    .media-container {
        max-width: 280px;
        overflow: visible;
        margin: 25px auto;
    }

    .media-container img {
        width: 100%;
        height: 486px;
    }

    .video-container {
        max-width: 280px;
        height: 486px;
        overflow: visible;
        margin: 25px auto;
        border-radius: 20px;
    }

    .video-container video {
        width: 100%;
        height: 486px;
        border-radius: 20px;
    }

    /* Gallery mobile optimization */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        margin-top: 2rem;
        padding: 0 0 2rem;
    }

    .gallery-item {
        max-width: 100%;
    }

    .gallery-item img {
        object-fit: cover;
    }


    .back-button {
        top: 80px;
        left: 1rem;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    /* Responsive lightbox for smaller screens */
    .lightbox {
        padding: 20px 15px 15px 15px;
    }

    .lightbox-close {
        top: 5px;
        right: 5px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox img {
        border-radius: 15px;
    }
}