:root {

    --olive-primary: #6B8E23;
    --olive-dark: #556B2F;
    --olive-light: rgba(107, 142, 35, 0.1);
    --text-dark: #111112;
    --text-muted: #5a5a5f;
    --bg-light: #f8f9f5;
    --bg-white: #fcfcfc;
    --border-light: #e1e1e1;
    --grey-hover: #555;


    --shadow-sm: 0 8px 25px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 12px 35px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 18px 45px rgba(0, 0, 0, 0.10);


    --transition-curve: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-duration: 0.2s;
    --transition-fast: var(--transition-duration);
    --transition-medium: 0.2s;
    --transition-slow: 0.25s;


    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;


    --primary-accent: var(--olive-primary);
    --text-primary: var(--text-dark);
    --text-secondary: var(--text-muted);
}

*, *::before, *::after {
    word-break: keep-all !important;
    overflow-wrap: break-word !important;
    hyphens: none !important;
}

h1, h2, h3, h4, h5, h6,
.hero-title,
.section-title,
.related-project-title {
    word-break: keep-all;
    overflow-wrap: break-word;
    hyphens: none;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
        Oxygen, Ubuntu, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
}

main { padding-top: 0 !important; }

/* ========================================
   HERO
======================================== */

.project-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: #111;
}

.project-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    display: block;
    transition: opacity var(--transition-slow);
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
}

.hero-text {
    position: absolute;
    bottom: 70px;
    left: 60px;
    z-index: 2;
    max-width: 80%;
}

.hero-category {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #fff;
    background: rgba(107, 142, 35, 0.85);
    padding: 6px 14px;
    border-radius: 3px;
    margin-bottom: 16px;
}

.hero-title {
    color: #fff;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: clamp(3.2rem, 8vw, 6rem);
    font-weight: 300;
    line-height: 1.05;
    margin: 16px 0 0 0;
    letter-spacing: -0.02em;
    text-shadow: 0 3px 15px rgba(0,0,0,0.3);
}

/* ========================================
   CONTENT AREA
======================================== */

.project-content-area {
    max-width: 1320px;
    margin: 0 auto;
    padding: 80px 60px;
}

.project-content-area--lightbox {
    padding-top: 0;
    padding-bottom: 0;
}

.project-intro {
    margin-bottom: 80px;
}

/* ========================================
   EDITORIAL TAGLINE
======================================== */

.project-tagline {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    color: var(--text-dark);
    font-weight: 400;
    line-height: 1.35;
    max-width: 800px;
    margin: 0 0 40px 0;
}

/* ========================================
   SPECS STRIP (replaces metadata grid)
======================================== */

.project-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.spec {
    padding: 16px 24px;
    border-right: 1px solid var(--border-light);
}

.spec:first-child {
    padding-left: 0;
}

.spec:last-child {
    border-right: none;
}

.spec dt {
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 4px;
}

.spec dd {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.4;
}

/* ========================================
   DESCRIPTION — DROP CAP
======================================== */

.project-description-content {
    max-width: none;
    margin-top: 48px;
    font-size: 1.15rem;
    line-height: 1.85;
    color: var(--text-muted);
}

.project-description-content p {
    margin-bottom: 1.5em;
}

/* ========================================
   SECTION TITLE
======================================== */

.section-title {
    font-size: 2.2rem;
    color: var(--text-dark);
    margin-bottom: 35px;
    position: relative;
    font-weight: 400;
    letter-spacing: -0.01em;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
}

/* ========================================
   GALLERY SECTION DIVIDER
======================================== */

.gallery-section-divider {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 35px;
}

.gallery-section-divider::before,
.gallery-section-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-light);
}

.gallery-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ========================================
   GALLERY
======================================== */

.project-gallery {
    margin-bottom: 80px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    align-items: stretch;
}

.gallery-grid-1 {
    display: grid;
    justify-content: left;
    gap: 24px;
}
.gallery-grid-1 .gallery-item {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}

.gallery-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(2, 1fr);
    gap: 24px;
    aspect-ratio: 2 / 1;
}
.gallery-grid-3 .gallery-item:nth-child(1) { grid-column: 1; grid-row: 1; }
.gallery-grid-3 .gallery-item:nth-child(2) { grid-column: 1; grid-row: 2; }
.gallery-grid-3 .gallery-item:nth-child(3) { grid-column: 2; grid-row: 1 / span 2; }

