/**
 * Case Study Page – Reusable template styles
 * Modern, responsive layout. Use with case-study.html (duplicate for each project).
 */

.case-study {
    min-height: 100vh;
    background-color: var(--theme-bg, #fff);
    color: var(--theme-text, #1e293b);
}

/* Top bar: back link */
.case-study-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--theme-surface, #fff);
    border-bottom: 1px solid var(--theme-border, #e2e8f0);
    padding: 0.75rem 1rem;
}
.case-study-header-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.case-study-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color 0.2s ease;
}
.case-study-back:hover {
    color: #2563eb;
}
.case-study-back svg {
    width: 1.25rem;
    height: 1.25rem;
}
.case-study-site {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--theme-text-muted, #64748b);
}

/* Hero: project title + optional tagline */
.case-study-hero {
    padding: 3rem 1.5rem 2.5rem;
    text-align: center;
    border-bottom: 1px solid var(--theme-border, #e2e8f0);
}
.case-study-hero-inner {
    max-width: 720px;
    margin: 0 auto;
}
.case-study-hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--theme-text, #1e293b);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}
.case-study-hero .case-study-tagline {
    font-size: 1.125rem;
    color: var(--theme-text-muted, #64748b);
}

/* Generic section */
.case-study-section {
    padding: 2.5rem 1.5rem;
    max-width: 720px;
    margin: 0 auto;
}
.case-study-section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--theme-text, #1e293b);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.case-study-section-title svg {
    width: 1.25rem;
    height: 1.25rem;
    color: #2563eb;
}
.case-study-section p {
    color: var(--theme-text-muted, #64748b);
    line-height: 1.7;
    margin-bottom: 1rem;
}
.case-study-section p:last-child {
    margin-bottom: 0;
}

/* Technologies: tag list */
.case-study-tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.case-study-tech-tag {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 9999px;
}
[data-theme="dark"] .case-study-tech-tag {
    background: rgba(37, 99, 235, 0.2);
    color: #93c5fd;
}

/* Screenshots grid */
.case-study-screenshots {
    padding: 2.5rem 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}
.case-study-screenshots .case-study-section-title {
    margin-bottom: 1.25rem;
}
.case-study-screenshot-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}
@media (min-width: 640px) {
    .case-study-screenshot-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 900px) {
    .case-study-screenshot-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
.case-study-screenshot-item {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--theme-border, #e2e8f0);
    background: var(--theme-surface-alt, #f8fafc);
}
.case-study-screenshot-item img {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: middle;
}
.case-study-screenshot-caption {
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    color: var(--theme-text-muted, #64748b);
}

/* Results / impact – optional list or metrics */
.case-study-results-list {
    list-style: none;
}
.case-study-results-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--theme-text-muted, #64748b);
    line-height: 1.5;
}
.case-study-results-list li::before {
    content: '';
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    margin-top: 0.5rem;
    border-radius: 50%;
    background: #2563eb;
}
.case-study-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
}
.case-study-metric {
    text-align: center;
}
.case-study-metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2563eb;
}
.case-study-metric-label {
    font-size: 0.875rem;
    color: var(--theme-text-muted, #64748b);
}

/* CTA buttons */
.case-study-cta {
    padding: 2.5rem 1.5rem 4rem;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    border-top: 1px solid var(--theme-border, #e2e8f0);
}
.case-study-cta-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}
.case-study-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    border-radius: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.case-study-btn:hover {
    transform: translateY(-2px);
}
.case-study-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}
.case-study-btn-primary {
    background: #2563eb;
    color: #fff;
    border: none;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.case-study-btn-primary:hover {
    background: #1d4ed8;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}
.case-study-btn-secondary {
    background: var(--theme-surface-alt, #f1f5f9);
    color: var(--theme-text, #1e293b);
    border: 1px solid var(--theme-border, #e2e8f0);
}
.case-study-btn-secondary:hover {
    background: var(--theme-surface, #e2e8f0);
}

[data-theme="dark"] .case-study-section-title,
[data-theme="dark"] .case-study-hero h1 { color: #e2e8f0; }
[data-theme="dark"] .case-study-back { color: #94a3b8; }
[data-theme="dark"] .case-study-back:hover { color: #60a5fa; }
[data-theme="dark"] .case-study-btn-secondary {
    background: #334155;
    color: #e2e8f0;
    border-color: #475569;
}
[data-theme="dark"] .case-study-btn-secondary:hover { background: #475569; }
