/*
Theme Name: Smileline Clinic
Theme URI: https://example.com/
Author: Qasim
Description: A custom theme for a dental and aesthetic clinic. Treatments grouped by category, doctors, reviews, booking form, WhatsApp button and clinic details editable from the Customizer.
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: smileline
*/

:root {
  --ink: #3b3b3b;
  --ink-soft: #6e6a64;
  --sand: #e8e5df;
  --sand-deep: #dcd7ce;
  --gold: #cdad7b;
  --gold-text: #8a6a3a;       /* gold dark enough to read on white and sand */
  --white: #ffffff;
  --line: rgba(59, 59, 59, .16);
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --wrap: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-text); }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 3px; }

h1, h2, h3, h4 { font-family: var(--sans); font-weight: 500; letter-spacing: -0.03em; line-height: 1.08; margin: 0 0 .5em; color: inherit; }
h1 { font-size: clamp(2.75rem, 7.5vw, 6.25rem); }
h2 { font-size: clamp(2.1rem, 4.6vw, 3.9rem); }
h3 { font-size: 1.5rem; letter-spacing: -0.02em; }
h1 em, h2 em, h3 em {
  font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em;
}
p { margin: 0 0 1em; }

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.section { padding-block: clamp(4.5rem, 10vw, 8rem); }
.section--sand { background: var(--sand); }
.section-head { text-align: center; max-width: 46rem; margin: 0 auto clamp(2.5rem, 5vw, 4rem); }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 36rem; }
.screen-reader-text, .skip-link:not(:focus) {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link:focus { position: fixed; top: 1rem; left: 1rem; z-index: 100; background: var(--white); padding: .75rem 1rem; }

/* Buttons: pill, uppercase, like the reference */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .95rem 1.9rem; border-radius: 999px;
  font: 500 .85rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  border: 1px solid var(--ink); background: var(--ink); color: var(--white);
  transition: background-color .25s, color .25s, border-color .25s;
}
.btn:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn--outline { background: transparent; color: var(--ink); }
.btn--outline:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }
.btn--light { background: transparent; border-color: rgba(255,255,255,.7); color: var(--white); }
.btn--light:hover { background: var(--white); border-color: var(--white); color: var(--ink); }
.btn--gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn--gold:hover { background: var(--white); border-color: var(--white); }
.link-more {
  display: inline-block; font-size: .8rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; padding-bottom: 3px; border-bottom: 1px solid var(--gold);
}
.link-more:hover { color: var(--gold-text); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50; background: var(--white);
  border-bottom: 1px solid var(--line); color: var(--ink);
  transition: background-color .3s, border-color .3s, color .3s;
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 84px; }
.brand { display: flex; align-items: center; text-decoration: none; color: inherit; }
.brand__name { font-size: 1.35rem; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; }
.brand img { max-height: 54px; width: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2.25rem; align-items: center; }
.nav a { color: inherit; text-decoration: none; font-size: .95rem; padding-block: .35rem; border-bottom: 1px solid transparent; }
.nav a:hover, .nav .current-menu-item > a { border-bottom-color: currentColor; }
.header-cta { display: flex; align-items: center; gap: 1.25rem; }
.header-phone { color: inherit; text-decoration: none; font-size: .95rem; white-space: nowrap; }
.header-cta .btn { padding: .75rem 1.4rem; }
.nav-toggle { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; color: inherit; }
.nav-toggle svg { width: 28px; height: 28px; }

/* Transparent header over the hero photo */
.has-hero-image .site-header { position: fixed; left: 0; right: 0; background: transparent; border-color: transparent; color: var(--white); }
.has-hero-image .site-header .btn { background: transparent; border-color: rgba(255,255,255,.7); color: var(--white); }
.has-hero-image .site-header.is-scrolled { background: var(--white); border-color: var(--line); color: var(--ink); }
.has-hero-image .site-header.is-scrolled .btn { background: var(--ink); border-color: var(--ink); color: var(--white); }
.has-hero-image.admin-bar .site-header { top: 32px; }

@media (max-width: 1020px) {
  .nav-toggle { display: block; }
  .header-phone { display: none; }
  .nav {
    position: absolute; inset: 100% 0 auto; background: var(--white); color: var(--ink);
    border-bottom: 1px solid var(--line); display: none; padding: 1rem 1.25rem 1.5rem;
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; align-items: flex-start; gap: .75rem; }
}
@media (max-width: 480px) { .header-cta .btn { display: none; } .brand__name { font-size: 1.05rem; letter-spacing: .16em; white-space: nowrap; } }

