/* ============================================ */
/* PROJECT GALLERY PAGE                         */
/* ============================================ */

/* ── Two-Column Project Row ──────────────────── */
.cg-project-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 50px;
  align-items: start;
}

.cg-project-info-col {
  position: sticky;
  top: 100px;
}

.cg-project-info-col .coastline-section-label {
  text-align: left;
}

.cg-project-info-col .coastline-section-heading {
  text-align: left;
  font-size: 30px;
}

.cg-project-info-col .coastline-section-text {
  text-align: left;
  font-size: 16px;
}

.cg-project-link {
  margin-top: 18px;
}

.cg-project-link a {
  font-family: "Montserrat", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #af6661;
  text-decoration: none;
  transition: color 0.2s ease;
}

.cg-project-link a:hover {
  color: #121b25;
  text-decoration: underline;
}

/* ── Gallery Viewer ──────────────────────────── */
.cg-viewer {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
}

.cg-viewer-main {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f4f8;
}

.cg-viewer-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease;
}

/* Badge (bottom-right corner) */
.cg-viewer-badge {
  position: absolute;
  bottom: 16px;
  right: 16px;
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #ffffff;
  padding: 6px 16px;
  border-radius: 4px;
  pointer-events: none;
}

.cg-badge-before {
  background: rgba(18, 27, 37, 0.7);
}

.cg-badge-in-progress {
  background: rgba(55, 84, 114, 0.85);
}

.cg-badge-after {
  background: rgba(175, 102, 97, 0.85);
}

/* Arrows */
.cg-viewer-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(18, 27, 37, 0.5);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
}

.cg-viewer-arrow:hover {
  background: rgba(175, 102, 97, 0.85);
  border-color: rgba(175, 102, 97, 0.85);
}

.cg-viewer-prev {
  left: 12px;
}

.cg-viewer-next {
  right: 12px;
}

/* ── Thumbnail Strip ─────────────────────────── */
.cg-thumbs-wrap {
  margin-top: 14px;
  overflow: hidden;
}

.cg-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar but keep functionality */
.cg-thumbs::-webkit-scrollbar {
  height: 4px;
}

.cg-thumbs::-webkit-scrollbar-track {
  background: transparent;
}

.cg-thumbs::-webkit-scrollbar-thumb {
  background: #ccd3db;
  border-radius: 4px;
}

.cg-thumb {
  position: relative;
  flex: 0 0 auto;
  width: 90px;
  height: 68px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  background: none;
  transition:
    border-color 0.2s ease,
    opacity 0.2s ease;
  opacity: 0.6;
}

.cg-thumb:hover {
  opacity: 0.9;
}

.cg-thumb-active {
  border-color: #af6661;
  opacity: 1;
}

.cg-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Thumb badge (tiny) */
.cg-thumb-badge {
  position: absolute;
  bottom: 3px;
  right: 3px;
  font-family: "Montserrat", sans-serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #ffffff;
  padding: 2px 5px;
  border-radius: 2px;
  pointer-events: none;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 960px) {
  .cg-project-row {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .cg-project-info-col {
    position: static;
    text-align: center;
  }

  .cg-project-info-col .coastline-section-label,
  .cg-project-info-col .coastline-section-heading,
  .cg-project-info-col .coastline-section-text {
    text-align: center;
  }
}

@media (max-width: 600px) {
  .cg-viewer-arrow {
    width: 32px;
    height: 32px;
  }

  .cg-viewer-prev {
    left: 8px;
  }

  .cg-viewer-next {
    right: 8px;
  }

  .cg-thumb {
    width: 72px;
    height: 54px;
  }

  .cg-viewer-badge {
    bottom: 10px;
    right: 10px;
    font-size: 10px;
    padding: 4px 10px;
  }
}

@media (max-width: 600px) {
  .cg-thumbs {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}
/* ── GeneratePress Full-Width Override ────────── */
.page-template-templates-page-gallery-php .site-content,
.page-template-page-gallery .site-content {
  display: block !important;
}
.page-template-templates-page-gallery-php .inside-article,
.page-template-page-gallery .inside-article {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}
.page-template-templates-page-gallery-php #primary,
.page-template-page-gallery #primary {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
}
.page-template-templates-page-gallery-php .entry-content,
.page-template-page-gallery .entry-content {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}
.page-template-templates-page-gallery-php #right-sidebar,
.page-template-templates-page-gallery-php #left-sidebar,
.page-template-page-gallery #right-sidebar,
.page-template-page-gallery #left-sidebar {
  display: none !important;
}
