/* ============================================
   COASTWISE HEALTH — Homepage Styles
   Matches live site visual personality
   ============================================ */

/* ---- Hero ---- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: calc(var(--space-2xl) + 70px) var(--space-md) var(--space-lg);
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  z-index: 1;
}

.hero > * {
  position: relative;
  z-index: 2;
}

.hero-logo {
  height: 70px;
  margin-bottom: var(--space-lg);
  filter: brightness(1.1);
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--space-lg);
}

.hero h1 {
  color: var(--color-white);
  font-size: var(--text-5xl);
  margin-bottom: var(--space-xl);
  max-width: 750px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* Hero Service Cards */
.hero-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  max-width: 800px;
  width: 100%;
  margin-bottom: var(--space-xl);
}

.hero-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-decoration: none;
  transition: background var(--transition-base), transform var(--transition-base);
}

.hero-card:hover {
  background: rgba(0, 0, 0, 0.5);
  transform: translateY(-3px);
}

.hero-card h3 {
  color: var(--color-accent);
  font-size: var(--text-lg);
  margin-bottom: var(--space-sm);
}

.hero-card p {
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--text-sm);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Hero CTAs */
.hero-ctas {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: var(--space-xl);
}

/* Anchor Bar (below hero, own background) */
.anchor-bar {
  background: var(--color-primary-dark);
  padding: var(--space-md) var(--space-md);
}

.anchor-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: var(--container-max);
  margin: 0 auto;
}

.hero-anchor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--font-heading);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  transition: color var(--transition-fast);
  padding: 0 var(--space-xl);
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-anchor:last-child {
  border-right: none;
}

.hero-anchor:hover {
  color: var(--color-accent);
}

.hero-anchor svg {
  width: 22px;
  height: 22px;
  opacity: 0.8;
}

.hero-anchor:hover svg {
  opacity: 1;
}

/* ---- Full-Bleed Image Section (matches live site pattern) ---- */
.image-section {
  position: relative;
  padding: var(--space-2xl) var(--space-md);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--color-white);
  min-height: 420px;
  display: flex;
  align-items: center;
}

.image-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.image-section > * {
  position: relative;
  z-index: 2;
}

.image-section h2 {
  color: var(--color-white);
  font-size: var(--text-3xl);
  margin-bottom: var(--space-md);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.image-section p {
  font-size: var(--text-lg);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
  max-width: 650px;
}

.image-section .eyebrow {
  color: var(--color-accent);
  text-shadow: none;
}

.image-section .container {
  max-width: var(--container-narrow);
}

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

.image-section--center p {
  margin-left: auto;
  margin-right: auto;
}

/* ---- Accreditation Bar ---- */
.trust-bar {
  background: var(--color-white);
  padding: var(--space-md) var(--space-md);
  text-align: center;
}

.trust-bar h2 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-xs);
}

.trust-bar p {
  color: var(--color-text-light);
  font-size: var(--text-base);
  margin-bottom: var(--space-lg);
}

.trust-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
  flex-wrap: wrap;
}

.trust-badges img {
  height: 60px;
  width: auto;
  object-fit: contain;
}

.trust-badges img:first-child {
  height: 75px;
}

/* ---- Who We Serve (light section with icons) ---- */
.serve-section {
  background: var(--color-white);
  padding: var(--space-2xl) var(--space-md);
}

.serve-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.serve-item {
  text-align: center;
  padding: var(--space-md);
}

.serve-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto var(--space-md);
  color: var(--color-primary);
}

.serve-item h4 {
  font-size: var(--text-base);
  margin-bottom: var(--space-xs);
}

.serve-item p {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  line-height: 1.6;
}

/* ---- Pillars (Two-Column Service Lines) ---- */
.pillars-section {
  background: var(--color-off-white);
  padding: var(--space-2xl) var(--space-md);
}

.pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  max-width: 960px;
  margin: 0 auto;
}

.pillar {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.pillar:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.pillar-logo {
  height: 40px;
  margin: 0 auto var(--space-md);
  opacity: 0.6;
}

.pillar h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-xs);
}

.pillar .pillar-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
  font-style: italic;
}

.pillar ul {
  text-align: left;
  margin-bottom: var(--space-lg);
}

.pillar li {
  padding: 0;
  border-bottom: 1px solid var(--color-light-gray);
}

.pillar li:last-child {
  border-bottom: none;
}

.pillar li a {
  display: block;
  padding: 0.5rem 0;
  font-size: var(--text-base);
  color: var(--color-text-body);
  transition: color var(--transition-fast);
}

.pillar li a:hover {
  color: var(--color-primary);
}

/* ---- Personalized Care / Features Grid ---- */
.features-section {
  background: var(--color-white);
  padding: var(--space-2xl) var(--space-md);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.feature-item {
  text-align: center;
  padding: var(--space-lg) var(--space-md);
  border-radius: var(--radius-md);
  transition: background var(--transition-base);
}

.feature-item:hover {
  background: var(--color-off-white);
}

.feature-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-md);
  color: var(--color-accent);
}

.feature-item h4 {
  font-size: var(--text-base);
  margin-bottom: var(--space-xs);
}

.feature-item p {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  line-height: 1.6;
}

/* ---- Content Blocks (Image + Text, alternating) ---- */
.content-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 380px;
}

.content-block--reverse {
  direction: rtl;
}

