/*
Theme Name: Smile Pro Clinic
Theme URI: https://smileproclinics.com
Author: Smile Pro Dental & Aesthetic Clinic
Description: Custom theme for Smile Pro Dental & Aesthetic Clinic. Two specialties (Dental Surgery, Facial Aesthetics), treatment pages, branch pages, before & after gallery, doctors and WhatsApp booking. Activating the theme creates all pages, treatments, branches, doctors and the menu automatically.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: smilepro
*/

:root {
	--ink: #0B2230;
	--ink-2: #3B4F5A;
	--muted: #4A5D68;
	--ground: #F6F8F8;
	--line: #DCE4E6;
	--dental: #0B5E59;
	--dental-soft: #E3F1EF;
	--aesthetic: #9C3556;
	--aesthetic-soft: #F8E6EC;
	--wa: #0F7A43;
	--radius: 20px;
	--wrap: 1200px;
	--font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
	--display: Sora, Inter, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--ground); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--dental); }
a:hover { color: #073F3C; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(32px, 5vw, 52px); }
h2 { font-size: clamp(26px, 3.4vw, 38px); }
h3 { font-size: 20px; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid #2B7BE4; outline-offset: 2px; }

.sp-skip { position: absolute; left: -9999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }
.sp-skip:focus { left: 8px; }
.sp-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* Top bar & header */
.sp-topbar { background: var(--ink); color: #E6EEF0; font-size: 14px; }
.sp-topbar__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; padding: 8px 20px; }
.sp-topbar span, .sp-topbar a { display: inline-flex; align-items: center; gap: 6px; color: #fff; text-decoration: none; }
.sp-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.sp-header__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; }
.sp-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.sp-brand__logo { max-height: 52px; width: auto; }
.sp-brand__mark { width: 44px; height: 44px; border-radius: 12px; background: var(--dental); color: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 700; }
.sp-brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.sp-brand__text strong { font-family: var(--display); font-size: 19px; }
.sp-brand__text small { font-size: 11px; letter-spacing: .06em; color: var(--muted); }
.sp-nav { display: flex; align-items: center; gap: 24px; }
.sp-nav .menu { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.sp-nav .menu a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; padding: 10px 0; display: inline-block; }
.sp-nav .menu a:hover, .sp-nav .current-menu-item > a { color: var(--dental); }
.sp-nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; width: 44px; height: 44px; color: var(--ink); cursor: pointer; }

/* Buttons */
.sp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 15px; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.sp-btn:hover { transform: translateY(-1px); }
.sp-btn--sm { min-height: 44px; padding: 0 16px; font-size: 14px; }
.sp-btn--block { width: 100%; }
.sp-btn--wa { background: var(--wa); color: #fff; }
.sp-btn--wa:hover { background: #0B6236; color: #fff; }
.sp-btn--outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.sp-btn--outline:hover { background: var(--ink); color: #fff; }
.sp-btn--light { background: #fff; color: var(--ink); }
.sp-btn--light:hover { color: var(--ink); }
.sp-btn--ghost-light { border-color: rgba(255,255,255,.75); color: #fff; }
.sp-btn--ghost-light:hover { background: rgba(255,255,255,.12); color: #fff; }
.sp-btn--soft { background: #EEF3F3; color: var(--ink); border-radius: 12px; }
.sp-btn--link { color: var(--dental); padding: 0 6px; }
.sp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

/* Gateway (first screen) */
.sp-gateway { min-height: calc(100vh - 120px); padding: 40px 20px 32px; display: flex; flex-direction: column; justify-content: center; gap: 24px; max-width: var(--wrap); margin: 0 auto; }
.sp-gateway__title { text-align: center; font-size: clamp(26px, 3.6vw, 40px); margin: 0; }
.sp-gateway__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.sp-gate { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 40px 36px; border-radius: 28px; color: #fff; text-decoration: none; min-height: 420px; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.sp-gate:hover, .sp-gate:focus-visible { color: #fff; transform: translateY(-4px); box-shadow: 0 24px 48px rgba(11,34,48,.22); }
.sp-gate--dental-surgery { background: linear-gradient(160deg, #0E7069 0%, var(--dental) 60%, #084A46 100%); }
.sp-gate--facial-aesthetics { background: linear-gradient(160deg, #B0466A 0%, var(--aesthetic) 60%, #7A2742 100%); }
.sp-gate__icon { width: 76px; height: 76px; border-radius: 22px; background: rgba(255,255,255,.14); display: grid; place-items: center; margin-bottom: 8px; }
.sp-gate__kicker { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; opacity: .85; font-weight: 600; }
.sp-gate__title { font-family: var(--display); font-weight: 700; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.1; }
.sp-gate__text { font-size: 17px; opacity: .92; max-width: 420px; }
.sp-gate__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.sp-gate .sp-chip { background: rgba(255,255,255,.16); color: #fff; border: 0; }
.sp-gate__cta { margin-top: auto; display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; background: #fff; color: var(--ink); font-weight: 700; padding: 14px 24px; border-radius: 999px; }
.sp-gateway__rating { text-align: center; color: var(--ink-2); font-weight: 600; margin: 0; }
.sp-stars { color: #C27A0E; letter-spacing: 2px; }

/* Chips */
.sp-chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 500; background: #fff; border: 1.5px solid var(--line); color: var(--ink); text-decoration: none; }
.sp-chiplist { display: flex; flex-wrap: wrap; gap: 10px; }
.sp-chiplist .sp-chip { min-height: 44px; }
.sp-chip--dental-surgery:hover { border-color: var(--dental); color: var(--dental); }
.sp-chip--facial-aesthetics:hover { border-color: var(--aesthetic); color: var(--aesthetic); }

/* Sections */
.sp-section { padding: 80px 0; }
.sp-section--tight { padding: 48px 0; }
.sp-section--dark { background: var(--ink); color: #fff; }
.sp-section--dark h2, .sp-section--dark h3 { color: #fff; }
.sp-section__head { margin-bottom: 32px; max-width: 720px; }
.sp-section__head--row { max-width: none; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.sp-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.sp-section--dark .sp-eyebrow { color: #A9C2C9; }
.sp-grid { display: grid; gap: 24px; }
.sp-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sp-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sp-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sp-empty { background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); padding: 32px; text-align: center; color: var(--muted); }

/* Hero (inner pages) */
.sp-hero { color: #fff; padding: 64px 0 56px; }
.sp-hero--compact { padding: 44px 0 40px; }
.sp-hero--dental-surgery { background: var(--dental); }
.sp-hero--facial-aesthetics { background: var(--aesthetic); }
.sp-hero--ink { background: var(--ink); }
.sp-hero h1 { color: #fff; margin-bottom: 12px; }
.sp-hero__lead { font-size: 18px; max-width: 720px; opacity: .92; }
.sp-crumbs { font-size: 14px; margin-bottom: 14px; opacity: .9; }
.sp-crumbs a { color: #fff; }

/* Cards */
.sp-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.sp-card__media { display: block; aspect-ratio: 16 / 9; background: #DCE9E8; }
.sp-card__media img { width: 100%; height: 100%; object-fit: cover; }
.sp-card__body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.sp-card__title { margin: 0; }
.sp-card__title a { color: var(--ink); text-decoration: none; }
.sp-meta { display: flex; gap: 8px; align-items: flex-start; color: var(--ink-2); margin: 0; font-size: 15px; }
.sp-meta svg { flex: none; margin-top: 4px; }
.sp-pre { white-space: pre-line; }
.sp-placeholder { width: 100%; height: 100%; min-height: 160px; display: grid; place-items: center; background: repeating-linear-gradient(135deg, #E4EEEE 0 12px, #DCE9E8 12px 24px); color: #2F4B52; font-size: 13px; font-weight: 500; text-align: center; padding: 12px; }

/* Treatment cards */
.sp-tcard { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); overflow: hidden; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.sp-tcard:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(11,34,48,.08); color: var(--ink); }
.sp-tcard--dental-surgery { border-top: 4px solid var(--dental); }
.sp-tcard--facial-aesthetics { border-top: 4px solid var(--aesthetic); }
.sp-tcard__media { aspect-ratio: 4 / 3; overflow: hidden; }
.sp-tcard__media img { width: 100%; height: 100%; object-fit: cover; }
.sp-tcard__body { padding: 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.sp-tcard__title { font-family: var(--display); font-weight: 600; font-size: 19px; }
.sp-tcard__text { color: var(--ink-2); font-size: 15px; }
.sp-tcard__meta { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.sp-tcard__more { margin-top: auto; display: inline-flex; gap: 6px; align-items: center; font-weight: 600; font-size: 14px; }
.sp-tcard--dental-surgery .sp-tcard__more { color: var(--dental); }
.sp-tcard--facial-aesthetics .sp-tcard__more { color: var(--aesthetic); }

/* Layout with sidebar */
.sp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.sp-prose { font-size: 17px; color: var(--ink-2); }
.sp-prose h2 { font-size: 24px; color: var(--ink); margin-top: 1.4em; }
.sp-prose h2:first-child { margin-top: 0; }
.sp-feature-img { margin-bottom: 24px; border-radius: var(--radius); overflow: hidden; }
.sp-book { position: sticky; top: 96px; }
.sp-book__box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 12px 32px rgba(11,34,48,.06); }
.sp-book__title { font-family: var(--display); font-weight: 600; font-size: 20px; margin: 0; }
.sp-book__label { font-weight: 600; font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.sp-book__note { font-size: 13px; color: var(--muted); margin: 4px 0 0; }
.sp-facts { margin: 0; display: grid; gap: 8px; }
.sp-facts div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid #EEF2F3; padding-bottom: 8px; }
.sp-facts dt { color: var(--muted); font-size: 14px; }
.sp-facts dd { margin: 0; font-weight: 600; font-size: 14px; text-align: right; }
.sp-hours { margin: 0; font-size: 15px; line-height: 1.9; }
.sp-map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin-bottom: 24px; aspect-ratio: 16 / 9; background: #DCE9E8; }
.sp-map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Switch specialty */
.sp-switch { margin-top: 40px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 24px 28px; border-radius: var(--radius); text-decoration: none; color: #fff; }
.sp-switch:hover { color: #fff; }
.sp-switch--dental-surgery { background: var(--dental); }
.sp-switch--facial-aesthetics { background: var(--aesthetic); }
.sp-switch strong { display: inline-flex; gap: 8px; align-items: center; font-family: var(--display); font-size: 20px; }

/* Before / after */
.sp-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.sp-filter { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font: 600 14px var(--font); color: var(--ink); cursor: pointer; }
.sp-filter.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.sp-case { background: #fff; border-radius: var(--radius); overflow: hidden; color: var(--ink); border: 1px solid var(--line); }
.sp-section--dark .sp-case { border-color: transparent; }
.sp-section--dark .sp-case h3 { color: var(--ink); }
.sp-case[hidden] { display: none; }
.sp-ba { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #DCE9E8; user-select: none; }
.sp-ba__img { position: absolute; inset: 0; }
.sp-ba__img img, .sp-ba__img .sp-placeholder { width: 100%; height: 100%; object-fit: cover; }
.sp-ba__before .sp-placeholder { background: #C9D9DC; }
.sp-ba__line { position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.08); pointer-events: none; }
.sp-ba__line::after { content: "⇆"; position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; font-weight: 700; box-shadow: 0 4px 12px rgba(0,0,0,.18); }
.sp-ba__tag { position: absolute; top: 12px; background: rgba(11,34,48,.78); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; pointer-events: none; }
.sp-ba__tag--l { left: 12px; }
.sp-ba__tag--r { right: 12px; }
.sp-ba__range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.sp-case__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.sp-case__title { font-size: 18px; margin: 0; }
.sp-case__meta { font-size: 14px; color: var(--muted); margin: 0; }
.sp-case__link { font-size: 14px; font-weight: 600; }
.sp-tag { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; padding: 4px 10px; border-radius: 999px; }
.sp-tag--dental-surgery { background: var(--dental); }
.sp-tag--facial-aesthetics { background: var(--aesthetic); }

.sp-branch-card__bar { display: block; height: 6px; background: linear-gradient(90deg, var(--dental), var(--aesthetic)); }

/* Doctors */
.sp-doctor__media { aspect-ratio: 4 / 5; }
.sp-doctor__avatar { width: 96px; height: 96px; margin: 24px 24px 0; border-radius: 50%; background: var(--dental-soft); color: var(--dental); display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 32px; }
.sp-doctor__role { color: var(--ink-2); font-size: 15px; margin: 0; }
.sp-doctor__quals { color: var(--muted); font-size: 14px; margin: 0; }
.sp-doctor__branches { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.sp-doctor .sp-btn { margin-top: auto; }

/* CTA */
.sp-cta { background: var(--dental); color: #fff; border-radius: 28px; padding: 48px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.sp-cta h2 { color: #fff; font-size: 32px; }
.sp-cta p { opacity: .9; margin: 0; max-width: 620px; }

/* Footer */
.sp-footer { background: var(--ink); color: #C9D8DC; padding: 56px 0 28px; margin-top: 40px; font-size: 15px; }
.sp-footer a { color: #C9D8DC; text-decoration: none; display: block; padding: 4px 0; }
.sp-footer a:hover { color: #fff; }
.sp-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.sp-footer__brand { font-family: var(--display); font-weight: 700; font-size: 20px; color: #fff; margin-bottom: 8px; }
.sp-footer__h { color: #fff; font-weight: 600; margin-bottom: 6px; }
.sp-footer__small { display: block; font-size: 13px; color: #9FB6BD; margin-bottom: 8px; }
.sp-footer__social { display: flex; gap: 16px; }
.sp-footer__legal { border-top: 1px solid #23435A; margin-top: 32px; padding-top: 18px; font-size: 13px; color: #9FB6BD; }

/* Floating WhatsApp */
.sp-float-wa { position: fixed; right: 20px; bottom: 20px; width: 60px; height: 60px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px rgba(11,34,48,.25); z-index: 60; }
.sp-float-wa:hover { color: #fff; background: #0B6236; }

/* Responsive */
@media (max-width: 1024px) {
	.sp-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.sp-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.sp-layout { grid-template-columns: minmax(0, 1fr); }
	.sp-book { position: static; }
}
@media (max-width: 860px) {
	.sp-nav-toggle { display: inline-grid; place-items: center; }
	.sp-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 12px 20px 20px; gap: 8px; }
	.sp-nav.is-open { display: flex; }
	.sp-nav .menu { flex-direction: column; gap: 0; }
	.sp-nav .menu a { display: block; padding: 12px 0; border-bottom: 1px solid #EEF2F3; }
	.sp-header { position: sticky; }
	.sp-header__in { position: relative; }
}
@media (max-width: 720px) {
	.sp-gateway { min-height: auto; padding-top: 28px; }
	.sp-gateway__grid, .sp-grid--2, .sp-grid--3, .sp-grid--4 { grid-template-columns: minmax(0, 1fr); }
	.sp-gateway__grid { gap: 14px; }
	.sp-gate { min-height: 0; padding: 22px 22px 24px; gap: 6px; }
	.sp-gate__icon { width: 52px; height: 52px; border-radius: 16px; margin-bottom: 2px; }
	.sp-gate__icon svg { width: 30px; height: 30px; }
	.sp-gate__chips { display: none; }
	.sp-gate__text { font-size: 15px; }
	.sp-gate__cta { margin-top: 8px; padding: 12px 20px; }
	.sp-section { padding: 56px 0; }
	.sp-cta { padding: 32px 24px; }
	.sp-footer__grid { grid-template-columns: minmax(0, 1fr); }
	.sp-topbar__in { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}
