/* ==========================================================
   Service detail page template (e.g. Dental Implants)
   Shared banner styles live in page.css
   ========================================================== */

.tour-hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Hero ---------- */
.sd-hero { padding-bottom: clamp(110px, 11vw, 150px); }
.sd-hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.sd-hero__grid > div:first-child > *:not(.crumbs) { max-width: 600px; }
.sd-hero__kicker { font-size: .78rem !important; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-soft) !important; margin-bottom: 14px !important; }
.sd-hero__media { position: relative; isolation: isolate; }
.sd-hero__media img {
  width: 100%; height: auto; aspect-ratio: 4 / 3.3; object-fit: cover; object-position: 55% center;
  border-radius: 8px; box-shadow: 0 40px 80px -30px rgba(0,0,0,.65);
}
.sd-hero__media::before {
  content: ""; position: absolute; inset: -14px 14px 14px -14px; z-index: -1;
  border: 1px solid rgba(217, 207, 189, .35); border-radius: 8px;
}
.sd-hero__badge {
  position: absolute; left: -26px; bottom: 30px;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px 12px 12px; border-radius: 8px;
  background: var(--white); color: var(--ink); box-shadow: 0 24px 50px -18px rgba(0,0,0,.5);
}
.sd-hero__badge strong { display: block; font-size: .92rem; }
.sd-hero__badge small { display: block; font-size: .76rem; color: var(--muted); }

/* ---------- Quick facts (floating cards over the hero edge) ---------- */
.facts { position: relative; z-index: 2; margin-top: -70px; }
.facts__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.fact {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 16px;
  padding: 24px 22px; border-radius: 8px;
  background: var(--white); border: 1px solid var(--line);
  box-shadow: 0 22px 44px -26px rgba(20, 30, 24, .45);
  transition: transform .35s var(--ease), box-shadow .35s, border-color .35s;
}
/* gold accent line that draws in on hover */
.fact::before {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%;
  background: linear-gradient(90deg, #a39783, #d9cfbd);
  transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease);
}
.fact:hover { transform: translateY(-5px); border-color: var(--gold-soft); box-shadow: 0 28px 50px -24px rgba(20, 30, 24, .5); }
.fact:hover::before { transform: scaleX(1); }
.fact > span {
  display: grid; place-items: center; flex-shrink: 0; width: 54px; height: 54px; border-radius: 6px;
  background: linear-gradient(150deg, var(--teal-700), var(--teal-900)); color: var(--gold-soft);
  box-shadow: 0 10px 20px -10px rgba(20, 30, 24, .6);
  transition: background .35s, color .35s;
}
.fact:hover > span { background: linear-gradient(135deg, #cfc3a9, #a39783); color: var(--teal-900); }
.fact svg { width: 23px; height: 23px; }
.fact strong { display: block; font-family: var(--serif); font-size: 1.32rem; font-weight: 700; line-height: 1.15; color: var(--ink); margin-bottom: 3px; }
.fact small { display: block; font-size: .8rem; color: var(--muted); line-height: 1.4; }

/* ---------- Layout ---------- */
.sd__grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(40px, 5vw, 72px); align-items: start; }
.sd__block + .sd__block, .korea + .sd__block, .sd__block + .korea { margin-top: clamp(56px, 6vw, 80px); }
.sd__body h2 { font-size: clamp(2rem, 3.4vw, 2.8rem); margin-bottom: 18px; }
.sd__body > .sd__block > p { color: var(--muted); font-size: 1.05rem; }
.sd__h3 { font-family: var(--serif); font-size: 1.9rem; margin-bottom: 22px; }

.sd__figure { margin: 30px 0; border-radius: 8px; overflow: hidden; background: var(--white); border: 1px solid var(--line); }
.sd__figure img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.sd__figure figcaption { display: flex; flex-wrap: wrap; gap: 10px 26px; padding: 16px 22px; font-size: .88rem; font-weight: 600; color: var(--ink); }
.sd__figure figcaption span { display: inline-flex; align-items: center; gap: 9px; }
.sd__figure figcaption b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 4px; background: var(--teal-800); color: var(--gold-soft); font-size: .75rem; }

