:root {
  --bg-main: #f4ece4;
  --black: #000000;
  --gray: #515151;
  --font-body: "PT Sans Narrow", sans-serif;
  --font-heading: "Josefin Sans", sans-serif;
  --grid-gap-main: 3px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg-main);
  color: var(--black);
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 18px;
  padding-bottom: 60px;
}

a {
  color: inherit;
  text-decoration: none;
}

header,
footer {
  position: fixed;
  left: 0;
  width: 100%;
  z-index: 20;
  background: var(--bg-main);
}

header {
  top: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

footer {
  bottom: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.15);
}

.header-inner,
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-inner {
  padding: 1rem 2rem;
}

.footer-inner {
  padding: 0.6rem 1.4rem;
  font-size: 0.85rem;
  color: var(--gray);
}

.logo-image {
  height: 48px;
  width: auto;
}

nav ul {
  display: flex;
  gap: 1.8rem;
  list-style: none;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.85rem;
}

nav a {
  position: relative;
  padding-bottom: 0.2rem;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--black);
  transition: width 0.2s ease;
}

nav a:hover::after {
  width: 100%;
}

main {
  padding-top: 110px;
  display: flex;
  justify-content: center;
  padding-bottom: 2rem;
  padding-inline: 1.2rem;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(3, 420px);
  grid-template-rows: repeat(3, 300px);
  gap: var(--grid-gap-main);
}

.grid-item {
  width: 420px;
  height: 300px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.grid-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 25%;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.3rem;
  transition: opacity 0.3s ease;
}

.overlay-text {
  display: flex;
  flex-direction: column;
}

.overlay-mobile-arrow {
  display: none;
  color: #ffffff;
  font-size: 1.4rem;
  margin-left: 0.6rem;
}

.grid-item:hover img {
  transform: scale(1.05);
  filter: none;
}

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

.grid-item:hover .overlay-mobile-arrow {
  display: block;
}

