/* CSS Variables matching main portfolio branding */
#case-study-portal-wrapper {
    /* Dark Theme (Default) */
    --bg-primary: #0b0f19;
    --bg-secondary: #0f1322;
    --bg-card: rgba(30, 41, 59, 0.45);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #14b8a6; /* Premium Teal */
    --accent-hover: #0d9488;
    --border-color: rgba(255, 255, 255, 0.08);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] #case-study-portal-wrapper {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.85);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent: #0d9488;
    --accent-hover: #0f766e;
    --border-color: rgba(15, 23, 42, 0.08);
    --card-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    transition: background-color var(--transition-smooth), color var(--transition-smooth);
    overflow-x: hidden;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Header Styling */
#case-study-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: background-color var(--transition-smooth), border-color var(--transition-smooth);
}

[data-theme="light"] #case-study-header {
    background-color: rgba(248, 250, 252, 0.85);
}

.header-container {
    max-width: 100%;
    padding: 0.8rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-back-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition-fast);
}

.header-back-link:hover {
    transform: translateX(-2px);
}

.header-profile-img {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--accent);
}

.header-branding {
    display: flex;
    flex-direction: column;
}

.branding-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.branding-title {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background-color: rgba(20, 184, 166, 0.05);
}

.theme-toggle-btn i {
    font-size: 0.95rem;
}

/* Theme toggle element switches */
.theme-toggle-btn .fa-sun {
    display: none;
}
[data-theme="light"] .theme-toggle-btn .fa-moon {
    display: none;
}
[data-theme="light"] .theme-toggle-btn .fa-sun {
    display: block;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.15rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    background-color: rgba(20, 184, 166, 0.05);
}

/* Main Content Wrapper */
.case-study-main {
    max-width: 100%;
    padding: 2.5rem 5%;
}

/* Divider styling */
.section-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 3.5rem 0;
}

/* Case Study Directory Section */
.case-study-directory-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
}

.directory-section-title {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-primary);
}

.directory-section-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.directory-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.directory-card {
    background-color: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--card-shadow);
    transition: all var(--transition-smooth);
}

.directory-card:hover {
    transform: translateY(-4px);
    border-color: rgba(20, 184, 166, 0.2);
    box-shadow: 0 10px 20px rgba(20, 184, 166, 0.05);
}

.directory-card.active {
    border-color: var(--accent);
    background-color: rgba(20, 184, 166, 0.03);
    box-shadow: 0 8px 25px rgba(20, 184, 166, 0.12);
}

.card-logo-container {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 10px;
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.directory-card:hover .card-logo-container {
    transform: scale(1.05);
}

.card-logo-img {
    width: 80%;
    height: auto;
    object-fit: contain;
}

.card-text-container {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow: hidden;
}

.card-project-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-project-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
}

