/* ════════════════════════════════════════════════════
   GALLERY NODE — gallery-node.css
   ════════════════════════════════════════════════════ */
/* Hide the page title block specifically on gallery node pages */
body:has(article.gallery-node) #block-synnfulgirls-page-title {
  display: none;
}

/* ── WRAPPER ── */
.gallery-node {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 0 3rem;
  font-family: 'Inter', sans-serif;
  color: #1a1a1a;
}

/* ── GALLERY CONTAINER ── */
#gallery-container {
  max-width: 1280px;
  margin: 0 auto;
}

/* ── GALLERY GRID ── */
.gallery-grid {
  display: block !important;
  padding: 20px 0;
  align-items: start;
  margin-bottom: 2.5rem;
}

.gallery-grid > div {
  width: 100%;
  break-inside: avoid;
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.gallery-grid > div > div {
  width: 100%;
}

.gallery-grid a.glightbox {
  display: block;
  width: 100%;
  height: 300px;
  overflow: hidden;
  border-radius: 12px;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.gallery-grid a.glightbox:hover img {
  transform: scale(1.1);
}

/* ── INFO PANEL ── */
.gallery-info {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  border-top: 1px solid #e5e5e5;
}

/* ── TITLE ── */
.gallery-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.2;
}

/* ── DESCRIPTION ── */
.gallery-description {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #444;
  max-width: 72ch;
}

/* ── FEATURED GIRL LINK ── */
.gallery-girl .meta-value a {
  color: #1a1a1a;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid #e91e8c;
  padding-bottom: 1px;
  transition: color 0.2s;
}

.gallery-girl .meta-value a:hover {
  color: #e91e8c;
}

/* ════════════════════════════════════════════════════
   TAXONOMY BLOCK
   ════════════════════════════════════════════════════ */

.gallery-taxonomy {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  padding: 1.25rem 0;
  border-top: 1px solid #f0f0f0;
}

/* ── EACH META ITEM ── */
.gallery-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Style and Tags take full width so terms stack/wrap on their own line */
.gallery-meta-item:has(.meta-tags) {
  width: 100%;
}

.meta-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #999;
}

/* ── SINGLE VALUE FIELDS ── */
/* Target the div > a pattern Drupal outputs inside meta-value */
.meta-value {
  font-size: 0.9rem;
  font-weight: 500;
}

.meta-value div {
  display: inline;
}

.meta-value a {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: #f7f7f8;
  border: 1px solid #e8e8e8;
  font-size: 0.78rem;
  font-weight: 500;
  color: #333;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.meta-value a:visited {
  color: #333;
}

.meta-value a:hover {
  background: #1a1a1a;
  color: #fff;
}

/* ── MULTI VALUE FIELDS (Style, Tags) ── */
.meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.65rem 0.75rem;
  background: #f7f7f8;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  width: 100%;
  box-sizing: border-box;
}

/* Drupal's outer wrapper div inside meta-tags */
.meta-tags > div {
  display: contents; /* flattens it so children flow directly into flex */
}

/* Each term wrapper div */
.meta-tags > div > div {
  display: inline-block;
}

/* Hide the rogue field label Drupal injects (e.g. "Tags") */
.meta-tags > div > div:first-child:not(:has(a)) {
  display: none;
}

/* The actual links */
.meta-tags a {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #ddd;
  font-size: 0.78rem;
  font-weight: 500;
  color: #333;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.meta-tags a:visited {
  color: #333;
}

.meta-tags a:hover {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}

/* ════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-grid a.glightbox {
    height: 250px;
  }
}

@media (max-width: 600px) {
  .gallery-grid > div {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1px;
  }

  .gallery-title {
    font-size: 1.35rem;
  }

  .gallery-taxonomy {
    gap: 0.75rem 1.25rem;
  }

  .gallery-info {
    padding: 1.25rem 0.75rem 0;
  }

  .meta-tags {
    padding: 0.5rem;
  }
}