/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* New palette: Warm neutrals with terracotta accent */
    --primary: #c45d3e;           /* Terracotta - warm, grounded */
    --primary-light: #d97b5e;
    --primary-dark: #a34a2f;
    --accent: #c9a227;            /* Warm gold - sophisticated accent */

    --text: #1a1a1a;              /* Near-black for text */
    --text-muted: #5a5a5a;
    --text-subtle: #8a8a8a;

    --bg: #faf8f5;                /* Warm off-white */
    --bg-alt: #f0ebe4;            /* Slightly darker warm */
    --bg-card: #ffffff;
    --bg-card-hover: #fdfcfa;

    --border: rgba(26, 26, 26, 0.1);
    --border-strong: rgba(26, 26, 26, 0.2);

    /* Dark mode for accent sections */
    --bg-dark: #1a1a1a;
    --text-on-dark: #faf8f5;
    --text-muted-on-dark: rgba(250, 248, 245, 0.7);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* Headline typography */
h1, h2, .hero-headline, .case-detail-title, .case-block-title {
    font-family: 'Fraunces', Georgia, serif;
    font-optical-sizing: auto;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 32px;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(250, 248, 245, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.nav-container {
    width: 100%;
    padding: 20px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.nav-logo {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: 0;
}

.nav-links {
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-cta {
    background: var(--primary);
    color: white !important;
    padding: 10px 24px;
    border-radius: 6px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(196, 93, 62, 0.3);
}

.nav-resume {
    color: var(--text-muted) !important;
    padding: 8px 20px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    transition: all 0.3s;
}

.nav-resume:hover {
    color: var(--text) !important;
    border-color: var(--text);
    background: rgba(26, 26, 26, 0.03);
}

/* Hero Section - Editorial Layout */
.hero {
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 120px 0 60px;
    background: var(--bg);
    position: relative;
    overflow-x: hidden;
}

.hero-grid {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    box-sizing: border-box;
}

.hero-content {
    max-width: 600px;
}

.hero-eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 600;
    margin-bottom: 24px;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.1s forwards;
}

.hero-headline {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 600;
    color: var(--text);
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1px;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.2s forwards;
}

.hero-intro {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.3s forwards;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.4s forwards;
}

.btn-primary {
    display: inline-block;
    background: var(--primary);
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 6px;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(196, 93, 62, 0.25);
}

.btn-secondary,
.btn-ghost {
    display: inline-block;
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 14px 28px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    transition: all 0.3s;
}

.btn-secondary:hover,
.btn-ghost:hover {
    border-color: var(--text);
    background: rgba(26, 26, 26, 0.03);
}

/* Hero Visual Side */
.hero-visual {
    position: relative;
    opacity: 0;
    animation: fadeIn 0.8s ease-out 0.3s forwards;
}

.hero-photo-container {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.hero-photo {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    border-radius: 8px;
    position: relative;
    z-index: 2;
}

.hero-photo-accent {
    position: absolute;
    top: 16px;
    right: -16px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary);
    border-radius: 8px;
    z-index: 1;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.hero-stat {
    display: flex;
    flex-direction: column;
}

.hero-stat-number {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--text);
}

.hero-stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Scroll Indicator */
.hero-scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0;
    animation: fadeIn 0.6s ease-out 0.8s forwards;
}

.hero-scroll-indicator span {
    font-size: 0.75rem;
    color: var(--text-subtle);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--primary), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 1; transform: scaleY(1); }
    50% { opacity: 0.5; transform: scaleY(0.8); }
}

/* Tablet Hero */
@media (max-width: 1024px) {
    .hero-grid {
        gap: 40px;
    }

    .hero-headline {
        font-size: clamp(2rem, 4vw, 3rem);
    }

    .hero-photo-container {
        max-width: 340px;
    }
}

/* Mobile Hero */
@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
        width: 100%;
    }

    .hero-content {
        max-width: 100%;
        order: 2;
    }

    .hero-visual {
        order: 1;
    }

    .hero-photo-container {
        max-width: 260px;
        margin: 0 auto;
    }

    .hero-photo-accent {
        display: none;
    }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Legacy classes for compatibility */
