/* ============================================
   APEX DENTAL — Dental Practice Template
   Navy + ocean + coral, clean medical
   ============================================ */
:root {
  --navy: #1B3A5C;
  --navy-dark: #132A45;
  --ocean: #2C7B9E;
  --ocean-light: #4A9BC0;
  --sky: #E8F4F8;
  --coral: #E86F5E;
  --coral-dark: #D45A4A;
  --ink: #1A1F36;
  --muted: #5A6B7D;
  --line: #DDE5ED;
  --white: #FFFFFF;
  --shadow: 0 12px 32px rgba(26, 31, 54, 0.08);
  --shadow-lg: 0 24px 56px rgba(26, 31, 54, 0.14);
  --radius: 12px;
  --radius-lg: 20px;
  --font-head: 'DM Serif Display', Georgia, serif;
  --font-body: 'Inter', 'Helvetica Neue', sans-serif;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;
  --space-9: 96px; --space-10: 128px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 16px; line-height: 1.65;
  color: var(--ink); background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.container { width: min(1180px, 92%); margin: 0 auto; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.nav-logo {
  font-family: var(--font-head);
  font-size: 24px; font-weight: 400;
  letter-spacing: -0.3px;
  color: var(--navy);
}
.nav-logo em { font-style: normal; color: var(--ocean); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-link {
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--ink); opacity: 0.8;
  transition: color 0.2s, opacity 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--ocean); opacity: 1; }
.nav-cta {
  background: var(--coral); color: var(--white);
  padding: 11px 24px; border-radius: 8px;
  font-weight: 600; font-size: 13px; letter-spacing: 0.3px;
  transition: background 0.2s;
}
.nav-cta:hover { background: var(--coral-dark); }
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 40px; height: 40px; flex-direction: column; justify-content: center;
  align-items: center; gap: 5px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--navy);
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: 560px; display: flex; align-items: center;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
}
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover;
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 1s ease;
}
.hero-bg img.active { opacity: 1; }
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(120deg, rgba(27, 58, 92, 0.88), rgba(44, 123, 158, 0.72));
}
.hero .container { position: relative; z-index: 2; padding: 80px 0; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.15); color: var(--white);
  padding: 8px 18px; border-radius: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.5px;
  backdrop-filter: blur(4px);
}
.hero-title {
  font-family: var(--font-head);
  font-size: clamp(42px, 5.5vw, 64px);
  font-weight: 400; line-height: 1.05;
  margin: 24px 0 16px; color: var(--white);
  max-width: 620px;
}
.hero-title em { color: #FFD166; }
.hero-desc { font-size: 17px; color: rgba(255,255,255,0.8); max-width: 480px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 14px 30px;
  border-radius: 8px; font-size: 14px; font-weight: 600;
  transition: transform 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn--coral { background: var(--coral); color: var(--white); }
.btn--coral:hover { background: var(--coral-dark); }
.btn--ghost { border: 1.5px solid rgba(255,255,255,0.5); color: var(--white); background: transparent; }
.btn--ghost:hover { border-color: var(--white); background: rgba(255,255,255,0.1); }
.btn--navy { background: var(--navy); color: var(--white); }
.btn--navy:hover { background: var(--navy-dark); }
.btn--ocean { background: var(--ocean); color: var(--white); }
.btn--ocean:hover { background: var(--ocean-light); }
.btn--white { background: var(--white); color: var(--navy); }
.btn--white:hover { background: var(--sky); }

/* ---------- Section scaffolding ---------- */
.section { padding: var(--space-9) 0; }
.section--sky { background: var(--sky); }
.section--navy { background: var(--navy); color: var(--white); }
.section--navy .section-title { color: var(--white); }
.section--navy .section-desc { color: rgba(255,255,255,0.7); }
.section--navy .section-label { color: #FFD166; }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.section-label {
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--ocean); font-weight: 700;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 400; color: var(--navy);
  margin: 10px 0 14px;
}
.section-desc { color: var(--muted); font-size: 17px; max-width: 560px; }
.section-head { max-width: 640px; margin-bottom: var(--space-7); }

/* ---------- Services grid ---------- */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.service-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 32px 24px; text-align: center;
  border: 1px solid var(--line);
  transition: transform 0.3s, box-shadow 0.3s;
}
.service-card:hover { transform: translateY(-6px) scale(1.02); box-shadow: var(--shadow); }
.service-card-icon {
  width: 60px; height: 60px; margin: 0 auto 18px;
  background: var(--sky); border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.service-card-title { font-family: var(--font-head); font-size: 20px; font-weight: 400; margin-bottom: 8px; color: var(--navy); }
.service-card-desc { color: var(--muted); font-size: 14px; }
.service-card-cta { display: inline-block; margin-top: 16px; font-size: 13px; font-weight: 600; color: var(--ocean); letter-spacing: 0.3px; transition: color 0.2s; }
.service-card-cta:hover { color: var(--coral); }

/* ---------- About split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.split-img { border-radius: var(--radius-lg); overflow: hidden; }
.split-img img { width: 100%; height: 100%; object-fit: cover; }
.split-body { }
.split-body .section-title { margin-top: 10px; }
.check-list { display: grid; gap: 12px; margin: 22px 0; }
.check-list li { padding-left: 28px; position: relative; font-size: 15px; color: var(--muted); }
.check-list li::before { content: '✓'; position: absolute; left: 0; color: var(--ocean); font-weight: 700; }

/* ---------- Team ---------- */
.team-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.team-card {
  background: var(--white); border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--line);
  transition: transform 0.3s, box-shadow 0.3s;
}
.team-card:hover { transform: translateY(-6px) scale(1.02); box-shadow: var(--shadow); }
.team-card-img { aspect-ratio: 4 / 4.5; overflow: hidden; }
.team-card-img img { width: 100%; height: 100%; object-fit: cover; }
.team-card-body { padding: 18px 16px; text-align: center; }
.team-card-name { font-family: var(--font-head); font-size: 18px; font-weight: 400; color: var(--navy); }
.team-card-role { font-size: 12px; color: var(--ocean); font-weight: 600; letter-spacing: 1px; text-transform: uppercase; margin-top: 4px; }

