/* =========================================================================
   Components: top bar, header, hero, sections, cards, carousel, FAQ, footer
   ========================================================================= */

/* ---------- top bar ---------- */
.topbar { background: var(--blue); color: var(--white); min-height: var(--topbar-h); display: flex; align-items: center; position: relative; z-index: 30; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 12px; }
.topbar__address { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 500; text-decoration: none; }
.topbar__address .icon { width: 18px; height: 20px; flex: none; }
.topbar__address:hover span { text-decoration: underline; }
.topbar__actions { display: flex; gap: 16px; }

/* ---------- header / nav ---------- */
.site-header { position: relative; z-index: 20; background: var(--white); border-bottom: 1px solid var(--card-border); }
.header__inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 24px; }
.brand { display: block; flex: none; line-height: 0; }
.brand img { width: 232px; height: auto; }

.primary-nav__list { display: flex; align-items: center; gap: 40px; }
.primary-nav__item { position: relative; display: flex; align-items: center; }
.primary-nav__link {
    display: block; padding: 6px 0; font-size: 18px; font-weight: 400; color: var(--ink); text-decoration: none;
    border-bottom: 2px solid transparent; transition: color .2s ease, border-color .2s ease;
}
.primary-nav__link:hover { color: var(--blue); }
.primary-nav__link.is-active { border-bottom-color: var(--blue); }