.card-project-badge {
    margin-top: 0.5rem;
    display: inline-flex;
    align-self: flex-start;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.active-badge {
    background-color: rgba(20, 184, 166, 0.1);
    color: var(--accent);
}

.coming-soon-badge {
    background-color: rgba(148, 163, 184, 0.1);
    color: var(--text-secondary);
}

/* Recreated Slide 1 Mockup Hero Section */
.crops-hero-section {
    background-color: #ffffff; /* Match Slide 1 White Background */
    border-radius: 20px;
    padding: 4.5rem 4rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Dark mode subtle outline glow on the white hero card */
[data-theme="dark"] .crops-hero-section {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.crops-hero-container {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 4rem;
    align-items: center;
}

.crops-hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.crops-hero-title {
    font-family: var(--font-heading);
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1.15;
    color: #0f172a; /* Slate 900 matching mockup */
    margin-bottom: 1.25rem;
    letter-spacing: -1px;
}

.crops-hero-subtitle {
    font-family: var(--font-body);
    font-size: 1.25rem;
    font-weight: 500;
    color: #64748b; /* Slate 500 matching mockup */
    margin-bottom: 2.5rem;
    line-height: 1.5;
}

.crops-hero-badges {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.crops-badge {
    display: inline-flex;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.client-badge {
    border: 1.5px solid #0d9488;
    color: #0d9488;
    background-color: rgba(13, 148, 136, 0.02);
}

.partner-badge {
    border: 1.5px solid #0d9488;
    color: #0d9488;
    background-color: rgba(13, 148, 136, 0.02);
}

.crops-hero-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-illustration {
    width: 100%;
    max-height: 380px;
    object-fit: contain;
}

/* Section 2: Slide presentation viewer */
.presentation-viewer-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.viewer-title-area {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.viewer-section-title {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-primary);
}

.viewer-section-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
}



/* Slide Canvas Container */
.presentation-canvas-container {
    position: relative;
    width: 100%;
    background-color: #0c1a18; /* Dark teal/mint bg */
    border-radius: 16px;
    border: 1px solid rgba(20, 184, 166, 0.15);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    transition: background-color var(--transition-smooth), border-color var(--transition-smooth);
}

.presentation-canvas-container.double-slide {
    aspect-ratio: auto;
}

[data-theme="light"] .presentation-canvas-container {
    background-color: #e6f4f1; /* Light mint/green background */
    border-color: rgba(13, 148, 136, 0.15);
}

@media (max-width: 768px) {
    .presentation-canvas-container.double-slide {
        aspect-ratio: auto;
    }
}

[data-theme="dark"] .presentation-canvas-container {
    border-color: rgba(255, 255, 255, 0.05);
}

/* Active slide image wrapper */
.active-slide-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.active-slide-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
    will-change: opacity;
}

/* Floating Slide Info */
.slide-floating-info {
    display: none !important;
}

/* Navigation Arrows */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 50%;
    background: rgba(11, 15, 25, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 15;
    transition: all var(--transition-fast);
    opacity: 0; /* Fade in on hover */
}

.presentation-canvas-container:hover .nav-arrow {
    opacity: 1;
}

.nav-prev {
    left: 1.5rem;
}

.nav-next {
    right: 1.5rem;
}

.nav-arrow:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
    transform: translateY(-50%) scale(1.05);
}

.nav-arrow i {
    font-size: 1.1rem;
}

/* Slide progress bar */
.slide-progress-bar-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: rgba(0, 0, 0, 0.06);
    z-index: 20;
}

.slide-progress-bar {
    height: 100%;
    background-color: var(--accent);
    width: 8.33%; /* 1/12 default */
    transition: width 0.3s ease;
}

/* Thumbnail scroll strip */
.thumbnails-outer-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.thumbnails-track-container {
    flex: 1;
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0.2rem;
    scroll-behavior: smooth;
}

.thumbnails-track-container::-webkit-scrollbar {
    display: none; /* Hide scrollbar for clean strip look */
}

.thumbnail-card {
    flex: 0 0 160px;
    aspect-ratio: 16 / 9;
    background-color: #ffffff;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-fast);
    opacity: 0.6;
}

.thumbnail-card:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.thumbnail-card.active {
    opacity: 1;
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.25);
    transform: scale(1.02);
}

.thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-scroll-arrow {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.thumbnail-scroll-arrow:hover {
    border-color: var(--accent);
    color: var(--accent);
    background-color: rgba(20, 184, 166, 0.05);
}

/* Detailed Narrative Section */
.case-narrative-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.narrative-section-title {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-primary);
}

.narrative-section-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.narrative-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    transition: opacity 0.25s ease;
}

.narrative-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.25rem;
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-smooth), border-color var(--transition-smooth);
}

.narrative-card:hover {
    transform: translateY(-4px);
    border-color: rgba(20, 184, 166, 0.2);
}

.card-icon-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    color: var(--accent);
}

.card-icon-header i {
    font-size: 1.5rem;
}

.card-icon-header h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-body p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-align: justify;
    font-size: 0.95rem;
}

.card-body p:last-child {
    margin-bottom: 0;
}

.card-body ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.card-body ul li {
    position: relative;
    padding-left: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    text-align: justify;
}

.card-body ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* Fullscreen Slide display overrides */
:fullscreen .presentation-canvas-container {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    border: none;
}

:fullscreen .nav-arrow {
    opacity: 1; /* Keep arrows always visible in fullscreen */
}

/* Footer Section */
footer {
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    padding: 3.5rem 0 2.5rem 0;
    transition: background-color var(--transition-smooth), border-color var(--transition-smooth);
}

.footer-container {
    width: 100%;
    padding: 0 5%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.85rem;
    text-decoration: none;
    color: var(--text-primary);
    letter-spacing: -1px;
}

.footer-logo span {
    color: var(--accent);
}

