/* ============================================
   Horses 4 Heros - Global Stylesheet
   Color palette derived from logo:
   Navy: #1B2A4A  Red: #B22234  Gold: #C9A94E
   ============================================ */

:root {
  --navy: #1B2A4A;
  --navy-dark: #0F1B32;
  --red: #B22234;
  --red-dark: #8B1A28;
  --gold: #C9A94E;
  --gold-light: #D4BA6A;
  --brown: #6B4226;
  --cream: #FAF7F0;
  --white: #FFFFFF;
  --gray-light: #F0EDE6;
  --gray: #6B7280;
  --gray-dark: #374151;
  --text: #1A1A1A;
  --shadow: 0 4px 20px rgba(0,0,0,0.12);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.18);
  --radius: 8px;
  --transition: 0.3s ease;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  line-height: 1.7;
  background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 24px; }

/* ── HEADER ── */
/* The header has two visual halves:
   - Top half: solid navy-dark with nav items
   - Bottom half: transparent, logo overflows into content area
   Content is pushed down via --logo-overhang so nothing is hidden */

:root {
  --header-height: 70px;       /* navy bar height */
  --logo-height: 150px;        /* full logo height */
  --logo-overhang: 80px;       /* how far logo extends below the navy bar */
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: transparent;
}

/* Navy bar - only covers the top portion */
.site-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--navy-dark);
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  z-index: -1;
}

.header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-height);
  position: relative;
}

.nav-left, .nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  height: var(--header-height);
}

.nav-left { justify-content: flex-end; }
.nav-right { justify-content: flex-start; }

.nav-left a, .nav-right a {
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.nav-left a:hover, .nav-right a:hover {
  color: var(--gold);
  background: rgba(255,255,255,0.08);
}

/* Logo: centered, overflows below the navy bar */
.header-logo {
  margin: 0 24px;
  flex-shrink: 0;
  align-self: flex-start;
  position: relative;
  z-index: 1001;
  /* Vertically: top of logo starts near top of header,
     bottom half hangs below into content */
  margin-top: 6px;
}

.header-logo img {
  height: var(--logo-height);
  width: auto;
  transition: transform var(--transition);
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.header-logo img:hover { transform: scale(1.05); }

/* Push first content section down so the overhanging logo doesn't cover it */
.site-header + .hero {
  margin-top: 0; /* hero is full-viewport, no extra push needed */
}

.site-header + section:not(.hero),
.site-header + .article-hero {
  padding-top: calc(var(--logo-overhang) + 60px);
}

/* Mobile menu */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 8px;
  height: var(--header-height);
}

/* CTA button in nav */
.nav-cta {
  background: var(--red) !important;
  color: var(--white) !important;
  border-radius: var(--radius) !important;
  padding: 10px 20px !important;
}
.nav-cta:hover {
  background: var(--red-dark) !important;
  color: var(--white) !important;
}

/* ── HERO SECTION ── */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(15,27,50,0.7) 0%,
    rgba(15,27,50,0.5) 50%,
    rgba(15,27,50,0.8) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 40px 24px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  text-shadow: 2px 3px 8px rgba(0,0,0,0.5);
}

.hero h1 .highlight { color: var(--gold); }

.hero p {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  margin-bottom: 32px;
  opacity: 0.95;
  text-shadow: 1px 2px 6px rgba(0,0,0,0.4);
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.btn-primary:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(178,34,52,0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: var(--gold);
}
.btn-secondary:hover {
  background: var(--gold);
  color: var(--navy-dark);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-gold {
  background: var(--gold);
  color: var(--navy-dark);
  border-color: var(--gold);
}
.btn-gold:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201,169,78,0.4);
}

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

/* ── SECTIONS ── */
section { padding: 80px 0; }

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  color: var(--navy);
  margin-bottom: 16px;
  font-weight: 800;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--gray);
  max-width: 650px;
  margin: 0 auto;
}

.section-alt { background: var(--cream); }
.section-dark { background: var(--navy-dark); color: var(--white); }
.section-dark .section-header h2 { color: var(--white); }
.section-dark .section-header p { color: rgba(255,255,255,0.75); }

/* ── PROBLEM / GUIDE / PLAN (StoryBrand) ── */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.problem-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 28px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--red);
  transition: transform var(--transition), box-shadow var(--transition);
}