/* Hero */
.hero { position: relative; display: grid; place-items: center; text-align: center; overflow: hidden; }
.hero--photo { min-height: 100vh; min-height: 100svh; color: var(--white); padding: 8rem 0 5rem; }
.hero--photo .hero__bg { position: absolute; inset: 0; }
.hero--photo .hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero--photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.15) 40%, rgba(0,0,0,.5) 100%); }
.hero--plain { background: var(--sand); padding: clamp(5rem, 12vw, 9rem) 0; }
.hero__content { position: relative; z-index: 1; max-width: 62rem; margin-inline: auto; }
.hero h1 { margin-bottom: .35em; }
.hero p { font-size: 1.15rem; max-width: 34rem; margin: 0 auto 2.25rem; }
.hero--photo p { color: rgba(255,255,255,.9); }
.hero--plain p { color: var(--ink-soft); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; justify-content: center; }

/* Intro statement */
.intro { text-align: center; }
.intro h2 { max-width: 60rem; margin-inline: auto; font-size: clamp(1.9rem, 4vw, 3.3rem); }
.intro__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; margin-top: clamp(3rem, 6vw, 4.5rem); text-align: left; }
.intro__cols h3 { font-size: 1.3rem; margin-bottom: .6rem; }
.intro__cols p { color: var(--ink-soft); margin: 0; }
.intro__cols > div { border-top: 1px solid var(--line); padding-top: 1.5rem; }
@media (max-width: 860px) { .intro__cols { grid-template-columns: 1fr; gap: 1.75rem; } }

/* Treatments */
.practice + .practice { margin-top: clamp(3.5rem, 7vw, 5rem); }
.practice__title { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding-bottom: 1rem; margin-bottom: 1.75rem; }
.practice__title h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0; }
.practice__title p { margin: 0; color: var(--ink-soft); max-width: 30rem; text-align: right; font-size: .98rem; }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.cat {
  background: var(--white); padding: 2rem 1.75rem 1.75rem; display: flex; flex-direction: column;
  border-radius: 2px; border-top: 2px solid var(--gold);
}
.cat h4 { font-size: 1.2rem; letter-spacing: -0.02em; margin-bottom: 1rem; }
.cat ul { list-style: none; padding: 0; margin: 0 0 1.75rem; flex: 1; }
.cat li { padding: .3rem 0; color: var(--ink-soft); }
.cat li a { color: var(--ink-soft); text-decoration: none; }
.cat li a:hover { color: var(--gold-text); }
@media (max-width: 1020px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .practice__title { flex-direction: column; } .practice__title p { text-align: left; } }
@media (max-width: 560px) { .cat-grid { grid-template-columns: 1fr; } }

/* Approach */
.approach__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.approach__img { aspect-ratio: 16 / 15; overflow: hidden; border-radius: 0 240px 0 0; background: var(--sand); }
.approach__img img { width: 100%; height: 100%; object-fit: cover; }
.approach__img--empty { display: grid; place-items: center; }
.approach__img--empty span { font-family: var(--serif); font-style: italic; font-size: 2rem; color: var(--gold-text); }
.points { display: grid; grid-template-columns: 1fr 1fr; gap: 2.25rem 2rem; margin: 2.5rem 0; }
.points h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.points h3::before { content: ""; display: block; width: 28px; height: 1px; background: var(--gold); margin-bottom: 1rem; }
.points p { color: var(--ink-soft); margin: 0; font-size: .98rem; }
@media (max-width: 900px) { .approach__grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .points { grid-template-columns: 1fr; } }

