/* =====================================================
   D.M. Sebastiaans — Inspiratie page styles
   ===================================================== */

/* ----- PAGE HERO ----- */
.insp-hero {
  background: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)),
              url('images/inspiration_banner.jpg') center/cover no-repeat;
  padding: 5rem 2rem 4rem;
  text-align: center;
}

.insp-hero-inner {
  max-width: 680px;
  margin: 0 auto;
}

.insp-hero-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0.75rem;
}

.insp-hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 1.2rem;
}

.insp-hero-sub {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
  font-style: italic;
  font-family: var(--font-head);
}

/* ----- COUNTRY TABS ----- */
.country-tabs-wrap {
  position: sticky;
  top: var(--header-h);
  z-index: 50;
  background: #fff;
  border-bottom: 2px solid var(--warm-sand);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.country-tabs-wrap::-webkit-scrollbar {
  display: none;
}

.country-tabs {
  display: flex;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  gap: 0;
}

.ctab {
  display: inline-block;
  padding: 1rem 1.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color var(--transition), border-color var(--transition);
  cursor: pointer;
}

.ctab:hover {
  color: var(--blue);
}

.ctab.ctab--active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

/* ----- GALLERY MAIN ----- */
.gallery-main {
  background: var(--cream);
  padding-bottom: 5rem;
}

/* ----- COUNTRY SECTION ----- */
.country-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 2rem 3rem;
  border-bottom: 1px solid var(--warm-sand);
}

.country-section:last-child {
  border-bottom: none;
}

.country-header {
  margin-bottom: 2.5rem;
}

.country-name {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.6rem;
}

.country-intro {
  font-size: 1rem;
  color: var(--mid);
  max-width: 620px;
  font-style: italic;
  font-family: var(--font-head);
  line-height: 1.65;
}

/* ----- PHOTO GRID (masonry-style) ----- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  grid-auto-rows: 230px;
  gap: 1rem;
}

/* ----- PHOTO CARD ----- */
.photo-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
}

.photo-card.portrait {
  grid-row: span 2; /* = 460px + gap */
}

/* The actual image (or placeholder) */
.photo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.photo-placeholder-img {
  /* used when no real image is present */
}

.photo-card:hover .photo-img {
  transform: scale(1.04);
}

/* ----- HOVER OVERLAY ----- */
.photo-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.4rem 1.3rem 1.2rem;

  /* gradient: transparent top → dark bottom */
  background: linear-gradient(
    to top,
    rgba(30, 25, 20, 0.93) 0%,
    rgba(30, 25, 20, 0.55) 50%,
    rgba(30, 25, 20, 0.0)  100%
  );

  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.photo-card:hover .photo-overlay {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile: always show a slim caption bar */
@media (hover: none) {
  .photo-overlay {
    opacity: 1;
    transform: none;
    background: linear-gradient(
      to top,
      rgba(30, 25, 20, 0.85) 0%,
      rgba(30, 25, 20, 0.3)  40%,
      transparent 70%
    );
  }

  .overlay-story,
  .overlay-book {
    display: none; /* hide long text on touch; shown in lightbox instead */
  }
}

/* Overlay content */
.overlay-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.overlay-location {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sky);
}

.overlay-year {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.55);
  flex-shrink: 0;
}

.overlay-story {
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.55;
  margin-bottom: 0.85rem;
  /* clamp long stories */
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.overlay-book {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--sky);
  transition: color var(--transition);
}

.overlay-book:hover {
  color: #fff;
}

.overlay-book em {
  font-style: italic;
}

/* ----- LIGHTBOX ----- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(20, 16, 12, 0.93);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-inner {
  position: relative;
  max-width: 860px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 0;
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 90vh;
}

.lightbox-img-wrap {
  background: #000;
  min-height: 300px;
  max-height: 90vh;
}

.lightbox-img-wrap img,
.lightbox-img-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lightbox-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.1em;
}

.lightbox-info {
  background: var(--dark);
  color: #fff;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.lightbox-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 1.4rem;
}

.lightbox-location {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sky);
}

.lightbox-year {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.1em;
}

.lightbox-story {
  font-family: var(--font-head);
  font-size: 1rem;
  font-style: italic;
  line-height: 1.65;
  color: rgba(255,255,255,0.88);
  margin-bottom: 1.8rem;
  flex: 1;
}

.lightbox-book {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--sky);
  transition: color var(--transition);
}

.lightbox-book:hover {
  color: #fff;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  z-index: 1;
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.25);
}

/* Lightbox responsive */
@media (max-width: 680px) {
  .lightbox-inner {
    grid-template-columns: 1fr;
    grid-template-rows: 240px 1fr;
    max-height: 85vh;
    overflow-y: auto;
  }

  .lightbox-img-wrap {
    min-height: 240px;
    max-height: 240px;
  }
}

/* ----- RESPONSIVE GRID ----- */
@media (max-width: 760px) {
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
  }
}

@media (max-width: 480px) {
  .photo-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
  }

  .photo-card.portrait {
    grid-row: span 2;
  }

  .country-section {
    padding: 3rem 1.25rem 2.5rem;
  }
}
