/* =========================================
   HERO
========================================= */

.cs-hero {
    background: linear-gradient(90deg, #120000, #4C0000);
    color: white;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 60px;
}

.cs-hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 80px;
    max-width: 1400px;
    margin: 0 auto;
}

.cs-hero-text {
    max-width: 520px;
    padding-left: 5%;
}

.cs-hero-text h1 {
    font-size: 56px;
    font-weight: 700;
    letter-spacing: -2px;
    line-height: 1.1;
    margin-bottom: 20px;
}

.cs-hero-text p {
    font-size: 20px;
    opacity: .9;
    line-height: 1.5;
}

.cs-hero-image {
    position: relative;
}

.cs-hero-image img {
    width: 580px;
}

.cs-hero-cta {
    display: inline-block;
    margin-top: 32px;
    background: white;
    color: #4C0000;
    font-weight: 600;
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cs-hero-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* =========================================
   CASE STUDY LAYOUT
========================================= */

.case-study-layout {
    display: flex;
    gap: 80px;
    max-width: 1500px;
    margin: auto;
    padding: 100px 0px 100px 64px;
}


/* =========================================
   LEFT NAVIGATION
========================================= */

.cs-sidebar {
    width: 240px;
    flex-shrink: 0;

    position: sticky;
    top: 110px;
    align-self: flex-start;
}

.cs-sidebar h3 {
    margin: 0 0 28px;
    font-size: 18px;
    color: white;
    letter-spacing: .5px;
}

.cs-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cs-nav a {
    text-decoration: none;
    color: rgba(255, 255, 255, .55);

    font-size: 15px;
    font-weight: 500;

    padding: 12px 0 12px 18px;

    border-left: 2px solid rgba(255, 255, 255, .08);

    transition: .25s ease;
}

.cs-nav a:hover {
    color: white;
    border-left-color: var(--accent);
    padding-left: 24px;
}


/* =========================================
   CONTENT
========================================= */

.cs-content {
    flex: 1;
}

.cs-content .cs-section {
    padding: 0;
    max-width: 90%;
    margin: 0 0 120px;
}

.cs-section {
    scroll-margin-top: 120px;
}

.overview-intro {
    margin-bottom: 48px;
}

.overview-intro h2 {
    margin-bottom: 18px;
}

.overview-intro p {
    max-width: 760px;
    line-height: 1.8;
    opacity: .85;
}

.overview-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.overview-card {
    background: rgba(255, 255, 255, .04);

    border: 1px solid rgba(255, 255, 255, .08);

    border-radius: 18px;

    padding: 32px;
}

.overview-card h3 {
    font-size: 20px;
    margin: 16px 0 16px;
}

.tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tag {
    display: inline-flex;
    align-items: center;

    padding: 10px 18px;

    border-radius: 999px;

    background: rgba(255, 77, 77, .12);
    border: 1px solid rgba(255, 77, 77, .25);

    color: #ffe2e2;

    font-size: 14px;
    font-weight: 500;

    margin: 0;

    transition: .25s;
}

.tag:hover {
    background: rgba(255, 77, 77, .22);
    transform: translateY(-2px);
}

.cs-section h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 24px;
    position: relative;
    display: inline-block;
}

.cs-section h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;

    width: 60px;
    height: 4px;

    background: var(--accent);
    border-radius: 999px;
}

.cs-section h3 {
    font-size: 24px;
    font-weight: 600;
}

.cs-section p {
    font-size: 17px;
    line-height: 1.8;
    max-width: 720px;
    opacity: .85;
}

.process-timeline {
    margin: 60px auto;
    display: flex;
    flex-direction: column;
    gap: 80px;
    padding-left: 10%;
}

.process-step {
    display: flex;
    gap: 60px;
    align-items: flex-start;
    position: relative;
}

.process-step:nth-child(even) {
    flex-direction: row-reverse;
}

.step-number {
    font-size: 72px;
    font-weight: 700;
    opacity: 0.08;
    line-height: 1;
    min-width: 80px;
    text-align: center;
    color: var(--accent);
    position: relative;
    z-index: 2;
}

.step-content {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 77, 77, 0.15);
    border-radius: 24px;
    padding: 48px 52px;
    transition: all 0.4s ease;
}

.step-content:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 77, 77, 0.35);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.step-content h3 {
    font-size: 28px;
    margin-bottom: 20px;
}

