/* ============================================
   Santa Barbara Family Chiropractic
   Coastal Wellness California Theme
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --sand: #F5F0E9;
  --sand-light: #FAF8F4;
  --sand-dark: #EDE6DA;
  --eucalyptus: #6B8E76;
  --eucalyptus-deep: #4A7058;
  --eucalyptus-light: #8FB09A;
  --terracotta: #C17758;
  --terracotta-light: #D49A82;
  --terracotta-dark: #A8614A;
  --warm-brown: #37302A;
  --warm-brown-mid: #786E64;
  --warm-brown-light: #A89E94;
  --cream: #FFFDF9;
  --white: #FFFFFF;
  --shadow-soft: 0 4px 24px rgba(55, 48, 42, 0.08);
  --shadow-card: 0 8px 32px rgba(55, 48, 42, 0.1);
  --shadow-float: 0 12px 48px rgba(55, 48, 42, 0.14);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'DM Sans', sans-serif;
  color: var(--warm-brown);
  background: var(--sand-light);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  max-width: 100vw;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: 'Marcellus', serif;
  line-height: 1.2;
  letter-spacing: 0.01em;
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); color: var(--warm-brown); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); color: var(--warm-brown); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
p { color: var(--warm-brown-mid); font-size: 1.05rem; }
a { color: var(--eucalyptus); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--eucalyptus-deep); }

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

/* --- Section Spacing --- */
section { padding: 80px 0; position: relative; }
.section-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--eucalyptus);
  margin-bottom: 12px;
  display: block;
}
.section-title { margin-bottom: 20px; }
.section-subtitle {
  font-size: 1.1rem;
  color: var(--warm-brown-light);
  max-width: 600px;
  margin-bottom: 48px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--eucalyptus);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(107, 142, 118, 0.35);
}
.btn-primary:hover {
  background: var(--eucalyptus-deep);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(107, 142, 118, 0.45);
}
.btn-secondary {
  background: transparent;
  color: var(--eucalyptus);
  border: 2px solid var(--eucalyptus);
}
.btn-secondary:hover {
  background: var(--eucalyptus);
  color: var(--white);
  transform: translateY(-2px);
}
.btn-terracotta {
  background: var(--terracotta);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(193, 119, 88, 0.35);
}
.btn-terracotta:hover {
  background: var(--terracotta-dark);
  color: var(--white);
  transform: translateY(-2px);
}

/* --- Header / Sticky Nav --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(107, 142, 118, 0.1);
  transition: var(--transition);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.header-brand {
  font-family: 'Marcellus', serif;
  font-size: 1.25rem;
  color: var(--warm-brown);
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-brand .brand-icon {
  width: 36px;
  height: 36px;
  background: var(--eucalyptus);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  font-family: 'Marcellus', serif;
}
.header-nav { display: flex; align-items: center; gap: 28px; }
.header-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--warm-brown-mid);
  transition: var(--transition);
}
.header-nav a:hover { color: var(--eucalyptus); }
.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--eucalyptus);
  font-size: 0.95rem;
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding-top: 80px;
  background: var(--sand-light);
}
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(107, 142, 118, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 30%, rgba(193, 119, 88, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(237, 230, 218, 0.8) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  padding: 0 24px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--eucalyptus);
  box-shadow: var(--shadow-soft);
  margin-bottom: 28px;
  animation: fadeSlideUp 0.8s ease-out;
}
.hero-badge .star { color: var(--terracotta); font-size: 1rem; }
.hero h1 {
  animation: fadeSlideUp 0.8s ease-out 0.15s both;
  margin-bottom: 20px;
}
.hero h1 .accent { color: var(--eucalyptus); }
.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--warm-brown-mid);
  margin-bottom: 36px;
  animation: fadeSlideUp 0.8s ease-out 0.3s both;
  line-height: 1.7;
}
.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeSlideUp 0.8s ease-out 0.45s both;
}
.hero-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-top: 40px;
  animation: fadeSlideUp 0.8s ease-out 0.6s both;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--warm-brown-light);
}
.trust-item .trust-icon {
  width: 32px;
  height: 32px;
  background: rgba(107, 142, 118, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

/* --- Wave Divider --- */
.wave-divider {
  position: relative;
  width: 100%;
  line-height: 0;
  overflow: hidden;
}
.wave-divider svg {
  display: block;
  width: 100%;
  height: auto;
}

/* --- About Section --- */
.about { background: var(--white); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-image-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.about-image-wrap img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}
.about-image-accent {
  position: absolute;
  bottom: -10px;
  left: -10px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--eucalyptus);
  opacity: 0.15;
}
.about-text h2 { margin-bottom: 20px; }
.about-text p { margin-bottom: 16px; }
.about-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 28px;
}
.value-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--sand-light);
  border-radius: var(--radius);
  transition: var(--transition);
}
.value-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.value-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  background: var(--eucalyptus);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1rem;
}
.value-item span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--warm-brown);
  line-height: 1.4;
}

/* --- Services Section --- */
.services { background: var(--sand-light); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: var(--transition);
  border: 1px solid rgba(107, 142, 118, 0.08);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--eucalyptus), var(--terracotta));
  opacity: 0;
  transition: var(--transition);
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-float); }
.service-card:hover::before { opacity: 1; }
.service-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, rgba(107, 142, 118, 0.12), rgba(107, 142, 118, 0.04));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}
.service-card h3 { margin-bottom: 12px; color: var(--warm-brown); }
.service-card p { font-size: 0.95rem; line-height: 1.6; }