/* ---------- Testimonials ---------- */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testimonial-card {
  background: var(--white); border-radius: var(--radius);
  padding: 32px 28px; border: 1px solid var(--line);
  position: relative;
}
.testimonial-card-stars { color: #FFD166; font-size: 16px; letter-spacing: 3px; margin-bottom: 12px; }
.testimonial-card-text { font-size: 15px; color: var(--ink); font-style: italic; margin-bottom: 18px; }
.testimonial-card-author { display: flex; align-items: center; gap: 12px; }
.testimonial-card-avatar { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; }
.testimonial-card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.testimonial-card-name { font-weight: 600; font-size: 15px; }
.testimonial-card-role { font-size: 13px; color: var(--muted); }

/* ---------- Stats ---------- */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; text-align: center; }
.stat-num { font-family: var(--font-head); font-size: 44px; font-weight: 400; color: #FFD166; }
.stat-label { font-size: 14px; color: rgba(255,255,255,0.7); letter-spacing: 1px; text-transform: uppercase; margin-top: 6px; }

/* ---------- Insurance / pricing ---------- */
.insurance-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.insurance-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 36px 28px; border: 1px solid var(--line);
  text-align: center; transition: transform 0.3s, box-shadow 0.3s;
}
.insurance-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.insurance-card.featured { border-color: var(--ocean); box-shadow: 0 0 0 2px var(--ocean), var(--shadow); }
.insurance-card-icon { font-size: 40px; margin-bottom: 16px; }
.insurance-card-title { font-family: var(--font-head); font-size: 22px; font-weight: 400; color: var(--navy); margin-bottom: 10px; }
.insurance-card-desc { color: var(--muted); font-size: 14px; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--navy), var(--ocean));
  padding: var(--space-9) 0; text-align: center; color: var(--white);
}
.cta-title { font-family: var(--font-head); font-size: clamp(34px, 4.5vw, 48px); font-weight: 400; margin-bottom: 14px; }
.cta-desc { font-size: 17px; opacity: 0.9; margin-bottom: 30px; }

