/* ============================================================
   Engstrom & Gill Dental — Selma, CA
   Shared Stylesheet
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --navy:        #1a3060;
  --navy-dark:   #0f2347;
  --navy-light:  #22407e;
  --teal:        #4bb8c8;
  --teal-dark:   #35a0b0;
  --teal-light:  #e8f7fa;
  --gold:        #f5a623;
  --white:       #ffffff;
  --bg-light:    #f4f8fc;
  --bg-section:  #eef5fb;
  --text-dark:   #1c2b3a;
  --text-mid:    #4a5568;
  --text-light:  #718096;
  --border:      #e2e8f0;
  --radius:      12px;
  --radius-lg:   20px;
  --shadow-sm:   0 2px 8px rgba(26,48,96,.08);
  --shadow:      0 8px 32px rgba(26,48,96,.13);
  --shadow-lg:   0 16px 48px rgba(26,48,96,.18);
  --nav-height:  72px;
  --max-width:   1120px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--white);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ---------- Container ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }
p { color: var(--text-mid); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  transition: transform .15s ease, opacity .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); opacity: .92; }
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--teal);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(75,184,200,.4);
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(75,184,200,.5); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,.6);
}
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: var(--white); }

.btn-navy {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(26,48,96,.3);
}

.btn-lg { padding: 16px 36px; font-size: 1.05rem; }

/* ---------- Section ---------- */
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.section-dark { background: var(--navy-dark); color: var(--white); }
.section-dark p { color: rgba(255,255,255,.75); }
.section-light { background: var(--bg-light); }
.section-teal { background: var(--teal-light); }

.section-header { text-align: center; margin-bottom: 56px; }
.section-header .overline {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: 10px;
}
.section-header h2 { color: var(--navy); margin-bottom: 12px; }
.section-header p { max-width: 560px; margin: 0 auto; font-size: 1.05rem; }

/* ---------- Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  height: var(--nav-height);
  display: flex;
  align-items: center;
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links li a {
  display: block;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dark);
  border-radius: 8px;
  transition: color .15s, background .15s;
}

.nav-links li a:hover { color: var(--navy); background: var(--bg-light); }
.nav-links li a.active { color: var(--navy); font-weight: 600; }

.nav-links li a.nav-cta {
  background: var(--navy);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 600;
}
.nav-links li a.nav-cta:hover { background: var(--navy-light); opacity: 1; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.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 {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 55%, #1e4a7a 100%);
  min-height: 580px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 80px 0;
}

/* Decorative circles */
.hero::before {
  content: '';
  position: absolute;
  right: -5%;
  top: -20%;
  width: 550px;
  height: 550px;
  background: rgba(75,184,200,.12);
  border-radius: 50%;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  right: 12%;
  bottom: -30%;
  width: 380px;
  height: 380px;
  background: rgba(75,184,200,.08);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

.hero-content .overline {
  display: inline-block;
  background: rgba(75,184,200,.2);
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 20px;
}

.hero-content h1 { color: var(--white); margin-bottom: 16px; }

.hero-content p {
  font-size: 1.1rem;
  color: rgba(255,255,255,.8);
  margin-bottom: 36px;
  max-width: 500px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Page hero (inner pages) */
.page-hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  padding: 64px 0;
  text-align: center;
}
.page-hero h1 { color: var(--white); margin-bottom: 10px; }
.page-hero p { color: rgba(255,255,255,.75); font-size: 1.05rem; }
.page-hero .overline {
  display: inline-block;
  background: rgba(75,184,200,.2);
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 14px;
}

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* ---------- Grid layouts ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }

/* ---------- Service Icon Card ---------- */
.service-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 28px;
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
  border-top: 4px solid transparent;
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-top-color: var(--teal);
}
.service-icon {
  width: 64px;
  height: 64px;
  background: var(--teal-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.service-icon svg { width: 32px; height: 32px; stroke: var(--teal-dark); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.service-card h3 { color: var(--navy); margin-bottom: 10px; }
.service-card p { font-size: 0.92rem; }

/* ---------- Info bar ---------- */
.info-bar {
  background: var(--navy);
  padding: 20px 0;
}
.info-bar-items {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}
.info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,.9);
  font-size: 0.9rem;
}
.info-item svg { width: 18px; height: 18px; stroke: var(--teal); fill: none; stroke-width: 2; flex-shrink: 0; }
.info-item a { color: inherit; transition: color .15s; }
.info-item a:hover { color: var(--teal); }

/* ---------- Value prop / Why Us ---------- */
.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}
.value-item { text-align: center; padding: 28px 20px; }
.value-num {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--teal);
  display: block;
  margin-bottom: 6px;
}
.value-item h3 { color: var(--navy); margin-bottom: 8px; font-size: 1.05rem; }
.value-item p { font-size: 0.9rem; }

