/* Center the nav‑home link */
.nav-home {
    display: inline-flex;
    align-items: center;
}

/* New back‑arrow icon */
.back-icon {
    width: 24px;
    height: 24px;
    color: #333;
}

/* Additional styles specific to project view */
.project-view-container {
    padding-top: 120px; /* Increased space for fixed nav */
    max-width: 1200px; /* match your nav's max-width */
    width: 90%;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

.project-content {
    display: none;
}

.project-content.active {
    display: block;
}

#top-nav {
    transform: translateY(0) !important;
    background-color: #ffffff;
    border-bottom: 1px solid #f0f0f0;
}

@media screen and (max-width: 1200px) {
    #top-nav {
        display: none;
    }

    #hamburger-nav {
        display: flex;
    }

    .project-view-container {
        padding-top: 90px;
    }
}

.home-icon {
    width: 24px;
    height: 24px;
    color: #333;
}

/* Project Header Styles */
.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3rem;
    gap: 2rem;
}

.project-title {
    font-size: 3.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    color: #333333;
}

.project-subtitle {
    font-size: 1.5rem;
    color: #555555;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.text-only-header {
    display: block;
    padding: 3rem 0 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.text-only-header .project-info {
    max-width: 900px;
}

.project-kicker {
    color: #777;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

/* Move meta out of header flex and give it its own spacing */
.project-meta {
    display: flex;
    gap: 2rem 4rem;
    color: #666666;
    margin: 1.5rem 0 4rem; /* adjust top/bottom spacing as needed */
    flex-wrap: wrap;
}

/* Remove the extra top-margin rule from the old placement */
.project-info .project-meta {
    margin-top: 0 !important;
}

.meta-group {
    flex: 1 1 220px;
}

.project-meta .meta-group:last-child {
    flex-basis: 100%;
    max-width: 100%;
}

.meta-group h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    color: #999;
}

.meta-group p {
    font-size: 1rem;
    line-height: 1.6;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* Content Layout */
.content-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    gap: 4rem;
    margin-top: 4rem;
    margin-bottom: 4rem;
    position: static;
    align-items: start;
}

/* Overview Section */
.overview-section {
    padding: 2rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.overview-section h2 {
    font-size: 2rem;
    background: linear-gradient(120deg, #f6d365 0%, #fda085 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.overview-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}


/* Project Sections */
.project-sections {
    margin-top: 4rem;
    display: flex;
    flex-direction: column;
    gap: 4rem;
    scroll-margin-top: 100px;
}

.project-section {
    position: relative;
    padding-left: 2rem;
    margin-left: 1rem;
}

.project-section::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #e0e0e0;
    transition: background-color 0.3s ease;
}

.project-section.active::before {
    background: #f6d365;
    box-shadow: 0 0 15px rgba(246, 211, 101, 0.4);
}

.project-section h2 {
    font-size: 2rem;
    background: linear-gradient(120deg, #f6d365 0%, #fda085 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.project-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    margin: 0;
}

.challenge-block {
    margin: 0;
    padding: 1.25rem 1.5rem;
    border: 1px solid rgba(246, 211, 101, 0.25);
    border-left: 4px solid rgba(246, 211, 101, 0.6);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(246, 211, 101, 0.08), rgba(253, 160, 133, 0.06));
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.project-section.challenges .section-text {
    display: grid;
    gap: 1.5rem;
}

.challenge-block p + p {
    margin-top: 0.75rem;
}

.current-work-detail .execution-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.current-work-detail .execution-item {
    min-height: 190px;
}

.project4-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 1.25rem;
}

.project4-metrics div {
    min-height: 155px;
    padding: 1.25rem;
    border: 1px solid rgba(246, 211, 101, 0.24);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(246, 211, 101, 0.1), rgba(253, 160, 133, 0.07));
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-wrap: break-word;
}

.project4-metrics strong {
    color: #333;
    font-size: 2.4rem;
    line-height: 1;
}

.project4-metrics span {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

#project4-process .section-text ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    list-style: none;
    padding-left: 0;
}

#project4-process .section-text li {
    margin: 0;
    padding: 1.25rem 1.35rem;
    border: 1px solid rgba(246, 211, 101, 0.24);
    border-left: 4px solid rgba(246, 211, 101, 0.8);
    border-radius: 8px;
    background: #fff;
    line-height: 1.7;
}


/* Visual Design Section */
.visual-design {
    padding-top: 2rem;
}

.design-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 2rem 0;
    max-width: 100%;
}

