/* ============================================================
   PureSmile Dental Clinic — style.css
   Aesthetic: Luxury Medical — refined, airy, trust-building
   Palette: Navy blue, crisp white, soft sage, warm gold accents
   ============================================================ */

/* ===== CSS VARIABLES ===== */
:root {
  --bg: #f8fafd;
  --surface: #ffffff;
  --surface-2: #f0f5fb;
  --border: #e2eaf5;
  --text: #14253d;
  --text-mid: #4a607a;
  --text-light: #8099b4;
  --accent: #1a6fa8;
  --accent-dark: #145a8a;
  --accent-light: #e6f2fa;
  --accent-2: #2e9e6b;
  --accent-2-light: #e6f7f1;
  --gold: #c49b3c;
  --gold-light: #fdf4e3;
  --danger: #d9534f;
  --danger-light: #fdf0f0;
  --shadow-sm: 0 2px 12px rgba(26,111,168,0.08);
  --shadow-md: 0 8px 32px rgba(26,111,168,0.12);
  --shadow-lg: 0 20px 60px rgba(26,111,168,0.16);
  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 24px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

/* Dark mode variables */
body.dark-mode {
  --bg: #0d1b2a;
  --surface: #142233;
  --surface-2: #1a2d42;
  --border: #1e3450;
  --text: #e8f2fc;
  --text-mid: #8fafc8;
  --text-light: #5a7a9a;
  --accent: #4da6e0;
  --accent-dark: #3d96d0;
  --accent-light: #0d2035;
  --accent-2: #3ebd85;
  --accent-2-light: #0d2519;
  --gold: #e0b84d;
  --gold-light: #1e1a08;
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul { list-style: none; }
input, textarea, select {
  font-family: var(--font-body);
  font-size: 0.95rem;
}

/* ===== LOADER ===== */
#loader {
  position: fixed;
  inset: 0;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#loader.hidden { opacity: 0; visibility: hidden; }

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.loader-icon {
  width: 60px;
  height: 60px;
  animation: spin 1.5s ease-in-out infinite;
}
.loader-icon circle {
  animation: dash 1.5s ease-in-out infinite;
  stroke-linecap: round;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes dash {
  0% { stroke-dashoffset: 175; }
  50% { stroke-dashoffset: 40; }
  100% { stroke-dashoffset: 175; }
}

.loader-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.1em;
}

/* ===== CONTAINER ===== */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== NAVBAR ===== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(248,250,253,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
body.dark-mode #navbar {
  background: rgba(13,27,42,0.88);
}
#navbar.scrolled {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.nav-link {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-mid);
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--accent);
  background: var(--accent-light);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-dark-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background var(--transition);
}
.btn-dark-toggle:hover { background: var(--border); }
body.light-mode .icon-moon { display: block; }
body.light-mode .icon-sun { display: none; }
body.dark-mode .icon-sun { display: block; }
body.dark-mode .icon-moon { display: none; }

.btn-nav-primary {
  padding: 8px 20px;
  background: var(--accent);
  color: white;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: background var(--transition), transform var(--transition);
}
.btn-nav-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 32px;
  padding: 4px;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  background: var(--accent);
  color: white;
  border-radius: 30px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  border: 2px solid transparent;
}
.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26,111,168,0.3);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  border: 2px solid var(--border);
  color: var(--text-mid);
  border-radius: 30px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}
.btn-ghost.btn-sm { padding: 8px 18px; font-size: 0.85rem; }

.btn-full { width: 100%; }

/* ===== SECTION LABELS & TITLES ===== */
.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 16px;
}
.section-title em {
  font-style: italic;
  color: var(--accent);
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-mid);
  max-width: 560px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 52px;
}
.section-header .section-label { margin-bottom: 12px; }

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.4,0,0.2,1), transform 0.65s cubic-bezier(0.4,0,0.2,1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 24px 60px;
  max-width: 1160px;
  margin: 0 auto;
  gap: 48px;
  position: relative;
}

.hero-bg-shapes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}
.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
}
body.dark-mode .shape { opacity: 0.25; }
.shape-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #c8dff5 0%, transparent 70%);
  top: -100px; right: -100px;
  animation: float1 8s ease-in-out infinite;
}
.shape-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #c8edd8 0%, transparent 70%);
  bottom: 0; left: -80px;
  animation: float2 10s ease-in-out infinite;
}
.shape-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #fde8c8 0%, transparent 70%);
  top: 50%; left: 40%;
  animation: float1 12s ease-in-out infinite reverse;
}
@keyframes float1 {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.05); }
}
@keyframes float2 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(5deg); }
}