.footer-socials {
    display: flex;
    gap: 1.5rem;
}

.social-link {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.social-link:hover {
    color: #ffffff;
    background-color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(20, 184, 166, 0.25);
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.6;
    max-width: 600px;
}

/* Mobile responsive styles */
@media (max-width: 1024px) {
    .directory-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .crops-hero-section {
        padding: 3rem 2.5rem;
    }
    
    .crops-hero-title {
        font-size: 2.75rem;
    }
    
    .crops-hero-container {
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    .directory-grid {
        grid-template-columns: 1fr;
    }
    
    .crops-hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .crops-hero-content {
        align-items: center;
    }
    
    .crops-hero-badges {
        justify-content: center;
    }
    
    .crops-hero-title {
        font-size: 2.25rem;
    }
    
    .crops-hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1.75rem;
    }
    
    .hero-illustration {
        max-height: 260px;
    }
    
    .narrative-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .nav-arrow {
        width: 2.6rem;
        height: 2.6rem;
    }
    
    .nav-prev {
        left: 0.75rem;
    }
    
    .nav-next {
        right: 0.75rem;
    }
    
    .slide-floating-info {
        left: 1rem;
        bottom: 1rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .crops-hero-section {
        padding: 2.5rem 1.5rem;
    }
    
    .crops-hero-title {
        font-size: 1.85rem;
    }
    
    .crops-hero-subtitle {
        font-size: 0.95rem;
    }
    
    .crops-badge {
        padding: 0.4rem 0.8rem;
        font-size: 0.65rem;
    }
    
    .header-branding {
        display: none; /* Hide branding text on extra small mobile to save space */
    }
    
    .viewer-controls-top span {
        display: none; /* Hide button labels, leave icons on mobile */
    }
}

/* Custom Narrative Card Variations */
.narrative-card.challenge-card {
    border-left: 4px solid #64748b;
}
.narrative-card.highlighted-card {
    border-left: 4px solid #f97316;
}
.narrative-card.impact-card {
    border-left: 4px solid #10b981;
}

.carousel-group .narrative-card.challenge-card {
    border-left: 4px solid #64748b; /* Slate grey border highlight */
}

.carousel-group .narrative-card.challenge-card .card-icon-header {
    color: #64748b; /* Muted grey icon */
}

.carousel-group .narrative-card.challenge-card ul {
    list-style: none;
    margin-left: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.carousel-group .narrative-card.challenge-card li {
    background-color: rgba(148, 163, 184, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.12);
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    font-size: 0.78rem;
    line-height: 1.3;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

[data-theme="light"] .carousel-group .narrative-card.challenge-card li {
    background-color: rgba(255, 255, 255, 0.75);
    border-color: rgba(148, 163, 184, 0.18);
}

.carousel-group .narrative-card.challenge-card li strong {
    color: #475569; /* Darker slate for strong elements */
    font-size: 0.82rem;
}

[data-theme="dark"] .carousel-group .narrative-card.challenge-card li strong {
    color: #94a3b8; /* Lighter slate grey for dark mode strong elements */
}

.carousel-group .narrative-card.challenge-card .card-body p {
    font-size: 0.82rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

@media (max-width: 640px) {
    .carousel-group .narrative-card.challenge-card ul {
        grid-template-columns: 1fr;
    }
}

/* Highlighted Card Custom Styling */
.carousel-group .narrative-card.highlighted-card {
    border-left: 4px solid #f97316;
}

.carousel-group .narrative-card.highlighted-card .card-icon-header {
    color: #f97316;
}

/* Impact Card Custom Styling */
.carousel-group .narrative-card.impact-card {
    border-left: 4px solid #10b981;
}

.carousel-group .narrative-card.impact-card .card-icon-header {
    color: #10b981;
}

/* Grids inside narrative cards */
.summary-bullets-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}
.summary-col {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
    padding-left: 0.75rem;
    border-left: 2px solid var(--accent);
}
.highlight-teal {
    color: var(--accent);
    font-weight: 600;
}

.roles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}
@media (max-width: 640px) {
    .roles-grid {
        grid-template-columns: 1fr;
    }
}
.role-item {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    border-radius: 8px;
    line-height: 1.4;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-top: 1rem;
}
.metric-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    background-color: rgba(16, 185, 129, 0.03);
    border: 1px solid rgba(16, 185, 129, 0.1);
    padding: 1rem;
    border-radius: 10px;
    align-items: center;
    text-align: center;
}
[data-theme="light"] .metric-item {
    background-color: rgba(16, 185, 129, 0.02);
}
.metric-num {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: #10b981;
}
.metric-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Presentation Slide Carousel Styles */
.carousel-viewport {
    width: 100%;
    height: auto;
    overflow: hidden;
    position: relative;
}

.carousel-track {
    display: flex;
    height: auto;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.carousel-group {
    flex: 0 0 100%;
    width: 100%;
    height: auto;
    display: flex;
    align-items: stretch; /* Stretch columns to equal height */
    justify-content: center;
    gap: 1.5rem;
    padding: 1.75rem;
    box-sizing: border-box;
    background-color: #0c1a18; /* Match container background */
    transition: background-color var(--transition-smooth);
}

[data-theme="light"] .carousel-group {
    background-color: #e6f4f1; /* Light mint/green background */
}

/* Slide column layout */
.carousel-slide-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 48%; /* To display two columns side by side nicely */
    box-sizing: border-box;
}

.carousel-slide-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.carousel-slide-img:hover {
    transform: scale(1.02);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22), 0 4px 15px rgba(0, 0, 0, 0.12);
}

/* Single slide in group centering */
.carousel-group.single-slide .carousel-slide-col {
    max-width: 48%; /* Match double slide width to maintain constant height and avoid layout shifting */
    margin: 0 auto;
}

/* For project-level narrative group (Pandora / Health) */
.carousel-group.project-narrative-group {
    flex-direction: column;
    align-items: center;
}

.carousel-group.project-narrative-group .project-narrative-slide {
    max-width: 60%;
    margin-bottom: 1rem;
}

.carousel-group.project-narrative-group .narrative-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* Adjust narrative card spacing and sizes when inside carousel */
.carousel-group .narrative-card {
    background-color: #121824; /* Dark slate greyed out background */
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    padding: 0.85rem 1.15rem; /* Reduced padding from 1.25rem 1.5rem */
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-smooth), border-color var(--transition-smooth);
    width: 100%;
    margin: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

[data-theme="light"] .carousel-group .narrative-card {
    background-color: #f1f5f9; /* Light slate greyed out background */
    border-color: rgba(148, 163, 184, 0.3);
}

.carousel-group .card-body {
    /* Auto height, fit to content */
}

.carousel-group .narrative-card:hover {
    transform: translateY(-2px);
    border-color: rgba(148, 163, 184, 0.35);
}

.carousel-group .card-icon-header {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Reduced gap from 0.75rem */
    margin-bottom: 0.5rem; /* Reduced margin-bottom from 0.75rem */
    color: #64748b; /* Muted grey icon by default */
}

.carousel-group .card-icon-header i {
    font-size: 1.1rem; /* Reduced size from 1.25rem */
}

.carousel-group .card-icon-header h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem; /* Reduced font-size from 1.05rem */
    font-weight: 700;
    color: var(--text-primary);
}

