/* ============================================
   SmileWell Guide – Shared Stylesheet
   ============================================ */

:root {
  --blue-900: #0b3a66;
  --blue-800: #0f4c81;
  --blue-700: #1565a8;
  --blue-600: #1e7ac9;
  --blue-500: #2b8ee0;
  --blue-100: #e3f0fb;
  --blue-50: #f2f8fd;
  --teal-500: #16a394;
  --gray-900: #1a2430;
  --gray-700: #3d4a59;
  --gray-600: #55636f;
  --gray-300: #d5dde5;
  --gray-200: #e6ebf0;
  --gray-100: #f4f6f8;
  --white: #ffffff;
  --radius: 12px;
  --shadow: 0 4px 18px rgba(11, 58, 102, 0.08);
  --shadow-lg: 0 10px 30px rgba(11, 58, 102, 0.12);
  --max-width: 1140px;
}

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

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

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--gray-700);
  background: var(--white);
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--blue-700);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  color: var(--gray-900);
  line-height: 1.25;
  margin: 0 0 0.6em;
  font-weight: 700;
}

h1 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1.1em;
}

ul,
ol {
  padding-left: 1.4em;
  margin: 0 0 1.2em;
}

li {
  margin-bottom: 0.45em;
}

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

.narrow {
  max-width: 820px;
}

.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: var(--blue-50);
}

.section-title {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2.75rem;
}

.section-title p {
  color: var(--gray-600);
  font-size: 1.1rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: 0.75rem;
}

.text-center {
  text-align: center;
}

.muted {
  color: var(--gray-600);
  font-size: 0.95rem;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--blue-800);
  color: var(--white);
  padding: 0.6rem 1rem;
  z-index: 200;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  text-align: center;
  line-height: 1.3;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--blue-600);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(30, 122, 201, 0.3);
}

.btn-primary:hover {
  background: var(--blue-700);
}

.btn-outline {
  background: transparent;
  color: var(--blue-700);
  border-color: var(--blue-600);
}

.btn-outline:hover {
  background: var(--blue-100);
}

.btn-light {
  background: var(--white);
  color: var(--blue-800);
}

.btn-light:hover {
  background: var(--blue-100);
}

.btn-lg {
  padding: 1.05rem 2.1rem;
  font-size: 1.1rem;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-200);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--blue-900);
  letter-spacing: -0.01em;
}

.logo:hover {
  text-decoration: none;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue-600), var(--teal-500));
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.logo-mark svg {
  width: 22px;
  height: 22px;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}

.main-nav li {
  margin: 0;
}

.main-nav a {
  display: block;
  padding: 0.55rem 0.9rem;
  color: var(--gray-700);
  font-weight: 600;
  border-radius: 6px;
  font-size: 0.98rem;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--blue-700);
  background: var(--blue-50);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
  border-radius: 8px;
  position: relative;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--blue-900);
  margin: 5px auto;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--blue-50) 0%, #ffffff 55%, var(--blue-50) 100%);
  padding: 4.5rem 0 4rem;
  border-bottom: 1px solid var(--gray-200);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  color: var(--blue-900);
  margin-bottom: 1rem;
}

.hero p.lead {
  font-size: 1.2rem;
  color: var(--gray-600);
  margin-bottom: 1.8rem;
}

.hero-art {
  display: flex;
  justify-content: center;
}

.hero-art svg {
  width: 100%;
  max-width: 400px;
  height: auto;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1.75rem;
  font-size: 0.92rem;
  color: var(--gray-600);
}

.trust-row span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.trust-row svg {
  width: 18px;
  height: 18px;
  color: var(--teal-500);
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--blue-900), var(--blue-700));
  color: var(--white);
  padding: 3.5rem 0;
}

.page-hero h1 {
  color: var(--white);
}

.page-hero p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.15rem;
  max-width: 760px;
  margin-bottom: 0;
}

.breadcrumb {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.8);
}

.breadcrumb a {
  color: var(--white);
}

/* ---------- Cards / Grids ---------- */
.grid {
  display: grid;
  gap: 1.5rem;
}

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

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

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

.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.card h3 {
  margin-top: 0.25rem;
}

.card p:last-child {
  margin-bottom: 0;
}

.card .card-link {
  margin-top: auto;
  padding-top: 0.75rem;
  font-weight: 600;
}

.icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--blue-100);
  color: var(--blue-700);
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
}

.icon-circle svg {
  width: 26px;
  height: 26px;
}

.card-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue-600);
  margin-bottom: 0.4rem;
}

/* ---------- Feature / split ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.split-art {
  background: var(--blue-100);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  justify-content: center;
}

.split-art svg {
  width: 100%;
  max-width: 320px;
  height: auto;
}

.check-list {
  list-style: none;
  padding: 0;
}

.check-list li {
  padding-left: 1.9rem;
  position: relative;
  margin-bottom: 0.7rem;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: var(--teal-500);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='11' fill='white' stroke='none'/%3E%3Cpath d='M7 12.5l3 3 7-7' stroke='black'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='11' fill='white' stroke='none'/%3E%3Cpath d='M7 12.5l3 3 7-7' stroke='black'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ---------- Featured CTA ---------- */
.featured {
  background: linear-gradient(135deg, var(--blue-800), var(--blue-600));
  color: var(--white);
  border-radius: 18px;
  padding: 3rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  align-items: center;
  box-shadow: var(--shadow-lg);
}

