/* CSS Variables */
:root {
    --primary-color: #374151;
    --text-primary: #374151;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --background-primary: #ffffff;
    --background-secondary: #f9fafb;
    --border-color: #e5e7eb;
    --accent-color: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.2), 0 2px 4px -2px rgb(0 0 0 / 0.2);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.2), 0 4px 6px -4px rgb(0 0 0 / 0.2);
    --font-primary: 'Fredoka', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Macondo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary-color: #e5e7eb;
    --text-primary: #d1d5db;
    --text-secondary: #d1d5db;
    --text-light: #9ca3af;
    --background-primary: #111827;
    --background-secondary: #1f2937;
    --border-color: #374151;
    --accent-color: #f87171;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5), 0 2px 4px -2px rgb(0 0 0 / 0.5);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.6), 0 4px 6px -4px rgb(0 0 0 / 0.6);
}

/* Base Styles */
* {
    box-sizing: border-box;
    max-width: 100%;
}

html {
    width: 100%;
    height: 100vh;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-primary);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../image/background.png');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 0.25;
    z-index: -1;
    pointer-events: none;
}

[data-theme="dark"] body::before {
    opacity: 0.15;
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.logo-img {
    max-width: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--text-primary);
}

/* Header Styles */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    padding: 0.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.05);
    transition: background 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] header {
    background: rgba(17, 24, 39, 0.9);
    border-bottom: 1px solid rgba(55, 65, 81, 0.5);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.3);
}

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

.logo-link {
    text-decoration: none;
}

.logo-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 6px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.logo-img:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    cursor: pointer;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
}

nav a {
    display: inline-block;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

[data-theme="dark"] nav a {
    color: var(--text-primary);
}

[data-theme="dark"] nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    cursor: pointer;
}

/* Dark Mode Toggle Button */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    flex-shrink: 0;
}

.theme-icon {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.theme-toggle:hover {
    background: var(--background-secondary);
    border-color: var(--text-secondary);
    cursor: pointer;
}

.theme-toggle:hover .theme-icon {
    transform: rotate(20deg);
    cursor: pointer;
}


/* Main Content */
main {
    margin-top: 60px;
    width: 100%;
}

/* Hero Section */
.case-study-hero {
    background: var(--background-secondary);
    padding: 6rem 2rem 4rem;
    text-align: center;
}


.hero-cover-image {
    max-width: 1200px;
    margin: 3rem auto 0;
    padding: 0 2rem;
}

.hero-cover-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    object-fit: cover;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.case-study-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 3rem;
}

.project-meta {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
}

.meta-item strong {
    font-size: 0.875rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-item span {
    font-size: 1.125rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Project Image */
.project-image {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
    gap: 2rem;
    justify-items: center;
    align-items: start;
}

/* Single image (default) */
.project-image:has(img:only-child) {
    display: flex;
    justify-content: center;
    max-width: 800px;
}

.project-image img {
    width: 100%;
    max-width: 100%;
    max-height: 600px;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    object-fit: cover;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* For single images, maintain aspect ratio */
.project-image:has(img:only-child) img {
    width: auto;
    object-fit: contain;
}

/* Content Sections */
.content-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.content-section.bg-light {
    background: var(--background-secondary);
    max-width: 100%;
}

.content-section.bg-light > * {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.content-section h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.content-section h3 {
    font-size: 1.7rem;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
    color: var(--text-primary);
    font-weight: 600;
}
.content-section h4 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
    color: var(--text-primary);

}

.content-section p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Thematic Insights Table */
.thematic-insights-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--background-primary);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.thematic-insights-table thead {
    background: var(--background-secondary);
}

.thematic-insights-table th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.thematic-insights-table td {
    padding: 1.25rem;
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    border-bottom: 1px solid var(--border-color);
}

.thematic-insights-table td:first-child {
    font-weight: 600;
    color: var(--text-primary);
    width: 20%;
    vertical-align: top;
}

.thematic-insights-table tbody tr:last-child td {
    border-bottom: none;
}

.thematic-insights-table tbody tr:hover {
    background: var(--background-secondary);
}

.table-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
}

.content-section ul {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-left: 0;
    padding-left: 1.25rem;
    list-style-position: outside;
}

.content-section li {
    margin-bottom: 1rem;
    padding-left: 0.25rem;
}

/* Research Grid */


.research-card {
    background: var(--background-primary);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
}

.research-card:hover {
    transform: translateY(-4px);
    
}

.research-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.research-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Insight Box */
.insight-box {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 2rem;
    border-radius: 1rem;
    margin-top: 3rem;
}

.insight-box h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.insight-box p {
    color: white;
    margin: 0;
    font-size: 1.125rem;
}

/* Features List */
.features-list {
    display: grid;
    gap: 2rem;
    margin-top: 3rem;
}

.feature {
    background: var(--background-primary);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--accent-color);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-color);
}