/* --- Stats Section --- */
.stats {
  background: var(--eucalyptus);
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}
.stats::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(255,255,255,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(0,0,0,0.1) 0%, transparent 50%);
  pointer-events: none;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
  z-index: 1;
}
.stat-item { text-align: center; }
.stat-number {
  font-family: 'Marcellus', serif;
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  color: var(--white);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
}

/* --- Testimonials Section --- */
.testimonials { background: var(--white); }
.featured-testimonial {
  background: var(--sand-light);
  border-radius: var(--radius-lg);
  padding: 48px;
  margin-bottom: 40px;
  position: relative;
  border-left: 4px solid var(--eucalyptus);
}
.featured-testimonial::before {
  content: '\201C';
  font-family: 'Marcellus', serif;
  font-size: 6rem;
  color: var(--eucalyptus);
  opacity: 0.15;
  position: absolute;
  top: 10px;
  left: 30px;
  line-height: 1;
}
.featured-testimonial blockquote {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--warm-brown);
  font-style: italic;
  position: relative;
  z-index: 1;
  margin-bottom: 20px;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.author-avatar {
  width: 44px;
  height: 44px;
  background: var(--eucalyptus);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
}
.author-info .author-name {
  font-weight: 600;
  color: var(--warm-brown);
  font-size: 0.95rem;
}
.author-info .author-stars {
  color: var(--terracotta);
  font-size: 0.85rem;
  letter-spacing: 2px;
}
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.testimonial-card {
  background: var(--sand-light);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
}
.testimonial-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.testimonial-card blockquote {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--warm-brown-mid);
  font-style: italic;
  margin-bottom: 16px;
}

/* --- Photo Gallery --- */
.gallery { background: var(--sand-light); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
}
.gallery-item:hover { transform: scale(1.02); box-shadow: var(--shadow-card); }
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Hours & Contact --- */
.contact { background: var(--white); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.contact-info h2 { margin-bottom: 20px; }
.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}
.contact-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: rgba(107, 142, 118, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.contact-text strong {
  display: block;
  font-size: 0.85rem;
  color: var(--warm-brown);
  margin-bottom: 4px;
}
.contact-text span, .contact-text a {
  font-size: 1rem;
  color: var(--warm-brown-mid);
}
.hours-card {
  background: var(--sand-light);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.hours-card h3 {
  margin-bottom: 24px;
  color: var(--warm-brown);
  font-size: 1.3rem;
}
.hours-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(107, 142, 118, 0.08);
  font-size: 0.95rem;
}
.hours-row:last-child { border-bottom: none; }
.hours-row .day { font-weight: 600; color: var(--warm-brown); }
.hours-row .time { color: var(--warm-brown-mid); }
.hours-row.closed .time { color: var(--warm-brown-light); }
.hours-row.open .time { color: var(--eucalyptus); font-weight: 600; }

/* --- CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, var(--eucalyptus-deep), var(--eucalyptus));
  padding: 64px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.07) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(0,0,0,0.08) 0%, transparent 40%);
  pointer-events: none;
}
.cta-banner h2 { color: var(--white); margin-bottom: 16px; position: relative; z-index: 1; }
.cta-banner p {
  color: rgba(255,255,255,0.8);
  font-size: 1.1rem;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}
.cta-banner .btn { position: relative; z-index: 1; }
.btn-white {
  background: var(--white);
  color: var(--eucalyptus-deep);
  font-weight: 700;
}
.btn-white:hover {
  background: var(--sand);
  color: var(--eucalyptus-deep);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* --- Footer --- */
.site-footer {
  background: var(--warm-brown);
  color: rgba(255, 255, 255, 0.7);
  padding: 48px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}
.footer-brand h3 {
  font-family: 'Marcellus', serif;
  color: var(--white);
  font-size: 1.3rem;
  margin-bottom: 12px;
}
.footer-brand p { font-size: 0.9rem; line-height: 1.6; color: rgba(255,255,255,0.6); }
.footer-links h4 {
  color: var(--white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 16px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
}
.footer-links a {
  display: block;
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  margin-bottom: 10px;
  transition: var(--transition);
}
.footer-links a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

/* --- Floating CTA (Mobile) --- */
.floating-cta {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  background: var(--eucalyptus);
  color: var(--white);
  padding: 14px 32px;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 8px 32px rgba(107, 142, 118, 0.5);
  text-decoration: none;
  gap: 8px;
  align-items: center;
  transition: var(--transition);
}
.floating-cta:hover { background: var(--eucalyptus-deep); color: var(--white); }

/* --- Animations --- */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--sand); }
::-webkit-scrollbar-thumb { background: var(--eucalyptus-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--eucalyptus); }

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

@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  section { padding: 60px 0; }
  
  .header-nav a:not(.header-phone) { display: none; }
  
  .hero { min-height: auto; padding: 120px 0 80px; }
  
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-image-wrap img { height: 280px; }
  .about-values { grid-template-columns: 1fr; }
  
  .services-grid { grid-template-columns: 1fr; }
  
  .testimonials-grid { grid-template-columns: 1fr; }
  .featured-testimonial { padding: 32px 24px; }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .gallery-item { aspect-ratio: 1 / 1; }
  
  .contact-grid { grid-template-columns: 1fr; }
  
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  
  .floating-cta { display: inline-flex; }
  
  .cta-banner { padding: 48px 0; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-ctas { flex-direction: column; width: 100%; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
  .hero-trust { gap: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .stat-number { font-size: 2rem; }
  .service-card { padding: 28px 20px; }
}