.hero-tags span {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 400;
    transition: all 0.3s;
}

.hero-tags span:hover {
    background: var(--bg-card-hover);
    color: var(--text);
    border-color: var(--primary);
}

/* Sections */
.section {
    min-height: auto;
    padding: 80px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-alt {
    background: var(--bg-alt);
}

/* Technical Skills Section */
.section-skills {
    background: var(--bg-dark);
    color: var(--text-on-dark);
    border: none;
}

.section.section-skills h2 {
    color: var(--text-on-dark);
}

.skills-grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px 80px;
    margin-top: 48px;
}

.skills-group {
    display: flex;
    flex-direction: column;
}

.skills-category {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(250, 248, 245, 0.2);
}

.skills-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.skills-items span {
    font-size: 1rem;
    color: var(--text-muted-on-dark);
    line-height: 2;
    transition: color 0.2s ease;
}

.skills-items span:hover {
    color: var(--text-on-dark);
}

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

.section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

.section-intro {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    max-width: 700px;
    line-height: 1.8;
}

.section-emphasis {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 48px;
}

.section-emphasis strong {
    color: var(--accent);
}

/* Services List */
.services-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.services-list li {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 24px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.services-list li:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.services-list li:last-child {
    grid-column: 1 / -1;
}

.services-list li strong {
    color: var(--text);
    font-size: 1.05rem;
}

.services-list li span {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Problem List */
.problem-list {
    list-style: none;
    margin-bottom: 48px;
    max-width: 600px;
}

.problem-list li {
    padding: 20px 0;
    padding-left: 32px;
    position: relative;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 1.05rem;
    transition: color 0.3s;
}

.problem-list li:hover {
    color: var(--text);
}

.problem-list li:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--primary);
}

.highlight-text {
    font-size: 1.2rem;
    padding: 32px;
    background: var(--bg-card);
    border-left: 3px solid var(--primary);
    border-radius: 0 12px 12px 0;
    color: var(--text-muted);
}

.highlight-text strong {
    color: var(--text);
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.service-card {
    background: var(--bg-card);
    padding: 36px;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.service-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateY(-4px);
}

.service-card h3 {
    font-size: 1.15rem;
    color: var(--text);
    margin-bottom: 12px;
    font-weight: 600;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.emphasis {
    font-size: 1.15rem;
    text-align: left;
    padding-top: 24px;
    color: var(--text-muted);
}

.emphasis strong {
    color: var(--accent);
}

/* Case Studies Section */
#impact {
    background: var(--bg-alt);
}

#impact h2 {
    font-size: 2.5rem;
}

/* Case Studies Grid */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.case-card {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.case-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(26, 26, 26, 0.1);
}

.case-card-content {
    padding: 32px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.case-card-logo {
    height: 32px;
    width: auto;
    max-width: 100%;
    margin-bottom: 20px;
    opacity: 0.9;
    object-fit: contain;
    align-self: flex-start;
}

.case-card-logo-lg {
    height: 60px;
}

.case-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}

.case-card-role {
    font-size: 0.75rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 12px;
}

.case-card-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 24px;
    flex-grow: 1;
}

.case-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    transition: gap 0.3s;
}

.case-card-cta:hover {
    gap: 12px;
}

.case-card-cta::after {
    content: '→';
    transition: transform 0.3s;
}

.case-card:hover .case-card-cta::after {
    transform: translateX(4px);
}

@media (max-width: 768px) {
    .cases-grid {
        grid-template-columns: 1fr;
    }
}

/* Case Detail Page Styles */
.case-detail-hero {
    padding: 140px 32px 80px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.case-detail-hero .container {
    max-width: 800px;
}

.back-link {
    display: inline-block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 32px;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--accent);
}

.case-detail-logo {
    height: 40px;
    width: auto;
    margin-bottom: 20px;
}

.case-detail-logo-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
}

.case-detail-role {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
    margin-bottom: 20px;
}