.feature h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature p {
    margin: 0;
    font-size: 1rem;
}

/* Process Steps */
.process-steps {
    display: grid;
    gap: 2rem;
    margin-top: 3rem;
}

.process-step {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.process-step h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.process-step p {
    margin: 0;
    font-size: 1rem;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 2rem;
    margin-top: 3rem;
    width: 100%;
}

.result-card {
    background: var(--background-primary);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.result-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-color);
    font-family: var(--font-display);
    margin-bottom: 0.5rem;
}

.result-card p {
    margin: 0;
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Testimonial */
.testimonial {
    background: var(--background-primary);
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    margin-top: 3rem;
    border-left: 4px solid var(--accent-color);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-color);
}

.testimonial p {
    font-size: 1.25rem;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.testimonial cite {
    font-size: 1rem;
    color: var(--text-secondary);
    font-style: normal;
}

/* Learnings List */
.learnings-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0 0;
}

.learnings-list li {
    padding: 1.5rem;
    background: var(--background-primary);
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--accent-color);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-color);
}

.learnings-list strong {
    color: var(--text-primary);
}

/* Case Navigation */
.case-nav {
    max-width: 900px;
    margin: 4rem auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.nav-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: #dc2626;
}

/* Footer */
footer {
    background: var(--text-primary);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

footer p {
    margin: 1rem 0;
    color: rgb(163, 163, 163);
}

footer a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    margin: 0 1rem;
    transition: opacity 0.3s ease;
}

footer a:hover {
    opacity: 0.5;
    text-decoration: underline;
    cursor: pointer;
}

/* ===================================
   RESPONSIVE DESIGN - MEDIA QUERIES
   =================================== */