.problem-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.problem-card .icon {
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.problem-card h3 {
  font-size: 1.25rem;
  color: var(--navy);
  margin-bottom: 12px;
}

.problem-card p { color: var(--gray-dark); font-size: 0.95rem; }

/* Guide section */
.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.guide-content h3 {
  font-size: 1.6rem;
  color: var(--navy);
  margin-bottom: 16px;
}

.guide-content p { margin-bottom: 16px; color: var(--gray-dark); }

.guide-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.stat-item {
  text-align: center;
  padding: 20px;
  background: var(--cream);
  border-radius: var(--radius);
}

.stat-item .number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold);
  display: block;
}

.stat-item .label {
  font-size: 0.85rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Plan steps */
.plan-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
  counter-reset: step;
}

.plan-step {
  text-align: center;
  padding: 36px 24px;
  position: relative;
}

.plan-step::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--gold);
  color: var(--navy-dark);
  font-size: 1.5rem;
  font-weight: 800;
  border-radius: 50%;
  margin: 0 auto 20px;
}

.plan-step h3 {
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 10px;
}

.plan-step p { color: var(--gray-dark); font-size: 0.95rem; }

/* ── THERAPY CARDS ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--navy-dark);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.card-body {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-body h3 {
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 10px;
}

.card-body p {
  color: var(--gray-dark);
  font-size: 0.95rem;
  flex: 1;
  margin-bottom: 16px;
}

.card-body .btn { align-self: flex-start; }

.card-icon {
  background: var(--navy);
  color: var(--gold);
  padding: 24px;
  text-align: center;
  font-size: 2.5rem;
}

/* ── TESTIMONIALS ── */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.testimonial {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--gold);
}

.testimonial blockquote {
  font-style: italic;
  color: var(--gray-dark);
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.7;
}

.testimonial cite {
  font-style: normal;
  font-weight: 700;
  color: var(--navy);
  font-size: 0.9rem;
}

.testimonial cite span {
  display: block;
  font-weight: 400;
  color: var(--gray);
  font-size: 0.85rem;
}

/* ── HORIZONTAL SCROLLER (Who We Serve) ── */
.scroller {
  overflow: hidden;
  width: 100%;
  padding: 8px 0 20px;
  -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.scroller-track {
  display: flex;
  gap: 24px;
  width: max-content;
  animation: scroll-left 60s linear infinite;
}

.scroller:hover .scroller-track {
  animation-play-state: paused;
}

@keyframes scroll-left {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.scroller-card {
  flex-shrink: 0;
  width: 320px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.scroller-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.scroller-card .card-badge { margin-bottom: 12px; }

.scroller-card h3 {
  font-size: 1.15rem;
  color: var(--navy);
  margin-bottom: 10px;
}

.scroller-card p {
  color: var(--gray-dark);
  font-size: 0.9rem;
  margin-bottom: 16px;
  line-height: 1.6;
}

.scroller-card .btn {
  font-size: 0.8rem;
  padding: 8px 16px;
}

/* Accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .scroller-track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
  }
  .scroller {
    -webkit-mask-image: none;
    mask-image: none;
    overflow: visible;
  }
  .scroller-card[aria-hidden="true"] { display: none; }
}

/* ── CTA BANNER ── */
.cta-banner {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  color: var(--white);
  text-align: center;
  padding: 72px 24px;
}

.cta-banner h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 16px;
}

.cta-banner p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 28px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-banner .btn { margin: 0 8px; }

/* ── FOOTER ── */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.8);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

/* Footer logo: proportional, no distortion */
.footer-logo-img {
  width: 140px;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  margin-bottom: 16px;
}
.footer-brand p { font-size: 0.9rem; line-height: 1.6; max-width: 300px; }

.footer-col h4 {
  color: var(--gold);
  font-size: 1rem;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.footer-col a:hover { color: var(--gold); }

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

/* ── ARTICLE PAGE ── */
.article-hero {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  color: var(--white);
  padding: 60px 0;
  padding-top: calc(var(--logo-overhang) + 40px);
  text-align: center;
}

.article-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 16px;
  font-weight: 800;
}

.article-hero .breadcrumb {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-bottom: 16px;
}

.article-hero .breadcrumb a { color: var(--gold); }

.article-meta {
  font-size: 0.9rem;
  opacity: 0.8;
}

.article-body {
  padding: 60px 0;
}

.article-body h2 {
  font-size: 1.6rem;
  color: var(--navy);
  margin: 40px 0 16px;
  padding-top: 16px;
  border-top: 2px solid var(--cream);
}

.article-body h2:first-of-type { border-top: none; margin-top: 0; }

.article-body h3 {
  font-size: 1.25rem;
  color: var(--navy);
  margin: 28px 0 12px;
}

.article-body p { margin-bottom: 16px; color: var(--gray-dark); }

.article-body ul, .article-body ol {
  margin: 0 0 20px 24px;
  color: var(--gray-dark);
}

.article-body li { margin-bottom: 8px; }

.article-body blockquote {
  border-left: 4px solid var(--gold);
  padding: 16px 24px;
  margin: 24px 0;
  background: var(--cream);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--gray-dark);
}