.hero-content {
  flex: 1;
  max-width: 580px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent-2);
  background: var(--accent-2-light);
  border: 1px solid rgba(46,158,107,0.2);
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 300;
  line-height: 1.08;
  color: var(--text);
  margin-bottom: 22px;
  letter-spacing: -0.01em;
}
.hero-title em {
  font-style: italic;
  font-weight: 600;
  color: var(--accent);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-mid);
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 28px;
}
.stat {
  display: flex;
  flex-direction: column;
}
.stat strong {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}
.stat span {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-top: 4px;
}
.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

.hero-visual {
  flex-shrink: 0;
  position: relative;
  width: 380px;
}

.hero-card-main {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  text-align: center;
}
.hero-img-wrap {
  width: 200px;
  height: 240px;
  margin: 0 auto 16px;
  background: linear-gradient(160deg, var(--accent-light), var(--surface-2));
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.doctor-svg { width: 180px; }
.hero-card-info strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.hero-card-info span {
  font-size: 0.85rem;
  color: var(--text-light);
}

.floating-badge {
  position: absolute;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 170px;
}
.floating-badge strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}
.floating-badge span {
  font-size: 0.78rem;
  color: var(--text-light);
}
.badge-icon { font-size: 1.4rem; }
.badge-1 {
  bottom: -20px;
  left: -50px;
  animation: floatBadge1 4s ease-in-out infinite;
}
.badge-2 {
  top: 20px;
  right: -50px;
  animation: floatBadge2 5s ease-in-out infinite;
}
@keyframes floatBadge1 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes floatBadge2 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ===== ABOUT ===== */
.about {
  padding: 100px 0;
  background: var(--surface);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: center;
}
.about-visual { position: relative; }
.about-img-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.about-svg { width: 100%; display: block; }
.about-exp-badge {
  position: absolute;
  bottom: 24px;
  right: -20px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius);
  padding: 16px 20px;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.about-exp-badge strong { display: block; font-size: 2rem; font-weight: 700; line-height: 1; }
.about-exp-badge span { font-size: 0.78rem; opacity: 0.85; }

.about-lead {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  font-style: italic;
  color: var(--text-mid);
  margin-bottom: 16px;
  line-height: 1.5;
}
.about-body {
  font-size: 0.98rem;
  color: var(--text-mid);
  margin-bottom: 28px;
}
.about-pillars {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}
.pillar {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  transition: background var(--transition), border-color var(--transition);
}
.pillar:hover { background: var(--accent-light); border-color: var(--accent); }
.pillar-icon { font-size: 1.4rem; flex-shrink: 0; }
.pillar strong { display: block; font-size: 0.92rem; font-weight: 600; color: var(--text); }
.pillar span { font-size: 0.82rem; color: var(--text-light); }

.about-mission {
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 22px;
  margin-bottom: 28px;
}
.about-mission p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--accent-dark);
  line-height: 1.6;
}

/* ===== SERVICES ===== */
.services {
  padding: 100px 0;
  background: var(--bg);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px 24px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-light), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}
.service-card:hover::before { opacity: 1; }
.service-icon-wrap {
  width: 56px;
  height: 56px;
  background: var(--accent-light);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent);
  transition: background var(--transition);
}
.service-card:hover .service-icon-wrap { background: var(--accent); color: white; }
.service-icon { width: 28px; height: 28px; }
.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}
.service-card p {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.65;
  margin-bottom: 20px;
}
.service-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}
.service-price {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  padding: 4px 10px;
  border-radius: 20px;
}
.service-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  transition: letter-spacing var(--transition);
}
.service-link:hover { letter-spacing: 0.05em; }

/* ===== APPOINTMENT ===== */
.appointment {
  padding: 100px 0;
  background: var(--surface);
}
.appointment-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 64px;
  align-items: start;
}
.appointment-info h2 { margin-bottom: 14px; }
.appointment-info > p {
  font-size: 0.98rem;
  color: var(--text-mid);
  margin-bottom: 28px;
}
.appt-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}
.appt-feat {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-mid);
}
.appt-feat span {
  color: var(--accent-2);
  font-weight: 700;
}
.appt-hours { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.appt-hours h4 { font-size: 0.88rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-light); margin-bottom: 14px; }
.hours-grid { display: grid; grid-template-columns: auto 1fr; gap: 8px 24px; font-size: 0.9rem; }
.hours-grid span:nth-child(odd) { color: var(--text); font-weight: 500; }
.hours-grid span:nth-child(even) { color: var(--text-mid); }