.step-content p {
    font-size: 17px;
    line-height: 1.8;
    opacity: 0.9;
}

/* Images Grid */
.process-images {
    display: grid;
    gap: 20px;
    margin: 32px 0;
    overflow: hidden;
}

.process-images img {
    width: 100%;
    transition: transform 0.4s ease;
}

/* Connector Line */
.process-timeline::before {
    content: '';
    position: absolute;
    left: 38px;
    top: 40px;
    bottom: 40px;
    width: 3px;
    background: rgba(255, 77, 77, 0.15);
    z-index: 1;
}

/* =========================================
   OUTCOME
========================================= */

.outcome-box {
    position: relative;

    background: linear-gradient(135deg, #2a0000, #4C0000);

    border: 1px solid #ff4d4d;
    border-radius: 24px;

    padding: 60px;

    text-align: center;

    margin: 60px 0;
}


/* =========================================
   TAG
========================================= */

.tag {
    display: inline-block;

    background: rgba(255, 77, 77, .15);

    padding: 4px 14px;

    border-radius: 999px;

    font-size: 14px;

    margin-top: 12px;
}


/* =========================================
   SMOOTH SCROLL
========================================= */

html {
    scroll-behavior: smooth;
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 1000px) {

    .case-study-layout {
        flex-direction: column;
        gap: 50px;
        padding: 80px 32px;
    }

    .cs-sidebar {
        position: static;
        width: 100%;
    }

    .cs-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }

    .cs-nav a {
        border: 1px solid rgba(255, 255, 255, .12);
        border-left: none;
        border-radius: 999px;

        padding: 10px 18px;
    }

    .cs-nav a:hover {
        padding: 10px 18px;
    }

    .cs-content .cs-section {
        margin-bottom: 80px;
    }
}

.final-ui img {
    margin: 8px;
    max-width: 90%;
}

/* =========================================
   GALLERY
========================================= */

.masonry {
    column-count: 3;
    column-gap: 24px;
    width: 90%;
}

.masonry img {
    width: 100%;
    margin-bottom: 24px;
    border-radius: 12px;
    break-inside: avoid;
    cursor: pointer;
    transition: transform .3s ease;
}

.masonry img:hover {
    transform: scale(1.03);
}

/* Lightbox */

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .85);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fade .25s ease;
}

.lightbox-image {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    animation: zoom .25s ease;
}

.close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    user-select: none;
}

@keyframes fade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes zoom {
    from {
        transform: scale(.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* NEXT CASE SECTION */
.next-case {
    padding: 100px 5% 120px;
    background: #0a0a0a;
    border-top: 1px solid #222;
}

.next-case-container {
    max-width: 1200px;
    margin: 0 auto;
}

.next-case-label {
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 2px;
    color: #888;
    margin-bottom: 16px;
    font-weight: 500;
}

.next-case-card {
    display: flex;
    gap: 60px;
    align-items: center;
    background: #111;
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: white;
    transition: all 0.4s ease;
    border: 1px solid #222;
}

.next-case-card:hover {
    transform: translateY(-8px);
    border-color: #ffcc00;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.next-case-image {
    width: 420px;
    flex-shrink: 0;
}

.next-case-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.next-case-card:hover .next-case-image img {
    transform: scale(1.05);
}

.next-case-info {
    padding: 48px 40px 48px 0;
    flex: 1;
}

.next-case-tag {
    display: inline-block;
    background: rgba(255, 204, 0, 0.15);
    color: #ffcc00;
    font-size: 14px;
    padding: 6px 18px;
    border-radius: 30px;
    margin-bottom: 16px;
}

.next-case-info h3 {
    font-size: 42px;
    margin: 0 0 16px 0;
    line-height: 1.1;
}

.next-case-info p {
    font-size: 18px;
    line-height: 1.6;
    color: #ccc;
    max-width: 520px;
}

.next-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    font-weight: 600;
    font-size: 17px;
    color: #ffcc00;
}

.next-link .arrow {
    transition: transform 0.3s ease;
}

.next-case-card:hover .arrow {
    transform: translateX(6px);
}

/* Responsive */
@media (max-width: 900px) {
    .next-case-card {
        flex-direction: column;
        gap: 0;
    }

    .next-case-image {
        width: 100%;
        height: 280px;
    }

    .next-case-info {
        padding: 40px;
    }
}