/* ─── Academy page overrides ─── */
.academy-page { padding-bottom: 0 !important; }

/* ════════════════════ HERO (photos left + info right) ════════════════════ */
.acad-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  max-width: 1200px;
  margin: 24px auto 0;
  padding: 0 24px;
  align-items: start;
}

/* 2×2 photo grid */
.acad-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  background: var(--gray-light);
}

.photo-cell {
  overflow: hidden;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  display: block;
  touch-action: manipulation;
}

.photo-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
  pointer-events: none;
}
.photo-cell img:hover { transform: scale(1.05); }

/* Hero right column */
.acad-hero-right {
  padding-top: 4px;
}

.acad-title {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--dark);
  margin-bottom: 12px;
}

.acad-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--gray);
  margin-bottom: 16px;
}

.acad-meta-star {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 700;
  color: var(--dark);
}
.acad-meta-star .star { color: var(--coral); }
.acad-meta-dot { opacity: 0.35; }

.acad-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #E8F5E9;
  color: #2E7D32;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
}

.acad-hours-inline {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: var(--gray);
  margin-bottom: 16px;
}
.acad-hours-inline[hidden] { display: none; }
.hours-open { color: #2E7D32; font-weight: 600; }

.acad-divider {
  border: none;
  border-top: 1px solid var(--gray-light);
  margin: 20px 0;
}

/* Info rows (languages, address) */
.acad-info-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--gray);
  line-height: 1.5;
  margin-bottom: 14px;
}
.acad-info-row[hidden] { display: none; }
.acad-info-row svg { flex-shrink: 0; margin-top: 1px; }

.lang-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lang-chip {
  background: var(--bg);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
}

.acad-addr-text { color: var(--gray); }

/* Price row */
.panel-price-row {
  margin-bottom: 16px;
}
.panel-price-label {
  font-size: 12px;
  color: var(--gray);
  margin-bottom: 4px;
}
.panel-price-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--dark);
}

/* Contact toggle button (opens the contact modal) */
.btn-contact-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 20px;
  border-radius: 12px;
  border: none;
  background: var(--coral);
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
}
.btn-contact-toggle:hover { background: var(--coral-dark); }
.btn-contact-toggle:active { transform: translateY(1px); }

/* ════════════════════ CONTACT BUTTONS ════════════════════ */
.btn-contact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 20px;
  border-radius: 12px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  margin-bottom: 10px;
  transition: opacity 0.15s, transform 0.12s;
}
.btn-contact:hover:not(.disabled) { opacity: 0.88; transform: translateY(-1px); }
.btn-contact:active:not(.disabled) { transform: translateY(0); }

.btn-whatsapp  { background: #25D366; color: #fff; }
.btn-line      { background: #06C755; color: #fff; }
.btn-phone     { background: var(--bg); color: var(--dark); border: 1px solid var(--gray-light); }
.btn-website   { background: var(--bg); color: var(--dark); border: 1px solid var(--gray-light); }
.btn-facebook  { background: #1877F2; color: #fff; }

.btn-contact.disabled { opacity: 0.38; cursor: not-allowed; pointer-events: none; }

.panel-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--gray);
  text-align: center;
  line-height: 1.5;
}

/* Icon sizing */
.icon-wa, .icon-line, .icon-phone {
  width: 18px; height: 18px; flex-shrink: 0;
}

/* ════════════════════ BELOW SECTION (description + map) ════════════════════ */
.acad-below {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

.acad-below-inner {
  max-width: 600px; /* constrain to left half width to align under photos */
}

.acad-section { margin-bottom: 8px; }

.acad-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.acad-description {
  font-size: 15px;
  color: var(--dark);
  line-height: 1.75;
}

.acad-map {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--gray-light);
}
.acad-map iframe {
  display: block;
  width: 100%;
  height: 300px;
  border: 0;
}

/* ── Similar listings (static SEO pages only, see prerender.js) — grid
   of cards, Airbnb/Yelp "you might also like" style. ── */
.acad-similar-section {
  /* Now a full-width sibling of .acad-below-inner (not nested inside it —
     that 600px cap was squeezing the grid into the left-column width).
     Generous, clearly-visible separation from the map card above, on
     purpose — not the same subtle rhythm as the rest of the page. */
  margin-top: 3rem;
}

/* Bigger/bolder/brand-colored than the plain .acad-section-title (15px,
   var(--dark)) used elsewhere on this page — a deliberate CTA-style
   exception, not the baseline. Fredoka only on the EN build (no Thai/
   Chinese glyphs) — see prerender.js. */
.acad-similar-heading {
  font-size: 22px;
  font-weight: 800;
  color: var(--coral);
}
.acad-similar-heading-en {
  font-family: 'Fredoka', 'Plus Jakarta Sans', sans-serif;
}

.acad-similar-grid {
  display: grid;
  /* 260px (not 150px) so a full 1152px-wide row (.acad-below's 1200px max
     minus its 24px side padding) lands on 4 columns instead of ~7 too-narrow
     ones — see academy.html's PR:SIMILAR_LISTINGS placement. */
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.acad-similar-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.acad-similar-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.acad-similar-img-wrap {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--gray-light);
}
.acad-similar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.acad-similar-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.acad-similar-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Same colors as the homepage catalog cards' .card-badge.badge-verified /
   .card-rating (assets/style.css) — not reused verbatim because those are
   absolutely positioned as a photo overlay, which doesn't fit "below the
   title" placement here. */
.acad-similar-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  background: #34A853;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
}

.acad-similar-rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 700;
  color: var(--dark);
}
.acad-similar-rating .star { color: var(--coral); }

/* ════════════════════ MOBILE CONTACT BAR ════════════════════ */
.mobile-contact-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--white);
  border-top: 1px solid var(--gray-light);
  box-shadow: 0 -4px 16px rgba(0,0,0,0.10);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  z-index: 200;
  gap: 10px;
}


/* ════════════════════ LIGHTBOX ════════════════════ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.lightbox[hidden] { display: none; }

.lb-toolbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  z-index: 10;
}

.lb-counter {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.lb-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  transition: background 0.15s;
}
.lb-close:hover { background: rgba(255,255,255,0.22); }

.lb-img-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 80px;
  box-sizing: border-box;
}

.lb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 12px;
  display: block;
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  transition: background 0.15s;
  z-index: 10;
}
.lb-nav:hover { background: rgba(255,255,255,0.22); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

/* Make photos clickable */
.photo-cell { cursor: pointer; }

@media (max-width: 640px) {
  .lb-img-wrap { padding: 60px 0; }
  .lb-img { border-radius: 8px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}

/* ════════════════════ RESPONSIVE ════════════════════ */

/* Tablet: stack vertically */
@media (max-width: 900px) {
  .acad-hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .acad-photos {
    aspect-ratio: auto;
    height: 320px;
  }
  .mobile-contact-bar { display: flex; }
  .academy-page { padding-bottom: 90px !important; }
  /* Hide the desktop contact toggle on mobile — the bottom bar has its own */
  #btn-contact-toggle,
  .panel-price-row { display: none; }
}

/* Mobile: 2×2 grid full width, all 4 photos */
@media (max-width: 640px) {
  .acad-hero {
    padding: 0;
    margin-top: 0;
  }
  .acad-photos {
    aspect-ratio: auto;
    height: 320px;
    border-radius: 0;
  }
  .acad-hero-right { padding: 0 16px; }
  .acad-below { padding: 0 16px 80px; }
  .acad-below-inner { max-width: none; }
}