.subnav-toggle { display: none; }
.subnav {
    position: absolute; top: 100%; left: -16px; min-width: 320px; padding: 10px 0;
    background: var(--white); border-radius: var(--radius-sm); box-shadow: 0 14px 34px rgba(17, 17, 17, .14);
    opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.has-children:hover > .subnav, .has-children:focus-within > .subnav { opacity: 1; visibility: visible; transform: none; }
.subnav a { display: block; padding: 10px 22px; font-size: 16px; text-decoration: none; }
.subnav a:hover { background: var(--tint); color: var(--blue); }

.nav-toggle { display: none; }

/* Home: header floats over the hero photo */
.page-home .site-header { position: absolute; left: 0; right: 0; top: var(--topbar-h); background: transparent; border-bottom: 0; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 833px; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; background: #dfe5f2; isolation: isolate; }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(226, 232, 245, .72), rgba(226, 232, 245, .62)); }
.hero__inner { padding-top: 150px; padding-bottom: 70px; }
.hero__title { display: flex; flex-direction: column; font-size: 60px; line-height: 72px; font-weight: 700; }
.hero__eyebrow { color: var(--ink); }
.hero__name { color: var(--blue); }
.hero__subtitle { margin: 36px 0 0; font-size: 28px; line-height: 1.3; font-weight: 500; color: var(--ink); }

.hero__features {
    display: grid; grid-template-columns: repeat(3, 1fr); width: min(700px, 100%);
    margin: 44px auto 0; padding: 18px 0;
    background: rgba(255, 255, 255, .45); border-radius: 20px;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.hero__features li { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 14px; font-size: 18px; font-weight: 500; line-height: 1.25; color: var(--ink); }
.hero__features li + li { border-left: 3px solid var(--blue); }
.hero__features .icon { height: 62px; width: auto; max-width: 66px; }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; margin-top: 46px; }

/* ---------- split layouts ---------- */
.split { display: grid; gap: 87px; align-items: start; }
.split--intro { grid-template-columns: 710px 1fr; }
.split--why { grid-template-columns: 620px 1fr; gap: 80px; align-items: center; }
.split--doctor { grid-template-columns: 1fr 420px; gap: 80px; align-items: center; }
.split__text > p, .split__text .lead { font-size: 18px; line-height: 27px; }
.split__text .section-title { margin-bottom: 44px; }
.split--doctor .section-title, .split--why .section-title { margin-bottom: 30px; }
.split__text strong { font-weight: 600; color: var(--ink); }
.role { margin-bottom: 16px; }

.split__media { margin: 0; overflow: hidden; border-radius: var(--radius-lg); background: var(--tint); }
.split__media img { width: 100%; height: 100%; object-fit: cover; }
.media-portrait { aspect-ratio: 523 / 636; }
.media-landscape { aspect-ratio: 620 / 571; }
.media-doctor { aspect-ratio: 2 / 3; }

/* ---------- testimonials ---------- */
.testimonials .section-sub { margin-bottom: 56px; }
.review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.review-card { margin: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; padding: 20px; background: var(--white); border-radius: var(--radius-sm); }
.review-card blockquote { margin: 0; font-size: 16px; line-height: 24px; }
/* long reviews: show 5 lines, "Read more" appears only when the text is cut */
.review-card blockquote p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; line-clamp: 5; overflow: hidden; }
.review-card.is-expanded blockquote p { display: block; -webkit-line-clamp: unset; line-clamp: unset; overflow: visible; }
.review-card__more { margin-top: 8px; padding: 0; background: none; border: 0; font: inherit; font-size: 15px; font-weight: 600; color: var(--ink); cursor: pointer; }
.review-card__more:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.review-card figcaption { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.review-card__who { display: flex; flex-direction: column; gap: 4px; font-size: 16px; font-weight: 500; color: var(--blue); }
.stars { color: var(--star); letter-spacing: 3px; font-size: 18px; line-height: 1; }
.review-card__source { line-height: 0; }
.review-card__source .icon { width: 100px; height: auto; }

/* ---------- why us ---------- */
.why-us .split__text p { margin-bottom: 16px; }

/* ---------- smile designed to last ---------- */
.smile-design { padding-bottom: var(--section-y); }
.bridge { position: relative; width: 913px; max-width: 100%; height: 246px; margin: 62px auto 70px; }
.bridge__img { position: absolute; left: 218px; top: 44px; width: 470px; filter: drop-shadow(0 12px 14px rgba(40, 40, 60, .22)); }
/* callouts are positioned from the Figma coordinates (label + hand-drawn arrow) */
.callout { display: contents; }
.callout .icon { position: absolute; left: var(--ix); top: var(--iy); height: auto; }
.callout__label { position: absolute; left: var(--lx); top: var(--ly); font-size: 18px; font-weight: 500; line-height: 27px; color: var(--ink); white-space: nowrap; }
.callout--support  { --ix: 148px; --iy: 0;     --lx: 0;     --ly: 53px; }
.callout--zirconia { --ix: 690px; --iy: 51px;  --lx: 754px; --ly: 66px; }
.callout--fit      { --ix: 172px; --iy: 170px; --lx: 74px;  --ly: 170px; }
.callout--finish   { --ix: 623px; --iy: 196px; --lx: 698px; --ly: 214px; }
.smile-design__copy { max-width: 1320px; text-align: center; }
.smile-design__copy p { font-size: 18px; margin-bottom: 18px; }
.smile-design .btn-row { margin-top: 36px; }

/* ---------- doctor + gallery ---------- */
.doctor { padding-top: var(--section-y); }
.photo-grid { display: grid; grid-template-columns: repeat(26, 1fr); grid-auto-rows: 380px; gap: 12px; margin-top: 80px; }
.photo-grid__item { margin: 0; overflow: hidden; border-radius: var(--radius-sm); }
.photo-grid__item img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid__item.g1 { grid-column: span 8; }
.photo-grid__item.g2 { grid-column: span 18; }
.photo-grid__item.g3, .photo-grid__item.g4 { grid-column: span 13; }
.photo-grid__item.g3, .photo-grid__item.g4 { grid-row-end: span 1; }
.photo-grid > .g3, .photo-grid > .g4 { height: 409px; }
.photo-grid { grid-auto-rows: auto; }
.photo-grid > .g1, .photo-grid > .g2 { height: 380px; }

/* ---------- services ---------- */
.services { padding-block: var(--section-y); }
.services .section-sub { margin-bottom: 60px; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 33px; }
.service-card {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px;
    padding: 36px 28px 40px; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-md);
}
.service-card h3 { font-family: var(--font-body); font-size: 22px; font-weight: 500; color: var(--text); line-height: 1.35; }
.service-card p { font-size: 18px; line-height: 29px; flex: 1; }
.service-card .btn { min-height: 47px; white-space: normal; }

/* ---------- slider dots (JS-generated; visible only while the grid is a slider, below 1024px) ---------- */
.slider-dots { display: none; justify-content: center; gap: 10px; margin-top: 22px; }
.slider-dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: #c3cde6; cursor: pointer; transition: background .2s ease, transform .2s ease; }
.slider-dots button.is-active { background: var(--blue); transform: scale(1.25); }
@media (max-width: 1023px) { .slider-dots { display: flex; } }

/* ---------- closing CTA band on inner pages (blue, so it never blends with a tinted section above) ---------- */
.consult-cta { background: var(--white); }
.consult-cta__card {
    padding: 64px 40px 68px; text-align: center; color: #fff; border-radius: var(--radius-lg); border-bottom: 4px solid var(--gold);
    background: linear-gradient(105deg, rgba(48, 68, 124, .93) 0%, rgba(96, 124, 191, .86) 55%, rgba(96, 124, 191, .78) 100%), url("../images/hero/clinic-hero.webp") center / cover no-repeat;
    background-color: var(--blue);
}
@media (max-width: 767px) { .consult-cta__card { padding: 40px 20px 44px; } }
.consult-cta .section-title, .consult-cta .section-sub { color: #fff; }
.consult-cta .section-title .gold { color: #e3c9a3; }
.consult-cta .section-sub { margin-bottom: 36px; }

/* ---------- results carousel ---------- */
.results { padding-block: var(--section-y); }
.results .section-sub { margin-bottom: 60px; }
.carousel { position: relative; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.carousel__viewport { overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; border-radius: var(--radius-md); }
.carousel__viewport::-webkit-scrollbar { display: none; }
.carousel__track { display: flex; gap: 18px; }
.result-card {
    flex: 0 0 calc((100% - 36px) / 3); aspect-ratio: 428 / 322; display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
    scroll-snap-align: start; overflow: hidden; border-radius: var(--radius-md); background: #fff;
}
.result-card img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.carousel__btn {
    position: absolute; top: 50%; z-index: 2; width: 44px; height: 44px; margin-top: -22px; padding: 0;
    border: 0; border-radius: 50%; background: var(--gold); color: #fff; cursor: pointer; transition: background-color .2s ease, transform .2s ease;
}
.carousel__btn:hover { background: #8a6f4f; transform: scale(1.06); }
.carousel__btn[disabled] { opacity: .45; cursor: default; transform: none; }
.carousel__btn span { display: block; width: 10px; height: 10px; margin: auto; border: solid #fff; border-width: 0 0 2px 2px; }
.carousel__btn--prev { left: 0; }
.carousel__btn--prev span { transform: translateX(2px) rotate(45deg); }
.carousel__btn--next { right: 0; }
/* wide screens: arrows sit outside the cards like the Figma design */
@media (min-width: 1560px) {
    .carousel__btn--prev { left: -76px; }
    .carousel__btn--next { right: -76px; }
}
.carousel__btn--next span { transform: translateX(-2px) rotate(-135deg); }
.carousel--grid .carousel__track { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.carousel--grid .carousel__viewport { overflow: visible; }
.carousel--grid .result-card { flex: none; }

/* ---------- FAQ accordion ---------- */
.faq { padding-block: var(--section-y); }
.faq .section-sub { margin-bottom: 56px; }
.accordion { display: grid; gap: 16px; }
.accordion__item { background: #f2f3f7; border: 1px solid var(--card-border); border-radius: var(--radius-sm); transition: background-color .2s ease; }
.accordion__heading { font-family: var(--font-body); font-size: 18px; font-weight: 500; }
.accordion__button {
    display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%;
    padding: 18px 16px; background: none; border: 0; text-align: left; font-weight: 500; font-size: 18px; color: var(--text); cursor: pointer;
}
.accordion__icon { position: relative; flex: none; width: 18px; height: 18px; margin-right: 6px; }
.accordion__icon::before, .accordion__icon::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--ink); transition: transform .25s ease; }
.accordion__icon::after { transform: rotate(90deg); }
.accordion__item.is-open .accordion__icon::after { transform: rotate(0); }
.accordion__panel { padding: 0 16px 20px; }
.accordion__panel p { max-width: 820px; font-size: 18px; line-height: 29px; }

/* ---------- CTA + hours + map ---------- */
.cta-section { padding-block: var(--section-y); }
.cta-section .section-sub { margin-bottom: 60px; }
.visit-card { max-width: 1160px; margin-inline: auto; overflow: hidden; background: #f5f9fc; border: 1px solid var(--blue); border-radius: var(--radius-sm); }
.visit-card__bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 32px; min-height: 76px; background: var(--blue); }
.visit-card__bar h3 { font-family: var(--font-body); font-size: 28px; font-weight: 600; line-height: 1.2; color: var(--white); }
.visit-card__bar .btn { min-height: 52px; }
.visit-card__body { display: grid; grid-template-columns: minmax(280px, 1fr) 709px; gap: 100px; padding: 32px; align-items: center; }
.hours h4 { margin-bottom: 26px; font-family: var(--font-body); font-size: 24px; font-weight: 700; }
.hours table { width: 100%; max-width: 290px; border-collapse: collapse; font-size: 18px; }
.hours th { padding: 8px 0; text-align: left; font-weight: 400; }
.hours td { padding: 8px 0; text-align: right; font-weight: 400; }
.map { height: 360px; overflow: hidden; border-radius: var(--radius-md); background: #efe6d6; }
.map iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--blue); color: var(--white); }
.site-footer__grid { display: grid; grid-template-columns: 1.55fr 1fr .8fr .8fr; gap: 40px; max-width: calc(1200px + var(--gutter) * 2); padding-block: 82px 70px; }
.site-footer__brand img { width: 240px; height: auto; }
.social { display: flex; align-items: center; gap: 18px; margin-top: 32px; font-size: 14px; }
.social a { display: inline-flex; line-height: 0; }
.social .icon { height: 24px; width: auto; }
.footer-title { position: relative; margin-bottom: 40px; padding-bottom: 14px; font-family: var(--font-body); font-size: 18px; font-weight: 500; color: var(--white); }
.footer-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 28px; height: 1px; background: rgba(255, 255, 255, .35); }
.site-footer address p, .site-footer li { margin-bottom: 11px; font-size: 14px; line-height: 21px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 28px; padding: 20px var(--gutter); border-top: 1px solid rgba(255, 255, 255, .2); text-align: center; font-size: 14px; }
.site-footer__legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; }
.site-footer__legal a { color: #fff; text-decoration: none; }
.site-footer__legal a:hover { color: #e3c9a3; }
.prose--legal h2 { margin-top: 36px; font-size: 28px; line-height: 36px; }
.prose--legal h3 { margin: 22px 0 8px; font-size: 20px; font-weight: 600; }
.prose--legal ul { margin-bottom: 18px; }
.prose--legal li { margin-bottom: 6px; }
.prose--legal p { margin-bottom: 14px; }

/* ---------- inner pages ---------- */
.page-hero {
    position: relative; isolation: isolate; padding-block: 88px 92px; text-align: center; color: #fff;
    background:
        linear-gradient(105deg, rgba(48, 68, 124, .93) 0%, rgba(96, 124, 191, .86) 55%, rgba(96, 124, 191, .78) 100%),
        url("../images/hero/clinic-hero.webp") center / cover no-repeat;
    background-color: var(--blue);
}
.page-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--gold); }
.page-hero h1 { font-size: 52px; line-height: 1.2; color: #fff; text-shadow: 0 2px 14px rgba(20, 30, 60, .25); }
.page-hero h1::after { content: ""; display: block; width: 72px; height: 3px; margin: 20px auto 0; background: #e3c9a3; border-radius: 2px; }
.page-hero p { max-width: 760px; margin: 22px auto 0; font-weight: 500; color: #fff; }
.breadcrumbs { margin-bottom: 20px; font-size: 14px; color: #fff; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: #e3c9a3; }
.breadcrumbs a { color: #fff; text-decoration: none; opacity: .88; }
.breadcrumbs a:hover { text-decoration: underline; opacity: 1; }
.prose { max-width: 860px; margin-inline: auto; }
.prose h2 { margin: 44px 0 16px; font-size: 34px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { font-size: 18px; line-height: 29px; }
.prose ul { margin: 0 0 14px 22px; list-style: disc; }
.notice { padding: 16px 20px; border-radius: var(--radius-sm); background: var(--tint); border-left: 4px solid var(--blue); font-size: 16px; }

/* forms */
.form-card { max-width: 760px; margin-inline: auto; padding: 36px; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-md); }
.consent { margin-top: 22px; display: grid; gap: 14px; }
.consent__item { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; line-height: 21px; color: var(--text); cursor: pointer; }
.consent__item input { flex: none; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--blue); cursor: pointer; }
.consent__links { font-size: 15px; }
.consent__links a { color: var(--blue); }
.consent__links span { margin-inline: 6px; color: var(--gold); }
.form-card h2 { margin-bottom: 8px; font-size: 32px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 24px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field--full { grid-column: 1 / -1; }
.form-field label { font-size: 15px; font-weight: 500; color: var(--ink); }
.form-field .req { color: #b3261e; }
.form-field input, .form-field select, .form-field textarea {
    width: 100%; padding: 12px 14px; font: inherit; font-size: 16px; color: var(--ink);
    background: var(--white); border: 1px solid #c9cfdd; border-radius: var(--radius-xs);
}
.form-field textarea { min-height: 120px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: 3px solid rgba(96, 124, 191, .35); border-color: var(--blue); }
.form-field.has-error input, .form-field.has-error textarea, .form-field.has-error select { border-color: #b3261e; }
.field-error { font-size: 14px; color: #b3261e; }
.form-note { margin-top: 16px; font-size: 14px; color: #555; }
.form-status { margin-bottom: 20px; padding: 14px 18px; border-radius: var(--radius-sm); font-size: 16px; }
.form-status--ok { background: #e5f4e8; border-left: 4px solid #2e7d32; }
.form-status--err { background: #fdeaea; border-left: 4px solid #b3261e; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-list li { margin-bottom: 14px; font-size: 18px; }
.contact-list strong { display: block; font-weight: 600; color: var(--ink); }