.gallery-grid-4 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 0.75fr);
    gap: 20px;
    aspect-ratio: 5 / 3;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}
.gallery-grid-4 .gallery-item .gallery-img { aspect-ratio: 4 / 3; }

.gallery-grid-5 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 1fr 1fr;
    gap: 24px;
}
.gallery-grid-5 .gallery-item:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; }
.gallery-grid-5 .gallery-item:nth-child(2) { grid-column: 2; grid-row: 1; }
.gallery-grid-5 .gallery-item:nth-child(3) { grid-column: 3; grid-row: 1; }
.gallery-grid-5 .gallery-item:nth-child(4) { grid-column: 2; grid-row: 2; }
.gallery-grid-5 .gallery-item:nth-child(5) { grid-column: 3; grid-row: 2; }

.gallery-item {
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border-radius: var(--radius-md);
    background-color: var(--bg-light);
    height: 100%;
    transition: transform var(--transition-duration) var(--transition-curve),
                box-shadow var(--transition-duration) var(--transition-curve);
    box-shadow: var(--shadow-sm);
    will-change: transform;
}

.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-slow) ease;
    border-radius: var(--radius-md);
    will-change: transform;
}

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

.gallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(17, 17, 18, 0.4);
    opacity: 0;
    transition: opacity var(--transition-duration) var(--transition-curve);
    border-radius: var(--radius-md);
    pointer-events: none;
}

.gallery-overlay i {
    color: #fff;
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

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

/* ========================================
   RELATED PROJECTS
======================================== */

.related-projects-section {
    margin-top: 0;
    position: relative;
    padding-top: 40px;
    max-width: 100%;
    padding-bottom: 80px;
    background: var(--bg-light);
    border-top: 3px solid var(--olive-primary);
}

.related-section-header {
    max-width: 1320px;
    padding: 0 60px;
    margin: 0 auto;
    position: relative;
}

.related-section-header .section-title {
    font-weight: 400;
}

.related-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.related-projects-grid-1 {
    display: grid;
    justify-content: left;
    gap: 30px;
    margin-top: 40px;
}
.related-projects-grid-1 .related-project-card {
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
}

.related-projects-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 400px));
    gap: 30px;
    margin-top: 40px;
    justify-content: center;
}

.related-scroll-wrapper {
    position: relative;
    margin-top: 40px;
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
}

.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    background: var(--bg-white);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-duration) var(--transition-curve);
    box-shadow: var(--shadow-sm);
}

.scroll-arrow-left {
    left: 8px;
}

.scroll-arrow-right {
    right: 8px;
}

.scroll-arrow:hover {
    background: var(--olive-primary);
    color: #fff;
    border-color: var(--olive-primary);
    box-shadow: var(--shadow-md);
}

.scroll-arrow.hidden {
    opacity: 0.3;
    pointer-events: none;
}

.related-projects-scrollable {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 25px 60px;
    margin: -25px 0;
}

.related-projects-scrollable::-webkit-scrollbar {
    display: none;
}

.related-projects-scrollable .related-project-card {
    height: auto;
}

.related-project-card {
    overflow: hidden;
    background-color: var(--bg-white);
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: transform var(--transition-duration) var(--transition-curve),
                box-shadow var(--transition-duration) var(--transition-curve);
    will-change: transform;
}

.related-project-card:hover {
    transform: translateY(-4px) scale(1.015);
    box-shadow: var(--shadow-md);
}

.related-project-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.related-project-img-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 2;
    background-color: var(--bg-light);
    flex-grow: 1;
}

.related-project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-duration) ease;
    will-change: transform;
}

.related-project-card:hover img {
    transform: scale(1.08);
}

.related-project-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    gap: 8px;
}

.related-project-badge {
    background: rgba(107, 142, 35, 0.85);
    color: #fff;
    font-size: 0.75rem;
    padding: 5px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    font-weight: 500;
}