/* Large Desktops (1440px and above) */
@media (min-width: 1440px) {
    .case-study-hero {
        padding: 8rem 2rem 5rem;
    }
    
    .hero-cover-image {
        max-width: 1400px;
        margin-bottom: 3rem;
    }
    
    .hero-content {
        max-width: 1000px;
    }
    
    .content-section {
        max-width: 1000px;
    }
    
    .project-image {
        max-width: 1400px;
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
    
    .project-image:has(img:only-child) {
        max-width: 900px;
    }
    
    .project-image img {
        max-height: 500px;
    }
    
    .project-image:has(img:only-child) img {
        max-height: 700px;
    }
}

/* Extra Large Desktops (1920px and above) */
@media (min-width: 1920px) {
    .case-study-hero {
        padding: 10rem 4rem 6rem;
    }
    
    .hero-cover-image {
        max-width: 1800px;
        margin-bottom: 4rem;
    }
    
    .hero-content {
        max-width: 1200px;
    }
    
    .case-study-hero h1 {
        font-size: 4rem;
    }
    
    .subtitle {
        font-size: 1.5rem;
    }
    
    .content-section {
        max-width: 1200px;
        padding: 3rem 2rem;
    }
    
    .project-image {
        max-width: 1800px;
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }
    
    .project-image:has(img:only-child) {
        max-width: 1200px;
    }
    
    .project-image img {
        max-height: 600px;
    }
    
    .project-image:has(img:only-child) img {
        max-height: 800px;
    }
    
    .research-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
    
    .results-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
}

/* Ultra Wide Screens (2560px and above) */
@media (min-width: 2560px) {
    :root {
        --content-max: 2200px;
    }
    
    .case-study-hero {
        padding: 12rem 6rem 8rem;
    }
    
    .hero-cover-image {
        max-width: var(--content-max);
        margin-bottom: 5rem;
    }
    
    .hero-content {
        max-width: 1400px;
    }
    
    .case-study-hero h1 {
        font-size: 5rem;
        margin-bottom: 2rem;
    }
    
    .subtitle {
        font-size: 1.75rem;
        margin-bottom: 4rem;
    }
    
    .project-meta {
        gap: 5rem;
    }
    
    .meta-item strong {
        font-size: 1.1rem;
    }
    
    .meta-item span {
        font-size: 1.4rem;
    }
    
    .content-section {
        max-width: 1400px;
        padding: 4rem 2rem;
    }
    
    .content-section h2 {
        font-size: 3.5rem;
        margin-bottom: 2rem;
    }
    
    .content-section h3 {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }
    
    .content-section p {
        font-size: 1.4rem;
        line-height: 1.8;
        margin-bottom: 1.5rem;
    }
    
    .content-section ul {
        font-size: 1.4rem;
    }
    
    .project-image {
        max-width: var(--content-max);
        grid-template-columns: repeat(3, 1fr);
        gap: 4rem;
        margin: 4rem auto;
    }
    
    .project-image:has(img:only-child) {
        max-width: 1600px;
    }
    
    .project-image img {
        max-height: 800px;
    }
    
    .project-image:has(img:only-child) img {
        max-height: 1000px;
    }
    
    /* Larger components for ultra-wide screens */
    .research-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 3rem;
    }
    
    .research-card {
        padding: 3rem;
    }
    
    .research-card h3 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .research-card p {
        font-size: 1.2rem;
    }
    
    .results-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }
    
    .result-card {
        padding: 3rem;
    }
    
    .result-number {
        font-size: 4rem;
    }
    
    .result-card p {
        font-size: 1.2rem;
    }
    
    .insight-box {
        padding: 4rem;
        margin-top: 4rem;
    }
    
    .insight-box h3 {
        font-size: 2.2rem;
        margin-bottom: 1.5rem;
    }
    
    .insight-box p {
        font-size: 1.4rem;
    }
    
    .testimonial {
        padding: 4rem;
        margin-top: 4rem;
    }
    
    .testimonial p {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }
    
    .testimonial cite {
        font-size: 1.2rem;
    }
    
    .process-steps {
        gap: 3rem;
    }
    
    .process-step {
        gap: 3rem;
    }
    
    .step-number {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
    
    .process-step h3 {
        font-size: 1.8rem;
    }
    
    .process-step p {
        font-size: 1.3rem;
    }
    
    /* Navigation elements */
    .nav-btn {
        font-size: 1.2rem;
        padding: 1.5rem 3rem;
    }
    
    .page-navigation {
        max-width: var(--content-max);
        margin: 6rem auto 4rem;
        padding: 0 6rem;
        gap: 3rem;
    }
    
    /* Image gallery */
    .image-gallery {
        gap: 3rem;
    }
    
    .gallery-item img {
        height: 400px;
    }
    
    .gallery-caption {
        font-size: 1.1rem;
    }
}