.case-detail-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
    line-height: 1.2;
}

.case-detail-summary {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    line-height: 1.7;
    margin-top: 20px;
}

.case-detail-content {
    max-width: 800px;
}

.case-detail-content .case-study {
    background: transparent;
    border: none;
    padding: 0;
}

.case-detail-content .case-study:hover {
    border-color: transparent;
}

/* Case Study Hero Meta */
.case-hero-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.case-meta-tag {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.case-meta-divider {
    color: var(--text-subtle);
}

.case-detail-subtitle {
    font-size: 1.25rem;
    color: var(--accent);
    font-weight: 500;
    margin-top: 16px;
}

/* Case Selector */
.case-selector {
    margin-bottom: 24px;
}

.case-selector-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0;
}

/* Accordion Styles */
.accordion-item {
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: border-color 0.3s;
}

.accordion-item:has(.accordion-header.active) {
    border-color: var(--primary);
}

.accordion-header {
    width: 100%;
    background: var(--bg-card);
    border: none;
    padding: 24px 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.3s;
    text-align: left;
}

.accordion-header:hover {
    background: var(--bg-card-hover);
}

.accordion-header.active {
    background: rgba(196, 93, 62, 0.08);
}

.accordion-header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.accordion-number {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(196, 93, 62, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
    min-width: 44px;
    text-align: center;
}

.accordion-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.accordion-title {
    display: block;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
}

.accordion-subtitle {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.accordion-icon {
    width: 24px;
    height: 24px;
    position: relative;
    flex-shrink: 0;
}

.accordion-icon::before,
.accordion-icon::after {
    content: '';
    position: absolute;
    background: var(--text-muted);
    transition: transform 0.3s, opacity 0.3s;
}

.accordion-icon::before {
    width: 14px;
    height: 2px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.accordion-icon::after {
    width: 2px;
    height: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.accordion-header.active .accordion-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.3s ease-out;
    background: var(--bg);
    padding: 0 28px;
}

.accordion-content.active {
    max-height: 5000px;
    padding: 32px 28px 40px;
}

.accordion-content .case-block {
    margin-bottom: 40px;
    padding-bottom: 40px;
}

.accordion-content .case-block:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

.accordion-content .case-block-highlight:last-child {
    padding-bottom: 40px;
}

@media (max-width: 768px) {
    .accordion-header {
        padding: 20px;
    }

    .accordion-header-content {
        gap: 16px;
    }

    .accordion-number {
        display: none;
    }

    .accordion-title {
        font-size: 1rem;
    }

    .accordion-content {
        padding: 0 20px;
    }

    .accordion-content.active {
        padding: 24px 20px 32px;
    }
}

/* Case Content Section */
.case-content-section {
    padding: 80px 32px;
    background: var(--bg);
}

/* Case Blocks */
.case-block {
    margin-bottom: 56px;
    padding-bottom: 56px;
    border-bottom: 1px solid var(--border);
}

.case-block:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.case-block-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 24px;
    letter-spacing: -0.3px;
}

.case-block-subheading {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 28px 0 12px 0;
    letter-spacing: -0.2px;
}

.case-block-subheading:first-of-type {
    margin-top: 20px;
}

.case-block-content {
    max-width: 720px;
}

.case-block-content p {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.85;
    margin-bottom: 20px;
    text-align: justify;
    hyphens: auto;
}

.case-block-content p:last-child {
    margin-bottom: 0;
}

.case-block-list {
    list-style: none;
    margin: 20px 0;
}

.case-block-list li {
    padding: 12px 0;
    padding-left: 24px;
    position: relative;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.case-block-list li:before {
    content: '';
    position: absolute;
    left: 0;
    top: 20px;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
}

.case-block-list-numbered {
    counter-reset: item;
}

.case-block-list-numbered li:before {
    content: counter(item);
    counter-increment: item;
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 14px;
}

.case-block-list-numbered li {
    padding-left: 40px;
}

.case-block-sublist {
    list-style: none;
    margin: 12px 0 0 0;
    padding-left: 24px;
}

.case-block-sublist li {
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
    font-size: 0.95rem;
}

.case-block-sublist li:before {
    content: '–';
    position: absolute;
    left: 0;
    top: 6px;
    width: auto;
    height: auto;
    background: transparent;
    border-radius: 0;
    color: var(--text-muted);
}

/* Case Block Highlight (Results) */
.case-block-highlight {
    background: rgba(196, 93, 62, 0.06);
    padding: 40px;
    border-radius: 12px;
    border-bottom: none;
    border-left: 3px solid var(--primary);
    margin-bottom: 0;
}

.case-block-highlight .case-block-title {
    color: var(--primary);
}

.case-results-list {
    list-style: none;
}

.case-results-list li {
    padding: 16px 0;
    padding-left: 32px;
    position: relative;
    color: var(--text);
    font-size: 1.1rem;
    line-height: 1.7;
    border-bottom: 1px solid rgba(196, 93, 62, 0.15);
}

.case-results-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.case-results-list li:before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 16px;
    color: var(--primary);
    font-weight: 600;
}

.case-block-closing {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(196, 93, 62, 0.2);
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text);
}

/* Workflow Comparison */
.workflow-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.workflow-card {
    padding: 28px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.workflow-before {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
}

.workflow-after {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
}

.workflow-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
}

.workflow-before .workflow-label {
    color: #ef4444;
}

.workflow-after .workflow-label {
    color: #10b981;
}

.workflow-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.workflow-list li {
    padding: 10px 0;
    padding-left: 20px;
    position: relative;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    border-bottom: 1px solid var(--border);
}

.workflow-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.workflow-list li:before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--text-subtle);
}