/* ===== FORMS ===== */
.appt-form, .contact-form {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 18px;
}
.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.93rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-light);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26,111,168,0.1);
}
.form-group input.invalid,
.form-group textarea.invalid,
.form-group select.invalid {
  border-color: var(--danger);
}
.field-error {
  font-size: 0.78rem;
  color: var(--danger);
  min-height: 16px;
}
textarea { resize: vertical; min-height: 100px; }

/* ===== TESTIMONIALS ===== */
.testimonials {
  padding: 100px 0;
  background: var(--bg);
  overflow: hidden;
}
.testimonials-slider {
  position: relative;
}
.testimonials-track {
  display: flex;
  gap: 24px;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}
.testi-card {
  flex: 0 0 calc(33.333% - 16px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.testi-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.testi-stars {
  font-size: 1rem;
  color: var(--gold);
  margin-bottom: 16px;
  letter-spacing: 2px;
}
.testi-text {
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 24px;
  font-style: italic;
}
.testi-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.testi-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}
.testi-author strong { display: block; font-size: 0.92rem; color: var(--text); }
.testi-author span { font-size: 0.8rem; color: var(--text-light); }

.slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 36px;
}
.slider-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  font-size: 1.4rem;
  color: var(--text-mid);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.slider-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.slider-dots { display: flex; gap: 8px; }
.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.slider-dot.active {
  background: var(--accent);
  transform: scale(1.3);
}

/* ===== GALLERY ===== */
.gallery {
  padding: 100px 0;
  background: var(--surface);
}
.gallery-tabs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 36px;
}
.tab-btn {
  padding: 9px 22px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-mid);
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  transition: all var(--transition);
}
.tab-btn:hover, .tab-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--border);
  aspect-ratio: 4/3;
  transition: transform var(--transition), box-shadow var(--transition);
}
.gallery-item-wide { grid-column: span 2; aspect-ratio: 16/7; }
.gallery-item:hover { transform: scale(1.02); box-shadow: var(--shadow-md); }
.gallery-item.hidden { display: none; }
.gallery-thumb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-thumb svg { width: 100%; height: 100%; object-fit: cover; }
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26,111,168,0.75);
  display: flex;
  align-items: flex-end;
  padding: 18px;
  opacity: 0;
  transition: opacity var(--transition);
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay span {
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  cursor: pointer;
}
.lightbox-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  width: 90vw;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: rgba(0,0,0,0.5);
  color: white;
  border-radius: 50%;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  z-index: 2;
}
.lightbox-close:hover { background: var(--danger); }
.lightbox-img-wrap svg { width: 100%; display: block; }
.lightbox-caption {
  padding: 16px 20px;
  font-size: 0.9rem;
  color: var(--text-mid);
  text-align: center;
  font-style: italic;
}

/* ===== CONTACT ===== */
.contact {
  padding: 100px 0;
  background: var(--bg);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: start;
}
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.contact-detail {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.contact-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 2px; }
.contact-detail strong { display: block; font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-light); margin-bottom: 4px; }
.contact-detail span, .contact-detail a { font-size: 0.95rem; color: var(--text-mid); }
.contact-detail a:hover { color: var(--accent); }
.map-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }

/* ===== FOOTER ===== */
.footer {
  background: var(--text);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 0;
}
body.dark-mode .footer { background: #050d16; }
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .nav-logo { color: white; margin-bottom: 14px; }
.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.65;
  margin-bottom: 20px;
  color: rgba(255,255,255,0.55);
}
.social-links { display: flex; gap: 10px; }
.social-btn {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
  transition: background var(--transition);
  border: 1px solid rgba(255,255,255,0.15);
}
.social-btn:hover { background: var(--accent); border-color: var(--accent); }
.footer-links-group h4 {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: white;
  margin-bottom: 18px;
}
.footer-links-group ul { display: flex; flex-direction: column; gap: 10px; }
.footer-links-group a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.55);
  transition: color var(--transition);
}
.footer-links-group a:hover { color: var(--accent); }
.footer-newsletter h4 {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: white;
  margin-bottom: 10px;
}
.footer-newsletter > p { font-size: 0.88rem; margin-bottom: 16px; }
.newsletter-form { display: flex; gap: 8px; }
.newsletter-form input {
  flex: 1;
  padding: 10px 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: white;
  font-size: 0.88rem;
  outline: none;
  transition: border-color var(--transition);
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.35); }
.newsletter-form input:focus { border-color: var(--accent); }
.newsletter-form .btn-primary { padding: 10px 18px; font-size: 0.85rem; border-radius: 8px; white-space: nowrap; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  font-size: 0.82rem;
}
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { color: rgba(255,255,255,0.4); transition: color var(--transition); }
.footer-legal a:hover { color: rgba(255,255,255,0.8); }

