/* ==========================================================================
   AXOM DENTAL CLINIC - Global Stylesheet (Desktop, Tablet & Compact Mobile)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400;1,6..72,500&display=swap');

:root {
  /* Boutique Clinical Palette */
  --primary: #1e3a34;           /* Deep Eucalyptus */
  --primary-dark: #142824;      /* Forest Ink */
  --primary-light: #d6e2dc;     /* Soft Sage Border */
  --primary-soft: #ecf1ee;      /* Muted Sage Wash */
  --navy: #182320;              /* Deep Organic Charcoal */
  --navy-light: #25332f;
  --text-main: #222624;         /* Warm Obsidian */
  --text-muted: #585c58;        /* Stone Grey */
  --text-light: #767a75;
  --bg-body: #faf8f5;           /* Warm Porcelain */
  --bg-surface: #ffffff;        /* Pure Crisp White for Cards */
  --bg-subtle: #f2eee7;         /* Soft Linen Sand */
  --border: #e5dfd5;            /* Warm Hairline Border */
  --border-strong: #cfc7ba;
  --whatsapp: #20523c;          /* Muted Botanical Green */
  --whatsapp-dark: #173d2c;
  --accent-gold: #b48a3e;       /* Brushed Brass */
  --danger: #b43c32;
  --success: #2f7d57;

  /* Typography */
  --font-heading: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing & Sizing */
  --container-max: 1180px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 2px 8px rgba(24, 35, 32, 0.04);
  --shadow-md: 0 12px 28px rgba(24, 35, 32, 0.07);
  --shadow-lg: 0 20px 44px rgba(24, 35, 32, 0.1);
  --transition: all 0.24s ease;
}

/* Reset & Anti-Overflow Lock */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-body);
  line-height: 1.65;
  max-width: 100%;
  overflow-x: clip;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--navy);
  line-height: 1.16;
  font-weight: 500;
  letter-spacing: -0.015em;
}

/* Utility Layout */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 88px 0;
}

.section-alt {
  background-color: var(--bg-subtle);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--primary);
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid var(--accent-gold);
}

.section-header h2 {
  font-size: clamp(1.85rem, 3.4vw, 2.75rem);
  margin-bottom: 14px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.02rem;
}

/* Top Utility Bar */
.top-bar {
  background-color: var(--navy);
  color: #dcd8cf;
  font-size: 0.82rem;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.top-bar-left,
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.top-bar-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.top-bar a:hover {
  color: #ffffff;
}

/* Live Open/Closed Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #f3f0ea;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #52b788;
  flex-shrink: 0;
}

.status-badge.is-closed .status-dot {
  background-color: #d9776c;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(250, 248, 245, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.site-header.scrolled {
  background: rgba(250, 248, 245, 0.99);
  box-shadow: var(--shadow-sm);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background-color: var(--primary);
  color: #faf8f5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-text strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.22rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.brand-text span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 6px 0;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--navy);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Mobile / Tablet Menu Button */
.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--navy);
}

/* Hero Section */
.hero {
  position: relative;
  padding: 72px 0 84px;
  background-color: var(--bg-body);
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 52px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 22px;
}

.hero-badge .stars {
  color: var(--accent-gold);
  letter-spacing: 1px;
  font-size: 0.9rem;
}

.hero h1 {
  font-size: clamp(2.15rem, 4.6vw, 3.65rem);
  margin-bottom: 18px;
  color: var(--navy);
  font-weight: 500;
}

.hero h1 span {
  color: var(--primary);
  font-style: italic;
  font-weight: 400;
}

.hero-subtitle {
  font-size: 1.04rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 530px;
  line-height: 1.7;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.hero-meta-item strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.32rem;
  font-weight: 500;
  color: var(--navy);
}

.hero-meta-item span {
  font-size: 0.83rem;
  color: var(--text-light);
}

.hero-visual {
  position: relative;
  min-width: 0;
}

/* Page Banner (Inner Pages) */
.page-banner {
  background-color: var(--navy);
  color: #f3f0ea;
  padding: 64px 0;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.page-banner h1 {
  color: #ffffff;
  font-size: clamp(1.95rem, 3.8vw, 3rem);
  margin-bottom: 12px;
}

.page-banner p {
  color: #c7cdc9;
  max-width: 600px;
  margin: 0 auto;
  font-size: 1rem;
}

.breadcrumb {
  display: inline-block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #d8b56c;
  margin-bottom: 12px;
  font-weight: 600;
}

/* Safe Responsive Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

/* Footer */
.site-footer {
  background-color: var(--navy);
  color: #c5cbc7;
  padding: 72px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr) minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand p {
  margin-top: 16px;
  font-size: 0.92rem;
  color: #a9b1ac;
  max-width: 320px;
  line-height: 1.65;
}

.footer-col h4 {
  font-family: var(--font-body);
  color: #ffffff;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  margin-bottom: 18px;
}

.footer-links {
  display: grid;
  gap: 11px;
}

.footer-links a {
  font-size: 0.93rem;
  color: #b7bfba;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-contact-list {
  display: grid;
  gap: 14px;
  font-size: 0.92rem;
  color: #b7bfba;
}

.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.footer-contact-list svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: #d8b56c;
}

