/* CC Lead Engine — Dental Implants Referral Template
   Mobile-first responsive CSS. No frameworks, fast loading.
   Forked from templates/home-services/styles.css.

   Differences from home-services:
   - Calmer palette: deep teal/blue accents, off-white backgrounds.
   - System font stack only (no Google Fonts CDN call).
   - Adds: .btn--call-floating, .compare-table, .cost-table,
     .disclaimer-block, .results-grid, .map-embed, .hero--with-form.
   - .hero--with-form lays out an above-the-fold qualifying form on a
     375x667 mobile viewport (form visible without scrolling).
*/

/* ============================================================
   RESET & BASE
   ============================================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #1c2b3a;
  background: #ffffff;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #0a6c74;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #08545a;
}

ul, ol {
  padding-left: 1.5rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}
.skip-link:focus {
  left: 0;
  top: 0;
  background: #0a6c74;
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 200;
}

/* ============================================================
   CSS VARIABLES
   ============================================================ */

:root {
  --color-primary: #0a3d4f;
  --color-accent: #0a6c74;
  --color-accent-dark: #08545a;
  --color-cta: #1d8a4a;
  --color-cta-dark: #166935;
  --color-bg-light: #f4f7f9;
  --color-bg-dark: #0a3d4f;
  --color-text: #1c2b3a;
  --color-text-light: #4a5a6b;
  --color-text-white: #fff;
  --color-border: #d8e1ea;
  --color-success: #1d8a4a;
  --color-warning: #b54b00;
  --max-width: 1200px;
  --header-height: 64px;
}

/* ============================================================
   LAYOUT
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 2.5rem 0;
}

.section--dark {
  background: var(--color-bg-dark);
  color: var(--color-text-white);
}

.section--light {
  background: var(--color-bg-light);
}

/* ============================================================
   HEADER & NAV
   ============================================================ */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg-dark);
  color: var(--color-text-white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.header__logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text-white);
  white-space: nowrap;
}

.nav {
  display: none;
}

.nav--open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--color-bg-dark);
  padding: 1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.nav a {
  color: var(--color-text-white);
  padding: 0.75rem 1rem;
  font-weight: 500;
  transition: background 0.2s;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.nav a:hover {
  background: rgba(255,255,255,0.1);
  color: #d8eef0;
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text-white);
}

/* ============================================================
   HERO + ABOVE-THE-FOLD FORM (375x667 target)
   ============================================================ */