.overlay-title {
  font-family: var(--font-heading);
  color: #ffffff;
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.overlay-subtitle {
  color: #f4f4f4;
  font-size: 0.85rem;
}

.footer-inner strong {
  color: var(--black);
  font-family: var(--font-heading);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.social-links {
  display: flex;
  gap: 0.8rem;
}

.social-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 30%, #000000, #515151 75%);
  color: #ffffff;
  font-size: 0.85rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
  transition: 0.2s ease;
}

.social-icon:hover {
  transform: translateY(-2px) scale(1.05);
  background: radial-gradient(circle at 70% 30%, #515151, #000000 80%);
}

.project-wrapper {
  max-width: 1266px;
  margin: 0 auto;
  width: 100%;
}

.project-title {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 3rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.project-hero {
  width: 100%;
  margin-bottom: 2.5rem;
}

.project-hero video {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

.project-hero img,
.project-two-column-image img {
  width: 100%;
  height: auto;
  display: block;
}

.project-section {
  margin-bottom: 3rem;
}

/* === PROJECT IMAGE + TEXT WRAP BEHAVIOR === */
/* container can stay block */
.project-two-column {
  /* container stays block-level */
  /* float behavior handled by children */
  margin-bottom: 3rem;
}

.project-two-column::after {
  content: "";
  display: block;
  clear: both;
}

.project-two-column-image {
  float: left;
  width: 50%;
  max-width: 50%;
  margin-right: 1rem;
  margin-bottom: .1rem;
}

.project-text-block {
  padding-right: 1rem;
}

.project-section-title {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.project-text-block p {
  font-size: 1.1rem;
  line-height: 1.55;
  color: #333333;
}

.project-text-block p + p {
  margin-top: 1rem;
}


.project-gallery-section {
  position: relative;
  margin-top: 3rem;
}

.project-gallery-title {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 1.4rem;
  text-align: left;
  margin-bottom: 1.5rem;
}

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

/* Slider container */
.project-gallery-grid {
  display: flex;
  gap: var(--grid-gap-main);
  overflow-x: auto;                  /* allow horizontal scroll */
  scroll-behavior: smooth;           /* smooth sliding */
  scroll-snap-type: x mandatory;     /* snap to items */
  -webkit-overflow-scrolling: touch; /* nice touch behavior on iOS */
  align-items: center;
  padding-bottom: 0.5rem;
}

/* Each slide */
.project-gallery-item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;          /* snap each item to the left edge */
}

/* Images: same height, variable width */
.project-gallery-image {
  height: 300px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* Videos: same height, variable width */
.project-gallery-video {
  height: 300px;
  width: auto;
  object-fit: contain;
  display: block;
  background: #000;
}

/* Nav buttons (keep your existing look) */
.gallery-nav-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 59px;
  height: 59px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  z-index: 2;
}

.gallery-nav-button i {
  font-size: 1.95rem;
}

.gallery-nav-button:hover {
  background: rgba(0, 0, 0, 0.65);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.gallery-nav-button--prev {
  left: 10px;
}

.gallery-nav-button--next {
  right: 10px;
}

.gallery-nav-button:disabled {
  opacity: 0.35;
  cursor: default;
  transform: translateY(-50%);
  box-shadow: none;
}

/* Dots */
.gallery-indicators {
  margin-top: 1.2rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.gallery-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid #000;
  background: transparent;
  cursor: pointer;
  opacity: 0.35;
  transition:
      background 0.25s ease,
      opacity 0.25s ease,
      transform 0.25s ease,
      width 0.25s ease,
      border-radius 0.25s ease;
}

.gallery-indicator--active {
  width: 24px;
  height: 10px;
  background: #000;
  border-radius: 999px;
  opacity: 1;
  transform: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.is-active {
  display: flex;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
}

/* Bounding box for the media (full viewport, with padding as margin) */
.lightbox-content {
  position: relative;
  z-index: 1;

  width: 100vw;
  height: 100vh;

  /* margin-like padding on all sides */
  padding: 2.5rem 1.5rem 1.5rem;
  box-sizing: border-box;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* Image / video inside: always fully visible, no cropping */
.lightbox-media {
  display: none;

  max-width: 100%;
  max-height: 100%;

  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox-media.is-visible {
  display: block;
}

/* Close button inside the padded area */
.lightbox-close {
  position: fixed;          /* instead of absolute */
  top: 1rem;                /* safe visual zone */
  right: 1rem;
  z-index: 100;             /* above everything */
  border: none;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 2rem;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
}

.lightbox-close i {
  pointer-events: none;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 59px;
  height: 59px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(3px);

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  color: #ffffff;

  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
  transition: background 0.25s ease,
              transform 0.25s ease,
              box-shadow 0.25s ease,
              opacity 0.25s ease;

  z-index: 20;
  opacity: 0.85;
}

.lightbox-nav i {
  font-size: 1.95rem;
}

/* Hover effect */
.lightbox-nav:hover {
  background: rgba(0,0,0,0.65);
  transform: translateY(-50%) scale(1.1);
  opacity: 1;
}

/* Position inside the image bounds */
.lightbox-nav--prev {
  left: 1rem;   /* inside the left side */
}

.lightbox-nav--next {
  right: 1rem;  /* inside the right side */
}

.lightbox-nav:hover {
  background: rgba(0, 0, 0, 0.75);
  transform: translateY(-50%) scale(1.06);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.project-two-col {
  display: flex;
  gap: 2rem;
  align-items: stretch;     /* makes both columns equal height */
  width: 100%;
}

/* LEFT COLUMN */
.project-two-col .col-left {
  flex: 0 0 40%;
  display: flex;
}

.project-two-col .col-left img {
  width: 100%;
  height: 100%;
  object-fit: contain;      /* shows entire image, no cropping */
}

/* RIGHT COLUMN */
.project-two-col .col-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* text takes top, image bottom */
}

/* TEXT BLOCK */
.col-right-top {
  margin-bottom: 1.5rem;
}

/* BOTTOM IMAGE */
.col-right-bottom img {
  width: 100%;
  height: auto;
  object-fit: contain;       /* full image, no cropping */
}

@media (max-width: 1380px) {
  .image-grid {
    grid-template-columns: repeat(2, 420px);
    grid-auto-rows: 300px;
  }
}

@media (max-width: 900px) {
  .header-inner,
  .footer-inner {
    padding-inline: 1.2rem;
  }

  .image-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 300px;
  }

  .grid-item {
    width: 100%;
  }

  .grid-item img {
    transform: none !important;
    filter: none !important;
  }

  .grid-overlay {
    opacity: 1;
  }

  .overlay-mobile-arrow {
    display: block;
  }

  .overlay-mobile-arrow i {
    font-size: 1.6rem;
  }

  .project-two-col {
    flex-direction: column;
  }

  .project-two-col .col-left,
  .project-two-col .col-right {
    flex: 0 0 auto;
  }

  .project-two-col .col-left img {
    height: auto;
  }
}

@media (max-width: 720px) {
  .project-gallery-image,
  .project-gallery-video {
    height: 220px;
  }

  .gallery-nav-button {
    width: 40px;
    height: 40px;
  }

  .gallery-nav-button i {
    font-size: 1.3rem;
  }

  .gallery-nav-button--prev {
    left: 5px;
  }

  .gallery-nav-button--next {
    right: 5px;
  }

  .lightbox-nav {
      width: 40px;
      height: 40px;
    }

    .lightbox-nav i {
      font-size: 1.3rem;
    }

    .lightbox-nav--prev {
      left: 0.5rem;
    }

    .lightbox-nav--next {
      right: 0.5rem;
    }
}

@media (max-width: 600px) {
  .gallery-indicator {
    width: 8px;
    height: 8px;
  }

  .gallery-indicator--active {
    width: 18px;
    height: 8px;
    border-radius: 999px;
  }

  .project-title {
    letter-spacing: 0.1em;
    font-size: 2.5rem;
  }

  .lightbox-close {
    font-size: 1.6rem;
    padding: 0.3rem 0.5rem;
  }

    .lightbox-nav i {
      font-size: 1.2rem;
    }

    .lightbox-nav--prev {
      left: 1rem;
    }

    .lightbox-nav--next {
      right: 1rem;
    }
}
