/* Base Styles */
:root {
    --primary: #FF00A8;
    --primary-light: #ff66c4;
    --primary-dark: #b30077;
    --secondary: #5F9D3F;
    --background: #f8f8f8;
    --surface: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --border: #e0e0e0;
    --accent1: #00BCD4;
    --accent2: #FFEB3B;
    --accent3: #8BC34A;
    --error: #F44336;
    --success: #4CAF50;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inconsolata', monospace;
}

body {
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    padding-top: 0;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-dark);
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5em;
    line-height: 1.3;
}

p {
    margin-bottom: 1em;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background-color: var(--surface);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo-container img {
    display: block;
}

.nav-links a {
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    background-color: rgba(255, 0, 168, 0.1);
    color: var(--primary);
}

.nav-links a:hover {
    background-color: rgba(255, 0, 168, 0.2);
}

/* Breadcrumbs */
.breadcrumbs {
    margin: 20px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.breadcrumbs a {
    color: var(--text-secondary);
}

.breadcrumbs a:hover {
    color: var(--primary);
}

/* Case Study Header */
.case-study-header {
    margin: 40px 0 30px;
}

.post-type-indicator {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 10px;
}

.post-type-project {
    background-color: #e1f5fe;
    color: #0288d1;
}

.post-type-publication {
    background-color: #e8f5e9;
    color: #388e3c;
}

.case-study-header h1 {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
}

.case-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
}

.meta-item {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.meta-item i {
    margin-right: 8px;
    color: var(--primary);
}

/* Overview Section */
.overview-section {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.overview-card {
    flex: 1;
    min-width: 300px;
    background-color: var(--surface);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.overview-content {
    padding: 20px;
}

.overview-content h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--primary-dark);
}

.overview-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    flex: 1;
    min-width: 300px;
}

.stat {
    flex: 1;
    background-color: var(--surface);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    min-width: 100px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* Project Tags */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.tag-section {
    flex: 1;
    min-width: 200px;
}

.tag-section h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
    background-color: var(--surface);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.method-tag {
    color: #0288d1;
    background-color: #e1f5fe;
}

.tool-tag {
    color: #388e3c;
    background-color: #e8f5e9;
}

.domain-tag {
    color: #7b1fa2;
    background-color: #f3e5f5;
}

/* Table of Contents */
.toc {
    background-color: var(--surface);
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 25px;
    position: sticky;
    top: 90px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.toc h2 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--primary-dark);
}

.toc-columns {
    display: flex;
    column-gap: 20px;
}

.toc-column {
    flex: 1;
}

.toc ol {
    list-style: decimal;
    padding-left: 18px;
    margin: 0;
}

.toc li {
    margin-bottom: 3px;
    line-height: 1.3;
}

.toc a {
    color: var(--text-secondary);
    font-size: 13px;
    display: block;
    padding: 2px 0;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toc a:hover, .toc a.active {
    color: var(--primary);
}

@media (max-width: 480px) {
    .toc-columns {
        flex-direction: column;
        gap: 5px;
    }
}

/* Content Sections */
.content-section {
    background-color: var(--surface);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.section-header {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    background-color: rgba(255, 0, 168, 0.03);
}

.section-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: white;
}

.section-header h2 {
    font-size: 22px;
    margin-bottom: 0;
}

.section-content {
    padding: 25px;
}

/* Media Callouts */
.media-callout {
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.section-image {
    width: 100%;
    display: block;
}

.caption {
    background-color: #f5f5f5;
    padding: 10px 15px;
    font-size: 14px;
    color: var(--text-secondary);
    font-style: italic;
}

/* Objectives List */
.objectives-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.objective-item {
    display: flex;
    align-items: flex-start;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
}

.objective-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.objective-text {
    flex-grow: 1;
    padding-top: 5px;
}

/* Methodology Cards */
.methodology-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
}

.method-card {
    flex: 1;
    min-width: 250px;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.method-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.method-card h3 {
    margin-bottom: 10px;
}

.method-details {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.method-stat {
    background-color: var(--surface);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Finding Cards */
.finding-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.finding-card h3 {
    color: var(--primary-dark);
    margin-bottom: 15px;
}

/* Quote Callouts */
.quote-callout {
    background-color: #f0f0f0;
    border-left: 4px solid var(--primary);
    padding: 20px;
    margin: 20px 0;
    position: relative;
}

.quote-callout i {
    color: var(--primary-light);
    font-size: 20px;
    margin-right: 10px;
}

.quote-callout blockquote {
    font-style: italic;
    margin: 10px 0;
    font-size: 16px;
}

.quote-attribution {
    text-align: right;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Insights Grid */
.insights-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
}

.insight-card {
    flex: 1;
    min-width: 280px;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.insight-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.insight-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.recommendations {
    margin-top: 15px;
    background-color: rgba(255, 0, 168, 0.05);
    padding: 15px;
    border-radius: 6px;
}

.recommendations h4 {
    margin-bottom: 10px;
    color: var(--primary-dark);
}

.recommendations ul {
    padding-left: 20px;
}

.recommendations li {
    margin-bottom: 8px;
}

/* Impact Stats */
.impact-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
}

.impact-stat {
    flex: 1;
    min-width: 150px;
    text-align: center;
    background-color: var(--surface);
    padding: 25px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.impact-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.impact-label {
    font-size: 15px;
    color: var(--text-secondary);
}

/* Reflections Grid */
.reflections-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
}

.reflection-card {
    flex: 1;
    min-width: 250px;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.reflection-card h3 {
    color: var(--primary-dark);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.reflection-card ul {
    padding-left: 20px;
}

.reflection-card li {
    margin-bottom: 10px;
}

/* Next Case Study Section */
.next-case-study {
    background-color: var(--primary-light);
    padding: 40px 0;
    margin-top: 50px;
}

.next-case-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.next-label {
    font-size: 14px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    color: white;
}

.next-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.next-case-content h2 {
    font-size: 28px;
    color: white;
    margin-bottom: 10px;
}

.next-case-content p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
    max-width: 600px;
}

.next-case-link {
    display: inline-block;
    background-color: white;
    color: var(--primary);
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.2s;
}

.next-case-link:hover {
    background-color: var(--primary-dark);
    color: white;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    padding: 40px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-left p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s;
}

.social-links a:hover {
    background-color: var(--primary);
}

/* Fix for quote z-index issue */
        .quote-callout {
            position: relative;
            z-index: 1; /* Lower z-index than the TOC */
        }
        
        .toc {
            position: relative;
            z-index: 2; /* Higher z-index than quote elements */
        }

/* Responsive Styles */
@media (max-width: 768px) {
    .case-study-header h1 {
        font-size: 28px;
    }
    
    .overview-section, 
    .project-tags,
    .methodology-cards,
    .insights-grid,
    .impact-stats,
    .reflections-grid {
        flex-direction: column;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .footer-left {
        align-items: center;
    }
    
    .case-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .next-case-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .toc {
        position: relative;
        top: 0;
    }
}