.related-zoom-indicator {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(107, 142, 35, 0.85);
    color: #fff;
    font-size: 0.75rem;
    padding: 8px 18px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(5px);
    white-space: normal;
    max-width: 90%;
    text-align: center;
    transition: opacity var(--transition-duration) var(--transition-curve),
                transform var(--transition-duration) var(--transition-curve);
}

.related-project-card:hover .related-zoom-indicator {
    opacity: 1;
    transform: translateY(0);
}

.related-project-info {
    padding: 16px 20px 20px;
    background-color: var(--bg-white);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.related-project-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-dark);
    transition: color var(--transition-duration) var(--transition-curve);
    line-height: 1.35;
    letter-spacing: -0.01em;
    white-space: normal;
}

.related-project-card:hover .related-project-title {
    color: var(--olive-primary);
}

.related-project-type {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--olive-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: normal;
    line-height: 1.4;
}

/* ========================================
   LIGHTBOX
======================================== */

.lightbox {
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 10, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-medium) ease-in-out;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
}

.lightbox-img {
    max-width: 90%;
    max-height: 85%;
    transform: scale(0.9);
    transition: transform var(--transition-medium) ease-in-out,
                opacity var(--transition-medium) ease-in-out;
    opacity: 1;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.lightbox.active .lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 25px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 28px;
    font-weight: 400;
    line-height: 0.8;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    transition: background-color var(--transition-duration) var(--transition-curve),
                color var(--transition-duration) var(--transition-curve),
                transform var(--transition-duration) var(--transition-curve);
    z-index: 1010;
    text-align: center;
    padding-bottom: 4px;
}

.lightbox-close:hover {
    background-color: var(--grey-hover);
    color: #fff;
    transform: scale(1.1);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1005;
  user-select: none;
  background-color: rgba(30, 30, 30, 0.5);
  color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  transition: background-color var(--transition-fast) var(--transition-curve),
              color var(--transition-fast) var(--transition-curve),
              transform var(--transition-fast) var(--transition-curve),
              box-shadow var(--transition-fast) var(--transition-curve);
}

.lightbox-nav svg {
  display: block;
}

