/* Downtown Dental - Complete Live Visual Styling Engine */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,600;1,700&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600;1,700&family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,600&display=swap');

:root {
  /* Global Brand Accent */
  --theme-primary: #0f766e;
  --theme-primary-hover: #115e59;
  --theme-primary-dark: #134e4a;
  --theme-primary-light: #f0fdfa;
  --theme-primary-border: #99f6e4;
  
  /* Topbar & Header */
  --theme-topbar-bg: #0f172a;
  --theme-topbar-text: #ffffff;
  --theme-header-bg: #ffffff;
  --theme-header-text: #0f172a;
  
  /* Page Body */
  --theme-page-bg: #f8fafc;
  --theme-page-gradient: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
  --theme-page-text: #1e293b;
  
  /* Hero Dynamic Gradient Overlay & Badges */
  --theme-hero-gradient-start: #0f172a;
  --theme-hero-gradient-mid: rgba(15, 23, 42, 0.88);
  --theme-hero-gradient-end: rgba(15, 23, 42, 0.45);
  --theme-hero-title-color: #ffffff;
  --theme-hero-title-font: 'Playfair Display', Georgia, serif;
  --theme-hero-title-weight: 800;
  --theme-hero-title-style: normal;
  --theme-hero-desc-color: #cbd5e1;

  --theme-hero-badge1-bg: #450a0a;
  --theme-hero-badge1-text: #fca5a5;
  --theme-hero-badge1-border: #991b1b;

  --theme-hero-badge2-bg: #042f2e;
  --theme-hero-badge2-text: #5eead4;
  --theme-hero-badge2-border: #115e59;

  /* Hero Partner Card Styling */
  --theme-partner-card-bg: rgba(255, 255, 255, 0.95);
  --theme-partner-card-blur: 24px;
  --theme-partner-card-radius: 28px;
  --theme-partner-card-border: rgba(255, 255, 255, 0.85);
  --theme-partner-badge-color: #0f766e;
  --theme-partner-title-color: #0f172a;
  --theme-partner-title-font: 'Plus Jakarta Sans', sans-serif;
  --theme-partner-title-weight: 700;
  --theme-partner-title-style: normal;
  --theme-partner-quote-color: #334155;
  --theme-partner-quote-style: italic;
  --theme-partner-addr-color: #0f172a;
  --theme-partner-link-color: #0f766e;

  /* Stats Bar Section */
  --theme-stats-bg: #0f766e;
  --theme-stats-text: #ffffff;
  --theme-stats-num-color: #99f6e4;

  /* Services Section Background & Headings */
  --theme-services-section-bg: #f8fafc;
  --theme-services-heading-color: #0f172a;
  --theme-services-heading-font: 'Playfair Display', Georgia, serif;
  --theme-services-heading-weight: 800;
  --theme-services-heading-style: normal;
  --theme-services-desc-color: #475569;

  /* Calgary Flames Section */
  --theme-flames-section-bg: #0f172a;
  --theme-flames-title-color: #ffffff;
  --theme-flames-text-color: #cbd5e1;

  /* Bottom CTA Banner Section */
  --theme-cta-banner-bg: linear-gradient(135deg, #042f2e 0%, #0f766e 60%, #0f172a 100%);
  --theme-cta-title-color: #ffffff;
  --theme-cta-text-color: #ccfbf1;

  /* Footer Section */
  --theme-footer-bg: #0f172a;
  --theme-footer-heading-color: #2dd4bf;
  --theme-footer-text-color: #94a3b8;

  /* Universal 3D Frosted Glass Tile Styling */
  --theme-card-radius: 28px;
  --theme-card-bg: rgba(255, 255, 255, 0.92);
  --theme-card-border: rgba(255, 255, 255, 0.65);
  --theme-card-rim-glow: rgba(255, 255, 255, 0.9);
  --theme-card-blur: 20px;
  --theme-card-backdrop: blur(var(--theme-card-blur));
  --theme-card-shadow: 0 16px 36px -8px rgba(15, 23, 42, 0.12), inset 0 1px 2px 0 var(--theme-card-rim-glow), inset 0 -1px 2px 0 rgba(0, 0, 0, 0.05);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden !important;
  position: relative;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--theme-page-text);
  background: var(--theme-page-gradient);
  -webkit-text-size-adjust: 100%;
}

.font-serif-title {
  font-family: 'Playfair Display', Georgia, serif;
}

/* 3D Frosted Glass Tile Card */
.glass-tile, .theme-card, .bg-white.rounded-3xl, .bg-slate-50.rounded-3xl {
  background: var(--theme-card-bg) !important;
  backdrop-filter: var(--theme-card-backdrop) !important;
  -webkit-backdrop-filter: var(--theme-card-backdrop) !important;
  border-radius: var(--theme-card-radius) !important;
  border: 1px solid var(--theme-card-border) !important;
  box-shadow: var(--theme-card-shadow) !important;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease;
}

