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

:root {
    --primary-color: #B3FF92;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --text-dark: #202020;
    --text-light: #6b7280;
    --bg-light: #EFEAE5;
    --bg-white: #EFEAE5;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Browser scrollbar styling */
html {
    background-color: #cab7a7;
    scrollbar-width: thin;
    scrollbar-color: #4f4f4f transparent;
}

html::-webkit-scrollbar {
    width: 12px;
}

html::-webkit-scrollbar-track {
    background: transparent;
}

html::-webkit-scrollbar-thumb {
    background-color: #4f4f4f;
    border-radius: 6px;
}

html::-webkit-scrollbar-thumb:hover {
    background-color: #4f4f4f;
}


@font-face {
    font-family: 'PPAcma';
    src: url('assets/fonts/serif/PPAcma-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PPAcma';
    src: url('assets/fonts/serif/PPAcma-Semibold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PPAcma';
    src: url('assets/fonts/serif/PPAcma-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* PPPangramSans Font Faces */
@font-face {
    font-family: 'PPPangramSans';
    src: url('assets/fonts/sans-serif/PPPangramSans-CompactRegular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PPPangramSans';
    src: url('assets/fonts/sans-serif/PPPangramSans-CompressedExtrabold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PPPangramSans';
    src: url('assets/fonts/sans-serif/PPPangramSans-CompactBold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PPPangramSans';
    src: url('assets/fonts/sans-serif/PPPangramSans-CompactBoldItalic.woff2') format('woff2');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'PPPangramSans';
    src: url('assets/fonts/sans-serif/PPPangramSans-CompactThinItalic.woff2') format('woff2');
    font-weight: 100;
    font-style: italic;
    font-display: swap;
}

body {
    font-family: 'PPPangramSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #cab7a7;
    margin-left: 0.75rem;
    margin-right: 0.75rem;
}

img {
    border-radius: 8px;
}

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

.text-center {
    text-align: center;
}

h1, h3, h4, h5, h6,
.section-title,
.work-title,
.case-title,
.work-title-display h2 {
    font-family: 'PPAcma', 'PPPangramSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

h1 {
    color: #454545;
}

h2 {
    font-family: 'PPPangramSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 700;
    word-spacing: -2px;
    color: #454545;
}

h2 em {
    font-family: 'PPAcma', serif;
    font-weight: 300;
    font-style: normal;
}

/* Navigation */
.navbar {
    position: relative;
    width: 100%;
    background: #cab7a7;
    box-shadow: none;
    z-index: 10;
    padding: 1rem 0;
}

.navbar .container {
    max-width: 100%;
    padding: 0 32px;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

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

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 0.78;
    letter-spacing: -0.01em;
    color: var(--text-dark);
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

.logo span {
    transition: opacity 0.3s ease;
}

.logo:hover {
    color: var(--text-dark);
}

.logo:hover span {
    opacity: 0;
}

.logo::before {
    content: 'HELLO DAVJ DESIGN';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    white-space: pre-line;
    opacity: 0;
    transition: opacity 0.3s ease;
    line-height: 0.78;
    text-align: center;
}

.logo:hover::before {
    opacity: 1;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin-left: auto;
    align-items: center;
}

.nav-wrapper .btn-primary {
    margin-left: 1.5rem;
}

.nav-menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-menu a:hover {
    color: #1C8902;
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 4px;
}

.nav-menu a.active {
    color: var(--text-dark);
    text-decoration: none;
    background-color: #DED4CA;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    font-weight: bold;
}

.cases-page .nav-menu a.active {
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-thickness: 3px;
    text-underline-offset: 4px;
}

.nav-menu a.active:hover {
    background-color: #57FA21;
    text-decoration: none;
}

.cases-page .nav-menu a.active:hover {
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-thickness: 3px;
    text-underline-offset: 4px;
}

.nav-menu a.active::after {
    display: none;
}


.menu-toggle {
    display: none !important;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 196px 0 140px; /* ~40% taller for more vertical room */
    background: #cab7a7;
    color: var(--text-dark);
    margin-top: 0;
    overflow: hidden;
}

.hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.hero-single {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeInUp 0.8s ease;
    align-items: center;
}

.hero-title {
    font-size: 5.5rem; /* 88px */
    font-weight: 800;
    line-height: 5rem; /* 80px */
    margin-bottom: 1rem;
    text-align: center;
    color: #454545;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
    line-height: 1.8;
    max-width: 620px;
    text-align: center;
}

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

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

.hero-visual {
    display: none;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #EFEAE5;
    border-top: 1px solid #4F4F4F;
    border-left: 1px solid #4F4F4F;
    border-right: 1px solid #4F4F4F;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}

.hero-overlay-text {
    font-size: 12.5rem;
    font-weight: 800;
    letter-spacing: 0px;
    color: #F5F4F1;
    mix-blend-mode: soft-light;
    text-transform: uppercase;
    white-space: pre-line;
    text-align: center;
    line-height: 0.9;
    transition: font-size 0.3s ease;
}

.overlay-title {
    position: relative;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: #212121;
    color: #57FA21;
    border: 3px solid #4F4F4F;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background: #212121;
    color: white;
    border: 3px solid #4F4F4F;
    box-shadow: inset 0 0 0 2px #57FA21;
    outline: none;
}

.btn-secondary {
    background: #FFFFFF;
    color: white;
    border: 2px solid #4F4F4F;
}

.btn-secondary:hover {
    background: #FFFFFF;
    color: var(--primary-color);
    border: 2px solid #4F4F4F;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Sections */
section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Services Section */
.services {
    background: var(--bg-light);
}

.services-carousel-wrapper {
    position: relative;
    padding: 0 60px;
}

.services-carousel {
    overflow: hidden;
    position: relative;
    cursor: grab;
    user-select: none;
}

.services-carousel:active {
    cursor: grabbing;
}

.services-carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
    flex: 0 0 calc(33.333% - 1.33rem);
    min-width: 0;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

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

/* Carousel Navigation Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
    color: var(--text-dark);
    box-shadow: var(--shadow-md);
}

.carousel-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-btn-prev {
    left: 0;
}

.carousel-btn-next {
    right: 0;
}

.carousel-btn svg {
    width: 24px;
    height: 24px;
}

.carousel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Carousel Indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    padding: 0;
}

.carousel-indicator.active {
    background: var(--primary-color);
    width: 32px;
    border-radius: 6px;
}

.carousel-indicator:hover {
    background: var(--primary-color);
    opacity: 0.7;
}

/* Featured Work Section */
.featured-work {
    border-left: 1px solid #4F4F4F;
    border-right: 1px solid #4F4F4F;
    background-color: #efeae5;
    padding-top: 1rem;
}

.work-carousel-wrapper {
    position: relative;
    padding: 0 96px;
    margin-bottom: 2.4rem;
}

.work-carousel {
    overflow: visible;
    position: relative;
    cursor: grab;
    user-select: none;
    /* Height is determined by track height which matches card height */
}

.work-carousel:active {
    cursor: grabbing;
}

.work-carousel-track {
    position: relative;
    width: 100%;
    display: block;
    /* Height is set dynamically by JavaScript to match card height */
}

.work-card {
    background: white;
    border-radius: 12px;
    overflow: visible;
    box-shadow: var(--shadow-md);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 190px;
    height: 390px;
    opacity: 0.4;
    transform: scale(0.85);
    pointer-events: none;
    position: absolute;
}

.work-card.active {
    opacity: 1;
    transform: scale(1);
    z-index: 10;
    pointer-events: auto;
    box-shadow: var(--shadow-lg);
    cursor: pointer; /* Make active card clickable */
}

.work-card:hover {
    /* Hover transform is handled by JavaScript to preserve rotation */
    box-shadow: var(--shadow-lg);
}

.work-card.active:hover {
    /* Hover transform is handled by JavaScript to preserve rotation */
    box-shadow: var(--shadow-lg);
}

/* Hide work-image, remove background and box-shadow for previous/next cards */
.work-card.previous,
.work-card.next {
    background: transparent;
    box-shadow: none;
}

.work-card.previous .work-image,
.work-card.next .work-image {
    opacity: 0;
    visibility: hidden;
}

/* Animate work-image opacity when card becomes active */
.work-image {
    transition: opacity 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.work-card.active .work-image {
    opacity: 1;
    visibility: visible;
}

/* Card background - positioned behind everything */
.work-card-background {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) !important;
    width: 550px;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease !important;
    will-change: opacity;
    background-color: transparent; /* No background when image is present */
}

.work-card.active .work-card-background,
.work-card.previous .work-card-background,
.work-card.next .work-card-background {
    opacity: 1;
}

.work-card-background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Fallback state when image fails to load */
.work-card-background.fallback {
    background-color: #F6F6F6;
}

.work-card-background.fallback .work-card-background-image {
    display: none;
}

/* Ensure no background color when image is successfully loaded */
.work-card-background.image-loaded {
    background-color: transparent !important;
}

/* Hide background image when card is active (in focus) */
.work-card.active .work-card-background.image-loaded {
    opacity: 0;
}

/* Flower animation images - positioned behind the main card */
.work-flower-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    z-index: 0;
    box-shadow: var(--shadow-md);
}

.work-flower-left {
    left: 0;
    transform: scale(0.95) translateX(0) rotate(0deg);
}

.work-flower-right {
    right: 0;
    left: auto;
    transform: scale(0.95) translateX(0) rotate(0deg);
}

/* Flower animation when card is active (in focus) - starts with 500ms delay */
.work-card.active .work-flower-left {
    opacity: 0.9;
    left: -30%;
    transform: scale(0.9) translateX(-15px) rotate(-8deg);
    transition-delay: 500ms;
}

.work-card.active .work-flower-right {
    opacity: 0.9;
    right: -30%;
    left: auto;
    transform: scale(0.9) translateX(15px) rotate(8deg);
    transition-delay: 500ms;
}

/* Flower animation on hover for active card - reveal from behind */
/* Flowers animate on card hover, but title styling only happens on title-hover class */
/* Hover overrides the active state with no delay for immediate response */
.work-card.active:hover .work-flower-left,
.work-card.active.title-hover .work-flower-left {
    opacity: 0.9;
    left: -30%;
    transform: scale(0.9) translateX(-15px) rotate(-8deg);
    transition-delay: 0ms;
}

.work-card.active:hover .work-flower-right,
.work-card.active.title-hover .work-flower-right {
    opacity: 0.9;
    right: -30%;
    left: auto;
    transform: scale(0.9) translateX(15px) rotate(8deg);
    transition-delay: 0ms;
}

/* Ensure main image stays on top, covering part of flower images */
.work-image {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 12px;
    background: white;
    aspect-ratio: 1 / 1;
}

/* Work Content Wrapper - Independent section below carousel */
.work-content-wrapper {
    position: relative;
    height: fit-content;
    margin-top: 8px;
}

.work-content {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    pointer-events: none;
    padding: 0 1rem;
}

.work-content.work-content-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.work-content-wrapper .work-content {
    padding: 2rem 0;
}

/* Work Carousel Navigation Buttons */
.work-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
    color: var(--text-dark);
    box-shadow: var(--shadow-md);
    font-family: 'PPAcma', 'PPPangramSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
    padding: 0;
}

.work-carousel-btn:hover {
    background: #57FA21;
    color: var(--text-dark);
    border-color: #57FA21;
    transform: translateY(-50%) scale(1.1);
}

.work-carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.work-carousel-btn-prev {
    left: 0;
}

.work-carousel-btn-next {
    right: 0;
}

.work-carousel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Work Carousel Indicators */
.work-carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    margin-bottom: 0;
}

.work-carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #202020;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    padding: 0;
}

.work-carousel-indicator.active {
    background: #6BED1E;
    width: 32px;
    border-radius: 6px;
}

.work-carousel-indicator:hover {
    background: #6BED1E;
    opacity: 0.7;
}

.work-image {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.work-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: 1 / 1;
}

.work-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.work-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.work-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.work-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.work-4 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.work-5 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.work-6 {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

/* Work Category Display - Above carousel */
.work-category-display {
    position: relative;
    min-height: 30px;
    text-align: center;
    margin-bottom: 5rem;
}

.work-category-display .work-category,
.work-category-display .case-study-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    pointer-events: none;
}

/* Override case-study-badge styles for work-category-display context */
.work-category-display .case-study-badge {
    margin-bottom: 0;
    padding: 0.25rem;
    background-color: #57FA21;
    border-radius: 6px;
    color: #2d5016;
    text-transform: none;
}

.work-category-display .case-study-badge svg {
    width: 16px;
    height: 16px;
    color: #2d5016;
    flex-shrink: 0;
}

.work-category-display .case-study-badge .work-category-text {
    color: #2d5016;
}

.work-category-display .work-category::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url('assets/images/icons/squares-green.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

.work-category-display .work-category.work-category-active,
.work-category-display .case-study-badge.work-category-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Work Title Display - Below carousel, above content */
.work-title-display {
    position: relative;
    min-height: 60px;
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 8px;
    /* Height will be dynamically set by JavaScript based on active title */
}

.work-title-display .work-title {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 800px;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0;
    color: #454545;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    pointer-events: none;
    text-decoration: none;
}

.work-title-display .work-title:hover {
    text-decoration: none;
}

.work-title-display .work-title.work-title-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.work-title-display .work-title .title-text {
    background-color: #DED4CA;
    padding: 2px 2rem;
    display: inline;
    text-decoration: underline;
    text-decoration-style: dotted;
    transition: all 0.3s ease;
    border-radius: 4px;
}

/* Title styling only when hovering directly over the title link */
.work-title-display .work-title:hover .title-text {
    background-color: #57FA21;
    text-decoration-color: transparent;
}

/* Prevent title styling when card is being hovered (controlled by JavaScript) */
.work-title-display .work-title.card-hover-active:hover .title-text {
    background-color: #DED4CA;
    text-decoration-color: inherit;
}

/* Apply hover effect to title when hovering over work-image in active card */
.work-title-display .work-title.image-hover-active .title-text {
    background-color: #57FA21;
    text-decoration-color: transparent;
}

.work-category {
    display: inline-block;
    color: var(--text-dark);
    font-size: 0.875rem;
    font-weight: bold;
    font-family: 'PPPangramSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}


.work-content p {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.125rem;
    line-height: 1.6rem;
}

.work-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.work-link:hover {
    color: var(--primary-dark);
}

/* About Section */
.about {
    background: var(--bg-light);
}

.about-content {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

.about-text p {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.about-text p:last-of-type {
    margin-bottom: 0;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-light);
    font-weight: 500;
}

/* Contact Section */
.contact {
    position: relative;
    overflow: hidden;
    padding: 196px 0 140px;
    background: #cab7a7;
}

.contact-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #EFEAE5;
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
    border-left: 1px solid #4F4F4F;
    border-right: 1px solid #4F4F4F;
    border-bottom: 1px solid #4F4F4F;
}

.contact-overlay-text {
    font-size: clamp(5rem, 18vw, 14rem);
    font-weight: 800;
    letter-spacing: 0;
    color: #F5F4F1;
    mix-blend-mode: soft-light;
    text-transform: uppercase;
    white-space: pre-line;
    text-align: center;
    line-height: 0.9;
}

.contact .container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.contact-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.btn-linkedin-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: white;
    color: var(--text-dark);
    border: 3px solid #4F4F4F;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
}

.btn-linkedin-secondary:hover,
.btn-linkedin-secondary:focus-visible {
    background: #212121;
    color: white;
    border: 3px solid #4F4F4F;
    box-shadow: inset 0 0 0 2px #6BED1E;
    outline: none;
}

/* Footer */
.footer {
    background: #cab7a7;
    color: #202020;
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section {
    text-align: center;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section p {
    color: #202020;
    line-height: 1.8;
    text-align: center;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #202020;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: #202020;
}

.footer-headshot {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    margin: 0 auto 1rem;
}

.footer-logo {
    color: #202020;
    margin-bottom: 1rem;
}

.footer-logo:hover {
    color: #202020;
}

.footer-logo:hover span {
    opacity: 1;
}

.footer-logo::before {
    display: none;
}

.footer-logo:hover::before {
    display: none;
    opacity: 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #202020;
}

/* Case Study Page Styles */
.case-hero {
    padding: 120px 0 80px;
    background: #EFEAE5;
    color: var(--text-dark);
    margin-top: 70px;
    position: relative;
    overflow: hidden;
}

/* Case Study Hero Overlay - HELLO DAVJ DESIGN */
.case-hero-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    padding-left: 20px;
    padding-top: 20px;
    z-index: 0;
}

.case-hero-overlay-text {
    font-size: 12.5rem;
    font-weight: 800;
    letter-spacing: 0px;
    color: #F5F4F1;
    mix-blend-mode: soft-light;
    text-transform: uppercase;
    white-space: pre-line;
    text-align: left;
    line-height: 0.9;
    transition: font-size 0.3s ease;
    font-family: 'PPPangramSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.case-hero-content {
    max-width: 800px;
    margin: 0 0 3rem 0;
    text-align: left;
    position: relative;
    z-index: 1;
}

.case-category {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1.5rem;
    text-align: left;
}

.case-category::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url('assets/images/icons/squares-green.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

.case-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #454545;
}

.case-intro {
    font-size: 1.25rem;
    opacity: 0.95;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.case-meta {
    display: flex;
    justify-content: flex-start;
    gap: 3rem;
    flex-wrap: wrap;
}

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

.meta-label {
    font-size: 0.875rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    font-size: 1.125rem;
    font-weight: 600;
}

.case-hero-images {
    display: grid;
    grid-template-columns: 70% 30%;
    gap: 2rem;
    max-width: 1440px;
    margin: 0 auto;
}

.case-hero-image {
    width: 100%;
}

.case-hero-secondary {
    width: 100%;
}

.case-visual {
    width: 100%;
    height: 400px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

/* Main hero image - abstract gradient with white card */
.case-hero-main {
    background: linear-gradient(135deg, 
        #2d5016 0%, 
        #4a7c2a 25%, 
        #ff6b35 50%, 
        #ff8c42 75%, 
        #ffb3ba 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    position: relative;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.case-hero-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 500px;
    height: 60%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.case-hero-card::before {
    content: '';
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.case-hero-card::after {
    content: 'I';
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
    z-index: 1;
}

/* Secondary hero image - person/portrait style */
.case-hero-secondary-image {
    background: linear-gradient(135deg, 
        #f0f0f0 0%, 
        #e8e8e8 50%, 
        #f5f5f5 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.case-hero-secondary-image::before {
    content: '';
    position: absolute;
    width: 60%;
    height: 70%;
    background: linear-gradient(135deg, 
        rgba(139, 139, 139, 0.2) 0%, 
        rgba(200, 200, 200, 0.3) 50%, 
        rgba(139, 139, 139, 0.2) 100%);
    border-radius: 50%;
    top: 15%;
    left: 20%;
}

.case-hero-secondary-image::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 50%;
    background: linear-gradient(135deg, 
        rgba(180, 180, 180, 0.3) 0%, 
        rgba(220, 220, 220, 0.4) 50%, 
        rgba(180, 180, 180, 0.3) 100%);
    border-radius: 50%;
    top: 25%;
    left: 25%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Case visual with work placeholder classes - override for main hero */
.case-hero-main.work-1 {
    background: linear-gradient(135deg, 
        #2d5016 0%, 
        #4a7c2a 25%, 
        #667eea 50%, 
        #764ba2 75%, 
        #ffb3ba 100%);
}

.case-hero-main.work-2 {
    background: linear-gradient(135deg, 
        #2d5016 0%, 
        #4a7c2a 25%, 
        #f093fb 50%, 
        #f5576c 75%, 
        #ffb3ba 100%);
}

.case-hero-main.work-3 {
    background: linear-gradient(135deg, 
        #2d5016 0%, 
        #4a7c2a 25%, 
        #4facfe 50%, 
        #00f2fe 75%, 
        #ffb3ba 100%);
}

.case-hero-main.work-4 {
    background: linear-gradient(135deg, 
        #2d5016 0%, 
        #4a7c2a 25%, 
        #43e97b 50%, 
        #38f9d7 75%, 
        #ffb3ba 100%);
}

.case-hero-main.work-5 {
    background: linear-gradient(135deg, 
        #2d5016 0%, 
        #4a7c2a 25%, 
        #fa709a 50%, 
        #fee140 75%, 
        #ffb3ba 100%);
}

.case-hero-main.work-6 {
    background: linear-gradient(135deg, 
        #2d5016 0%, 
        #4a7c2a 25%, 
        #30cfd0 50%, 
        #330867 75%, 
        #ffb3ba 100%);
}

/* Secondary image variations */
.case-hero-secondary-image.work-1 {
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 50%, #f5f5f5 100%);
}

.case-hero-secondary-image.work-2 {
    background: linear-gradient(135deg, #f5f0f0 0%, #e8e0e0 50%, #faf5f5 100%);
}

.case-hero-secondary-image.work-3 {
    background: linear-gradient(135deg, #f0f5f0 0%, #e0e8e0 50%, #f5faf5 100%);
}

.case-hero-secondary-image.work-4 {
    background: linear-gradient(135deg, #f0f0f5 0%, #e0e0e8 50%, #f5f5fa 100%);
}

.case-hero-secondary-image.work-5 {
    background: linear-gradient(135deg, #f5f5f0 0%, #e8e8e0 50%, #fafaf5 100%);
}

.case-hero-secondary-image.work-6 {
    background: linear-gradient(135deg, #f0f5f5 0%, #e0e8e8 50%, #f5fafa 100%);
}

.case-section {
    padding: 80px 0;
}

.case-section h2,
.case-content h2 {
    font-size: 2rem;
    font-weight: 600;
    font-family: 'PPAcma', serif;
    color: var(--text-dark);
}

.case-section .container {
    max-width: 1440px;
    padding: 0 20px;
}

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

.case-content {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Two-column content layout (like Dapper style) - 4/4 Grid */
.case-content-two-col {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1rem;
    min-height: 400px;
}

.case-content-left {
    display: flex;
    flex-direction: column;
    grid-column: 1;
    grid-row: 1;
    align-self: start;
}

.case-section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-family: 'PPPangramSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.case-section-label::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url('assets/images/icons/squares-green.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

.case-section-heading {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.1;
    color: var(--text-dark);
    margin: 0;
    font-family: 'PPAcma', serif;
    word-spacing: -2px;
}

.case-section-heading em {
    font-family: 'PPAcma', serif;
    font-weight: 300;
    font-style: normal;
}

.case-content-right {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    padding-top: 0;
    margin-top: 0;
}

.case-content-right p {
    font-size: 1.125rem;
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-family: 'PPPangramSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Results grid styling within the 4/4 grid layout */
.case-content-right .results-grid {
    margin-top: 0;
    margin-bottom: 2rem;
}

.case-content-right .case-text-block {
    margin-top: 0;
}

.case-text-block {
    margin-bottom: 0;
    width: 100%;
}

.case-text-block h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--text-dark);
    font-family: 'PPAcma', serif;
}

.case-text-block p {
    font-size: 1.125rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.case-text-block + .case-image-grid,
.case-text-block + .results-grid,
.case-image-grid + .case-text-block,
.results-grid + .case-text-block {
    margin-top: 2rem;
}

.case-list {
    list-style: none;
    padding-left: 0;
}

.case-list li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--text-light);
    font-size: 1.125rem;
    line-height: 1.8;
}

.case-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.25rem;
}

.case-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 0;
    width: 100%;
}

.case-image-item {
    text-align: center;
}

.case-image-placeholder {
    width: 100%;
    height: 250px;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-md);
}

.img-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.img-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.img-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.img-4 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.img-5 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.img-6 {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.image-caption {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Process Banner */
.process-section-full {
    padding: 0;
}

.process-banner {
    background: white;
    border-radius: 0;
    padding: 5rem 0;
    width: 100%;
    margin: 0;
}

.process-banner-container {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4rem;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
    align-items: start;
}

.process-banner-left {
    padding-left: 0;
    max-width: 600px;
}

.process-icon {
    margin-bottom: 2rem;
}

.process-icon svg {
    display: block;
}

.process-text {
    font-size: 1.5rem;
    line-height: 1.6;
    color: var(--text-dark);
    font-family: 'PPAcma', serif;
    font-weight: 300;
}

.process-text strong {
    font-weight: 900;
    color: var(--text-dark);
}

.process-banner-right {
    position: relative;
    z-index: 1;
}

.process-card {
    width: 20vw;
    min-width: 280px;
    background: #202020;
    border-radius: 12px;
    padding: 3rem 2rem;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.process-card-text {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.4;
    font-family: 'PPPangramSans', sans-serif;
    color: white;
}

.process-card-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
}

.process-card-buttons .btn-primary {
    width: fit-content;
}

.btn-process-primary {
    background: var(--primary-color);
    color: var(--text-dark);
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    padding: 0.875rem 2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: var(--transition);
    text-align: center;
    font-size: 0.875rem;
    font-family: 'PPPangramSans', sans-serif;
}

.btn-process-primary:hover {
    background: #9AFF7A;
    border-color: #9AFF7A;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-process-secondary {
    background: white;
    color: var(--text-dark);
    border: 2px solid var(--text-dark);
    border-radius: 50px;
    padding: 0.875rem 2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: var(--transition);
    text-align: center;
    font-size: 0.875rem;
    font-family: 'PPPangramSans', sans-serif;
}

.btn-process-secondary:hover {
    background: var(--text-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    margin: 2rem auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--bg-light);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10001;
    color: var(--text-dark);
}

.modal-close:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(90deg);
}

.modal-body {
    padding: 3rem;
}

.modal-body h2 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-family: 'PPAcma', serif;
}

.modal-intro {
    font-size: 1.125rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 3rem;
}

/* Modal CTA */
.modal-cta {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    padding-top: 2rem;
}

.btn-linkedin {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    background: #0077b5;
    color: white;
    border: none;
    text-decoration: none;
}

.btn-linkedin:hover {
    background: #005885;
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-linkedin svg {
    width: 20px;
    height: 20px;
}

/* Modal Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 0;
    width: 100%;
}

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

.result-number {
    font-size: 3rem;
    font-weight: 900;
    color: #202020;
    margin-bottom: 0.5rem;
    font-family: 'PPAcma', serif;
}

.result-label {
    color: var(--text-light);
    font-weight: 500;
}

.testimonial {
    font-size: 1.25rem;
    font-style: italic;
    color: var(--text-light);
    line-height: 1.8;
    margin: 2rem 0;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.testimonial-author {
    font-weight: 600;
    color: var(--text-dark);
    margin-top: 1rem;
    font-style: normal;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 0;
    width: 100%;
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.gallery-large {
    grid-column: span 2;
}

.gallery-placeholder {
    width: 100%;
    height: 300px;
}

.gallery-large .gallery-placeholder {
    height: 400px;
}

.gallery-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gallery-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.gallery-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.gallery-4 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.gallery-5 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

/* Next Project Section */
.next-project-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.next-project-link {
    text-align: center;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

.next-project-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.next-project-title {
    text-decoration: none;
    color: var(--text-dark);
    transition: var(--transition);
    display: inline-block;
}

.next-project-title:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.next-project-title h2 {
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
    transition: var(--transition);
}

.next-project-title:hover h2 {
    color: var(--primary-color);
}

.next-project {
    background: #EFEAE5;
    color: var(--text-dark);
    padding: 80px 0;
    text-align: center;
}

.next-project-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.next-project-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.next-project-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.next-project .btn-primary {
    background: white;
    color: var(--primary-color);
}

.next-project .btn-outline {
    background: transparent;
    color: white;
    border-color: white;
}

.next-project .btn-outline:hover {
    background: white;
    color: var(--primary-color);
}

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .service-card {
        flex: 0 0 calc(50% - 1rem);
    }

    .work-card {
        width: 190px;
        height: 390px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: none !important;
    }

    .nav-menu {
        position: static;
        flex-direction: row;
        gap: 1.25rem;
        background: transparent;
        width: auto;
        padding: 0;
        box-shadow: none;
    }

    .hero .container {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 4rem;
    }
    
    .hero-overlay-text {
        font-size: 8rem;
        letter-spacing: 0px;
    }
    
    .case-hero-overlay-text {
        font-size: 8rem;
        letter-spacing: 0px;
    }

    .hero-visual {
        height: 300px;
    }

    .case-title {
        font-size: 2rem;
    }
    
    .case-content-two-col {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        gap: 2.5rem;
        min-height: auto;
    }
    
    .case-content-left {
        grid-column: 1;
        grid-row: 1;
    }
    
    .case-content-right {
        grid-column: 1;
        grid-row: 2;
    }
    
    .case-section-heading {
        font-size: 2rem;
    }

    .case-hero-images {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .case-visual {
        height: 300px;
    }

    .case-hero-card {
        width: 90%;
        height: 70%;
        padding: 1.5rem;
    }

    .case-meta {
        flex-direction: column;
        gap: 1.5rem;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .gallery-large {
        grid-column: span 1;
    }

    .section-title {
        font-size: 2rem;
    }

    .services-carousel-wrapper {
        padding: 0 50px;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
    }

    .carousel-btn svg {
        width: 20px;
        height: 20px;
    }

    .work-carousel-wrapper {
        padding: 0 64px;
    }

    .work-card {
        flex: 0 0 190px;
        width: 190px;
        height: 390px;
    }

    .work-carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.6rem;
    }

    /* Left align work-title-display on mobile */
    .work-title-display {
        text-align: left;
    }

    .work-title-display .work-title {
        left: 0;
        transform: none;
    }

    /* Move carousel buttons below cards and above title, left aligned on mobile */
    .work-carousel-wrapper {
        position: relative;
        padding-bottom: 60px; /* Space for buttons below cards */
    }

    .work-carousel-btn {
        top: auto;
        bottom: 0;
        transform: none;
    }

    .work-carousel-btn:hover {
        background: #57FA21;
        border-color: #57FA21;
        transform: scale(1.1);
    }

    .work-carousel-btn:active {
        transform: scale(0.95);
    }

    .work-carousel-btn-prev {
        left: 0;
        right: auto;
    }

    .work-carousel-btn-next {
        right: auto;
        left: 60px; /* Position next to prev button */
    }

    /* Left align work-content on mobile */
    .work-content-wrapper .work-content {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-overlay-text {
        font-size: 8rem;
        letter-spacing: 0px;
    }
    
    .case-hero-overlay-text {
        font-size: 6rem;
        letter-spacing: 0px;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .case-title {
        font-size: 1.75rem;
    }
    
    .case-content-two-col {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        gap: 2rem;
        min-height: auto;
    }
    
    .case-content-left {
        grid-column: 1;
        grid-row: 1;
    }
    
    .case-content-right {
        grid-column: 1;
        grid-row: 2;
    }
    
    .case-section-heading {
        font-size: 1.75rem;
    }

    .case-hero-images {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .case-visual {
        height: 250px;
    }

    .case-hero-card {
        width: 95%;
        height: 75%;
        padding: 1rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .services-carousel-wrapper {
        padding: 0 40px;
    }

    .service-card {
        flex: 0 0 100%;
    }

    .carousel-btn {
        width: 35px;
        height: 35px;
    }

    .carousel-btn svg {
        width: 18px;
        height: 18px;
    }

    .work-carousel-wrapper {
        padding: 0 48px;
    }

    .work-card {
        width: 190px;
        height: 390px;
    }

    .work-carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 1.4rem;
    }

    /* Adjust button spacing for smaller mobile */
    .work-carousel-btn-next {
        left: 45px; /* Adjust spacing for smaller buttons */
    }

    .work-content-wrapper {
        margin-top: 1.6rem;
    }

    .work-content-wrapper .work-content {
        padding: 1.5rem 0;
        text-align: left;
    }

    .process-banner {
        padding: 3rem 1.5rem;
    }

    .process-banner-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 0 20px;
    }

    .process-banner-left {
        padding-left: 0;
        max-width: 100%;
    }

    .process-icon {
        margin-bottom: 1.5rem;
    }

    .process-text {
        font-size: 1.25rem;
    }

    .process-card {
        width: 100%;
        min-width: auto;
        max-width: 400px;
        margin: 0 auto;
    }

    .modal-content {
        width: 95%;
        margin: 1rem auto;
        max-height: 95vh;
    }

    .modal-body {
        padding: 2rem 1.5rem;
    }

    .modal-body h2 {
        font-size: 2rem;
    }

    .btn-linkedin {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }

    .hero-buttons,
    .next-project-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: auto;
        padding-left: 1rem;
        padding-right: 1rem;
        text-align: center;
    }

    .next-project-title h2 {
        font-size: 2rem;
    }
}

/* ============================================
   Case Study Preloader
   ============================================ */

.case-study-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #cab7a7;
    z-index: 1000;
    overflow-y: auto;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

/* Preloader Navigation */
.preloader-navbar {
    position: relative;
    width: 100%;
    background: #cab7a7;
    z-index: 10;
    padding: 1rem 0;
}

.preloader-navbar .container {
    max-width: 100%;
    padding: 0 32px;
}

.preloader-navbar .nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Preloader Logo Skeleton */
.preloader-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.preloader-logo-line {
    height: 18px;
    background: linear-gradient(90deg, #9a8a7a 25%, #b4a494 50%, #9a8a7a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 2px;
    opacity: 0.7;
}

.preloader-logo-line:nth-child(1) {
    width: 80px;
}

.preloader-logo-line:nth-child(2) {
    width: 100px;
}

.preloader-logo-line:nth-child(3) {
    width: 90px;
}

/* Preloader Nav Menu */
.preloader-nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin-left: auto;
    align-items: center;
}

.preloader-nav-link {
    width: 60px;
    height: 20px;
    background: linear-gradient(90deg, #9a8a7a 25%, #b4a494 50%, #9a8a7a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    opacity: 0.7;
}

/* Preloader Button */
.preloader-btn {
    width: 140px;
    height: 40px;
    background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 50px;
    margin-left: 1.5rem;
    opacity: 0.8;
    border: 3px solid #4F4F4F;
}

.case-study-preloader-template {
    display: flex;
    min-height: 100vh;
    padding-top: 70px;
    background-color: var(--bg-light);
    margin-left: 0.75rem;
    margin-right: 0.75rem;
    margin-top: 0;
    border-radius: 1rem;
    border: 1px solid #4f4f4f;
}

/* Preloader Navigation Skeleton */
.case-study-preloader-nav {
    position: fixed;
    top: 70px;
    left: 0;
    width: 280px;
    min-width: 280px;
    height: calc(100vh - 70px);
    padding: 0;
    overflow: hidden;
    z-index: 10;
}

.preloader-nav-skeleton {
    background-color: #DED4CA;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 8px 8px #454545;
    border: 1px solid #4f4f4f;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: absolute;
    margin-left: 1rem;
    min-width: 280px;
    transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.preloader-nav-item {
    height: 24px;
    background: linear-gradient(90deg, #c4b5a5 25%, #d4c5b5 50%, #c4b5a5 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    opacity: 0.6;
}

.preloader-nav-item:nth-child(1) { width: 80%; }
.preloader-nav-item:nth-child(2) { width: 70%; }
.preloader-nav-item:nth-child(3) { width: 75%; }
.preloader-nav-item:nth-child(4) { width: 65%; }
.preloader-nav-item:nth-child(5) { width: 85%; }
.preloader-nav-item:nth-child(6) { width: 70%; }

/* Preloader Content Area */
.case-study-preloader-content {
    flex: 1;
    margin-left: 320px;
    padding: 2rem 4rem;
    max-width: calc(100% - 320px);
}

/* Preloader Back Button */
.preloader-back-button {
    width: 120px;
    height: 24px;
    background: linear-gradient(90deg, #c4b5a5 25%, #d4c5b5 50%, #c4b5a5 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    opacity: 0.6;
    margin-bottom: 3rem;
}

/* Preloader Sections */
.preloader-section {
    margin-bottom: 4rem;
}

/* Preloader Introduction Section - matches case-study-section */
.preloader-section:first-of-type {
    margin-bottom: 8rem;
}

.preloader-header {
    margin-bottom: 4rem;
    min-height: 50vh;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.preloader-badge {
    width: 280px;
    height: 32px;
    background: linear-gradient(90deg, #c4b5a5 25%, #d4c5b5 50%, #c4b5a5 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    opacity: 0.6;
    margin-bottom: 1.5rem;
}

.preloader-title {
    width: 85%;
    height: 48px;
    background: linear-gradient(90deg, #c4b5a5 25%, #d4c5b5 50%, #c4b5a5 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    opacity: 0.6;
    margin-bottom: 1rem;
}

.preloader-subtitle {
    width: 70%;
    height: 24px;
    background: linear-gradient(90deg, #c4b5a5 25%, #d4c5b5 50%, #c4b5a5 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    opacity: 0.6;
    margin-bottom: 2rem;
}

.preloader-section-title {
    width: 200px;
    height: 32px;
    background: linear-gradient(90deg, #c4b5a5 25%, #d4c5b5 50%, #c4b5a5 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    opacity: 0.6;
    margin-bottom: 0.5rem;
}

.preloader-section-subtitle {
    width: 60%;
    height: 24px;
    background: linear-gradient(90deg, #c4b5a5 25%, #d4c5b5 50%, #c4b5a5 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    opacity: 0.6;
    margin-bottom: 1rem;
}

.preloader-text {
    width: 100%;
    height: 20px;
    background: linear-gradient(90deg, #c4b5a5 25%, #d4c5b5 50%, #c4b5a5 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    opacity: 0.6;
    margin-bottom: 0.75rem;
}

.preloader-text:nth-child(2) { width: 95%; }
.preloader-text:nth-child(3) { width: 90%; }

/* Preloader Image Scroll */
.preloader-image-scroll {
    display: flex;
    gap: 1rem;
    margin: 3rem 0;
    overflow-x: auto;
    padding-bottom: 1rem;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding-left: calc(280px + 4rem);
    padding-right: 4rem;
}

.preloader-image-item {
    min-width: 400px;
    height: 300px;
    background: linear-gradient(90deg, #c4b5a5 25%, #d4c5b5 50%, #c4b5a5 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
    opacity: 0.6;
    flex-shrink: 0;
}

/* Preloader Metrics Grid */
.preloader-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.preloader-metric-block {
    height: 120px;
    background: linear-gradient(90deg, #c4b5a5 25%, #d4c5b5 50%, #c4b5a5 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
    opacity: 0.6;
}

.preloader-metric-block:nth-child(1),
.preloader-metric-block:nth-child(4) {
    background: transparent;
}

/* Preloader Approach Grid */
.preloader-approach-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.preloader-text-block {
    height: 200px;
    background: linear-gradient(90deg, #c4b5a5 25%, #d4c5b5 50%, #c4b5a5 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
    opacity: 0.6;
}

.preloader-wireframe-image {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    opacity: 0.7;
    animation: pulse 2s ease-in-out infinite;
}

.preloader-wireframe-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) brightness(0.9);
}

/* Preloader Observations Grid */
.preloader-observations-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}


.preloader-text-block {
    height: 150px;
    background: linear-gradient(90deg, #c4b5a5 25%, #d4c5b5 50%, #c4b5a5 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
    opacity: 0.6;
    margin-bottom: 1.5rem;
}

/* Animations */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 0.5;
    }
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .case-study-preloader-content {
        margin-left: 0;
        max-width: 100%;
        padding: 2rem 1.5rem;
    }
    
    .case-study-preloader-nav {
        display: none;
    }
    
    .preloader-approach-grid,
    .preloader-observations-grid {
        grid-template-columns: 1fr;
    }
    
    .preloader-image-item {
        min-width: 300px;
        height: 200px;
    }
    
    .preloader-image-scroll {
        padding-left: calc(280px + 2rem);
        padding-right: 2rem;
    }
    
    .preloader-metrics-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .preloader-image-scroll {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .preloader-section:first-of-type {
        margin-bottom: 4rem;
    }
    
    .preloader-header {
        min-height: 40vh;
    }
}

/* ============================================
   Case Study Template - 2 Column Layout
   ============================================ */

.case-study-template {
    display: block;
    min-height: calc(100vh - 70px);
    margin-top: 0px;
    padding-top: 4rem;
    background-color: var(--bg-light);
    position: relative;
    border-radius: 1rem;
    border: 1px solid #4f4f4f;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in, visibility 0.5s ease-in;
}

/* Left Sidebar Navigation */
.case-study-nav {
    position: fixed;
    top: 70px;
    left: 0;
    width: 280px;
    min-width: 280px;
    height: calc(100vh - 70px);
    max-height: calc(100vh - 70px);
    padding: 0;
    overflow: hidden;
    z-index: 10;
}

.case-study-nav::-webkit-scrollbar {
    display: none;
}

.case-study-nav {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Mobile Dropdown Menu */
.case-study-nav-dropdown {
    display: none;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-weight: 400;
    color: var(--text-dark);
    background-color: #DED4CA;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'PPPangramSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23202020' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 2.5rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.case-study-nav-dropdown:hover {
    background-color: rgba(222, 212, 202, 0.8);
}

.case-study-nav-dropdown:focus {
    outline: 2px solid #2d5016;
    outline-offset: 2px;
}

.case-study-nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background-color: #DED4CA;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 8px 8px #454545;
    position: absolute;
    transition: top 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                left 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                position 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                background-color 0.3s ease;
    margin-left: 1rem;
    min-width: 280px;
    border: 1px solid #4f4f4f;
}

.case-study-nav-list.sticky {
    position: fixed;
    top: 70px;
    left: 1rem;
    width: 280px;
    min-width: 280px;
}

.case-study-nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    color: var(--text-dark);
    text-decoration: underline;
    text-decoration-style: dotted;
    font-size: 0.9375rem;
    font-weight: 400;
    transition: color 0.5s ease, background-color 0.5s ease, text-decoration 0.3s ease;
    background-color: transparent;
    position: relative;
    border-radius: 0;
}

.case-study-nav-item span {
    position: relative;
    z-index: 1;
}

.case-study-nav-item-child {
    padding-left: 2rem;
}

.case-study-nav-item:hover {
    color: #2d5016;
    background-color: transparent;
    text-decoration: none;
    font-weight: bold;
}

.case-study-nav-item.active {
    color: #202020;
    background-color: #EFEAE5;
    font-weight: bold;
    border-radius: 0.25rem;
    text-decoration: none;
    transition: color 0.5s ease, background-color 0.5s ease, text-decoration 0.3s ease;
}

.case-study-nav-item.active:hover {
    color: #2d5016;
    text-decoration: underline;
}

.case-study-nav-item.active::after {
    display: none;
}

/* Right Content Area */
.case-study-content {
    padding: 0 4rem 6rem;
    max-width: 1200px;
    margin-left: 280px;
    width: calc(100% - 280px);
}

/* Back to Home Button */
.case-study-back-home {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.case-study-back-home span {
    display: inline-block;
    background-color: #DED4CA;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    font-weight: bold;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-thickness: 3px;
    text-underline-offset: 4px;
    transition: background-color 0.3s ease, text-decoration 0.3s ease;
}

.case-study-back-home:hover span {
    background-color: #57FA21;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-thickness: 3px;
    text-underline-offset: 4px;
}

.case-study-section {
    margin-bottom: 8rem;
    scroll-margin-top: 100px;
}

.case-study-section-inner {
    max-width: 100%;
}

/* Header Section */
.case-study-header {
    margin-bottom: 4rem;
    min-height: 50vh;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.case-study-header .case-hero-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding-left: 0;
    padding-top: 0;
    z-index: 0;
}

.case-study-header .case-hero-overlay-text {
    font-size: 12.5rem;
    font-weight: 800;
    letter-spacing: 0px;
    color: #F5F4F1;
    mix-blend-mode: soft-light;
    text-transform: uppercase;
    white-space: pre-line;
    text-align: left;
    line-height: 0.9;
    transition: font-size 0.3s ease;
    font-family: 'PPPangramSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.case-study-header .case-study-badge,
.case-study-header .case-study-title,
.case-study-header .case-study-subtitle {
    position: relative;
    z-index: 1;
}

.case-study-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #2d5016;
    margin-bottom: 1.5rem;
    padding: 0.25rem;
    background-color: #57FA21;
    border-radius: 6px;
}

.case-study-badge svg {
    width: 16px;
    height: 16px;
    color: #2d5016;
    flex-shrink: 0;
}

.case-study-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #454545;
    font-family: 'PPAcma', 'PPPangramSans', sans-serif;
}

.case-study-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* Section Titles */
.case-study-section-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-family: 'PPPangramSans', sans-serif;
}

/* Title Sentence */
.case-study-section-title-sentence {
    font-size: 2.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #454545;
    font-family: 'PPAcma', serif;
    line-height: 1.4;
}

.case-study-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    opacity: 0.9;
    font-family: 'PPPangramSans', sans-serif;
    font-weight: 400;
    font-style: normal;
}

/* Learnings Grid */
.learnings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem 3rem;
    margin-top: 2rem;
}

.learnings-item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.learnings-item-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #454545;
    font-family: 'PPAcma', serif;
    line-height: 1.4;
    margin: 0;
}

.learnings-item-description {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-dark);
    opacity: 0.9;
    font-family: 'PPPangramSans', sans-serif;
    font-weight: 400;
    margin: 0;
}

/* Bold text - PPPangramSans-CompactBold.woff2 */
.case-study-text p b,
.case-study-text p strong,
.case-study-text b,
.case-study-text strong {
    font-weight: 700;
    font-style: normal;
    font-family: 'PPPangramSans', sans-serif;
}

/* Bold Italic - PPPangramSans-CompactBoldItalic.woff2 */
.case-study-text p i b,
.case-study-text p em strong,
.case-study-text p b i,
.case-study-text p strong em,
.case-study-text i b,
.case-study-text em strong,
.case-study-text b i,
.case-study-text strong em {
    font-weight: 700;
    font-style: italic;
    font-family: 'PPPangramSans', sans-serif;
}

/* Italic - PPPangramSans-CompactThinItalic.woff2 */
.case-study-text p i,
.case-study-text p em,
.case-study-text i,
.case-study-text em {
    font-weight: 100;
    font-style: italic;
    font-family: 'PPPangramSans', sans-serif;
}

/* Outcomes Metrics Grid */
.outcomes-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 3rem 0;
    width: 100%;
}

.outcome-metric-block {
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: 0;
}


.outcome-metric-empty-space {
    min-height: 2rem;
    margin: 2rem 0;
}

.outcome-metric-separator {
    width: 100%;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.15);
    margin: 0;
}

.outcome-metric-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin: 0;
    padding: 0 1rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
    text-align: left;
    font-family: 'PPPangramSans', sans-serif;
    font-weight: 400;
    opacity: 0.9;
}

/* Approach Section */


/* Approach Grid - 3 Column Layout */
.approach-grid {
    display: grid;
    grid-template-columns: 0.4fr 1fr 0.4fr;
    gap: 2rem;
    margin: 3rem 0;
    width: 100%;
    align-items: stretch;
}

.approach-column {
    display: flex;
    flex-direction: column;
}

.approach-column:first-child .approach-text-block {
    margin-top: auto;
}

.approach-column-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.approach-text-block {
    display: flex;
    flex-direction: column;
    padding-top: 2rem;
}

.approach-text-separator {
    width: 100%;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.15);
    margin-bottom: 1.5rem;
}

.approach-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin: 0;
    text-align: left;
    font-family: 'PPPangramSans', sans-serif;
    font-weight: 400;
    opacity: 0.9;
}

.approach-image-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.approach-wireframe-image {
    width: 60%;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin: 0 auto;
    display: block;
    opacity: 0.20;
}

/* Second case study (MLSE) approach image - fully opaque and wider */
.approach-wireframe-image[src*="mlse/card_7"],
.approach-wireframe-image[src*="mlse/card_8"] {
    opacity: 1;
    width: 100%;
}

/* Case study 1 (Constellation) approach images - fully opaque and wider */
.approach-wireframe-image[src*="constellation/constellation_10"],
.approach-wireframe-image[src*="constellation/constellation_11"] {
    opacity: 1;
    width: 100%;
}

/* Observations: one logical row (default 3-col and/or stacked variant for first item) */
.observations-row {
    width: 100%;
}

/* Stacked: outer grid is 1×1 (one cell); inner panel stacks image + copy (see rules after .observations-grid) */

.observations-grid--stacked .observations-column-hero,
.observations-grid--stacked .observations-column-stacked-copy {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    align-items: stretch;
}

.observations-grid--stacked .observations-column-hero .observations-image-wrapper {
    width: 100%;
    max-width: 100%;
    padding: 0 0 1.5rem;
    box-sizing: border-box;
    justify-content: flex-start;
    align-items: stretch;
}

.observations-grid--stacked .observations-column-stacked-copy .observations-text-block {
    padding-top: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.observations-grid--stacked .observations-text {
    max-width: none;
    width: 100%;
}

/* Observations Grid - 3 Column Layout */
.observations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 3rem 0;
    width: 100%;
    align-items: stretch;
}

/* One column × one row: single cell wraps a flex panel (image then paragraph) */
.observations-grid.observations-grid--stacked {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    gap: 0;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.observations-stacked-panel {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    min-width: 0;
}

.observations-column {
    display: flex;
    flex-direction: column;
}


.observations-column-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.observations-column-texts {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.observations-text-block {
    display: flex;
    flex-direction: column;
    padding-top: 2rem;
}

.observations-text-top {
    padding-top: 0;
}

.observations-text-bottom {
    margin-top: auto;
    padding-top: 2rem;
}

.observations-text-separator {
    width: 100%;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.15);
    margin-bottom: 1.5rem;
}

.observations-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin: 0;
    text-align: left;
    font-family: 'PPPangramSans', sans-serif;
    font-weight: 400;
    opacity: 0.9;
}

.observations-image-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.observations-wireframe-image {
    width: 60%;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin: 0 auto;
    display: block;
    opacity: 0.20;
}

/* Stacked core problem: full-opacity hero, copy below (must follow base rule for cascade) */
.observations-grid--stacked .observations-wireframe-image {
    width: 100%;
    max-width: 100%;
    margin: 0;
    opacity: 1;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.observations-stacked-panel .observations-column-hero,
.observations-stacked-panel .observations-column-stacked-copy {
    order: 0;
}

/* Challenges Grid - 3 Column Layout */
.challenges-grid {
    display: grid;
    grid-template-columns: 0.4fr 1fr 0.4fr;
    gap: 2rem;
    margin: 3rem 0;
    width: 100%;
    align-items: stretch;
}

.challenges-column {
    display: flex;
    flex-direction: column;
}

.challenges-column:first-child .challenges-text-block {
    margin-top: auto;
}

.challenges-column-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.challenges-text-block {
    display: flex;
    flex-direction: column;
    padding-top: 2rem;
}

.challenges-text-separator {
    width: 100%;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.15);
    margin-bottom: 1.5rem;
}

.challenges-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin: 0;
    text-align: left;
    font-family: 'PPPangramSans', sans-serif;
    font-weight: 400;
    opacity: 0.9;
}

.challenges-image-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.challenges-wireframe-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin: 0 auto;
    display: block;
    opacity: 1;
}

/* Next Project Grid - 3 Column Layout */
.next-project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 3rem 0;
    width: 100%;
    align-items: stretch;
}

.next-project-column {
    display: flex;
    flex-direction: column;
}


.next-project-column-texts {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.next-project-text-block {
    display: flex;
    flex-direction: column;
    padding-top: 0;
    align-items: flex-start;
}

.next-project-grid .next-project-title {
    font-family: 'PPAcma', serif;
    font-weight: 900;
    font-size: 1.5rem;
    line-height: 1.2;
    color: var(--text-dark);
    margin: 0 0 1rem 0;
    text-align: left;
}

.next-project-grid .next-project-title:hover {
    color: var(--text-dark);
    transform: none;
}

.next-project-separator {
    width: 100%;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.15);
    margin-bottom: 1.5rem;
}

.next-project-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin: 0;
    text-align: left;
    font-family: 'PPPangramSans', sans-serif;
    font-weight: 400;
    opacity: 0.9;
    width: 100%;
}

.next-project-text-inner {
    background-color: #DED4CA;
    padding: 0.5rem;
    display: inline;
    text-align: left;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-thickness: 2px;
    border-radius: 4px;
    line-height: 1.5rem;
    font-weight: bold;
    transition: background-color 0.3s ease, text-decoration 0.3s ease;
}

.next-project-text-inner:hover {
    background-color: #57FA21;
    text-decoration: none;
}

.next-project-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

.next-project-text-inner:hover .next-project-arrow {
    transform: translateX(2px);
}

/* Horizontal Scrolling Image Gallery */
.case-study-image-scroll {
    margin: 3rem 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding-left: calc(280px + 4rem);
    padding-right: 4rem;
}

.case-study-image-scroll::-webkit-scrollbar {
    height: 8px;
}

.case-study-image-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.case-study-image-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.case-study-image-scroll::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

.image-scroll-container {
    width: 100%;
}

.image-scroll-track {
    display: flex;
    gap: 1.5rem;
    padding-bottom: 1rem;
    align-items: flex-start;
}

.image-scroll-item {
    flex-shrink: 0;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-scroll-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.image-scroll-item img {
    width: auto;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

/* Call to Action Section */
.case-study-cta {
    margin-top: 4rem;
    padding: 3rem;
    background-color: var(--text-dark);
    color: var(--bg-light);
    border-radius: 12px;
    text-align: center;
    box-shadow: 8px 8px #454545;
}

.case-study-cta-text {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 2rem;
    color: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.case-study-cta-lock-icon {
    color: white;
    flex-shrink: 0;
}

.case-study-connect-link {
    color: #57FA21;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    cursor: pointer;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

.case-study-connect-link:hover {
    color: white;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .case-study-nav {
        width: 280px;
        min-width: 280px;
    }

    .case-study-content {
        margin-left: 280px;
        width: calc(100% - 280px);
        padding: 3rem 2rem 4rem;
    }

    .case-study-image-scroll {
        padding-left: calc(280px + 2rem);
        padding-right: 2rem;
    }

    .case-study-title {
        font-size: 2.5rem;
    }

    .case-study-section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .case-study-nav {
        position: relative;
        top: 0;
        left: 0;
        width: 100%;
        height: auto;
        padding: 1.5rem;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .case-study-content {
        margin-left: 0;
        width: 100%;
    }

    /* Show dropdown, hide nav list on mobile */
    .case-study-nav-dropdown {
        display: block;
    }

    .case-study-nav-list {
        display: none;
    }

    .case-study-content {
        padding: 2rem 1.5rem 3rem;
    }

    .case-study-title {
        font-size: 2rem;
    }

    .case-study-section-title {
        font-size: 1.75rem;
    }

    .case-study-section {
        margin-bottom: 4rem;
        scroll-margin-top: 20px;
    }

    .learnings-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .learnings-item {
        gap: 0.5rem;
    }

    .learnings-item-title {
        font-size: 1.25rem;
    }

    .learnings-item-description {
        font-size: 1rem;
    }

    .image-scroll-item {
        height: 300px;
    }

    .case-study-image-scroll {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .outcomes-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .outcome-metric-block-empty {
        display: none;
    }

    .outcome-metric-text {
        font-size: 1rem;
        margin: 0;
        padding: 0 0.75rem;
        padding-top: 1.5rem;
        border-top: 1px solid rgba(0, 0, 0, 0.15);
    }

    .outcome-metric-empty-space {
        min-height: 1.5rem;
        margin: 1.5rem 0;
    }

    .approach-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .approach-column-image {
        order: -1;
    }

    .approach-text {
        font-size: 1rem;
    }

    .approach-image-wrapper {
        padding: 1.5rem 0;
    }

    .observations-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .observations-column-image {
        order: -1;
    }

    .observations-text {
        font-size: 1rem;
    }

    .observations-image-wrapper {
        padding: 1.5rem 0;
    }

    .next-project-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .next-project-text {
        font-size: 1rem;
    }

    .next-project-grid .next-project-title {
        font-size: 1.25rem;
    }

    .challenges-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .challenges-column-image {
        order: -1;
    }

    .challenges-text {
        font-size: 1rem;
    }

    .challenges-image-wrapper {
        padding: 1.5rem 0;
    }
}

@media (max-width: 480px) {
    .case-study-title {
        font-size: 1.75rem;
    }

    .case-study-section-title {
        font-size: 1.5rem;
    }

    .case-study-cta {
        padding: 2rem 1.5rem;
    }

    .case-study-cta-buttons {
        flex-direction: column;
    }

    .case-study-cta-buttons .btn {
        width: 100%;
    }

    .outcomes-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .outcome-metric-block-empty {
        display: none;
    }

    .outcome-metric-text {
        font-size: 0.9375rem;
        margin: 0;
        padding: 0 0.5rem;
        padding-top: 1.25rem;
        border-top: 1px solid rgba(0, 0, 0, 0.15);
    }

    .outcome-metric-empty-space {
        min-height: 1.25rem;
        margin: 1.25rem 0;
    }

    .approach-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .approach-text {
        font-size: 0.9375rem;
    }

    .approach-image-wrapper {
        padding: 1rem 0;
    }

    .observations-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .observations-text {
        font-size: 0.9375rem;
    }

    .observations-image-wrapper {
        padding: 1rem 0;
    }

    .next-project-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .next-project-text {
        font-size: 0.9375rem;
    }

    .next-project-grid .next-project-title {
        font-size: 1.125rem;
    }

    .challenges-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .challenges-text {
        font-size: 0.9375rem;
    }

    .challenges-image-wrapper {
        padding: 1rem 0;
    }
}