.lightbox-nav:hover {
  background-color: rgba(0, 0, 0, 0.7);
  color: #fff;

  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.lightbox-nav:active {

    transform: translateY(-50%) scale(1.02);
    background-color: rgba(0, 0, 0, 0.8);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    background-color: rgba(0, 0, 0, 0.3);
    padding: 8px 18px;
    border-radius: var(--radius-lg);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.5px;
    z-index: 1005;
    user-select: none;
}

/* ========================================
   SCROLLABLE RELATED CARDS — BASE SIZES
======================================== */

.related-projects-scrollable .related-project-card {
    flex: 0 0 380px;
    max-width: 380px;
    height: auto;
    margin-bottom: 10px;
}

.related-project-card .related-project-img-container {
    aspect-ratio: 16 / 9;
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

@media (max-width: 1100px) {
    .hero-text {
        bottom: 50px;
        left: 50px;
    }
    .hero-title {
        font-size: clamp(2.8rem, 6.5vw, 5rem);
    }
    .project-content-area {
        padding: 70px 50px;
    }
    .related-projects-scrollable {
        padding: 25px 50px;
    }

    .related-section-header {
        padding: 0 50px;
    }

    .related-projects-scrollable .related-project-card {
        flex: 0 0 350px;
        max-width: 350px;
    }
}

@media (max-width: 992px) {
    .project-hero {
        height: 85vh;
    }
    .project-content-area {
        padding: 60px 40px;
    }
    .related-projects-scrollable {
        padding: 25px 40px;
    }

    .related-section-header {
        padding: 0 40px;
    }

    .section-title {
        font-size: 2rem;
    }
    .related-projects-grid {
        gap: 25px;
    }
    .related-projects-grid-2 {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        justify-content: initial;
    }

    .related-projects-scrollable .related-project-card {
        flex: 0 0 330px;
        max-width: 330px;
    }

    /* Specs strip: 2-col grid at medium screens */
    .project-specs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
        border-top: 1px solid var(--border-light);
        border-bottom: 1px solid var(--border-light);
    }
    .spec {
        padding: 12px 20px;
        border-right: 1px solid var(--border-light);
    }
    .spec:nth-child(2n) {
        border-right: none;
    }
    .spec:first-child {
        padding-left: 20px;
    }
}

@media (max-width: 768px) {
    .project-hero {
        height: 70vh;
    }
    .hero-text {
        bottom: 40px;
        left: 30px;
        max-width: 85%;
    }
    .hero-title {
        font-size: clamp(2.2rem, 6vw, 3.5rem);
    }
    .project-content-area {
        padding: 50px 25px;
    }
    .related-projects-scrollable {
        padding: 25px 25px;
    }

    .scroll-arrow-left {
        left: 2px;
    }

    .scroll-arrow-right {
        right: 2px;
    }

    .related-section-header {
        padding: 0 25px;
    }

    .gallery-grid, .gallery-grid-1, .gallery-grid-3, .gallery-grid-4, .gallery-grid-5 {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        max-width: none;
        aspect-ratio: auto;
    }
    .gallery-grid-1 .gallery-item,
    .gallery-grid-3 .gallery-item,
    .gallery-grid-4 .gallery-item,
    .gallery-grid-5 .gallery-item {
        grid-column: 1;
        grid-row: auto;
        max-width: none;
    }
    .gallery-grid-4 .gallery-item .gallery-img {
        aspect-ratio: auto;
    }
    .gallery-grid {
        gap: 16px;
    }
    .section-title {
        font-size: 1.8rem;
    }


    .lightbox-nav {
        display: flex;
        width: 44px;
        height: 44px;
        font-size: 18px;
        background-color: rgba(30, 30, 30, 0.6);
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }

    .lightbox-content {
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
        cursor: default;
    }

    .related-projects-grid {
        gap: 20px;
    }

    .related-projects-scrollable {
        gap: 20px;
    }

    .related-projects-scrollable .related-project-card {
        flex: 0 0 300px;
        max-width: 300px;
    }

    .scroll-arrow {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 576px) {
    body {
        line-height: 1.6;
    }
    .project-hero {
        height: 60vh;
    }
    .hero-text {
        bottom: 30px;
        left: 20px;
        max-width: 90%;
    }
    .hero-title {
        font-size: clamp(2rem, 7vw, 3rem);
    }
    .project-content-area {
        padding: 40px 20px;
    }
    .related-projects-scrollable {
        padding: 25px 20px;
    }

    .scroll-arrow-left {
        left: 0;
    }

    .scroll-arrow-right {
        right: 0;
    }

    .related-section-header {
        padding: 0 20px;
    }

    .gallery-grid {
        gap: 12px;
    }


    .related-projects-grid,
    .related-projects-grid-1,
    .related-projects-grid-2 {
        grid-template-columns: 1fr;
        gap: 25px;
        justify-content: initial;
    }
    .related-projects-grid-1 .related-project-card,
    .related-projects-grid-2 .related-project-card {
        max-width: none;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 25px;
    }
    .project-description-content {
        font-size: 1.05rem;
    }
    .related-projects-section {
        padding-top: 30px;
        padding-bottom: 40px;
    }
    .lightbox-counter {
        bottom: 15px;
        padding: 6px 12px;
        font-size: 12px;
    }

    .related-projects-scrollable {
        gap: 15px;
    }

    .related-projects-scrollable .related-project-card {
        flex: 0 0 280px;
        max-width: 280px;
    }

    /* Specs strip: vertical stack on small screens */
    .project-specs {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    .spec {
        padding: 10px 0;
        border-right: none;
        border-bottom: 1px solid var(--border-light);
    }
    .spec:last-child {
        border-bottom: none;
    }
    .spec:first-child {
        padding-left: 0;
    }

    .project-tagline {
        font-size: clamp(1.3rem, 4vw, 1.6rem);
    }
}

@media (max-width: 480px) {
    .lightbox-prev {
        left: 5px;
    }
    .lightbox-next {
        right: 5px;
    }
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    .lightbox-close {
        width: 36px;
        height: 36px;
        font-size: 20px;
        top: 10px;
        right: 10px;
    }

    .related-projects-scrollable .related-project-card {
        flex: 0 0 260px;
        max-width: 260px;
    }

    .scroll-arrow {
        width: 32px;
        height: 32px;
    }
}
