/* ===================================================================
   photo-gallery-v1.css
   Scoped styles for the "Hawaii Through Our Lens" galleries:
     /photos                       (hub)
     /maui/photos
     /kauai/photos
     /big-island/photos
   All classes prefixed .hg-pg- to avoid bleed.
   Pure CSS Grid + flexbox. No Foundation grid usage.
   =================================================================== */

/* Page-level breathing room. The default layout's <section class="content">
   stretches edge-to-edge under sidebar:false, which made the intro + tiles
   feel cramped against the viewport sides. Wrap the gallery surface in a
   max-width container with proper horizontal padding. Mobile-first. */
body.photos-hub-page section.content,
body.photos-page section.content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 18px 40px;
  box-sizing: border-box;
}
@media (min-width: 760px) {
  body.photos-hub-page section.content,
  body.photos-page section.content {
    padding: 36px 32px 56px;
  }
}
@media (min-width: 1100px) {
  body.photos-hub-page section.content,
  body.photos-page section.content {
    padding: 44px 40px 64px;
  }
}

/* Back-to-hub pill — small breadcrumb-style link at the top of each
   per-island gallery, returning the reader to /photos. */
.hg-pg-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 18px;
  padding: 6px 14px 6px 12px;
  background: #f5f7fa;
  border: 1px solid #e0e6ec;
  border-radius: 18px;
  color: #0E3B7E;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.hg-pg-back:hover,
.hg-pg-back:focus {
  background: #0E3B7E;
  color: #fff;
  border-color: #0E3B7E;
  text-decoration: none;
}
.hg-pg-back .hg-pg-back-arrow {
  font-size: 16px;
  line-height: 1;
}

.hg-pg-intro {
  max-width: 720px;
  margin: 0 auto 30px;
  font-size: 18px;
  line-height: 1.6;
  color: #333;
}
.hg-pg-intro p { margin: 0 0 14px; }
.hg-pg-intro p:last-child { margin-bottom: 0; }

.hg-pg-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 14px;
  color: #666;
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid #eee;
}
.hg-pg-meta-row span i {
  margin-right: 6px;
  color: #888;
}

/* Section heading — separates a long gallery into thematic groupings */
.hg-pg-section {
  font-size: 22px;
  font-weight: 700;
  color: #0E3B7E;
  letter-spacing: 0.3px;
  margin: 38px 0 6px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e6ecf3;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.hg-pg-section .hg-pg-section-meta {
  font-size: 14px;
  font-weight: 500;
  color: #888;
  letter-spacing: 0.2px;
}
@media (min-width: 760px) {
  .hg-pg-section { font-size: 24px; }
}
.hg-pg-section:first-of-type { margin-top: 28px; }

/* Gallery grid — masonry-flavored, equal-width tracks */
.hg-pg-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin: 30px 0 40px;
}
@media (min-width: 640px) {
  .hg-pg-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
}
@media (min-width: 980px) {
  .hg-pg-grid { grid-template-columns: 1fr 1fr 1fr; gap: 22px; }
}

.hg-pg-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  text-decoration: none;
  color: inherit;
}
.hg-pg-card:hover,
.hg-pg-card:focus {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.10);
  text-decoration: none;
  color: inherit;
}

.hg-pg-card .hg-pg-img-wrap {
  display: block;
  background: #f5f5f5;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.hg-pg-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.hg-pg-card:hover img { transform: scale(1.03); }

.hg-pg-card figcaption {
  padding: 14px 16px 16px;
  font-size: 16px;
  line-height: 1.45;
  color: #222;
}
.hg-pg-card figcaption .hg-pg-loc {
  display: block;
  font-weight: 600;
  font-size: 17px;
  color: #0E3B7E;
  margin-bottom: 4px;
}
.hg-pg-card figcaption .hg-pg-take {
  display: block;
  color: #555;
  font-size: 15px;
}
.hg-pg-card figcaption .hg-pg-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #0E3B7E;
}

/* Pinterest CTA strip */
.hg-pg-pin-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  margin: 36px 0 28px;
  background: linear-gradient(135deg, #fff 0%, #fff5f5 100%);
  border: 1px solid #f3d0d0;
  border-radius: 14px;
}
.hg-pg-pin-cta .hg-pg-pin-icon {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #E60023;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  font-family: Georgia, serif;
  line-height: 1;
}
.hg-pg-pin-cta .hg-pg-pin-text {
  flex: 1 1 280px;
  font-size: 17px;
  line-height: 1.5;
  color: #222;
}
.hg-pg-pin-cta .hg-pg-pin-text strong { color: #E60023; }
.hg-pg-pin-cta .hg-pg-pin-btn {
  flex: 0 0 auto;
  display: inline-block;
  padding: 12px 22px;
  background: #E60023;
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  border-radius: 28px;
  transition: background 0.15s ease, transform 0.15s ease;
}
.hg-pg-pin-cta .hg-pg-pin-btn:hover {
  background: #b50019;
  transform: translateY(-1px);
  text-decoration: none;
  color: #fff !important;
}

/* Hub page: 3 large island tiles */
.hg-pg-island-tiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  margin: 28px 0 36px;
}
@media (min-width: 760px) {
  .hg-pg-island-tiles { grid-template-columns: 1fr 1fr 1fr; }
}
.hg-pg-island-tile {
  display: block;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #222;
  aspect-ratio: 4 / 5;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.hg-pg-island-tile:hover,
.hg-pg-island-tile:focus {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(0,0,0,0.18);
  text-decoration: none;
}
.hg-pg-island-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: transform 0.45s ease, opacity 0.25s ease;
}
.hg-pg-island-tile:hover img { transform: scale(1.04); opacity: 1; }
.hg-pg-island-tile-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 60px 18px 18px;
  background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
  color: #fff;
}
.hg-pg-island-tile-overlay .hg-pg-island-name {
  display: block;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}
.hg-pg-island-tile-overlay .hg-pg-island-meta {
  display: block;
  font-size: 14px;
  opacity: 0.9;
}

/* Oahu placeholder card on hub */
.hg-pg-oahu-soon {
  margin: 24px 0 36px;
  padding: 20px 22px;
  background: #fafafa;
  border: 1px dashed #ccc;
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.55;
  color: #555;
}
.hg-pg-oahu-soon strong { color: #222; }

/* "More from this island" footer link row */
.hg-pg-more-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 30px 0 10px;
  padding-top: 22px;
  border-top: 1px solid #eee;
  font-size: 16px;
}
.hg-pg-more-row a {
  display: inline-block;
  padding: 8px 14px;
  background: #f5f7fa;
  border: 1px solid #e0e6ec;
  border-radius: 18px;
  color: #0E3B7E;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}
.hg-pg-more-row a:hover {
  background: #0E3B7E;
  color: #fff;
  text-decoration: none;
  border-color: #0E3B7E;
}

/* Print + reduced motion hygiene */
@media (prefers-reduced-motion: reduce) {
  .hg-pg-card, .hg-pg-card img,
  .hg-pg-island-tile, .hg-pg-island-tile img,
  .hg-pg-pin-cta .hg-pg-pin-btn {
    transition: none !important;
    transform: none !important;
  }
}
@media print {
  .hg-pg-pin-cta, .hg-pg-more-row { display: none !important; }
  .hg-pg-grid { grid-template-columns: 1fr 1fr !important; }
  .hg-pg-card { box-shadow: none; border-color: #ccc; }
}