.expect { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.expect li { display: flex; gap: 16px; padding: 22px; border-radius: 8px; background: var(--white); border: 1px solid var(--line); transition: border-color .25s, transform .3s var(--ease); }
.expect li:hover { border-color: var(--teal-100); transform: translateY(-3px); }
.expect li > span { font-family: var(--serif); font-style: italic; font-size: 1.6rem; font-weight: 600; line-height: 1; color: var(--gold); }
.expect strong { display: block; margin-bottom: 4px; }
.expect p { margin: 0; font-size: .9rem; color: var(--muted); line-height: 1.55; }

.benefits { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 26px; }
.benefit { padding: 26px 24px; border-radius: 8px; background: var(--sand); }
.benefit > span { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 6px; background: var(--teal-800); color: var(--gold-soft); margin-bottom: 16px; }
.benefit svg { width: 21px; height: 21px; }
.benefit strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.benefit p { margin: 0; font-size: .9rem; color: var(--muted); }

/* Korea training callout */
.korea {
  display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: center;
  padding: 26px; border-radius: 8px; color: #fff;
  background:
    radial-gradient(400px 260px at 100% 0%, rgba(207, 195, 169, .22), transparent 70%),
    linear-gradient(150deg, var(--teal-700), var(--teal-900));
}
.korea img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; object-position: 41% 20%; border-radius: 6px; }
.korea h3 { font-family: var(--serif); font-size: 1.8rem; margin-bottom: 10px; }
.korea p:not(.eyebrow) { color: #c5cec7; margin-bottom: 16px; }
.korea .eyebrow { margin-bottom: 12px; }


/* ---------- Sidebar ---------- */
.sd__side { position: sticky; top: 100px; display: grid; gap: 18px; }
.side-book {
  padding: 28px 26px; border-radius: 8px; color: #fff;
  background:
    radial-gradient(260px 200px at 100% 0%, rgba(207, 195, 169, .25), transparent 70%),
    linear-gradient(160deg, var(--teal-700), var(--teal-900));
}
.side-book .eyebrow { margin-bottom: 12px; }
.side-book h3 { font-family: var(--serif); font-size: 1.6rem; line-height: 1.2; margin-bottom: 22px; }
.side-book .btn { width: 100%; }
.side-book__phone { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 14px; font-weight: 800; font-size: 1.15rem; color: #fff; }
.side-book__phone svg { width: 18px; height: 18px; color: var(--gold-soft); }
.side-book__hours { margin: 20px 0 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14); display: grid; gap: 8px; font-size: .86rem; }
.side-book__hours div { display: flex; justify-content: space-between; gap: 10px; }
.side-book__hours dt { color: #c2ccc4; }
.side-book__hours dd { margin: 0; font-weight: 600; }

.side-nav { padding: 22px; border-radius: 8px; background: var(--white); border: 1px solid var(--line); }
.side-nav h4 { font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: 10px; padding: 0 12px; }
.side-nav a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 12px; border-radius: 4px; font-size: .93rem; font-weight: 600; color: var(--ink);
  transition: background .2s, color .2s;
}
.side-nav a svg { width: 15px; height: 15px; color: var(--gold); opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .25s var(--ease); }
.side-nav a:hover { background: var(--teal-50); color: var(--teal-700); }
.side-nav a:hover svg, .side-nav a.is-current svg { opacity: 1; transform: none; }
.side-nav a.is-current { background: var(--teal-800); color: #fff; }
.side-nav a.is-current svg { color: var(--gold-soft); }
.side-nav__all { margin-top: 6px; border-top: 1px solid var(--line); border-radius: 0 !important; padding-top: 14px !important; color: var(--teal-700) !important; }
.side-nav__all svg { opacity: 1 !important; transform: none !important; }

.side-emergency {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 8px;
  background: var(--sand); border: 1px solid var(--sand-200); transition: background .2s;
}
.side-emergency:hover { background: var(--sand-200); }
.side-emergency__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 6px; background: var(--gold); color: #fff; }
.side-emergency__icon svg { width: 20px; height: 20px; }
.side-emergency strong { display: block; }
.side-emergency small { display: block; font-size: .82rem; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .sd__grid { grid-template-columns: 1fr; }
  .sd__side { position: static; grid-template-columns: 1fr 1fr; }
  .side-emergency { grid-column: 1 / -1; }
  .facts__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .sd-hero__grid { grid-template-columns: 1fr; }
  .sd-hero__media { max-width: 560px; }
  .sd-hero__badge { left: 12px; }
}
@media (max-width: 640px) {
  .tour-hero__ctas .btn { flex: 1 1 100%; }
  .facts__grid { grid-template-columns: 1fr 1fr; }
  .facts__grid { gap: 10px; }
  .fact { flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px 16px; }
  .fact > span { width: 44px; height: 44px; }
  .fact strong { font-size: 1.12rem; }
  .fact small { font-size: .76rem; }
  .sd-hero__media::before { display: none; }
  .expect, .benefits { grid-template-columns: 1fr; }
  .korea { grid-template-columns: 1fr; }
  .korea img { max-width: 160px; }
  .sd__side { grid-template-columns: 1fr; }
  .faq summary { padding: 18px; font-size: .96rem; }
  .faq details p { padding: 0 18px 18px; }
}

/* ---------- Generated service pages ---------- */
.sd__block > p { color: var(--muted); font-size: 1.05rem; }
.sd__block .benefits + p, .sd__block .ticks + p { margin-top: 22px; }
.sd__block .benefits { margin-bottom: 8px; }

.ticks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 22px 0; }
.ticks li {
  position: relative; padding: 14px 16px 14px 46px; border-radius: 6px;
  background: var(--white); border: 1px solid var(--line);
  font-size: .94rem; line-height: 1.5; color: var(--ink);
}
.ticks li::before {
  content: ""; position: absolute; left: 14px; top: 15px; width: 20px; height: 20px; border-radius: 4px;
  background: var(--teal-800) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ecd49c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.ticks li strong { color: var(--teal-900); }

.sd__body .korea { margin-top: clamp(56px, 6vw, 80px); }
.sd__body .korea + .sd__block { margin-top: clamp(56px, 6vw, 80px); }

/* Related treatments */
.related { background: var(--sand); }
.rel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.rel-card {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 8px; background: var(--white);
  transition: transform .35s var(--ease), box-shadow .35s;
}
.rel-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.rel-card__img { display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.rel-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.rel-card:hover .rel-card__img img { transform: scale(1.06); }
.rel-card__body { display: grid; gap: 4px; padding: 22px 24px 24px; }
.rel-card__body small { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); }
.rel-card__body strong { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; line-height: 1.15; color: var(--ink); margin-bottom: 8px; }

@media (max-width: 960px) {
  .rel-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .ticks { grid-template-columns: 1fr; }
  .rel-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .sd-hero .hero-title + p { font-size: .98rem; line-height: 1.65; }
}

/* Highlighted intro (a single sub-heading with a long paragraph) */
.sd__lead {
  margin: 22px 0; padding: 26px 28px 24px; border-radius: 8px;
  background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--gold);
}
.sd__lead h3 { font-family: var(--serif); font-size: 1.55rem; font-weight: 700; line-height: 1.2; color: var(--teal-900); margin-bottom: 10px; }
.sd__lead p { margin: 0; color: var(--muted); font-size: 1.02rem; }

/* Benefit cards: stronger typography and hover */
.benefit {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: start;
  padding: 24px 24px 24px 22px; background: var(--white); border: 1px solid var(--line);
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.benefit::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, #cfc3a9, #a39783); transform: scaleY(0); transform-origin: top; transition: transform .4s var(--ease); }
.benefit:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); border-color: var(--gold-soft); }
.benefit:hover::after { transform: scaleY(1); }
.benefit > span { grid-row: span 2; margin-bottom: 0; width: 50px; height: 50px; }
.benefit strong { font-family: var(--serif); font-size: 1.32rem; font-weight: 700; line-height: 1.2; color: var(--teal-900); margin: 2px 0 6px; }
.benefit p { font-size: .92rem; line-height: 1.55; }
@media (max-width: 640px) {
  .benefit { padding: 20px 18px; }
  .benefit > span { width: 44px; height: 44px; }
}

