/* ==========================================================================
   Bayview Smile Center — styles.css
   Google Fonts (Cormorant Garamond + Raleway) are loaded via <link> tags in
   each page's <head>, not @import here — @import forces a sequential fetch
   after this file loads, which delayed full styling and caused unstyled
   inline SVG icons to flash at their raw (huge, black) default size.
   ========================================================================== */

:root {
  --primary: #1B4D3E;
  --primary-light: #23604d;
  --accent: #C4956A;
  --accent-dark: #b07f52;
  --bg-light: #F9F7F4;
  --white: #FFFFFF;
  --text: #1A1A1A;
  --shadow: 0 6px 28px rgba(0, 0, 0, 0.07);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Raleway', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}

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

a { text-decoration: none; color: inherit; }

ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.2;
}

h1 { font-size: 62px; }
h2 { font-size: 44px; }
h3 { font-size: 28px; }

p { font-size: 17px; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-block;
  border-radius: 5px;
  font-weight: 700;
  font-family: 'Raleway', sans-serif;
  padding: 14px 36px;
  font-size: 15px;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  text-align: center;
}

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

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.btn-secondary:hover { background: var(--accent); color: var(--white); }

.btn-secondary-light {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}
.btn-secondary-light:hover { background: var(--white); color: var(--primary); }

.btn-white {
  background: var(--white);
  color: var(--primary);
  border-color: var(--white);
}
.btn-white:hover { background: transparent; color: var(--white); border-color: var(--white); }

.btn-block { width: 100%; }

/* ==========================================================================
   Navbar
   ========================================================================== */

.navbar {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--primary);
  box-shadow: 0 3px 16px rgba(0, 0, 0, 0.15);
}

.nav-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
}

.nav-logo { display: flex; align-items: center; height: 65px; max-width: 220px; overflow: hidden; flex-shrink: 0; }
.nav-logo img { height: 65px; width: auto; max-width: 220px; object-fit: contain; }

.nav-right { display: flex; align-items: center; gap: 36px; }

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

.nav-links a {
  color: var(--white);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.3px;
  padding-bottom: 6px;
  border-bottom: 2px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.nav-links a:hover { color: var(--accent); }

.nav-links a.active {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}

.nav-cta {
  background: var(--accent);
  color: var(--white) !important;
  padding: 12px 28px;
  border-radius: 5px;
  font-weight: 700;
  font-size: 14px;
  transition: background 0.3s ease;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--accent-dark); }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1100;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile-menu { display: none; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  width: 100%;
  min-height: 640px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(27, 77, 62, 0.7);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  padding: 0 24px;
  color: var(--white);
}

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

.hero-content p {
  font-size: 19px;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 34px;
}

.hero-buttons { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }

.page-hero {
  min-height: 380px;
}

.page-hero h1 { margin-bottom: 0; }

/* ==========================================================================
   Sections
   ========================================================================== */

.section { padding: 100px 0; }
.section-sm { padding: 80px 0; }
.section-alt { background: var(--bg-light); }
.section-white { background: var(--white); }

.section-title-wrap { text-align: center; margin-bottom: 60px; }

.section-title-wrap h2 { margin-bottom: 16px; }

.section-title-wrap .underline {
  width: 70px;
  height: 3px;
  background: var(--accent);
  margin: 0 auto;
  border-radius: 2px;
}

.section-title-wrap p.lead {
  max-width: 700px;
  margin: 18px auto 0;
  color: #444;
}

.section-intro {
  max-width: 820px;
  margin: 0 auto 60px;
  text-align: center;
  color: #333;
}

/* ==========================================================================
   Icons
   ========================================================================== */