.key-takeaway {
  background: var(--navy);
  color: var(--white);
  padding: 28px;
  border-radius: var(--radius);
  margin: 32px 0;
}

.key-takeaway h3 { color: var(--gold); margin-top: 0; }
.key-takeaway p { color: rgba(255,255,255,0.9); }
.key-takeaway ul { color: rgba(255,255,255,0.85); }

.article-sidebar {
  background: var(--cream);
  padding: 28px;
  border-radius: var(--radius);
  margin: 32px 0;
}

.article-sidebar h3 {
  color: var(--navy);
  margin-top: 0;
  margin-bottom: 12px;
}

.article-sidebar a { color: var(--red); font-weight: 600; }
.article-sidebar a:hover { color: var(--red-dark); }

/* FAQ / Schema-ready */
.faq-section { margin: 40px 0; }
.faq-item { margin-bottom: 20px; }
.faq-item h3 {
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: 8px;
  cursor: pointer;
}
.faq-item h3::before {
  content: 'Q: ';
  color: var(--gold);
  font-weight: 800;
}
.faq-item p { padding-left: 24px; }

/* ── ABOUT PAGE ── */
.about-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 28px;
}

.value-card {
  text-align: center;
  padding: 32px 24px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.value-card .icon { font-size: 2.5rem; margin-bottom: 16px; }
.value-card h3 { color: var(--navy); margin-bottom: 10px; }
.value-card p { color: var(--gray-dark); font-size: 0.95rem; }

/* ── CONTACT PAGE ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-info-card {
  background: var(--navy);
  color: var(--white);
  padding: 40px;
  border-radius: var(--radius);
}

.contact-info-card h3 {
  color: var(--gold);
  margin-bottom: 24px;
  font-size: 1.4rem;
}

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
}

.contact-detail .icon { font-size: 1.4rem; flex-shrink: 0; }
.contact-detail a { color: var(--gold); }
.contact-detail p { margin: 0; opacity: 0.9; font-size: 0.95rem; }

.contact-form label {
  display: block;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #E5E7EB;
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  margin-bottom: 20px;
  transition: border-color var(--transition);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.contact-form textarea { min-height: 140px; resize: vertical; }

/* ── PROGRAMS PAGE ── */
.program-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 64px;
  padding-bottom: 64px;
  border-bottom: 2px solid var(--cream);
}

.program-detail:nth-child(even) { direction: rtl; }
.program-detail:nth-child(even) > * { direction: ltr; }
.program-detail:last-child { border-bottom: none; }

.program-detail h3 {
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 12px;
}

.program-detail p { color: var(--gray-dark); margin-bottom: 12px; }

.program-feature-list {
  list-style: none;
  margin: 16px 0;
}

.program-feature-list li {
  padding: 6px 0 6px 28px;
  position: relative;
  color: var(--gray-dark);
}

.program-feature-list li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 800;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .guide-grid { grid-template-columns: 1fr; }
  .program-detail { grid-template-columns: 1fr; }
  .program-detail:nth-child(even) { direction: ltr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root {
    --header-height: 60px;
    --logo-height: 100px;
    --logo-overhang: 45px;
  }

  .nav-left, .nav-right { display: none; }
  .nav-left.active, .nav-right.active {
    display: flex;
    background: var(--navy-dark);
  }

  .mobile-toggle { display: block; }

  .header-inner {
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0 16px;
  }

  .header-logo { order: 0; margin: 0; margin-top: 4px; }
  .mobile-toggle { order: 1; }

  .nav-left, .nav-right {
    order: 2;
    flex-direction: column;
    width: 100%;
    padding: 12px 0;
    gap: 4px;
    height: auto;
  }

  .nav-left { justify-content: flex-start; }

  .hero { min-height: 70vh; }

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

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

  section { padding: 56px 0; }
}

/* ── ANIMATIONS ── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── STRUCTURED DATA helper ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ── PHONE LINK ── */
.phone-link {
  color: var(--gold);
  font-weight: 700;
  font-size: 1.1rem;
}

.phone-link:hover { color: var(--gold-light); }

/* Footer credit line - unstyled link */
.footer-credit {
  margin-top: 6px;
  font-size: 0.8rem;
}
.footer-credit a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  border: none;
}
.footer-credit a:hover {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
}

/* Footer bottom links */
.footer-bottom a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-bottom a:hover {
  color: rgba(255,255,255,0.7);
}