/* ---------- Same-day emergency panel (inside the article) ---------- */
.em-panel {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start;
  margin-top: clamp(56px, 6vw, 80px); padding: 30px 30px 30px 28px; border-radius: 8px; color: #fff;
  background:
    radial-gradient(420px 260px at 100% 0%, rgba(207, 195, 169, .22), transparent 70%),
    linear-gradient(150deg, var(--teal-700), var(--teal-900));
}
.em-panel::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, #cfc3a9, #a39783); }
.em-panel__icon {
  position: relative; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 8px;
  background: rgba(207, 195, 169, .16); color: var(--gold-soft);
}
.em-panel__icon svg { width: 30px; height: 30px; }
.em-panel__icon::after {
  content: ""; position: absolute; right: -4px; top: -4px; width: 14px; height: 14px; border-radius: 50%;
  background: #e5484d; box-shadow: 0 0 0 3px var(--teal-800); animation: emPulse 2s infinite;
}
@keyframes emPulse { 0% { box-shadow: 0 0 0 3px var(--teal-800), 0 0 0 3px rgba(229, 72, 77, .55); } 70% { box-shadow: 0 0 0 3px var(--teal-800), 0 0 0 13px rgba(229, 72, 77, 0); } 100% { box-shadow: 0 0 0 3px var(--teal-800), 0 0 0 3px rgba(229, 72, 77, 0); } }
.em-panel .eyebrow { margin-bottom: 10px; }
.em-panel h3 { font-family: var(--serif); font-size: clamp(1.6rem, 2.6vw, 2rem); font-weight: 700; line-height: 1.15; margin-bottom: 10px; }
.em-panel h3 em { color: var(--gold-soft); }
.em-panel__body > p:not(.eyebrow) { color: #c5cec7; margin-bottom: 14px; }
.em-panel__list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.em-panel__list li {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 4px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  font-size: .84rem; font-weight: 600;
}
.em-panel__list li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.em-panel__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.sd__body .em-panel + .sd__block { margin-top: clamp(56px, 6vw, 80px); }
@media (max-width: 640px) {
  .em-panel { grid-template-columns: 1fr; padding: 24px 20px; }
  .em-panel__icon { width: 54px; height: 54px; }
  .em-panel__ctas .btn { width: 100%; }
}

/* Booking banner placed inside the article */
.sd__body .cta__box--inline { margin-top: clamp(56px, 6vw, 80px); padding: clamp(44px, 6vw, 64px) clamp(20px, 4vw, 48px); border-radius: 28px; }
.sd__body .cta__box--inline h2 { font-size: clamp(2rem, 3.6vw, 2.8rem); margin-bottom: 14px; }
.sd__body .cta__box--inline > p:not(.eyebrow) { color: #cad2cc; }
.sd__body .cta__box--inline + .sd__block { margin-top: clamp(56px, 6vw, 80px); }

/* Service-area line at the end of each service article */
.sd__area {
  display: flex; align-items: center; gap: 12px; margin-top: clamp(40px, 5vw, 56px);
  padding: 16px 20px; border-radius: 8px; background: var(--white); border: 1px solid var(--line);
  font-size: .95rem; font-weight: 600; color: var(--teal-900);
}
.sd__area svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--gold); }

/* Category pages: treatment cards inside the article column */
.rel-grid--hub { grid-template-columns: repeat(2, 1fr); margin-top: 22px; }
@media (max-width: 560px) { .rel-grid--hub { grid-template-columns: 1fr; } }
.side-nav h4 a { color: inherit; }

/* "From our blog" links on treatment pages */
.reads { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.reads a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); font-weight: 700; color: var(--teal-800); transition: border-color .2s, transform .2s var(--ease); }
.reads a::after { content: "→"; color: var(--gold); font-size: 1.2rem; }
.reads a:hover { border-color: var(--gold); transform: translateX(3px); }
