/* ---------------------------------------------------------------------
 * [rc_gallery_index] — the 6-card grid of gallery entry points on the
 * /gallery/ page. Audience-filtered card set/count is decided server-side
 * by the shortcode (see functions.php); this file is layout/visuals only.
 * ------------------------------------------------------------------- */

.rc-gallery-index {
  max-width: 1160px;
  margin: 0 auto;
  padding: 10px 20px 40px;
  font-family: "Work Sans", sans-serif;
}
.rc-gallery-index .rc-gi-intro {
  max-width: 680px;
  margin: 0 0 36px;
  color: #4a4237;
  font-size: 1.05rem;
  line-height: 1.7;
}
.rc-gallery-index .rc-gi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.rc-gallery-index .rc-gi-card {
  position: relative;
  display: block;
  background: #1b1815;
  border: 1px solid #2f2a23;
  text-decoration: none;
  overflow: hidden;
  transition: border-color .3s ease, transform .3s ease;
}
.rc-gallery-index .rc-gi-card:hover {
  border-color: #a8813f;
  transform: translateY(-3px);
}
.rc-gallery-index .rc-gi-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 2px;
  width: 0;
  background: #c79a52;
  transition: width .35s ease;
}
.rc-gallery-index .rc-gi-card:hover::before {
  width: 100%;
}
.rc-gallery-index .rc-gi-eyebrow {
  display: block;
  font-family: "Work Sans", sans-serif;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #a8813f;
  margin-bottom: 14px;
}
.rc-gallery-index .rc-gi-title {
  display: block;
  font-family: "Fraunces", serif;
  font-size: 1.4rem;
  line-height: 1.3;
  color: #e9dfc7;
  margin: 0 0 16px;
  font-weight: 600;
}
.rc-gallery-index .rc-gi-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  color: #e9dfc7;
  opacity: .75;
}
.rc-gallery-index .rc-gi-cta svg {
  width: 14px;
  height: 14px;
  transition: transform .3s ease;
  vertical-align: middle;
}
.rc-gallery-index .rc-gi-card:hover .rc-gi-cta {
  opacity: 1;
  color: #c79a52;
}
.rc-gallery-index .rc-gi-card:hover .rc-gi-cta svg {
  transform: translateX(4px);
}
@media (max-width: 900px) {
  .rc-gallery-index .rc-gi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .rc-gallery-index .rc-gi-grid { grid-template-columns: 1fr; }
  .rc-gallery-index { padding: 10px 16px 32px; }
}

/* --- Real photo leading each card (added with the index-image pass) ------
 * Mirrors services-index.css: card padding moves to .rc-gi-body so the
 * image sits flush to the card edges. Cards with no real imagery get
 * .rc-gi-card--noimg and render text-only, exactly as before.
 * --------------------------------------------------------------------- */
.rc-gallery-index .rc-gi-card {
  padding: 0;
}
.rc-gallery-index .rc-gi-thumb {
  display: block;
  overflow: hidden;
}
.rc-gallery-index .rc-gi-thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  transition: transform .45s ease;
}
.rc-gallery-index .rc-gi-card:hover .rc-gi-thumb img {
  transform: scale(1.04);
}
.rc-gallery-index .rc-gi-body {
  display: block;
  padding: 26px 26px 30px;
}
/* Same baseline-alignment treatment as services-index.css. */
.rc-gallery-index .rc-gi-card {
  display: flex;
  flex-direction: column;
}
.rc-gallery-index .rc-gi-body {
  margin-top: auto;
}