.featured h2 {
  color: var(--white);
}

.featured p {
  color: rgba(255, 255, 255, 0.9);
}

.featured .eyebrow {
  color: #bfe0ff;
}

.featured-art {
  display: flex;
  justify-content: center;
}

.featured-art svg {
  width: 100%;
  max-width: 240px;
  height: auto;
}

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 820px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  margin-bottom: 0.9rem;
  background: var(--white);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  background: none;
  border: 0;
  text-align: left;
  padding: 1.1rem 3rem 1.1rem 1.25rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gray-900);
  cursor: pointer;
  position: relative;
  font-family: inherit;
  line-height: 1.4;
}

.faq-question::after {
  content: "+";
  position: absolute;
  right: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--blue-600);
  font-weight: 400;
  transition: transform 0.2s ease;
}

.faq-question[aria-expanded="true"]::after {
  content: "−";
}

.faq-answer {
  display: none;
  padding: 0 1.25rem 1.2rem;
  color: var(--gray-700);
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-item.open .faq-answer {
  display: block;
}

/* ---------- Article / prose ---------- */
.prose {
  max-width: 800px;
}

.prose h2 {
  margin-top: 2.5rem;
  padding-top: 0.5rem;
}

.prose h3 {
  margin-top: 1.8rem;
}

.prose p,
.prose li {
  font-size: 1.06rem;
}

.article {
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.article:last-of-type {
  border-bottom: 0;
}

.article-meta {
  color: var(--gray-600);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.toc {
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin: 0 0 2.5rem;
}

.toc h2 {
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
  padding: 0;
}

.toc ol {
  margin: 0;
  columns: 2;
  column-gap: 2rem;
}

.toc li {
  break-inside: avoid;
}

.callout {
  background: var(--blue-50);
  border-left: 4px solid var(--blue-600);
  padding: 1.1rem 1.4rem;
  border-radius: 0 10px 10px 0;
  margin: 1.75rem 0;
}

.callout.warning {
  background: #fff8e8;
  border-left-color: #e0a500;
}

.callout p:last-child {
  margin-bottom: 0;
}

.notice-box {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  color: var(--gray-600);
}

/* ---------- Layout with sidebar ---------- */
.with-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 3rem;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 96px;
}

.sidebar .card {
  margin-bottom: 1.5rem;
}

.sidebar .card h3 {
  font-size: 1.1rem;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.97rem;
}

.sidebar li:last-child {
  border-bottom: 0;
}

/* ---------- Pros & Cons ---------- */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.pros,
.cons {
  border-radius: var(--radius);
  padding: 1.5rem;
}

.pros {
  background: #eef9f5;
  border: 1px solid #cdeee1;
}

.cons {
  background: #fff5f2;
  border: 1px solid #fbd9cf;
}

.pros h3 {
  color: #157a5c;
}

.cons h3 {
  color: #b7442b;
}

.pros ul,
.cons ul {
  margin-bottom: 0;
  padding-left: 1.2rem;
}

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

th,
td {
  padding: 0.85rem 1rem;
  border: 1px solid var(--gray-200);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--blue-50);
  color: var(--blue-900);
  font-weight: 700;
}

/* ---------- CTA box ---------- */
.cta-box {
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  margin: 2.5rem 0;
}

.cta-box h3 {
  margin-bottom: 0.5rem;
}

.cta-box p {
  margin-bottom: 1.25rem;
}

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.4rem;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font: inherit;
  color: var(--gray-900);
  background: var(--white);
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--blue-500);
  outline-offset: 1px;
  border-color: var(--blue-500);
}

textarea {
  min-height: 150px;
  resize: vertical;
}

.form-message {
  display: none;
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  background: #eef9f5;
  border: 1px solid #cdeee1;
  color: #157a5c;
  font-weight: 600;
}

.form-message.show {
  display: block;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--blue-900);
  color: rgba(255, 255, 255, 0.82);
  padding: 3.5rem 0 1.5rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.site-footer h3 {
  color: var(--white);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.site-footer .logo {
  color: var(--white);
  margin-bottom: 0.9rem;
}

.site-footer p {
  font-size: 0.95rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li {
  margin-bottom: 0.55rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.82);
}

.site-footer a:hover {
  color: var(--white);
}

.footer-disclaimer {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
}

.footer-disclaimer p {
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
}

/* ---------- Utilities ---------- */
.mt-2 {
  margin-top: 2rem;
}

.mb-0 {
  margin-bottom: 0;
}

.last-updated {
  color: var(--gray-600);
  font-size: 0.92rem;
  margin-bottom: 2rem;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 992px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .with-sidebar {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .hero-grid,
  .split,
  .featured {
    grid-template-columns: 1fr;
  }

  .hero-art {
    order: -1;
  }

  .hero-art svg {
    max-width: 260px;
  }

  .featured-art {
    display: none;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 3.25rem 0;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
    display: none;
  }

  .main-nav.open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1rem 1rem;
  }

  .main-nav a {
    padding: 0.9rem 0.75rem;
    border-radius: 8px;
    font-size: 1.05rem;
  }

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

  .featured {
    padding: 2rem;
  }

  .toc ol {
    columns: 1;
  }

  .hero {
    padding: 3rem 0;
  }
}

@media (max-width: 520px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .btn-group .btn {
    width: 100%;
  }

  .card {
    padding: 1.4rem;
  }
}