.design-gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface-2);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.design-gallery-item img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    background: white;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

.design-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.design-gallery-item:hover img {
    transform: scale(1.02);
}

.design-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.design-gallery-item:hover .design-title-overlay {
    opacity: 1;
}

/* Modal styles for full-size view */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 2rem;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.modal-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    background: white;
}

.modal-title {
    color: white;
    font-size: 1.2rem;
    text-align: center;
    margin: 0;
    padding: 0.5rem 1rem;
    background: rgba(0,0,0,0.7);
    border-radius: 4px;
}

.close-modal {
    position: absolute;
    top: -2rem;
    right: -2rem;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .design-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .design-gallery {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem 0;
    }
    
    .design-gallery-item {
        max-width: 100%;
    }
}

/* Loading state */
.design-gallery-item.loading {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
}

.design-gallery-item.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid var(--surface-3);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: loading 1s infinite linear;
}

@keyframes loading {
    to {
        transform: rotate(360deg);
    }
}

/* Loading animation for images */
.design-gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: loading 1.5s infinite;
    display: none;
}

.design-gallery-item.loading::after {
    display: block;
}

@keyframes loading {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Responsive adjustments for design gallery */
@media (max-width: 992px) {
    .design-gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 576px) {
    .design-gallery {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Responsive adjustments for project sections */
@media (max-width: 768px) {
    .project-sections {
        gap: 2rem;
    }

    .project-section {
        padding: 1.5rem;
    }

    .project-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .project-section p {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .project-sections {
        gap: 1.5rem;
    }

    .project-section {
        padding: 1.25rem;
    }

    .project-section h2 {
        font-size: 1.3rem;
    }
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .media-gallery {
        position: relative;
        top: 0;
        order: -1;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .overview-section {
        padding: 1.5rem;
    }

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

    .overview-content {
        font-size: 1rem;
    }
}

/* Shrink container on mid-large screens */
@media (max-width: 1200px) {
    .project-view-container {
        width: 95%;
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Stack layout on tablet */
@media (max-width: 992px) {
    .project-view-container {
        width: 100%;
        padding-left: 1.75rem;
        padding-right: 1.75rem;
    }
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .project-info {
        position: relative;
        top: 0;
    }

    .project-meta {
        flex-direction: column;
        gap: 1rem;
        margin: 1rem 0 2rem;
    }

    .meta-group {
        flex: 0 1 auto;
    }

    .project-title {
        font-size: 2.2rem;
    }

    .project-subtitle {
        font-size: 1.2rem;
    }
}

/* Tweak type scale on smaller tablets */
@media (max-width: 768px) {
    .project-view-container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .project-header {
        margin-bottom: 40px;
    }
    .project-header .project-title    { font-size: 2.2rem; }
    .project-header .project-subtitle { font-size: 1.2rem; }
}

/* Fine-tune on phones */
@media (max-width: 576px) {
    .project-view-container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .project-header .project-title    { font-size: 1.8rem; }
    .project-header .project-subtitle { font-size: 1rem; }
    .project-meta                     { gap: 1.5rem; }
}

/* Section Navigation */
.section-navigation {
    margin: 0;
    padding: 0;
    align-self: start;
    position: static !important;
    width: 100%;
    display: block;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
}

.nav-heading {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #9aa0a6;
    margin-bottom: 1rem;
}

.nav-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.section-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 0;
    text-decoration: none;
    color: #9aa0a6;
    transition: color 0.2s ease;
}

.section-nav-item::before {
    content: none;
}

.section-nav-item.active {
    color: #333;
    font-weight: 600;
}

.section-nav-item:hover {
    color: #333;
}

.nav-number {
    font-size: 0.8rem;
    font-weight: 500;
    color: inherit;
    min-width: 2.5rem;
    text-transform: none;
}

.nav-title {
    font-size: 0.95rem;
    color: inherit;
    font-weight: 500;
}

/* Responsive adjustments for section navigation */
@media (max-width: 992px) {
    .section-navigation {
        margin-top: 1.5rem;
    }

    .nav-wrapper {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .nav-wrapper {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem 1.5rem;
        max-width: 100%;
    }

    .section-nav-item {
        padding: 0.25rem 0;
    }
}

@media (max-width: 576px) {
    .nav-wrapper {
        grid-template-columns: 1fr;
    }

    .nav-title {
        font-size: 0.95rem;
    }
}

/* 2) Two‑column grid: text on left, media slot on right */
.section-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

/* Media area styling */
.section-media {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
}

/* Outcomes: first two bullets sit beside media, rest below */
.project-section.outcomes .section-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    gap: 2.5rem;
    align-items: start;
}

.project-section.outcomes .outcomes-top {
    grid-column: 1;
}

.project-section.outcomes .section-media {
    grid-column: 2;
    grid-row: 1;
    max-width: 520px;
}

.project-section.outcomes .outcomes-rest {
    grid-column: 1 / -1;
}

@media (max-width: 992px) {
    .project-section.outcomes .section-body {
        grid-template-columns: 1fr;
    }

    .project-section.outcomes .section-media {
        grid-column: 1;
        grid-row: auto;
        max-width: 100%;
        margin-top: 1.5rem;
    }

    .project-section.outcomes .outcomes-rest {
        grid-column: 1;
    }
}

/* Video Container Styles */
.section-media .video-hover-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    border-radius: 12px;
    overflow: hidden;
    background: #f8f8f8;
}

.section-media .video-hover-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.section-media .hover-to-play-hint {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    color: white;
    font-size: 0.9rem;
    transition: opacity 0.3s ease;
}

.section-media .hover-to-play-hint span {
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    font-weight: 500;
}

.section-media .video-hover-container.active {
    display: block;
}

.section-media .video-hover-container:not(.active) {
    display: none;
}

/* Ensure images maintain aspect ratio */
.section-media img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: none;
}

.section-media img.active {
    display: block;
}

.section-media-controls {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.section-media-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s ease;
}

.section-media-dot.active {
    background: #f6d365;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .section-body {
        grid-template-columns: 1fr;
    }
    
    .section-media {
        min-height: 250px;
    }
}

.gallery-controls .gallery-nav {
  position: static;
  bottom: auto;
  left: auto;
  transform: none;
}

/* back-to-top button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: #f6d365;
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  opacity: 0.8;
  transition: opacity 0.2s ease;
  z-index: 1000;
}

.back-to-top:hover {
  opacity: 1;
}

/* Section content styling */
.section-text ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.section-text li {
    position: relative;
    padding-left: 1.5em;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.section-text li:before {
    content: '•';
    position: absolute;
    left: 0;
    color: #f6d365;
    font-weight: bold;
}

.section-text p {
    margin-bottom: 1.5rem;
}

/* Overview section specific styling */
.overview-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.overview-content li {
    position: relative;
    padding-left: 1.5em;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.overview-content li:before {
    content: '•';
    position: absolute;
    left: 0;
    color: #f6d365;
    font-weight: bold;
}

/*  Make Reflection text full‐width (no second empty column) */
.project-section.reflection .section-body {
    grid-template-columns: 1fr;
}

/* Make Background & Context text full-width */
.project-section.background .section-body {
    grid-template-columns: 1fr;
}

/* Typography Consistency Overrides */

/* 1. Unify h2 sizes in overview & all project sections */
.overview-section h2,
.project-section h2 {
    font-size: 2rem;       /* same size for all sub-headings */
}

/* 2. Ensure list-items match paragraph text size/leading */
.section-text li,
.overview-content li {
    font-size: 1.1rem;     /* match your body text scale */
    line-height: 1.8;      /* same comfortable leading */
}

/* 3. (Optional) Make sure any paragraph inside section-text or overview has the same sizing */
.section-text p,
.overview-content p {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Make the Challenges & Solutions text span the full width */
.project-section.challenges .section-body {
    grid-template-columns: 1fr;
}

/* Execution: collapse the default two-column grid for text+media */
.project-section.execution .section-body {
  display: block;
}

/* Execution: render its 4 list items in a 2×2 grid */
.project-section.execution .section-text ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

/* Execution: give its media-slot some breathing room */
/* .project-section.execution .section-media {
  margin-top: 2rem;
} */

/* Execution section: 2×2 grid of items with image placeholders */
.execution-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

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

.execution-item {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.execution-item-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

.execution-item-text strong {
    font-size: 1.25rem;
    line-height: 1.4;
    display: block;
    margin-bottom: 0.5rem;
}

.execution-item-image {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #f8f8f8;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Make all media elements inside execution items absolute-positioned to maintain consistent sizing */
.execution-item-image > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* Ensure videos are sized correctly */
.execution-item-image video,
.execution-item-image img,
.execution-item-image .video-hover-container {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* Maintain aspect ratio on video hover container */
.video-hover-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; 
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
}

/* 1) Lay out title/meta and videos side-by-side in header */
.project-header {
  display: flex;
  justify-content: space-between;  /* keep them left/right */
  align-items: center;             /* ← center vertically */
  gap: 2rem;
}

/* 2) Override sticky so the header videos flow naturally */
.project-header .media-gallery {
  position: static !important;
  top: auto !important;
  margin: 0;
}

/* 3) Let the overview section span both grid columns below */
.content-wrapper .overview-section {
  grid-column: 1 / -1;
}

/* 2) Text block: takes exactly 50% of the header */
.project-info {
  flex: 1;
  max-width: 50%;
}

/* 3) Gallery block: also 50% of the header */
.project-media {
  flex: 1;
  max-width: 50%;
  width: 100%;
  aspect-ratio: 16 / 9;
}

/* 4) Make sure the gallery fills its container */
.project-media .media-gallery,
.project-media .media-container {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
}

/* Responsive: stack header on tablets */
@media (max-width: 992px) {
    .project-header {
        flex-direction: column;
        align-items: stretch;
    }
    .project-info,
    .project-media {
        flex: 1 1 100%;
        max-width: 100%;
    }
    .project-media {
        margin-top: 2rem;
    }

    .project-media .video-link-container {
        width: 100%;
        aspect-ratio: 16 / 9;
        min-height: 220px;
    }

    .project-header .project-media {
        flex: 1 1 100%;
        max-width: 100%;
        justify-content: stretch;
        align-items: stretch;
    }
}

/* Further tweak on phones */
@media (max-width: 576px) {
    .project-title {
        font-size: 2.5rem;
    }
    .project-subtitle {
        font-size: 1.2rem;
    }
    .project-meta {
        flex-direction: column;
        gap: 1.5rem;
    }

    .project-media .video-link-container {
        min-height: 200px;
        aspect-ratio: 16 / 9;
    }

    .project-header .project-media {
        flex: 1 1 100%;
        max-width: 100%;
        justify-content: stretch;
        align-items: stretch;
    }
}

/* === Override: show gallery controls in header === */
.project-header .gallery-controls {
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.project-header .gallery-nav {
  background: rgba(255, 255, 255, 0.5);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s ease;
}

.project-header .gallery-nav svg {
  width: 20px;
  height: 20px;
  stroke: #333;
}

/* === Video-Gallery Controls → match section-media-controls styling === */

/* 1) Make gallery container relative so controls can be absolutely placed */
.project-header .media-gallery {
  position: relative;
}

/* 2) Style the prev/next + dots container just like .section-media-controls */
/* comment out this entire rule:
.project-header .gallery-controls {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  …
}
*/

/* 3) Ensure dots look like .section-media-dot */
.project-header .gallery-dot {
  width: 8px;
  height: 8px;
  border: none;
  border-radius: 50%;
  background: #ddd;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.project-header .gallery-dot.active {
  background: #f6d365;
}

/* Hide the arrow buttons in the header video-gallery */
.project-header .gallery-controls .gallery-nav {
  display: none !important;
}

/* make execution videos/images fill their cards */
.execution-item-image video,
.execution-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

/* Video hover container and hint styling */
.video-hover-container {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
}

.execution-item-image .video-hover-container {
  position: absolute;
  top: 0;
  left: 0;
}

.video-hover-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.hover-to-play-hint {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  color: white;
  font-size: 0.9rem;
  transition: opacity 0.3s ease;
  pointer-events: none; /* Make sure hover events still reach the container */
  z-index: 2;
}

.hover-to-play-hint span {
  background: rgba(0, 0, 0, 0.6);
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 500;
}

/* Hide any built-in controls that might slip through */
.execution-item-image video::-webkit-media-controls,
.media-container video::-webkit-media-controls {
  display: none !important;
}

/* For Firefox and others */
.execution-item-image video::-moz-media-controls,
.media-container video::-moz-media-controls {
  display: none !important;
}

/* Video link container and overlay styling */
.video-link-container {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
}

.video-link-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
    text-decoration: none;
}

.video-link-overlay:hover {
    opacity: 1;
}

.video-link-overlay span {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 30px;
    transform: translateY(10px);
    transition: transform 0.3s ease;
    border: 2px solid white;
}

.video-link-overlay:hover span {
    transform: translateY(0);
}

/* Media gallery specific styles for header */
.project-header .gallery-controls {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.project-header .gallery-nav {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.project-header .gallery-nav svg {
    width: 24px;
    height: 24px;
    color: #f6d365;
}

/* Video error placeholder */
.video-error-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #666;
    text-align: center;
    font-size: 0.9rem;
    border-radius: 12px;
}

/* Fix header video container */
.project-header .media-gallery {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-header .media-container {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
}

/* Hide video controls */
.video-link-container video::-webkit-media-controls-enclosure,
.media-container video::-webkit-media-controls-enclosure {
    display: none !important;
}

.video-link-container video::-webkit-media-controls,
.media-container video::-webkit-media-controls {
    display: none !important;
}

/* Header project media container */
.project-header .project-media {
    flex: 0 0 50%;
    max-width: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

@media (max-width: 992px) {
    .project-header .project-media {
        flex: 1 1 100%;
        max-width: 100%;
        justify-content: stretch;
        align-items: stretch;
    }
}

@media (max-width: 576px) {
    .project-header .project-media {
        flex: 1 1 100%;
        max-width: 100%;
        justify-content: stretch;
        align-items: stretch;
    }
}

/* Header media gallery and container */
.project-header .media-gallery {
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.project-header .media-container {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-header .media-container:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

/* Fix for nested videos */
.project-header .media-container .video-link-container {
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

/* Enhanced header media container for videos */
.project-header .media-container {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-header .media-container:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

/* Better video overlay styling */
.video-link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.1);
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    z-index: 2;
}

.video-link-overlay:hover {
    background: rgba(0, 0, 0, 0.5);
}

.video-link-overlay span {
    padding: 10px 20px;
    background: linear-gradient(120deg, #f6d365 0%, #fda085 100%);
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    color: #333;
    transform: translateY(5px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.video-link-overlay:hover span {
    transform: translateY(0);
    opacity: 1;
}

@media (max-width: 992px) {
    .current-work-detail .execution-grid,
    .project4-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #project4-process .section-text ul {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .text-only-header {
        padding-top: 1.5rem;
    }

    .current-work-detail .execution-grid,
    .project4-metrics {
        grid-template-columns: 1fr;
    }

    .project4-metrics div {
        min-height: 150px;
    }
}

/* Project 4 responsive overrides live late to beat generic project list styles. */
.current-work-detail .content-wrapper {
    grid-template-columns: 1fr;
}

.current-work-detail .section-navigation {
    max-width: 100%;
}

.current-work-detail .project-section .section-body {
    display: block;
    width: 100%;
}

.current-work-detail .project-section .section-text {
    width: 100%;
}

.current-work-detail .project-section {
    margin-top: 4rem;
    margin-bottom: 4rem;
}

.current-work-detail #project4-impact.project-section.outcomes .section-body {
    display: block;
}

.current-work-detail #project4-impact {
    margin-bottom: 5rem;
}

.current-work-detail #project4-process {
    margin-top: 5rem;
}

.current-work-detail .project4-metrics {
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.current-work-detail #project4-process .section-text ul {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1rem;
    list-style: none;
    padding-left: 0;
}

.current-work-detail #project4-process .section-text li {
    margin: 0;
    padding: 1.25rem 1.35rem;
    border: 1px solid rgba(246, 211, 101, 0.24);
    border-left: 4px solid rgba(246, 211, 101, 0.8);
    border-radius: 8px;
    background: #fff;
    line-height: 1.7;
}

.current-work-detail #project4-process .section-text li::before {
    display: none;
}

@media (max-width: 576px) {
    .current-work-detail .project4-metrics,
    .current-work-detail #project4-process .section-text ul {
        grid-template-columns: 1fr;
    }
}