/* ---------- Steps ---------- */
.steps { display: flex; flex-direction: column; gap: 24px; }
.step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.step-num {
  width: 44px;
  height: 44px;
  background: var(--navy);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}
.step-content h3 { color: var(--navy); margin-bottom: 4px; }

/* ---------- Hours table ---------- */
.hours-table { width: 100%; border-collapse: collapse; }
.hours-table tr { border-bottom: 1px solid var(--border); }
.hours-table tr:last-child { border-bottom: none; }
.hours-table td { padding: 10px 0; font-size: 0.92rem; color: var(--text-mid); }
.hours-table td:first-child { font-weight: 600; color: var(--text-dark); }
.hours-closed { color: var(--text-light) !important; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  padding: 72px 0;
  text-align: center;
}
.cta-banner h2 { color: var(--white); margin-bottom: 12px; }
.cta-banner p { color: rgba(255,255,255,.75); margin-bottom: 32px; font-size: 1.05rem; max-width: 500px; margin-left: auto; margin-right: auto; }
.cta-banner .btn-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Accent divider ---------- */
.accent-line {
  width: 56px;
  height: 4px;
  background: linear-gradient(90deg, var(--navy), var(--teal));
  border-radius: 2px;
  margin: 0 auto 20px;
}
.accent-line-left { margin: 0 0 20px; }

/* ---------- Form ---------- */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-dark);
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(75,184,200,.15);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---------- Insurance chips ---------- */
.insurance-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.insurance-chip {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: 0.85rem;
  color: var(--text-mid);
  font-weight: 500;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,.85);
  padding: 60px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand img { height: 60px; width: auto; margin-bottom: 16px; }
.footer-brand p { font-size: 0.88rem; color: rgba(255,255,255,.6); line-height: 1.6; max-width: 240px; }

.footer-col h4 {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 16px;
}
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a {
  font-size: 0.88rem;
  color: rgba(255,255,255,.7);
  transition: color .15s;
}
.footer-col ul li a:hover { color: var(--white); }
.footer-col p, .footer-col address {
  font-size: 0.88rem;
  color: rgba(255,255,255,.7);
  font-style: normal;
  line-height: 1.7;
}
.footer-col a { color: rgba(255,255,255,.7); transition: color .15s; }
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom p { font-size: 0.8rem; color: rgba(255,255,255,.45); }
.footer-bottom a { color: rgba(255,255,255,.6); transition: color .15s; }
.footer-bottom a:hover { color: var(--white); }

/* ---------- Placeholder image ---------- */
.placeholder-img {
  background: linear-gradient(135deg, #c8dff0 0%, #b0cfe8 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(26,48,96,.3);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* ---------- Badge / tag ---------- */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.badge-teal { background: var(--teal-light); color: var(--teal-dark); }
.badge-navy { background: rgba(26,48,96,.1); color: var(--navy); }

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

@media (max-width: 768px) {
  :root { --nav-height: 64px; }

  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px 24px 24px;
    box-shadow: var(--shadow);
    gap: 4px;
    align-items: stretch;
  }
  .nav-links.open { display: flex; }
  .nav-links li a { padding: 12px 16px; font-size: 1rem; }
  .nav-links li a.nav-cta { text-align: center; margin-top: 8px; }

  .site-header { position: relative; }

  .section { padding: 56px 0; }
  .hero { min-height: 480px; padding: 56px 0; }
  .hero::before, .hero::after { display: none; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-brand p { max-width: 100%; }
  .info-bar-items { gap: 20px; flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.4rem; }
  .btn { padding: 13px 22px; font-size: 0.9rem; }
  .btn-lg { padding: 14px 28px; font-size: 0.95rem; }
  .hero-actions { flex-direction: column; }
  .cta-banner .btn-actions { flex-direction: column; align-items: center; }
}