/* Stats */
.stats { background: var(--ink); color: var(--white); padding-block: clamp(3.5rem, 7vw, 5rem); }
.stats__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2rem; text-align: center; }
.stat__num { font-size: clamp(2.6rem, 5vw, 4rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1; color: var(--gold); }
.stat__label { margin-top: .75rem; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.stat__label em { display: block; font-family: var(--serif); font-size: 1.15rem; letter-spacing: 0; text-transform: none; color: rgba(255,255,255,.75); }

/* Visit steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; counter-reset: step; }
.steps li { counter-increment: step; border-top: 1px solid var(--line); padding-top: 1.5rem; }
.steps li::before { content: "0" counter(step); display: block; font-family: var(--serif); font-style: italic; font-size: 2.2rem; color: var(--gold-text); line-height: 1; margin-bottom: 1rem; }
.steps h3 { font-size: 1.2rem; margin-bottom: .45rem; }
.steps p { color: var(--ink-soft); margin: 0; font-size: .98rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* Reviews */
.reviews__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.review { background: var(--white); padding: 2.25rem 2rem; display: flex; flex-direction: column; }
.review h3 { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; font-size: 1.4rem; margin-bottom: 1rem; }
.review__text { color: var(--ink-soft); flex: 1; }
.review__text p:last-child { margin-bottom: 0; }
.review__name { margin-top: 1.5rem; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.review__stars { color: var(--gold); letter-spacing: .15em; margin-bottom: .75rem; }
@media (max-width: 900px) { .reviews__grid { grid-template-columns: 1fr; } }

/* Doctors */
.doctors__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2rem; }
.doctor__photo { aspect-ratio: 4 / 5; overflow: hidden; background: var(--sand); margin-bottom: 1.1rem; border-radius: 140px 140px 0 0; }
.doctor__photo img { width: 100%; height: 100%; object-fit: cover; }
.doctor__placeholder { width: 100%; height: 100%; display: grid; place-items: center; font-family: var(--serif); font-style: italic; font-size: 3.5rem; color: var(--gold-text); }
.doctor h3 { font-size: 1.25rem; margin-bottom: .2rem; }
.doctor__role { color: var(--ink-soft); font-size: .95rem; margin: 0; }

/* Booking */
.book__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 2.5rem 0 0; display: grid; gap: 1.5rem; }
.contact-list span { display: block; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: .2rem; }
.contact-list a { color: var(--ink); font-size: 1.15rem; text-decoration: none; border-bottom: 1px solid var(--gold); }
.contact-list p { margin: 0; white-space: pre-line; }
.booking-form { background: var(--white); padding: clamp(1.75rem, 4vw, 3rem); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.field { margin-bottom: 1.5rem; }
.field label { display: block; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .35rem; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%; padding: .7rem 0; font: inherit; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
}
.field select { appearance: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%233b3b3b' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right .25rem center; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom: 1px solid var(--gold-text); box-shadow: 0 1px 0 var(--gold-text); }
.field textarea { min-height: 90px; resize: vertical; }
.hp-field { position: absolute; left: -9999px; }
.form-note { font-size: .88rem; color: var(--ink-soft); margin: 1rem 0 0; }
.notice { padding: 1rem 1.1rem; margin-bottom: 1.5rem; font-weight: 500; }
.notice--ok { background: var(--sand); border-left: 3px solid var(--gold); }
.notice--err { background: #f6e3e1; border-left: 3px solid #a33a2b; color: #7a1f1f; }
.map { margin-top: 2.5rem; overflow: hidden; }
.map iframe { width: 100%; height: 240px; border: 0; display: block; filter: grayscale(.6); }
@media (max-width: 900px) { .book__grid, .form-row { grid-template-columns: 1fr; } .form-row { gap: 0; } }

/* Inner pages */
.page-hero { background: var(--sand); padding-block: clamp(4rem, 9vw, 6.5rem); text-align: center; }
.page-hero h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); margin-bottom: .25em; }
.page-hero .lede { margin-inline: auto; }
.entry { padding-block: clamp(3.5rem, 7vw, 5.5rem); }
.entry__content { max-width: 46rem; margin-inline: auto; }
.entry__content > * + * { margin-top: 1.1em; }
.entry__content h2 { margin-top: 1.8em; font-size: 2rem; }
.entry__content ul, .entry__content ol { padding-left: 1.25rem; }
.entry__thumb { margin: 0 auto 2.5rem; overflow: hidden; max-width: 46rem; }
.treatment-cta { margin: 3.5rem auto 0; padding: clamp(2rem, 4vw, 3rem); background: var(--sand); max-width: 46rem; text-align: center; }
.treatment-cta h2 { font-size: 2rem; }
.treatment-cta .hero__actions { margin-top: 1.5rem; }
.post-list { display: grid; gap: 2.5rem; max-width: 46rem; margin-inline: auto; }
.post-list h2 { font-size: 1.7rem; margin-bottom: .25rem; }
.post-list h2 a { color: var(--ink); text-decoration: none; }
.pagination { margin-top: 3rem; display: flex; gap: 1rem; justify-content: center; }

/* Footer */
.site-footer { background: var(--ink); color: rgba(255,255,255,.78); padding-block: clamp(4rem, 8vw, 5.5rem) 2rem; font-size: .97rem; }
.footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2.5rem; }
.footer__brand { font-size: 1.3rem; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; color: var(--white); margin-bottom: 1rem; }
.site-footer h3 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer__big { font-size: 1.35rem; letter-spacing: -0.02em; }
.footer__pre { white-space: pre-line; }
.footer__bottom { margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.15); font-size: .87rem; color: rgba(255,255,255,.6); }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr; } }

/* WhatsApp floating button */
.wa-float {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: #25d366; color: #fff; box-shadow: 0 10px 25px -8px rgba(0,0,0,.35);
}
.wa-float:hover { color: #fff; background: #1ebe5b; }
.wa-float svg { width: 30px; height: 30px; }

/* One entrance moment: the hero copy settles in on load */
.hero__content { animation: rise 1s .15s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__content { animation: none; }
  * { transition: none !important; }
}
