/*
 * ===================================================================
 * Stylesheet: Single Case Study Template
 * Purpose: Provides consistent styling for all individual case study pages.
 * Loaded via functions.php on specific page templates.
 * ===================================================================
 */

/* =================================================================== */
/* TABLE OF CONTENTS
/* =================================================================== */
/*  1. Page Layout & Astra Fixes
/*  2. Hero Section
/*  3. Main Content Section & Layout
/*  4. Narrative Body Styles (Left Column)
/*  5. Project Overview Sidebar (Right Column)
/*  6. Blockquote / Testimonial Style (Optional Element)
/*  7. Navigation
/*  8. Responsive Design
/* =================================================================== */

/* 1. Page Layout & Astra Fixes */
/* This targets the body class we'll add in functions.php */
.case-study-single-page .site-content .ast-container {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}
.case-study-single-page .entry-header {
    display: none;
}
.case-study-single-page #primary {
    padding-top: 0;
}

/* 2. Hero Section */
.cs-single-hero {
    background-color: var(--background-color);
    padding: 100px 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}
.cs-single-hero .container {
    max-width: 800px;
}
.cs-single-hero-title {
    font-size: 3rem;
    line-height: 1.15;
    margin-bottom: 1rem;
}
.cs-single-hero-subtitle {
    font-size: 1.25rem;
    color: var(--medium-gray);
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

/* 3. Main Content Section & Layout */
.cs-single-content-section {
    padding: var(--section-padding);
}
.cs-single-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: flex-start;
}

/* 4. Narrative Body Styles (Left Column) */
.cs-single-body h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}
.cs-single-body h2:not(:first-child) {
    margin-top: 3rem;
}
.cs-single-body ul {
    list-style: none;
    padding-left: 0;
    margin: 1.5rem 0;
}
.cs-single-body li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 1rem;
    color: var(--medium-gray);
}
.cs-single-body li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 1px;
    color: var(--accent-color);
    font-weight: 700;
    font-size: 1.1rem;
}

/* 5. Project Overview Sidebar (Right Column) */
.cs-single-sidebar {
    position: sticky;
    top: 120px; /* Adjust as needed based on your sticky header height */
}
.cs-project-overview {
    background-color: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}
.cs-project-overview-title {
    font-size: 1.5rem;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}
.cs-overview-item {
    padding: 1rem 0;
}
.cs-overview-item + .cs-overview-item {
    border-top: 1px solid var(--light-gray);
}
.cs-overview-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--medium-gray);
    margin-bottom: 0.25rem;
}
.cs-overview-value {
    display: block;
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* 6. Blockquote / Testimonial Style (Optional Element) */
/* This style will only apply if a .cs-blockquote element exists in the HTML */
.cs-blockquote {
    margin: 3.5rem 0;
    padding: 2.5rem;
    background-color: var(--white-color);
    border-left: 6px solid var(--accent-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}
.cs-blockquote-text {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.6;
    font-style: italic;
    color: var(--primary-color);
    margin: 0 0 1.5rem 0;
}
.cs-blockquote::before {
    content: '“';
    position: absolute;
    top: 0.5rem;
    right: 1.5rem;
    font-size: 6rem;
    font-weight: 700;
    line-height: 1;
    color: var(--light-gray);
    z-index: 0;
}
.cs-blockquote-text,
.cs-blockquote-author {
    position: relative;
    z-index: 1;
}
.cs-blockquote-author {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--medium-gray);
}
.cs-blockquote-author::before {
    content: "— ";
}

/* 7. Navigation */
.cs-single-nav {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}
.cs-single-nav .cta-secondary {
    font-weight: 500;
}

/* 8. Responsive Design */
@media (max-width: 1024px) {
    .cs-single-layout {
        gap: 3rem;
    }
}

@media (max-width: 820px) {
    .cs-single-layout {
        grid-template-columns: 1fr;
        gap: 3.5rem;
    }
    .cs-single-sidebar {
        position: static;
        top: auto;
    }
    .cs-single-hero-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .cs-single-hero {
        padding: 60px 0;
    }
    .cs-single-hero-title {
        font-size: 2.25rem;
    }
    .cs-single-hero-subtitle {
        font-size: 1.125rem;
    }
    .cs-project-overview {
        padding: 2rem;
    }
    .cs-blockquote {
        padding: 2rem;
        margin: 2.5rem 0;
    }
    .cs-blockquote-text {
        font-size: 1.3rem;
    }
    .cs-blockquote::before {
        font-size: 5rem;
        right: 1rem;
    }
}