.footer-bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.84rem;
  color: #8f9893;
}

/* ==========================================================================
   TABLET BREAKPOINT (641px – 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  .container {
    padding: 0 22px;
  }

  .section {
    padding: 72px 0;
  }

  .hero {
    padding: 56px 0 72px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-subtitle {
    max-width: 640px;
  }

  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px;
  }
}

/* Mobile/Tablet Drawer below 900px */
@media (max-width: 900px) {
  .top-bar-left {
    display: none;
  }

  .top-bar-inner {
    justify-content: space-between;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--bg-body);
    flex-direction: column;
    align-items: stretch;
    padding: 14px 20px 20px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    z-index: 999;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-links a {
    font-size: 1rem;
    padding: 11px 4px;
    border-bottom: 1px solid var(--border);
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .nav-links a.active::after {
    display: none;
  }

  .nav-links a.active {
    color: var(--primary);
    font-weight: 600;
  }

  .nav-actions .btn-desktop-only {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }
}

/* ==========================================================================
   COMPACT MOBILE PHONE BREAKPOINT (Up to 640px)
   ========================================================================== */
@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .top-bar {
    padding: 7px 0;
    font-size: 0.75rem;
  }

  .top-bar-right {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .status-badge {
    font-size: 0.72rem;
    padding: 3px 9px;
  }

  .nav-wrapper {
    height: 60px;
  }

  .brand-icon {
    width: 34px;
    height: 34px;
  }

  .brand-text strong {
    font-size: 1.05rem;
  }

  .brand-text span {
    font-size: 0.7rem;
  }

  .menu-toggle {
    width: 38px;
    height: 38px;
  }

  /* Tighter Section Rhythm — Cuts Excessive Vertical Scroll */
  .section {
    padding: 38px 0;
  }

  .section-header {
    margin-bottom: 22px;
    text-align: left;
  }

  .section-eyebrow {
    font-size: 0.7rem;
    margin-bottom: 8px;
    padding-bottom: 4px;
  }

  .section-header h2 {
    font-size: 1.6rem;
    margin-bottom: 8px;
  }

  .section-header p {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  /* Compact Hero */
  .hero {
    padding: 24px 0 36px;
  }

  .hero-grid {
    gap: 24px;
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 5px 11px;
    margin-bottom: 14px;
  }

  .hero h1 {
    font-size: 1.92rem;
    line-height: 1.14;
    margin-bottom: 12px;
  }

  .hero-subtitle {
    font-size: 0.92rem;
    line-height: 1.55;
    margin-bottom: 20px;
  }

  /* Side-by-Side Hero Buttons Instead of Tall Stack */
  .hero-cta-group {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 10px;
    margin-bottom: 22px;
  }

  .hero-cta-group .btn {
    width: 100%;
    padding: 10px 10px;
    font-size: 0.84rem;
    min-height: 44px;
    gap: 6px;
  }

  .hero-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding-top: 16px;
  }

  .hero-meta-item strong {
    font-size: 1.05rem;
  }

  .hero-meta-item span {
    font-size: 0.72rem;
    line-height: 1.25;
    display: block;
  }

  .page-banner {
    padding: 34px 0;
  }

  .page-banner h1 {
    font-size: 1.75rem;
    margin-bottom: 8px;
  }

  .page-banner p {
    font-size: 0.9rem;
  }

  .grid-2 {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  /* App-Style Horizontal Swipe Carousel for 3-Column Card Sections */
  .grid-3 {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
    margin: 0 -16px;
    padding: 2px 16px 14px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
  }

  .grid-3::-webkit-scrollbar {
    height: 4px;
  }

  .grid-3::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 999px;
  }

  .grid-3 > * {
    flex: 0 0 80%;
    scroll-snap-align: start;
  }

  /* Keep Dedicated Services Page (9 treatments) Easy to Scan Vertically */
  .grid-3:has(.service-card .btn) {
    display: grid;
    grid-template-columns: 1fr;
    overflow-x: visible;
    margin: 0;
    padding: 0;
    gap: 12px;
  }

  .grid-3:has(.service-card .btn) > * {
    flex: none;
  }

  /* 2x2 Compact Grid for 4-Column Feature Blocks */
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  /* Compact 2-Column Mobile Footer */
  .site-footer {
    padding: 40px 0 84px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 16px;
    padding-bottom: 28px;
  }

  .footer-brand,
  .footer-col:last-child {
    grid-column: 1 / -1;
  }

  .footer-brand p {
    margin-top: 10px;
    font-size: 0.86rem;
  }

  .footer-col h4 {
    margin-bottom: 12px;
    font-size: 0.76rem;
  }

  .footer-links {
    gap: 8px;
  }

  .footer-links a,
  .footer-contact-list {
    font-size: 0.85rem;
  }

  .footer-bottom {
    padding-top: 18px;
    flex-direction: column;
    align-items: flex-start;
    font-size: 0.78rem;
  }
}