.hero {
  background: linear-gradient(135deg, var(--color-bg-dark) 0%, #0a566a 100%);
  color: var(--color-text-white);
  padding: 1.5rem 0 2rem;
  text-align: center;
}

.hero h1 {
  font-size: 1.5rem;
  line-height: 1.25;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.hero p {
  font-size: 1rem;
  color: rgba(255,255,255,0.92);
  margin-bottom: 1rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

/* Above-the-fold layout: hero text + qualifying form share one screen. */
.hero--with-form {
  padding: 1rem 0 1.5rem;
}

.hero--with-form h1 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.hero--with-form .hero__subhead {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.hero__form {
  background: #fff;
  color: var(--color-text);
  border-radius: 10px;
  padding: 1rem;
  margin: 0 auto;
  max-width: 420px;
  text-align: left;
  box-shadow: 0 4px 18px rgba(0,0,0,0.18);
}

.hero__form h2 {
  font-size: 1.05rem;
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.1s;
  min-height: 44px;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-text-white);
}

.btn--primary:hover {
  background: var(--color-accent-dark);
  color: var(--color-text-white);
}

.btn--outline {
  background: transparent;
  border: 2px solid var(--color-text-white);
  color: var(--color-text-white);
}

.btn--outline:hover {
  background: var(--color-text-white);
  color: var(--color-bg-dark);
}

.btn--call {
  background: var(--color-cta);
  color: var(--color-text-white);
  font-size: 1.05rem;
  padding: 0.875rem 1.75rem;
}

.btn--call:hover {
  background: var(--color-cta-dark);
  color: var(--color-text-white);
}

/* Sticky bottom-right click-to-call. ≥44x44 tap target. */
.btn--call-floating {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 99;
  background: var(--color-cta);
  color: #fff;
  padding: 0.875rem 1.25rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  min-width: 44px;
  min-height: 44px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn--call-floating:hover {
  background: var(--color-cta-dark);
  color: #fff;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

/* ============================================================
   CARDS / GRIDS
   ============================================================ */

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

.card p {
  color: var(--color-text-light);
}

/* ============================================================
   TABLES (cost ranges, vs-dentures comparison)
   ============================================================ */

.cost-table,
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.95rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
}

.cost-table th,
.cost-table td,
.compare-table th,
.compare-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.cost-table thead th,
.compare-table thead th {
  background: var(--color-bg-light);
  font-weight: 700;
  color: var(--color-primary);
}

.cost-table tbody tr:last-child td,
.compare-table tbody tr:last-child td {
  border-bottom: none;
}

/* ============================================================
   DISCLAIMER BLOCK (referral-service framing)
   ============================================================ */

.disclaimer-block {
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: 0.9rem;
  color: var(--color-text-light);
  border-radius: 4px;
}

.disclaimer-block strong {
  color: var(--color-text);
}

/* ============================================================
   RESULTS GRID (inline SVG placeholders)
   ============================================================ */

.results-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.results-grid figure {
  margin: 0;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
}

.results-grid figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--color-text-light);
  text-align: center;
  background: var(--color-bg-light);
}

.results-grid svg {
  display: block;
  width: 100%;
  height: auto;
  background: var(--color-bg-light);
}

/* ============================================================
   MAP EMBED
   ============================================================ */

.map-embed {
  width: 100%;
  height: 280px;
  border: 0;
  border-radius: 8px;
  background: var(--color-bg-light);
  display: block;
}

/* ============================================================
   FORMS
   ============================================================ */

.form-section {
  max-width: 600px;
  margin: 0 auto;
}

.form-section h2 {
  text-align: center;
  margin-bottom: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.375rem;
  font-weight: 600;
  color: var(--color-text);
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 16px; /* prevent iOS zoom on focus */
  font-family: inherit;
  min-height: 44px;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(10, 108, 116, 0.15);
}

.form-group--radio fieldset {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 0.75rem 1rem 0.5rem;
}

.form-group--radio legend {
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0 0.25rem;
  color: var(--color-text);
}

.form-group--radio label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  margin: 0.25rem 0;
  cursor: pointer;
  min-height: 44px;
}

.form-group--radio input[type="radio"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  flex: 0 0 18px;
}

/* Honeypot field — visually hidden but rendered. */
.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.form-success {
  display: none;
  text-align: center;
  padding: 1.5rem;
  background: #e6f4eb;
  border: 1px solid #b8dec8;
  border-radius: 8px;
  color: #166935;
}

.form-success.visible {
  display: block;
}

/* ============================================================
   FAQ ACCORDION
   ============================================================ */

.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0;
  font-family: inherit;
  color: var(--color-text);
  min-height: 44px;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--color-accent);
}

.faq-item.open .faq-question::after {
  content: '\2212';
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  color: var(--color-text-light);
  line-height: 1.7;
}

.faq-item.open .faq-answer {
  max-height: 800px;
  padding-top: 0.5rem;
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  background: var(--color-bg-dark);
  color: rgba(255,255,255,0.78);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.9rem;
}

.footer a {
  color: rgba(255,255,255,0.92);
}

.footer__links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.footer__disclaimer {
  max-width: 720px;
  margin: 0 auto 0.5rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.7);
}

/* ============================================================
   RESPONSIVE — TABLET (768px+)
   ============================================================ */

@media (min-width: 768px) {
  .hero h1 {
    font-size: 2.25rem;
  }

  .hero--with-form h1 {
    font-size: 1.75rem;
  }

  .hero-buttons {
    flex-direction: row;
    justify-content: center;
  }

  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }

  .results-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav {
    display: flex;
    align-items: center;
    gap: 0;
  }

  .menu-toggle {
    display: none;
  }

  /* Floating call button is most useful on mobile; hide on tablet+. */
  .btn--call-floating {
    display: none;
  }
}

/* ============================================================
   RESPONSIVE — DESKTOP (1024px+)
   ============================================================ */

@media (min-width: 1024px) {
  .hero h1 {
    font-size: 2.75rem;
  }

  .hero--with-form h1 {
    font-size: 2.1rem;
  }

  .hero {
    padding: 3rem 0 3rem;
  }

  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }

  .results-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .section {
    padding: 3.5rem 0;
  }
}