.content-block--reverse > * {
  direction: ltr;
}

.content-block__image {
  background-size: cover;
  background-position: center;
  min-height: 320px;
}

.content-block__text {
  display: flex;
  align-items: center;
  padding: var(--space-lg) var(--space-xl);
}

.content-block__text-inner {
  max-width: 480px;
}

.content-block__text h3 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-md);
}

.content-block__text p {
  font-size: var(--text-base);
  line-height: 1.8;
  color: var(--color-text-body);
  margin-bottom: var(--space-md);
}

/* ---- Specialty Programs ---- */
.specialty-section {
  padding: var(--space-2xl) var(--space-md);
  background: var(--color-off-white);
}

.specialty-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.specialty-card {
  background: var(--color-white);
  padding: var(--space-xl);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--color-accent);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.specialty-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.specialty-card h3 {
  margin-bottom: var(--space-sm);
}

.specialty-card p {
  color: var(--color-text-body);
  margin-bottom: var(--space-md);
  line-height: 1.7;
}

/* ---- Testimonials ---- */
.testimonials-section {
  background: var(--color-white);
  padding: var(--space-2xl) var(--space-md);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.testimonial {
  padding: var(--space-lg);
  background: var(--color-off-white);
  border-radius: var(--radius-md);
  position: relative;
}

.testimonial::before {
  content: '\201C';
  font-size: 5rem;
  font-family: Georgia, serif;
  color: var(--color-accent);
  line-height: 1;
  position: absolute;
  top: 0.25rem;
  left: var(--space-md);
  opacity: 0.25;
}

.testimonial p {
  font-style: italic;
  font-size: var(--text-base);
  color: var(--color-text-body);
  margin-bottom: var(--space-sm);
  padding-top: var(--space-lg);
  line-height: 1.7;
}

.testimonial cite {
  font-style: normal;
  font-size: var(--text-sm);
  color: var(--color-text-light);
  font-weight: var(--font-weight-medium);
}

/* ---- CTA Banner (full-bleed dark image) ---- */
.cta-banner {
  position: relative;
  text-align: center;
  color: var(--color-white);
  padding: var(--space-2xl) var(--space-md);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(14, 95, 117, 0.88);
  z-index: 1;
}

.cta-banner > * {
  position: relative;
  z-index: 2;
}

.cta-banner h2 {
  color: var(--color-white);
  margin-bottom: var(--space-sm);
  font-size: var(--text-3xl);
}

.cta-banner p {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.85);
  max-width: var(--container-narrow);
  margin: 0 auto var(--space-lg);
}

/* ---- App Section ---- */
.app-section {
  background: var(--color-white);
  padding: var(--space-2xl) var(--space-md);
}

.app-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-xl);
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}

.app-mockup {
  max-width: 240px;
}

.app-text h3 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-md);
}

.app-text p {
  color: var(--color-text-body);
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

/* ---- Insurance Logos Section ---- */
.insurance-section {
  background: var(--color-off-white);
  padding: var(--space-2xl) var(--space-md);
  text-align: center;
}

/* ---- Scroll Reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Nav Overlay ---- */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.nav-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
  .hero h1 {
    font-size: var(--text-4xl);
  }

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

  .anchor-bar-inner {
    gap: var(--space-md);
  }

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

  .content-block {
    grid-template-columns: 1fr;
  }

  .content-block__image {
    min-height: 300px;
  }

  .content-block--reverse {
    direction: ltr;
  }

  .hero {
    background-attachment: scroll;
  }

  .image-section {
    background-attachment: scroll;
  }

  .cta-banner {
    background-attachment: scroll;
  }
}

@media (max-width: 767px) {
  .hero {
    min-height: auto;
    padding: calc(var(--space-3xl) + 60px) var(--space-sm) var(--space-lg);
    background-attachment: scroll;
    background-position: 65% center;
  }

  .hero h1 {
    font-size: var(--text-2xl);
  }

  .hero-cards {
    grid-template-columns: 1fr;
  }

  .anchor-bar {
    padding: var(--space-sm) var(--space-sm);
  }

  .anchor-bar-inner {
    flex-wrap: wrap;
    gap: 0;
  }

  .hero-anchor {
    flex: 0 0 50%;
    padding: var(--space-sm);
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.6rem;
    box-sizing: border-box;
  }

  .hero-anchor:nth-child(odd) {
    border-right: 1px solid rgba(255, 255, 255, 0.15);
  }

  .hero-anchor:nth-child(n+3) {
    border-bottom: none;
  }

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

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

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

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

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

  .app-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .app-mockup {
    margin: 0 auto;
    max-width: 180px;
  }

  .image-section {
    background-attachment: scroll;
    min-height: 400px;
    padding: var(--space-2xl) var(--space-md);
  }

  .image-section .btn {
    display: block;
    width: 100%;
    margin: var(--space-xs) 0;
    text-align: center;
  }

  .image-section .btn + .btn {
    margin-left: 0 !important;
  }

  .hero-ctas .btn {
    width: 100%;
  }

  .cta-banner {
    background-attachment: scroll;
  }

  .mobile-cta {
    display: block;
  }

  /* Extra bottom padding so content isn't hidden behind sticky CTA */
  .site-footer {
    padding-bottom: calc(var(--space-3xl) + 80px);
  }
}