.carousel-group .card-body p {
    color: var(--text-secondary);
    margin-bottom: 0.4rem; /* Reduced margin from 0.75rem */
    text-align: justify;
    font-size: 0.78rem; /* Reduced font-size from 0.88rem */
    line-height: 1.35; /* Reduced line-height from 1.5 */
}

.carousel-group .card-body p:last-child {
    margin-bottom: 0;
}

.carousel-group .card-body ul, 
.carousel-group .card-body ol {
    margin-left: 1rem; /* Reduced margin from 1.25rem */
    margin-bottom: 0.4rem; /* Reduced margin from 0.75rem */
    color: var(--text-secondary);
    font-size: 0.78rem; /* Reduced font-size from 0.88rem */
}

.carousel-group .card-body li {
    margin-bottom: 0.25rem; /* Reduced margin from 0.4rem */
}

/* Responsive adjustments for the carousel layouts */
@media (max-width: 768px) {
    .carousel-group {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.25rem;
    }
    
    .carousel-slide-col {
        max-width: 100% !important;
    }
    
    .carousel-group.single-slide .carousel-slide-col {
        max-width: 100% !important;
    }
    
    .carousel-group.project-narrative-group .project-narrative-slide {
        max-width: 100%;
    }
    
    .carousel-group.project-narrative-group .narrative-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}