/* ===== MODALS ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal[hidden] { display: none; }
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  cursor: pointer;
}
.modal-box {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s cubic-bezier(0.4,0,0.2,1);
}
.modal-box-wide { max-width: 680px; }
.modal-box-narrow { max-width: 420px; }
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(16px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  background: var(--surface-2);
  border-radius: 50%;
  font-size: 0.9rem;
  color: var(--text-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
}
.modal-close:hover { background: var(--danger-light); color: var(--danger); }

/* Auth Modal */
.auth-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 28px;
}
.auth-tab {
  flex: 1;
  padding: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-light);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color var(--transition), border-color var(--transition);
}
.auth-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.auth-panel h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.auth-sub { font-size: 0.9rem; color: var(--text-light); margin-bottom: 24px; }
.auth-switch {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 16px;
}
.link-btn {
  color: var(--accent);
  font-size: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Dashboard */
.dash-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.dash-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dash-header h3 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; }
.dash-email { font-size: 0.85rem; color: var(--text-light); }
.dash-header .btn-ghost { margin-left: auto; }

.dash-stats {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.dash-stat {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  text-align: center;
}
.dash-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
}
.dash-stat span { font-size: 0.8rem; color: var(--text-light); }

.dash-section h4 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-bottom: 14px;
}
.appt-history { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.appt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
}
.appt-info strong { display: block; font-size: 0.9rem; font-weight: 600; color: var(--text); }
.appt-info span { font-size: 0.82rem; color: var(--text-light); }
.appt-meta { display: flex; align-items: center; gap: 10px; }
.appt-date { font-size: 0.82rem; color: var(--text-light); }
.appt-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}
.status-done { background: var(--accent-2-light); color: var(--accent-2); }
.status-upcoming { background: var(--gold-light); color: var(--gold); }

/* Confirmation Modal */
.confirm-content { text-align: center; }
.confirm-icon { font-size: 3rem; margin-bottom: 16px; }
.confirm-content h3 { font-family: var(--font-display); font-size: 1.8rem; margin-bottom: 12px; }
.confirm-content p { font-size: 0.95rem; color: var(--text-mid); margin-bottom: 20px; }
.confirm-detail {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-size: 0.88rem;
  color: var(--text-mid);
  text-align: left;
  margin-bottom: 24px;
  line-height: 1.8;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 4000;
  background: var(--text);
  color: white;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  max-width: 340px;
  animation: toastIn 0.3s ease;
}
.toast[hidden] { display: none; }
.toast.success { background: var(--accent-2); }
.toast.error { background: var(--danger); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero { flex-direction: column; text-align: center; padding-top: 120px; }
  .hero-content { max-width: 100%; }
  .hero-cta, .hero-stats { justify-content: center; }
  .hero-visual { width: 300px; margin: 0 auto; }
  .badge-1 { left: -20px; bottom: -10px; }
  .badge-2 { right: -20px; top: 10px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .about-visual { max-width: 400px; margin: 0 auto; }
  .appointment-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; position: fixed; top: 68px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); flex-direction: column; padding: 16px; gap: 4px; box-shadow: var(--shadow-md); }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  .btn-nav-primary { display: none; }
  .services-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-item-wide { grid-column: span 2; }
  .testi-card { flex: 0 0 calc(100% - 0px); }
  .footer-top { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero-stats { flex-wrap: wrap; gap: 16px; }
  .hero-visual { width: 240px; }
  .badge-1, .badge-2 { display: none; }
  .modal-box { padding: 28px 20px; }
  .dash-stats { grid-template-columns: repeat(3,1fr); }
  .appt-row { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item-wide { grid-column: span 1; }
  .hero-title { font-size: 2.8rem; }
  .appt-form, .contact-form { padding: 22px 18px; }
  .newsletter-form { flex-direction: column; }
}