.glass-tile:hover, .theme-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 48px -10px rgba(15, 23, 42, 0.2), inset 0 1px 2px 0 var(--theme-card-rim-glow) !important;
}

/* Hero Overlay Gradient */
.hero-overlay-gradient {
  background: linear-gradient(105deg, var(--theme-hero-gradient-start) 0%, var(--theme-hero-gradient-mid) 60%, var(--theme-hero-gradient-end) 100%) !important;
}

.hero-main-title {
  color: var(--theme-hero-title-color) !important;
  font-family: var(--theme-hero-title-font) !important;
  font-weight: var(--theme-hero-title-weight) !important;
  font-style: var(--theme-hero-title-style) !important;
}

.hero-main-desc {
  color: var(--theme-hero-desc-color) !important;
}

/* Hero Badges */
.hero-badge-1 {
  background-color: var(--theme-hero-badge1-bg) !important;
  color: var(--theme-hero-badge1-text) !important;
  border-color: var(--theme-hero-badge1-border) !important;
}

.hero-badge-2 {
  background-color: var(--theme-hero-badge2-bg) !important;
  color: var(--theme-hero-badge2-text) !important;
  border-color: var(--theme-hero-badge2-border) !important;
}

/* Meet The Partners Card (High Contrast) */
.hero-partner-card {
  background: var(--theme-partner-card-bg) !important;
  backdrop-filter: blur(var(--theme-partner-card-blur)) !important;
  -webkit-backdrop-filter: blur(var(--theme-partner-card-blur)) !important;
  border-radius: var(--theme-partner-card-radius) !important;
  border: 1px solid var(--theme-partner-card-border) !important;
  box-shadow: 0 22px 50px -10px rgba(0,0,0,0.4), inset 0 1px 2px rgba(255,255,255,0.9) !important;
}

.hero-partner-badge {
  color: var(--theme-partner-badge-color) !important;
}

.hero-partner-title {
  color: var(--theme-partner-title-color) !important;
  font-family: var(--theme-partner-title-font) !important;
  font-weight: var(--theme-partner-title-weight) !important;
  font-style: var(--theme-partner-title-style) !important;
}

.hero-partner-quote {
  color: var(--theme-partner-quote-color) !important;
  font-style: var(--theme-partner-quote-style) !important;
}

.hero-partner-addr {
  color: var(--theme-partner-addr-color) !important;
}

.hero-partner-link {
  color: var(--theme-partner-link-color) !important;
}

/* Section Dynamic Backgrounds */
.section-services-bg {
  background: var(--theme-services-section-bg) !important;
}

.services-main-title {
  color: var(--theme-services-heading-color) !important;
  font-family: var(--theme-services-heading-font) !important;
  font-weight: var(--theme-services-heading-weight) !important;
  font-style: var(--theme-services-heading-style) !important;
}

.services-main-desc {
  color: var(--theme-services-desc-color) !important;
}

.section-flames-bg {
  background: var(--theme-flames-section-bg) !important;
}

.flames-main-title {
  color: var(--theme-flames-title-color) !important;
}

.flames-main-desc {
  color: var(--theme-flames-text-color) !important;
}

.section-cta-banner-bg {
  background: var(--theme-cta-banner-bg) !important;
}

.cta-banner-title {
  color: var(--theme-cta-title-color) !important;
}

.cta-banner-desc {
  color: var(--theme-cta-text-color) !important;
}

.section-footer-bg {
  background: var(--theme-footer-bg) !important;
}

/* Dynamic Themed Components */
.btn-theme-primary {
  background-color: var(--theme-primary) !important;
  color: #ffffff !important;
  border-radius: calc(var(--theme-card-radius) * 0.45) !important;
  transition: all 0.2s ease;
}
.btn-theme-primary:hover {
  background-color: var(--theme-primary-hover) !important;
  transform: scale(1.02);
}

.text-theme-primary {
  color: var(--theme-primary) !important;
}

.border-theme-primary {
  border-color: var(--theme-primary) !important;
}

.bg-theme-light {
  background-color: var(--theme-primary-light) !important;
}

/* Topbar & Header Dynamic Theming */
.theme-topbar {
  background-color: var(--theme-topbar-bg) !important;
  color: var(--theme-topbar-text) !important;
}

.theme-header {
  background-color: var(--theme-header-bg) !important;
  color: var(--theme-header-text) !important;
}

.theme-stats {
  background-color: var(--theme-stats-bg) !important;
  color: var(--theme-stats-text) !important;
}