.workflow-after .workflow-list li:before {
    content: '✓';
    color: #10b981;
}

@media (max-width: 768px) {
    .workflow-comparison {
        grid-template-columns: 1fr;
    }
}

/* RISE Dashboard Styles */
.rise-dashboard {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.rise-header {
    text-align: center;
    margin-bottom: 40px;
}

.rise-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 8px;
}

.rise-accent-bar {
    width: 4px;
    height: 32px;
    border-radius: 4px;
}

.rise-accent-bar.green { background: #10b981; }
.rise-accent-bar.blue { background: #3b82f6; }

.rise-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.rise-subtitle {
    font-size: 0.9rem;
    color: #94a3b8;
    margin: 0;
}

.rise-source {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 4px;
}

.rise-score-main {
    text-align: center;
    margin-bottom: 48px;
}

.rise-score-circle {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.3);
    margin-bottom: 12px;
    padding-top: 45px;
}

.rise-score-value {
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
}

.rise-score-max {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
}

.rise-score-label {
    font-size: 0.9rem;
    color: #94a3b8;
    margin: 0;
}

.rise-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rise-pillars {
    margin-bottom: 40px;
}

.rise-pillar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.rise-pillar-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.rise-pillar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.rise-pillar-name {
    font-size: 0.85rem;
    color: #cbd5e1;
}

.rise-pillar-score {
    font-size: 1.25rem;
    font-weight: 700;
}

.rise-pillar-score.green { color: #10b981; }
.rise-pillar-score.yellow { color: #f59e0b; }

.rise-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.rise-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.rise-progress-fill.green { background: #10b981; }
.rise-progress-fill.blue { background: #3b82f6; }
.rise-progress-fill.purple { background: #8b5cf6; }

.rise-regional {
    margin-bottom: 40px;
}

.rise-regional-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rise-country-row {
    display: grid;
    grid-template-columns: 100px 1fr 50px;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.rise-country-row.highlight {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.rise-country-name {
    font-size: 0.9rem;
    color: #e2e8f0;
    font-weight: 500;
}

.rise-country-bar-wrap {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.rise-country-bar {
    height: 100%;
    border-radius: 4px;
}

.rise-country-bar.green { background: #10b981; }
.rise-country-bar.gray { background: #6b7280; }

.rise-country-score {
    font-size: 0.9rem;
    font-weight: 600;
    color: #94a3b8;
    text-align: right;
}

.rise-sdg7-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.rise-sdg7-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.rise-sdg7-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 8px;
}

.rise-sdg7-label {
    font-size: 0.8rem;
    color: #94a3b8;
}

/* RISE progress bar width classes */
.rise-w-100 { width: 100%; }
.rise-w-79 { width: 79%; }
.rise-w-76 { width: 76%; }
.rise-w-72 { width: 72%; }
.rise-w-66 { width: 66%; }
.rise-w-65 { width: 65%; }
.rise-w-63 { width: 63%; }

@media (max-width: 768px) {
    .rise-dashboard {
        padding: 24px;
    }

    .rise-pillar-grid,
    .rise-sdg7-grid {
        grid-template-columns: 1fr;
    }

    .rise-country-row {
        grid-template-columns: 80px 1fr 40px;
        gap: 12px;
    }
}

/* Legacy Case Study Styles (for detail pages) */
.case-study {
    background: var(--bg-card);
    padding: 48px;
    border-radius: 20px;
    margin-bottom: 32px;
    border: 1px solid var(--border);
    transition: border-color 0.3s;
}

.case-study:hover {
    border-color: var(--primary);
}

.case-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.case-header h3 {
    font-size: 1.75rem;
    color: var(--text);
    font-weight: 700;
}

.case-logo {
    height: 32px;
    width: auto;
}

.case-logo-large {
    height: 48px;
}

.case-role {
    background: var(--primary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: white;
}

.case-tagline {
    font-size: 1.1rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 24px;
}

.case-description {
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.8;
}

.case-description p {
    margin-bottom: 16px;
}

.case-description p:last-child {
    margin-bottom: 0;
}

.case-description strong {
    color: var(--text);
}

.case-section-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 16px;
    margin-top: 8px;
}

.case-image {
    margin: 24px 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.case-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Case Gallery */
.case-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 24px;
}

.case-gallery-item {
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: rgba(26, 26, 26, 0.05);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.case-gallery-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.case-gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

.case-gallery-caption {
    padding: 8px 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(26, 26, 26, 0.08);
    text-align: center;
    line-height: 1.3;
}

@media (max-width: 900px) {
    .case-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .case-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Video Preview Card */
.video-preview {
    margin: 24px auto;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: border-color 0.3s;
    max-width: 500px;
}

.video-preview:hover {
    border-color: var(--primary);
}

.video-preview-link {
    display: block;
    position: relative;
    text-decoration: none;
}

.video-preview-thumb {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    filter: brightness(0.7);
    transition: filter 0.3s;
}

.video-preview-link:hover .video-preview-thumb {
    filter: brightness(0.5);
}

.video-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.video-preview-play {
    width: 70px;
    height: 70px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    transition: transform 0.3s, box-shadow 0.3s;
}

.video-preview-link:hover .video-preview-play {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(122, 0, 223, 0.6);
}

.video-preview-text {
    color: white;
    font-size: 1rem;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.case-details {
    list-style: none;
    margin-bottom: 32px;
}

.case-details li {
    padding: 10px 0;
    padding-left: 24px;
    position: relative;
    color: var(--text-muted);
    line-height: 1.7;
}

.case-details li:before {
    content: '';
    position: absolute;
    left: 0;
    top: 18px;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}

.case-details li strong {
    color: var(--text);
}

.case-details li a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s;
}

.case-details li a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.case-impact {
    background: rgba(196, 93, 62, 0.08);
    padding: 28px;
    border-radius: 8px;
}

.case-impact h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
    margin-bottom: 16px;
}

.case-impact ul {
    list-style: none;
}

.case-impact li {
    padding: 8px 0;
    color: var(--text-muted);
}

.case-impact li strong {
    color: var(--text);
}

/* Testimonials */
.case-testimonials {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.case-testimonials h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Video Grid */
.video-grid {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.video-card {
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    flex-shrink: 0;
    border: 2px solid var(--border);
    transition: border-color 0.3s, transform 0.3s;
}

.video-card:hover {
    border-color: var(--primary);
    transform: scale(1.02);
}

.video-card video {
    width: 160px;
    height: 220px;
    display: block;
    object-fit: cover;
}

/* Principles List */
.principles-list {
    list-style: none;
    max-width: 600px;
    counter-reset: item;
}

.principles-list li {
    padding: 20px 0;
    padding-left: 48px;
    position: relative;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    transition: color 0.3s;
}

.principles-list li:hover {
    color: var(--text);
}

.principles-list li:before {
    content: counter(item);
    counter-increment: item;
    position: absolute;
    left: 0;
    top: 20px;
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Trust Grid */
.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.trust-card {
    background: var(--bg-card);
    padding: 36px;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.trust-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.trust-card h3 {
    font-size: 1.15rem;
    color: var(--text);
    margin-bottom: 16px;
    font-weight: 600;
}

.trust-card p {
    color: var(--text-muted);
    line-height: 1.8;
}

.trust-card strong {
    color: var(--text);
}

/* Education */
.education-list {
    list-style: none;
    margin-bottom: 32px;
}

.education-list li {
    padding: 12px 0;
    padding-left: 28px;
    position: relative;
    color: var(--text-muted);
}

.education-list li:before {
    content: '';
    position: absolute;
    left: 0;
    top: 20px;
    width: 12px;
    height: 2px;
    background: var(--primary);
}

.certifications {
    margin-top: 48px;
}

.certifications h3 {
    font-size: 1.15rem;
    color: var(--text);
    margin-bottom: 20px;
}

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

.cert-tags span {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: all 0.3s;
}

.cert-tags span:hover {
    border-color: var(--primary);
    color: var(--text);
}

/* About & Skills */
.about-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 32px;
    margin-bottom: 20px;
}

.about-photo {
    width: 180px;
    height: 180px;
    border-radius: 16px;
    object-fit: cover;
    border: 2px solid var(--border);
    flex-shrink: 0;
    transition: border-color 0.3s;
}

.about-photo:hover {
    border-color: var(--primary);
}

.about-intro {
    flex: 1;
}

.about-intro h2 {
    margin-bottom: 24px;
}

.about-text {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    line-height: 1.8;
}

.about-me-content {
    max-width: 700px;
}

.about-me-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.9;
    margin-bottom: 28px;
    text-align: justify;
    hyphens: auto;
}

.about-me-content p:last-child {
    margin-bottom: 0;
}

.skills-section {
    margin-top: 64px;
}

.skills-section h3 {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 32px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.skill-category {
    padding: 28px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.skill-category:hover {
    border-color: var(--primary);
}

.skill-category h4 {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 10px;
    font-weight: 600;
}

.skill-category p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Compact Skills Section */
.skills-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.skill-group {
    padding: 20px;
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border);
}

.skill-group h4 {
    font-size: 0.9rem;
    color: var(--primary-light);
    margin-bottom: 8px;
    font-weight: 600;
}

.skill-group p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.education-minimal {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.education-minimal p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.education-minimal strong {
    color: var(--text);
}

/* References Section */
.section#references {
    min-height: auto;
    display: block;
}

.references-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.reference-card {
    background: var(--bg-card);
    padding: 28px;
    border-radius: 8px;
    border: 1px solid var(--border);
    text-align: center;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.reference-card .reference-link {
    margin-top: auto;
}

.reference-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(26, 26, 26, 0.08);
}

.reference-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 16px;
    border: 2px solid var(--border);
    transition: border-color 0.3s;
}

.reference-card:hover .reference-photo {
    border-color: var(--primary);
}

.reference-card a:has(.reference-photo-link) {
    position: relative;
    display: block;
    margin: 0 auto 16px auto;
    width: fit-content;
}

.reference-card a:has(.reference-photo-link) .reference-photo {
    margin-bottom: 0;
}

.reference-card a:has(.reference-photo-link)::after {
    content: '\25B6';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    color: white;
    background: rgba(196, 93, 62, 0.85);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    padding-left: 3px;
}

.reference-card a:has(.reference-photo-link):hover::after {
    opacity: 1;
}

.reference-photo-link {
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.3s;
}

.reference-photo-link:hover {
    transform: scale(1.05);
    border-color: var(--primary);
}

.reference-card h4 {
    font-size: 1.15rem;
    color: var(--text);
    margin-bottom: 8px;
    font-weight: 600;
}

.reference-company {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.reference-link {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 20px;
    border: 1px solid var(--primary);
    border-radius: 6px;
    transition: all 0.3s;
}

.reference-link:hover {
    background: var(--primary);
    color: white;
}

/* CTA Section */
.section-cta {
    background: var(--bg-dark);
    color: var(--text-on-dark);
    text-align: center;
    padding: 80px 32px;
}

.section-cta h2 {
    font-family: 'Fraunces', Georgia, serif;
    color: var(--text-on-dark);
    font-size: clamp(1.5rem, 3vw, 2rem);
    max-width: 700px;
    margin: 0 auto 48px;
    font-weight: 500;
    line-height: 1.5;
}

.cta-button {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 18px 48px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
}

.cta-button:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(196, 93, 62, 0.4);
}

.contact-links {
    margin-top: 40px;
}

.contact-links a {
    color: var(--text-muted-on-dark);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-links a:hover {
    color: var(--text-on-dark);
}

.contact-links span {
    color: rgba(250, 248, 245, 0.4);
    margin: 0 20px;
}

/* Footer */
.footer {
    background: var(--bg-dark);
    padding: 24px 32px;
    text-align: center;
    border-top: 1px solid rgba(250, 248, 245, 0.1);
}

.footer p {
    color: var(--text-muted-on-dark);
    font-size: 0.85rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero {
        padding: 120px 24px 80px;
        min-height: auto;
    }

    .hero-scroll-indicator {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin-top: 40px;
    }

    .about-photo {
        width: 140px;
        height: 140px;
    }

    .hero-tags {
        gap: 8px;
    }

    .hero-tags span {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .section {
        min-height: auto;
        padding: 60px 20px;
    }

    .section h2 {
        font-size: 1.8rem;
    }

    .case-study {
        padding: 28px;
    }

    .case-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .case-header h3 {
        font-size: 1.4rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .services-list {
        grid-template-columns: 1fr;
    }

    .cases-grid {
        grid-template-columns: 1fr;
    }

    .trust-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .section-cta h2 {
        font-size: 1.5rem;
    }

    .cta-button {
        padding: 16px 40px;
        font-size: 1rem;
    }

    .contact-links {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .contact-links span {
        display: none;
    }

    .video-grid {
        flex-wrap: wrap;
    }

    .video-card video {
        width: 140px;
        height: 190px;
    }
}

@media (max-width: 480px) {
    .hero-headline {
        font-size: 2rem;
    }

    .container {
        padding: 0 20px;
    }

    .highlight-text {
        padding: 20px;
        font-size: 1.05rem;
    }

    .cert-tags {
        flex-direction: column;
    }

    .cert-tags span {
        text-align: center;
    }
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2001;
}

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

.lightbox-close::before,
.lightbox-close::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: white;
}

.lightbox-close::before {
    transform: rotate(45deg);
}

.lightbox-close::after {
    transform: rotate(-45deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav.prev {
    left: 20px;
}

.lightbox-nav.next {
    right: 20px;
}

.lightbox-nav::before {
    content: '';
    width: 12px;
    height: 12px;
    border-top: 2px solid white;
    border-right: 2px solid white;
}

.lightbox-nav.prev::before {
    transform: rotate(-135deg);
    margin-left: 4px;
}

.lightbox-nav.next::before {
    transform: rotate(45deg);
    margin-right: 4px;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.case-gallery-item {
    cursor: pointer;
}

@media (max-width: 768px) {
    .lightbox-nav {
        width: 40px;
        height: 40px;
    }

    .lightbox-nav.prev {
        left: 10px;
    }

    .lightbox-nav.next {
        right: 10px;
    }
}