.icon-circle {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(196, 149, 106, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.icon-circle svg { width: 30px; height: 30px; stroke: var(--accent); fill: none; }

/* ==========================================================================
   Cards — generic
   ========================================================================== */

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }

.card {
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 36px 28px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 14px 34px rgba(0,0,0,0.12); }

.card-top-accent {
  border-top: 4px solid var(--accent);
}

.card h3 { margin-bottom: 14px; }
.card p { color: #444; font-size: 15.5px; }

/* Content images */
.content-img { border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
.content-img img { border-radius: 8px; width: 100%; height: 100%; object-fit: cover; }

/* Service snapshot / service cards with image top */
.service-card {
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}
.service-card:hover { transform: translateY(-6px); }
.service-card img { width: 100%; height: 220px; object-fit: cover; border-radius: 0; }
.service-card-body { padding: 30px 26px; display: flex; flex-direction: column; flex: 1; }
.service-card-body h3 { margin-bottom: 12px; }
.service-card-body p { color: #444; font-size: 15.5px; margin-bottom: 22px; flex: 1; }

/* ==========================================================================
   Stats
   ========================================================================== */

.stats-section {
  background: var(--primary);
  padding: 90px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}
.stat-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 56px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}
.stat-label { color: var(--white); font-size: 15px; letter-spacing: 0.3px; }

/* ==========================================================================
   Testimonials
   ========================================================================== */

.testimonial-card {
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 34px 30px;
  border-left: 4px solid var(--accent);
}
.stars { color: var(--accent); font-size: 18px; letter-spacing: 3px; margin-bottom: 16px; }
.testimonial-text { color: #333; font-size: 15.5px; margin-bottom: 20px; font-style: italic; }
.testimonial-name { font-weight: 700; color: var(--primary); }
.testimonial-loc { font-size: 13.5px; color: #777; }

/* ==========================================================================
   Insurance badges
   ========================================================================== */

.insurance-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-top: 36px;
}
.badge {
  background: var(--primary);
  color: var(--white);
  padding: 12px 26px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: 0.3px;
}

/* ==========================================================================
   CTA sections
   ========================================================================== */

.cta-section {
  padding: 100px 0;
  text-align: center;
}
.cta-rose { background: var(--accent); }
.cta-rose h2, .cta-rose p { color: var(--white); }
.cta-rose h2 { margin-bottom: 16px; }
.cta-rose p { margin-bottom: 32px; font-size: 18px; max-width: 640px; margin-left: auto; margin-right: auto; }

.cta-emerald { background: var(--primary); }
.cta-emerald h2, .cta-emerald p { color: var(--white); }
.cta-emerald h2 { margin-bottom: 16px; }
.cta-emerald p { margin-bottom: 32px; font-size: 18px; max-width: 640px; margin-left: auto; margin-right: auto; }

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  background: var(--primary);
  color: var(--white);
  padding: 70px 0 0;
  font-family: 'Jost', sans-serif;
}
.footer h3, .footer h4 { font-family: 'Jost', sans-serif; }

.footer-newsletter {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.footer-newsletter h4 {
  color: var(--white);
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 10px;
}
.footer-newsletter p {
  color: rgba(255,255,255,0.72);
  font-size: 14.5px;
  margin-bottom: 24px;
}
.newsletter-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 13px 18px;
  border-radius: 5px;
  border: 1.5px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.07);
  color: var(--white);
  font-family: 'Jost', sans-serif;
  font-size: 14.5px;
}
.newsletter-form input[type="email"]::placeholder { color: rgba(255,255,255,0.55); }
.newsletter-form input[type="email"]:focus { outline: none; border-color: var(--accent); }
.newsletter-success { color: var(--accent); font-weight: 600; font-size: 15px; }

.footer-top {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 50px 0 60px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.footer-brand img { height: 55px; margin-bottom: 16px; }
.footer-brand p { color: rgba(255,255,255,0.75); font-size: 14.5px; max-width: 240px; }

.footer-social { display: flex; gap: 12px; margin-top: 20px; }
.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.footer-social a:hover { background: var(--accent); border-color: var(--accent); }
.footer-social svg { width: 18px; height: 18px; stroke: #fff; fill: none; }
.footer-social text { font-family: 'Jost', sans-serif; }

.footer h4 { color: var(--accent); font-size: 18px; margin-bottom: 22px; }
.footer ul li { margin-bottom: 12px; }
.footer ul li a, .footer ul li { color: rgba(255,255,255,0.85); font-size: 14.5px; transition: color 0.3s ease; }
.footer ul li a:hover { color: var(--accent); }
.footer-hours { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.15); }
.footer-bottom {
  text-align: center;
  padding: 26px 0;
  font-size: 13.5px;
  color: rgba(255,255,255,0.6);
}

/* ==========================================================================
   Fade-in animation
   ========================================================================== */

.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Scroll to top
   ========================================================================== */

.scroll-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: all 0.3s ease;
  z-index: 900;
}
.scroll-top-btn.show { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top-btn svg { width: 20px; height: 20px; stroke: var(--accent); fill: none; }
.scroll-top-btn:hover { background: var(--primary-light); }

/* ==========================================================================
   About page — mission pillars
   ========================================================================== */

.pillars-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; margin-top: 50px; }
.pillar { text-align: center; padding: 20px; }
.pillar p { color: #444; font-size: 15.5px; }
.mission-statement { max-width: 780px; margin: 0 auto; text-align: center; color: #333; font-size: 18px; }

/* ==========================================================================
   Locations page
   ========================================================================== */

.locations-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; }
.location-card {
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.location-card img { width: 100%; height: 220px; object-fit: cover; }
.location-card-body { padding: 30px 28px; }
.location-card-body h3 { margin-bottom: 12px; }
.location-detail { display: flex; gap: 10px; margin-bottom: 10px; font-size: 15px; color: #333; align-items: flex-start; }
.location-detail svg { width: 18px; height: 18px; stroke: var(--accent); fill: none; flex-shrink: 0; margin-top: 3px; }
.location-detail a { color: var(--accent); font-weight: 600; }
.location-card .btn { margin-top: 16px; }

.map-wrap {
  margin-top: 60px;
  border: 3px solid var(--primary);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.map-wrap iframe { width: 100%; height: 420px; border: none; display: block; }

/* ==========================================================================
   Patients page
   ========================================================================== */

.checklist li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #eee;
  font-size: 16px;
}
.checklist li svg { width: 22px; height: 22px; stroke: var(--accent); fill: none; flex-shrink: 0; }

.insurance-list { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0; }

.accordion-item {
  border-bottom: 1px solid #e2ddd4;
}
.accordion-header {
  width: 100%;
  background: transparent;
  border: none;
  text-align: left;
  padding: 24px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: 'Cormorant Garamond', serif;
  font-size: 21px;
  font-weight: 600;
  color: var(--primary);
}
.accordion-toggle {
  position: relative;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-left: 20px;
}
.accordion-toggle::before, .accordion-toggle::after {
  content: '';
  position: absolute;
  background: var(--accent);
  transition: transform 0.3s ease;
}
.accordion-toggle::before { top: 50%; left: 0; width: 100%; height: 3px; transform: translateY(-50%); }
.accordion-toggle::after { left: 50%; top: 0; height: 100%; width: 3px; transform: translateX(-50%); }
.accordion-item.open .accordion-toggle::after { transform: translateX(-50%) rotate(90deg); opacity: 0; }

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.accordion-body-inner { padding: 0 6px 26px; color: #444; font-size: 15.5px; }

.privacy-box {
  background: var(--bg-light);
  border-left: 4px solid var(--primary);
  padding: 28px 30px;
  border-radius: 6px;
  color: #333;
  font-size: 15px;
}

/* ==========================================================================
   Contact page
   ========================================================================== */

.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 50px; align-items: start; }

.contact-form-card {
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 40px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.form-group { margin-bottom: 22px; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 14.5px;
  margin-bottom: 8px;
  color: var(--primary);
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid #ddd6cb;
  border-radius: 5px;
  font-family: 'Raleway', sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.3s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-group textarea { resize: vertical; min-height: 120px; }

.radio-group { display: flex; gap: 26px; margin-top: 6px; }
.radio-option { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.radio-option input[type="radio"] { accent-color: var(--accent); width: 18px; height: 18px; }

.contact-info-card {
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 30px;
}
.contact-info-header {
  background: var(--primary);
  color: var(--white);
  padding: 26px 30px;
}
.contact-info-body { padding: 30px; }
.contact-info-row { display: flex; gap: 14px; margin-bottom: 20px; align-items: flex-start; }
.contact-info-row svg { width: 20px; height: 20px; stroke: var(--accent); fill: none; flex-shrink: 0; margin-top: 3px; }
.contact-info-row a { color: var(--accent); font-weight: 700; }
.contact-info-row .label { font-weight: 600; color: var(--primary); display: block; margin-bottom: 3px; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: var(--white);
  border-radius: 10px;
  max-width: 480px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: modalPop 0.3s ease;
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}
.modal-header {
  background: var(--primary);
  color: var(--white);
  padding: 22px 28px;
}
.modal-header h3 { color: var(--white); margin: 0; }
.modal-body { padding: 30px 28px; }
.modal-body p { color: #333; font-size: 15.5px; margin-bottom: 26px; }
.modal-close-btn {
  background: var(--accent);
  color: var(--white);
  border: none;
  padding: 13px 34px;
  border-radius: 5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s ease;
}
.modal-close-btn:hover { background: var(--accent-dark); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  h1 { font-size: 48px; }
  h2 { font-size: 36px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
  .section { padding: 60px 0; }
  .cta-section { padding: 60px 0; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .locations-grid { grid-template-columns: 1fr; }
  .pillars-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  h1 { font-size: 38px; }
  h2 { font-size: 30px; }
  h3 { font-size: 23px; }

  .nav-links, .nav-cta-wrap { display: none; }
  .hamburger { display: flex; }

  .nav-mobile-menu {
    display: flex;
    position: fixed;
    top: 88px;
    left: 0;
    width: 100%;
    background: var(--primary);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 30px 30px;
    gap: 4px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }
  .nav-mobile-menu.open { max-height: 600px; }
  .nav-mobile-menu a {
    color: var(--white);
    padding: 14px 0;
    font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,0.12);
  }
  .nav-mobile-menu a.active { color: var(--accent); }
  .nav-mobile-menu .nav-cta { margin-top: 16px; text-align: center; }

  .grid-2 { grid-template-columns: 1fr; gap: 34px; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 34px; }
  .form-row { grid-template-columns: 1fr; }

  .section { padding: 40px 0; }
  .cta-section { padding: 40px 0; }
  .hero { min-height: 520px; }
  .page-hero { min-height: 300px; }
}

@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; }
  h1 { font-size: 32px; }
  .hero-content p { font-size: 16px; }
}