/* ---------- Contact / forms ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-label { font-size: 13px; letter-spacing: 0.5px; color: var(--ink); font-weight: 600; }
.form-input, .form-select, .form-textarea {
  padding: 13px 16px; border: 1.5px solid var(--line);
  border-radius: 10px; font-family: var(--font-body);
  font-size: 15px; background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--ocean);
  box-shadow: 0 0 0 3px rgba(44, 123, 158, 0.14);
}
.form-textarea { resize: vertical; min-height: 120px; }
.form-ok, .form-err {
  display: none; padding: 13px 18px; border-radius: 10px;
  font-size: 14.5px;
}
.form-ok.show, .form-err.show { display: block; }
.form-ok { background: #EAF7EE; color: #1E7B44; }
.form-err { background: #FDEBEC; color: #B02A37; }
.contact-info {
  background: var(--sky); border-radius: var(--radius-lg);
  padding: 40px 36px;
}
.contact-info h3 { font-family: var(--font-head); font-size: 26px; font-weight: 400; margin-bottom: 22px; color: var(--navy); }
.contact-item { display: flex; gap: 16px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-item:last-child { border-bottom: none; }
.contact-item-icon { width: 44px; height: 44px; flex-shrink: 0; background: var(--white); color: var(--ocean); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.contact-item-label { font-size: 13px; color: var(--muted); letter-spacing: 0.5px; }
.contact-item-text { font-size: 15px; font-weight: 600; margin-top: 2px; }
.hours-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; margin-top: 8px; }
.hours-grid div { display: flex; justify-content: space-between; font-size: 14.5px; padding: 5px 0; border-bottom: 1px dashed var(--line); }

/* ---------- Page hero ---------- */
.page-hero {
  background: var(--navy); padding: 80px 0 60px; text-align: center;
  position: relative; overflow: hidden;
}
.page-hero::after {
  content: ''; position: absolute; right: -60px; top: -60px;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
}
.page-hero-title { font-family: var(--font-head); font-size: clamp(38px, 4.5vw, 50px); font-weight: 400; color: var(--white); position: relative; z-index: 2; }
.page-hero-desc { font-size: 17px; color: rgba(255,255,255,0.7); margin-top: 14px; position: relative; z-index: 2; }

/* ---------- Treatment timeline ---------- */
.timeline { max-width: 720px; margin: 0 auto; }
.timeline-item { display: flex; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.timeline-item:last-child { border-bottom: none; }
.timeline-step { width: 48px; height: 48px; flex-shrink: 0; background: var(--sky); color: var(--ocean); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-size: 20px; font-weight: 400; }
.timeline-content h4 { font-family: var(--font-head); font-size: 20px; font-weight: 400; color: var(--navy); margin-bottom: 6px; }
.timeline-content p { color: var(--muted); font-size: 15px; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-dark); color: rgba(255,255,255,0.75); padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.footer-brand-logo { font-family: var(--font-head); font-size: 26px; color: var(--white); font-weight: 400; }
.footer-brand-logo em { font-style: normal; color: var(--ocean); }
.footer-brand-desc { font-size: 15px; margin-top: 12px; max-width: 300px; color: rgba(255,255,255,0.5); }
.footer-heading { font-family: var(--font-head); font-size: 18px; color: var(--white); margin-bottom: 18px; }
.footer-links { display: grid; gap: 10px; }
.footer-link { font-size: 15px; color: rgba(255,255,255,0.55); transition: color 0.2s; }
.footer-link:hover { color: var(--ocean-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 22px 0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 14px; color: rgba(255,255,255,0.45); }
.back-to-top { position: fixed; bottom: 28px; right: 28px; width: 46px; height: 46px; border-radius: 50%; background: var(--navy); color: var(--white); border: none; font-size: 20px; cursor: pointer; z-index: 90; opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.2s; box-shadow: var(--shadow); }
.back-to-top.show { opacity: 1; pointer-events: auto; }
.back-to-top:hover { transform: translateY(-3px); background: var(--ocean); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .split { grid-template-columns: 1fr; gap: 44px; }
  .contact-grid { grid-template-columns: 1fr; gap: 44px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(3, 1fr); }
  .insurance-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; top: 74px; left: 0; right: 0;
    background: var(--white); flex-direction: column;
    padding: 24px; gap: 20px; align-items: flex-start;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    transform: translateY(-120%); transition: transform 0.35s ease; z-index: 99;
  }
  .nav-links.open { transform: translateY(0); }
  .services-grid, .testimonials-grid, .team-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .cta-banner { padding: 64px 0; }
  .hero-title { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}