/* ==========================================================================
   BLOCK HP-7 — On the Table (Where to Find)
   Files: block-hp-7-on-the-table.php | block-hp-7-on-the-table.css
   ========================================================================== */

/* ── Section shell ──────────────────────────────────────────────────────── */
.taula-table {
  background: #ffffff;
  padding: 100px 0 100px;
}

/* ── Inner wrapper (for header — stays within side padding) ── */
.taula-table__inner {
  padding: 0 100px;
}

/* ── Two-column header ──────────────────────────────────────────────────── */
.taula-table__header {
  display: flex;
  align-items: flex-start;
  gap: 48px;
  margin-bottom: 32px;
}

/* Left column: H2 right-justified within its half */
.taula-table__header-left {
  flex: 0 0 auto;
  min-width: 200px;
  text-align: right;
}

.taula-table__headline {
  font-family: var(--font-heading); /* Staatliches */
  font-size: 48px;
  font-weight: 400;
  line-height: 1;
  color: #000;
  margin: 0;
  text-transform: uppercase;
}

/* Right column: intro body copy */
.taula-table__header-right {
  flex: 1;
  padding-top: 6px; /* optical alignment with H2 baseline */
}

.taula-table__intro {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: #000;
  margin: 0;
  max-width: 560px;
}

/* ── Full-width rule ────────────────────────────────────────────────────── */
.taula-table__rule {
  border: none;
  border-top: 1px solid #000;
  margin: 0 0 20px;
}

/* ── Card grid ──────────────────────────────────────────────────────────── */
/*
 * Grid uses 100px side padding matching the inner wrapper.
 * 8 venue cards + 1 CTA = 9 items → perfect 3×3 grid.
 * CTA naturally lands at position 9 (col 3, row 3) — no grid-column needed.
 */
.taula-table__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 0 100px;
}

/* ── Venue card ─────────────────────────────────────────────────────────── */
.taula-table__card {
  display: flex;
  flex-direction: column;
  border: 1px solid #000;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

/* Image wrapper — fills available space */
.taula-table__card-img-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.taula-table__card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}

.taula-table__card:hover .taula-table__card-img {
  transform: scale(1.04);
}

/* Type tag — bottom-right of image */
.taula-table__type-tag {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: #ffffff;
  border: 1px solid #000;
  font-family: var(--font-body); /* H4: Geist */
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #000;
  padding: 4px 8px;
  line-height: 1;
}

/* Business name strip — pinned inside card border at bottom */
.taula-table__card-name {
  flex: 0 0 auto;
  font-family: var(--font-heading); /* Staatliches H3 */
  font-size: 18px;
  font-weight: 400;
  line-height: 1.1;
  color: #000;
  text-transform: uppercase;
  margin: 0;
  padding: 8px 10px;
  border-top: 1px solid #000;
}

/* ── CTA card — naturally falls at position 9 (col 3, row 3) ───────────── */
.taula-table__card--cta {
  background: #ffffff;
  /* border + aspect-ratio inherited from .taula-table__card */
}

/* Override: CTA card has no image */
.taula-table__card--cta .taula-table__card-img-wrap {
  display: none;
}

.taula-table__cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  padding: 28px 24px;
  gap: 20px;
}

.taula-table__cta-title {
  font-family: var(--font-heading); /* Staatliches */
  font-size: 20px;
  font-weight: 400;
  line-height: 1.15;
  color: #000;
  text-transform: uppercase;
  margin: 0;
}

.taula-table__contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  background: #000;
  color: #fff;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid #000;
  border-radius: 2px;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.taula-table__contact-btn:hover {
  background: #fff;
  color: #000;
}

/* ── CSS-driven language switching ─────────────────────────────────────── */
.taula-table__lang {
  display: none;
}

html[data-taula-lang="CA"] .taula-table__lang[data-lang="CA"],
html[data-taula-lang="ES"] .taula-table__lang[data-lang="ES"],
html[data-taula-lang="EN"] .taula-table__lang[data-lang="EN"] {
  display: inline;
}

html:not([data-taula-lang]) .taula-table__lang[data-lang="EN"],
html[data-taula-lang=""] .taula-table__lang[data-lang="EN"] {
  display: inline;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .taula-table__inner,
  .taula-table__grid {
    padding-left: 60px;
    padding-right: 60px;
  }
}

@media (max-width: 900px) {
  .taula-table {
    padding: 80px 0;
  }

  .taula-table__inner,
  .taula-table__grid {
    padding-left: 40px;
    padding-right: 40px;
  }

  .taula-table__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .taula-table__headline {
    font-size: 40px;
  }
}

@media (max-width: 600px) {
  .taula-table__inner,
  .taula-table__grid {
    padding-left: 20px;
    padding-right: 20px;
  }

  .taula-table__header {
    flex-direction: column;
    gap: 16px;
  }

  .taula-table__header-left {
    text-align: left;
  }

  .taula-table__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* CTA: let aspect-ratio loosen on single-column mobile */
  .taula-table__card--cta {
    aspect-ratio: auto;
    min-height: 200px;
  }

  .taula-table__headline {
    font-size: 36px;
  }
}
