/* ================================================================
   BENTO GRID SYSTEM — Jardín Ferraris
   Layered on top of existing CSS. IDs and JS hooks never change.
   ================================================================ */

/* ── CORE GRID ──────────────────────────────────────────────── */
.bento-grid {
  display: grid;
  gap: var(--space-4);
}

.bento-grid--2     { grid-template-columns: 1fr 1fr; }
.bento-grid--3     { grid-template-columns: repeat(3, 1fr); }
.bento-grid--hero  { grid-template-columns: 5fr 2fr; min-height: 100vh; }

.bento-grid--feature {
  grid-template-columns: 2fr 1fr 1fr;
}

.bento-grid--stats {
  grid-template-columns: 2fr 1fr 1fr 2fr;
  min-height: 180px;
  align-items: stretch;
}

.bento-grid--about {
  grid-template-columns: 9fr 11fr;
  align-items: stretch;
  gap: var(--space-4);
}

.bento-grid--paquetes {
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
}

.bento-grid--servicios {
  grid-template-columns: repeat(4, 1fr);
}

.bento-grid--testimonios-layout {
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto auto;
}

.bento-grid--gallery {
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 280px;
}

.bento-grid--contact {
  grid-template-columns: 5fr 7fr;
  gap: var(--space-8);
  align-items: start;
}

/* ── BENTO CARD BASE ─────────────────────────────────────────── */
.bento-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* Size modifiers */
.bento-card--wide  { grid-column: span 2; }
.bento-card--tall  { grid-row: span 2; }
.bento-card--large { grid-column: span 2; grid-row: span 2; }

/* ── COLOR VARIANTS ──────────────────────────────────────────── */
.bento-card--light {
  background: white;
  border: 1px solid var(--color-border-light);
}

.bento-card--cream {
  background: var(--color-surface-alt);
}

.bento-card--forest {
  background: var(--color-primary);
  color: white;
}

.bento-card--dark {
  background: var(--color-forest-deep);
  color: white;
}

.bento-card--gold-accent {
  background: white;
  border: 1px solid var(--color-border-light);
  border-left: 3px solid var(--color-gold);
}

.bento-card--image {
  padding: 0;
}

.bento-card--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── TYPOGRAPHY INSIDE CARDS ─────────────────────────────────── */
.bento-card__number {
  font-family: var(--font-heading);
  font-size: var(--font-size-5xl);
  font-weight: 700;
  line-height: 1;
}

.bento-card__label {
  font-family: var(--font-heading);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  opacity: 0.75;
}

.bento-card__title {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 600;
  line-height: 1.2;
}

.bento-card__body {
  font-size: var(--font-size-md);
  line-height: 1.75;
  opacity: 0.85;
}

.bento-card__tag {
  display: inline-block;
  background: rgba(197, 179, 88, 0.15);
  color: var(--color-gold);
  border: 1px solid rgba(197, 179, 88, 0.4);
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--ls-normal);
  align-self: flex-start;
}

/* ── HERO BENTO SPLIT ────────────────────────────────────────── */
/* Sits absolutely inside .hero, splits it into photo | panel */
.hero-bento-split {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 5fr 2fr;
  z-index: 2;
  pointer-events: none;
}

.hero-bento-image-side {
  /* transparent — hero photo shows through */
}

.hero-bento-panel {
  background: var(--color-forest-deep);
  border-left: 1px solid rgba(197, 179, 88, 0.20);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-16) var(--space-8);
  gap: var(--space-6);
  pointer-events: all;
  position: relative;
  overflow: hidden;
}

/* Subtle cross-hatch pattern on the panel */
.hero-bento-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      45deg,
      rgba(197, 179, 88, 0.04) 0px,
      rgba(197, 179, 88, 0.04) 1px,
      transparent 1px,
      transparent 12px
    );
  pointer-events: none;
}

.hero-bento-eyebrow {
  color: var(--color-gold);
  font-family: var(--font-heading);
  font-size: var(--font-size-xs);
  font-variant: small-caps;
  letter-spacing: var(--ls-wider);
  opacity: 0.9;
}

.hero-bento-title {
  color: white;
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  font-weight: 600;
  line-height: 1.2;
}

.hero-bento-divider {
  width: 40px;
  height: 1px;
  background: var(--color-gold);
  opacity: 0.7;
}

.hero-bento-subtitle {
  color: rgba(255, 255, 255, 0.80);
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 300;
  font-size: var(--font-size-sm);
  line-height: 1.65;
}

.hero-bento-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.hero-bento-stats {
  display: flex;
  flex-direction: row;
  gap: var(--space-4);
  border-top: 1px solid rgba(197, 179, 88, 0.20);
  padding-top: var(--space-4);
  margin-top: var(--space-2);
}

.hero-bento-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.hero-bento-stat__value {
  color: var(--color-gold);
  font-family: var(--font-heading);
  font-size: var(--font-size-lg);
  font-weight: 700;
  line-height: 1;
}

.hero-bento-stat__label {
  color: rgba(255, 255, 255, 0.60);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: var(--ls-normal);
}

/* Mobile hero — shown only on small screens */
.hero-content--mobile-only {
  display: none;
}

/* ── PAGE HERO BENTO (páginas internas) ──────────────────────── */
.page-hero-bento {
  min-height: 320px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 72px; /* navbar height */
}