.theme-page-bg {
  background: var(--theme-page-gradient) !important;
}

/* Modal Animations */
.modal-backdrop {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-backdrop.active, #booking-modal[style*="display: flex"] {
  opacity: 1 !important;
  visibility: visible !important;
}

img {
  max-width: 100%;
  height: auto;
  image-rendering: -webkit-optimize-contrast;
}

/* ============================================================
   Theme Coverage Layer
   Maps the remaining hard-coded utility colors inside each
   section to the live theme variables, so an admin theme
   change repaints the WHOLE page (flames, testimonials,
   CTA banner, footer, accents) — not just a few blocks.
   ============================================================ */

/* --- Global brand accent utilities --- */
.text-teal-600, .text-teal-700, .text-teal-800, .text-teal-900,
.theme-text-primary {
  color: var(--theme-primary) !important;
}
.bg-teal-50, .bg-teal-100 {
  background-color: var(--theme-primary-light) !important;
}
.border-teal-100, .border-teal-200, .border-teal-300 {
  border-color: var(--theme-primary-border) !important;
}
.bg-teal-600, .bg-teal-700 {
  background-color: var(--theme-primary) !important;
}
.hover\:bg-teal-700:hover, .hover\:bg-teal-800:hover {
  background-color: var(--theme-primary-hover) !important;
}
.hover\:text-teal-300:hover, .hover\:text-teal-400:hover,
.hover\:text-teal-600:hover, .hover\:text-teal-700:hover {
  color: var(--theme-primary) !important;
}

/* --- Stats bar numbers --- */
.theme-stats .text-teal-200, .theme-stats .text-teal-300 {
  color: var(--theme-stats-num-color) !important;
}

/* --- Calgary Flames / dark feature section --- */
.section-flames-bg .text-slate-300,
.section-flames-bg .text-slate-400,
.section-flames-bg blockquote,
.section-flames-bg li, .section-flames-bg p {
  color: var(--theme-flames-text-color) !important;
}
.section-flames-bg h2, .section-flames-bg h3, .section-flames-bg h4 {
  color: var(--theme-flames-title-color) !important;
}
.section-flames-bg .text-transparent {
  color: var(--theme-flames-title-color) !important;
  background-image: none !important;
  -webkit-text-fill-color: currentColor !important;
}
.section-flames-bg .text-teal-300, .section-flames-bg .text-teal-400 {
  color: var(--theme-primary-border) !important;
}

/* --- Testimonials section --- */
.section-testimonials-bg {
  background: var(--theme-services-section-bg) !important;
}
.testimonials-main-title {
  color: var(--theme-services-heading-color) !important;
  font-family: var(--theme-services-heading-font) !important;
  font-weight: var(--theme-services-heading-weight) !important;
  font-style: var(--theme-services-heading-style) !important;
}
.section-testimonials-bg .text-slate-600,
.section-testimonials-bg .text-slate-500 {
  color: var(--theme-services-desc-color) !important;
}

/* --- Bottom CTA banner --- */
.section-cta-banner-bg h2 { color: var(--theme-cta-title-color) !important; }
.section-cta-banner-bg p,
.section-cta-banner-bg .text-teal-100,
.section-cta-banner-bg .text-teal-200 {
  color: var(--theme-cta-text-color) !important;
}
.section-cta-banner-bg .bg-teal-800,
.section-cta-banner-bg .bg-teal-900 {
  background-color: var(--theme-primary-dark) !important;
  border-color: var(--theme-primary) !important;
}
.section-cta-banner-bg .hover\:bg-teal-700:hover {
  background-color: var(--theme-primary-hover) !important;
}
.section-cta-banner-bg .bg-white {
  color: var(--theme-primary-dark) !important;
}

/* --- Footer --- */
.section-footer-bg h3, .section-footer-bg h4,
.section-footer-bg .text-teal-300, .section-footer-bg .text-teal-400 {
  color: var(--theme-footer-heading-color) !important;
}
.section-footer-bg,
.section-footer-bg p, .section-footer-bg li, .section-footer-bg span,
.section-footer-bg a, .section-footer-bg div,
.section-footer-bg .text-slate-300, .section-footer-bg .text-slate-400,
.section-footer-bg .text-slate-500 {
  color: var(--theme-footer-text-color);
}
.section-footer-bg a:hover { color: var(--theme-primary) !important; }
.section-footer-bg .clinic-social-links a { color: var(--theme-footer-heading-color); }
.section-footer-bg .clinic-social-links a:hover { color: var(--theme-primary) !important; }

/* --- Topbar accents --- */
.theme-topbar .text-slate-300, .theme-topbar .text-slate-400 {
  color: var(--theme-topbar-text) !important;
  opacity: 0.85;
}