/* Standard Desktop (1200px to 1439px) */
@media (max-width: 1439px) and (min-width: 1200px) {
    .case-study-hero h1 {
        font-size: 3.25rem;
    }
    
    .project-image {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    .project-image img {
        max-height: 450px;
    }
    
    .research-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large Tablets and Small Desktops (1024px and below) */
@media (max-width: 1024px) {
    .case-study-hero {
        padding: 5rem 1.5rem 3rem;
    }
    
    .hero-cover-image {
        margin-bottom: 2.5rem;
        padding: 0 1.5rem;
    }
    
    .case-study-hero h1 {
        font-size: 3rem;
    }
    
    .subtitle {
        font-size: 1.15rem;
    }
    
    .project-meta {
        gap: 2rem;
    }
    
    .project-image {
        max-width: 1000px;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .project-image:has(img:only-child) {
        max-width: 700px;
        display: flex;
    }
    
    .project-image img {
        max-height: 400px;
    }
    
    .project-image:has(img:only-child) img {
        max-height: 500px;
    }
    
    .content-section h2 {
        font-size: 2.25rem;
    }
    
    .content-section h3 {
        font-size: 1.5rem;
    }
    
    .research-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .results-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

/* Medium Tablets (900px and below) */
@media (max-width: 900px) {
    .project-image {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    
    .project-image img {
        max-height: 350px;
    }
    
    .research-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    }
    
    .process-step {
        gap: 1.5rem;
    }
}

/* Tablets (768px and below) */
@media (max-width: 768px) {
    header {
        padding: 0.5rem 1rem;
    }
    
    .header-right {
        gap: 0.75rem;
    }
    
    .theme-toggle {
        width: 32px;
        height: 32px;
    }
    
    .theme-icon {
        font-size: 0.9rem;
    }
    
    nav ul {
        gap: 0.5rem;
    }
    
    nav a {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
    
    .case-study-hero {
        padding: 4rem 1rem 2.5rem;
    }
    
    .hero-cover-image {
        margin-bottom: 2rem;
        padding: 0 1rem;
    }
    
    .case-study-hero h1 {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.05rem;
        margin-bottom: 2rem;
    }
    
    .project-meta {
        gap: 1.5rem;
        flex-direction: column;
    }
    
    .project-image {
        margin: 1.5rem auto;
        padding: 0 1rem;
        max-width: 600px;
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project-image:has(img:only-child) {
        display: flex;
    }
    
    .project-image img {
        max-height: 400px;
    }
    
    .content-section {
        padding: 2rem 1rem;
    }
    
    .content-section h2 {
        font-size: 2rem;
    }
    
    .content-section h3 {
        font-size: 1.4rem;
    }
    
    .thematic-insights-table {
        font-size: 0.9rem;
    }
    
    .thematic-insights-table th,
    .thematic-insights-table td {
        padding: 0.875rem 1rem;
    }
    
    .content-section p,
    .content-section ul {
        font-size: 1rem;
    }
    
    .content-section ul {
        padding-left: 1rem;
    }
    
    .research-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .research-card {
        padding: 1.5rem;
    }
    
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    
    .insight-box {
        padding: 1.5rem;
    }
    
    .testimonial {
        padding: 2rem;
    }
    
    .testimonial p {
        font-size: 1.1rem;
    }
    
    .case-nav {
        flex-direction: column;
        margin: 3rem auto;
    }
    
    .nav-btn {
        text-align: center;
        width: 100%;
    }
}

/* Small Mobile Landscape and Portrait (600px and below) */
@media (max-width: 600px) {
    .project-image {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .process-step {
        flex-direction: column;
        gap: 1rem;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
}

/* Mobile Devices (480px and below) */
@media (max-width: 480px) {
    header {
        padding: 0.5rem 1rem;
    }
    
    .logo-img {
        width: 40px;
        height: 40px;
    }
    
    .header-right {
        gap: 0.5rem;
    }
    
    .theme-toggle {
        width: 30px;
        height: 30px;
        border-width: 1px;
    }
    
    .theme-icon {
        font-size: 0.85rem;
    }
    
    nav ul {
        gap: 0.3rem;
        flex-wrap: wrap;
    }
    
    nav a {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
    
    .case-study-hero {
        padding: 3rem 1rem 2rem;
    }
    
    .hero-cover-image {
        margin-bottom: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .hero-cover-image img {
        border-radius: 0.75rem;
    }
    
    .case-study-hero h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .project-meta {
        gap: 1rem;
    }
    
    .meta-item strong {
        font-size: 0.75rem;
    }
    
    .meta-item span {
        font-size: 1rem;
    }
    
    .project-image {
        margin: 1.5rem auto;
        padding: 0 1rem;
        max-width: 400px;
    }
    
    .project-image img {
        max-height: 350px;
        border-radius: 0.75rem;
    }
    
    .content-section {
        padding: 1.5rem 1rem;
    }
    
    .content-section h2 {
        font-size: 1.75rem;
        margin-bottom: 1.25rem;
    }
    
    .content-section h3 {
        font-size: 1.35rem;
        margin-bottom: 0.75rem;
        margin-top: 1.25rem;
    }
    
    .thematic-insights-table {
        font-size: 0.85rem;
        margin: 1.5rem 0;
    }
    
    .thematic-insights-table th,
    .thematic-insights-table td {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
    
    .thematic-insights-table td:first-child {
        width: 25%;
    }
    
    .content-section p,
    .content-section ul {
        font-size: 0.95rem;
        line-height: 1.7;
    }
    
    .content-section ul {
        padding-left: 0.875rem;
    }
    
    .content-section li {
        padding-left: 0.15rem;
    }
    
    .research-card,
    .feature,
    .testimonial,
    .insight-box {
        padding: 1.25rem;
    }
    
    .research-card h3,
    .feature h3 {
        font-size: 1.15rem;
    }
    
    .research-card p,
    .feature p {
        font-size: 0.9rem;
    }
    
    .insight-box h3 {
        font-size: 1.25rem;
    }
    
    .insight-box p {
        font-size: 1rem;
    }
    
    .result-number {
        font-size: 2.5rem;
    }
    
    .result-card p {
        font-size: 0.9rem;
    }
    
    .testimonial p {
        font-size: 1rem;
    }
    
    .testimonial cite {
        font-size: 0.9rem;
    }
    
    .process-step h3 {
        font-size: 1.1rem;
    }
    
    .process-step p {
        font-size: 0.9rem;
    }
    
    .nav-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .case-nav {
        margin: 2rem auto;
        padding: 0 1rem;
    }
    
    footer a {
        display: inline-block;
        margin: 0.5rem;
        font-size: 0.9rem;
    }
    
    /* Better text wrapping on mobile */
    .content-section p,
    .content-section li,
    .testimonial p {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Inline styles adjustments for mobile */
    div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
}

/* Landscape Mobile Devices */
@media (max-width: 896px) and (orientation: landscape) {
    .case-study-hero {
        padding: 3rem 1rem 2rem;
    }
    
    .case-study-hero h1 {
        font-size: 2.25rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .content-section {
        padding: 1.5rem 1rem;
    }
}

/* Extra Small Devices (360px and below) */
@media (max-width: 360px) {
    .case-study-hero h1 {
        font-size: 1.75rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .project-image {
        max-width: 320px;
    }
    
    .project-image img {
        max-height: 300px;
        border-radius: 0.5rem;
    }
    
    .content-section h2 {
        font-size: 1.5rem;
    }
    
    .content-section h3 {
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
        margin-top: 1.25rem;
    }
    
    .thematic-insights-table {
        font-size: 0.8rem;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
    
    .thematic-insights-table thead,
    .thematic-insights-table tbody {
        display: table;
        width: 100%;
        min-width: 600px;
    }
    
    .thematic-insights-table th,
    .thematic-insights-table td {
        padding: 0.625rem 0.75rem;
        white-space: normal;
    }
    
    .thematic-insights-table td:first-child {
        width: 22%;
    }
    
    .content-section p,
    .content-section ul {
        font-size: 0.875rem;
    }
    
    .content-section ul {
        padding-left: 0.75rem;
    }
    
    nav ul {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .research-card,
    .feature,
    .testimonial,
    .insight-box,
    .result-card {
        padding: 1rem;
    }
    
    .result-number {
        font-size: 2rem;
    }
}

/* Print Styles */
@media print {
    header {
        position: relative;
    }
    
    nav {
        display: none;
    }
    
    .case-study-hero {
        padding: 2rem 1rem;
    }
    
    .nav-btn {
        display: none;
    }
    
    .content-section {
        page-break-inside: avoid;
        padding: 1.5rem 1rem;
    }
    
    .project-image {
        page-break-inside: avoid;
    }
}

/* Page Navigation */
.page-navigation {
    max-width: 1200px;
    margin: 3rem auto 2rem;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: var(--background-primary);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.nav-btn:hover {
    background: var(--background-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--text-secondary);
}

.nav-back {
    background: var(--text-primary);
    color: var(--background-primary);
    border-color: var(--text-primary);
}

.nav-back:hover {
    background: var(--text-secondary);
    border-color: var(--text-secondary);
}

[data-theme="dark"] .nav-back {
    background: var(--background-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .nav-back:hover {
    background: var(--text-primary);
    color: var(--background-primary);
    border-color: var(--text-primary);
}

/* Responsive Navigation */
@media (max-width: 600px) {
    .page-navigation {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .nav-btn {
        width: 100%;
        justify-content: center;
        padding: 1rem;
        font-size: 0.875rem;
    }
}

/* 🔒 Image Protection Styles */
.image-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  max-width: 400px;
}

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

  /* Disable basic saving methods */
  pointer-events: none;     /* stops right-click and selection */
  user-select: none;        /* no text/image selection */
  -webkit-user-drag: none;  /* disables dragging */
}

/* Optional transparent overlay */
.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.02); /* very light invisible layer */
  cursor: not-allowed;
}

/* Optional: subtle hover effect */
.gallery-item:hover img {
  transform: scale(1.02);
  transition: transform 0.3s ease;
}

/* Image Gallery */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.gallery-item:hover img {
    box-shadow: var(--shadow-lg);
}

.gallery-caption {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0;
}

/* Responsive Gallery */
@media (max-width: 1024px) {
    .image-gallery {
        gap: 1.25rem;
    }
    
    .gallery-item img {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .image-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .gallery-item img {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .image-gallery {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .gallery-item img {
        height: 220px;
    }
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    body::before {
        background-attachment: scroll;
    }
}