.page-hero-bento__text {
  background: linear-gradient(135deg, var(--color-forest-deep) 0%, var(--color-primary) 100%);
  padding: var(--space-16) var(--space-12);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-4);
  position: relative;
  overflow: hidden;
  color: white;
}

/* Cross-hatch on text side */
.page-hero-bento__text::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      45deg,
      rgba(197, 179, 88, 0.04) 0px,
      rgba(197, 179, 88, 0.04) 1px,
      transparent 1px,
      transparent 12px
    );
  pointer-events: none;
}

.page-hero-bento__text .page-hero-label {
  color: var(--color-gold);
  opacity: 1;
}

.page-hero-bento__text .page-hero-title {
  color: white;
}

.page-hero-bento__text .page-hero-subtitle {
  color: rgba(255, 255, 255, 0.80);
}

.page-hero-bento__image {
  overflow: hidden;
  position: relative;
}

.page-hero-bento__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Green decorative panel variant (when no photo available) */
.page-hero-bento__image--green {
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.page-hero-bento__image--green::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      -45deg,
      rgba(197, 179, 88, 0.05) 0px,
      rgba(197, 179, 88, 0.05) 1px,
      transparent 1px,
      transparent 16px
    );
}

/* Decorative large numbers */
.page-hero-bento__deco-stats {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  align-items: center;
  position: relative;
  z-index: 1;
}

.page-hero-bento__deco-stat {
  text-align: center;
  border-bottom: 1px solid rgba(197, 179, 88, 0.25);
  padding-bottom: var(--space-6);
  width: 100%;
  max-width: 200px;
}

.page-hero-bento__deco-stat:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.page-hero-bento__deco-num {
  color: var(--color-gold);
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1;
  opacity: 0.90;
}

.page-hero-bento__deco-lbl {
  color: rgba(255, 255, 255, 0.65);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  margin-top: var(--space-1);
}

/* ── CSS AUTO-TARGETING (JS-rendered grids) ──────────────────── */

/* Eventos: primer card grande */
#eventos-grid.bento-grid--feature > *:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

/* Paquetes: tarjeta del medio elevada con barra dorada */
.bento-grid--paquetes > *:nth-child(2) {
  transform: translateY(-12px);
  box-shadow: var(--shadow-xl);
  z-index: 1;
  position: relative;
}

.bento-grid--paquetes > *:nth-child(2)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-gold);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Servicios: primeras 2 anchas */
.bento-grid--servicios > .servicio-card:nth-child(1),
.bento-grid--servicios > .servicio-card:nth-child(2) {
  grid-column: span 2;
}

/* Testimonios: primero ancho, segundo alto */
#testimonios-grid.bento-grid--testimonios-layout > *:first-child {
  grid-column: span 2;
}

#testimonios-grid.bento-grid--testimonios-layout > *:nth-child(2) {
  grid-row: span 2;
}

/* Galería: primera imagen grande */
#gallery-grid.bento-grid--gallery > *:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

/* ── STATS BENTO ─────────────────────────────────────────────── */
/* Color each stat card in the bento stats row */
#stats-grid.bento-grid--stats > *:nth-child(1) {
  background: var(--color-primary);
  color: white;
  border: none;
}

#stats-grid.bento-grid--stats > *:nth-child(1) .stat-label {
  color: rgba(255,255,255,0.75);
}

#stats-grid.bento-grid--stats > *:nth-child(2) {
  background: var(--color-surface-alt);
}

#stats-grid.bento-grid--stats > *:nth-child(3) {
  background: white;
  border: 1px solid var(--color-border-light);
  border-left: 3px solid var(--color-gold);
}

#stats-grid.bento-grid--stats > *:nth-child(4) {
  background: var(--color-forest-deep);
  color: white;
  border: none;
}

#stats-grid.bento-grid--stats > *:nth-child(4) .stat-label {
  color: rgba(255,255,255,0.75);
}

/* ── ABOUT BENTO ─────────────────────────────────────────────── */
.bento-about-right {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.bento-about-sub {
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: var(--space-6) var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.bento-about-sub--forest {
  background: var(--color-primary);
  color: white;
  flex: 0 0 auto;
}

.bento-about-sub--light {
  background: white;
  border: 1px solid var(--color-border-light);
  flex: 1;
}

.bento-about-sub--cream {
  background: var(--color-surface-alt);
  flex: 0 0 auto;
}

/* ── CONTACT BENTO ───────────────────────────────────────────── */
.bento-card--contact-info {
  background: var(--color-forest-deep);
  color: white;
  padding: var(--space-10);
  min-height: 560px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.bento-card--contact-info::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      45deg,
      rgba(197, 179, 88, 0.04) 0px,
      rgba(197, 179, 88, 0.04) 1px,
      transparent 1px,
      transparent 12px
    );
  pointer-events: none;
}

.bento-card--contact-info .quote-label,
.bento-card--contact-info .quote-section-title {
  color: white;
  position: relative;
  z-index: 1;
}

.bento-card--contact-info .quote-info-item {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.85);
}

.bento-card--contact-info .quote-info-icon {
  color: var(--color-gold);
}

.bento-card--contact-info a {
  color: var(--color-gold);
}

.bento-card--contact-form {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-8);
}

/* ── HOVER STATES ────────────────────────────────────────────── */
.bento-card--light:hover,
.bento-card--cream:hover,
.bento-card--gold-accent:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
