/* Modern, inspiring, welcoming theme overlay */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800&display=swap');

:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc; /* slate-50 */
  --card: #ffffff;
  --text: #0f172a; /* slate-900 */
  --muted: #475569; /* slate-600 */
  --brand: #22c55e; /* green-500 */
  --brand-strong: #16a34a; /* green-600 */
  --accent: #38bdf8; /* sky-400 */
  --success: #16a34a; /* green-600 */
  --shadow: 0 6px 24px rgba(2, 6, 23, 0.08);
}

html, body {
  background: radial-gradient(1200px 600px at 50% -10%, #ecfeff 0%, transparent 50%),
              linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Desktop: set content widths */
@media (min-width: 931px) {
  /* Hero uses full width with desktopbghero.jpg */
  .hero-image {
    max-width: 100% !important;
    background-image: url('./images/desktopbghero.jpg') !important;
    border-radius: 0 !important;
  }
  
  /* Most content sections at 70% width */
  .logo,
  .treatment,
  .table-container,
  .desktop-reviews,
  .faq-container,
  .inhero-image,
  .gallery {
    max-width: 70% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  /* Full-width sections */
  .seenin,
  .carousel-container,
  .footer {
    max-width: 100% !important;
    width: 100% !important;
  }
}

/* Header hero */
.hero-image {
  position: relative;
  min-height: 50vh;
  max-height: 500px;
  background-image: url('./images/elderhappy.jpg');
  background-size: cover;
  background-position: center;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}

.herocontent {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  padding: 32px 24px;
  width: 90%;
  max-width: 800px;
  text-align: center;
  background: transparent;
}

.highlight-yellow {
  background-color: #fff600;
  color: #000000;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 800;
  text-shadow: none !important;
}

.herotext2 {
  color: #0f172a;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-size: clamp(20px, 4vw, 28px) !important;
  text-align: center !important;
}

/* Header: make the main hero headline white */
.hero-image .herotext2 {
  color: #ffffff !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8),
               -1px -1px 2px rgba(0, 0, 0, 0.8),
               1px -1px 2px rgba(0, 0, 0, 0.8),
               -1px 1px 2px rgba(0, 0, 0, 0.8),
               1px 1px 2px rgba(0, 0, 0, 0.8);
}

.logo {
  padding: 20px 40px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.logo-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.logo-left img {
  height: 52px;
  filter: drop-shadow(0 6px 18px rgba(2,6,23,0.4));
}

.logo-tagline {
  margin: 0;
  font-size: 12px;
  color: #475569;
  font-weight: 600;
}

.logo-right {
  display: flex;
  align-items: center;
}

.bbb-rating {
  height: 60px;
  width: auto;
}
.logo h6 {
  margin: 0;
  color: #ffffff; /* white text for contrast on dark bg */
  font-weight: 600;
  font-size: clamp(16px, 2.2vw, 22px);
  background: #111111; /* dark charcoal band under logo */
  display: block;
  padding: 10px 0; /* a little more breathing room */
  width: 100%;
  position: relative;
  /* Robust full-bleed background without causing horizontal scroll */
  box-shadow: 0 0 0 100vmax #111111;
  clip-path: inset(0 -100vmax);
}

/* Primary CTA */
.call-button, .button {
  background: #3d9fda !important; /* light blue to match Helpline Info */
  color: white !important;
  border: 0;
  text-decoration: none;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
  padding: 14px 20px !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 20px rgba(61, 159, 218, 0.25) !important;
  transition: transform .12s ease, box-shadow .2s ease, background-color .2s ease;
  animation: none !important;
    width: auto; /* allow responsive overrides */
  max-width: none !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  font-size: clamp(16px, 2vw, 20px) !important;
  margin: 12px auto !important;
}

/* Center content spacing inside button by removing extra padding on icon */
.call-button .phoneicon,
.button .phoneicon {
  padding-right: 0 !important;
}
.call-button:hover, .button:hover {
  transform: translateY(-1px);
  background: #225397 !important; /* darker blue on hover */
  box-shadow: 0 12px 26px rgba(61, 159, 218, 0.35) !important;
}

/* Section shells */
.seenin, .treatment, .faq-container, .desktop-reviews, .mobile-reviews {
  background: transparent !important;
}

.treatment h2 {
  color: #0f172a !important;
}
.treatment p {
  color: #334155 !important;
  text-align: left !important;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Cards for treatment types */
.table-container {
  gap: 24px !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
  align-items: stretch;
}
.custom-table {
  background: var(--card);
  border: 1px solid rgba(2,6,23,0.06);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.tableimg {
  border-bottom: 1px solid rgba(148,163,184,0.12);
}
/* Make BODY, MIND, SPIRIT icons smaller and centered */
.tableimg[src$="body.png"],
.tableimg[src$="mind.png"],
.tableimg[src$="spirit.png"] {
  width: 150px;
  display: block;
  margin: 12px auto 16px;
}
.treattitle {
  color: #0f172a !important;
}
.treatbody {
  color: #475569 !important;
  padding: 0 18px 24px !important;
  text-align: left !important;
}

/* Spacing: add room before the CTA under the Body/Mind/Spirit section */
.table-container + .desktop {
  margin-top: 24px !important;
}

/* Carousel area */
.carousel-container {
  background: transparent !important;
}

/* Gallery */
.gallery {
  display: block !important;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 16px;
}
.gallery img {
  border-radius: 16px !important;
  box-shadow: var(--shadow);
}

/* Balance the gallery track into a neat grid */
.gallery-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  grid-auto-rows: 200px;
}
.gallery-track img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0 !important;
  transition: transform 160ms ease, box-shadow 160ms ease;
  cursor: pointer;
}
.gallery-track img:hover,
.gallery-track img:focus-visible {
  transform: scale(1.02);
}

@media (max-width: 600px) {
  .gallery-track { grid-auto-rows: 160px; }
}

/* FAQ */
.faq-item { 
  border-color: rgba(2,6,23,0.08) !important;
}
.faq-question h4 { color: #2563eb !important; }
.faq-answer { color: #475569 !important; }

/* Footer */
.footer {
  background: #225397 !important;
  border-top: 1px solid rgba(2,6,23,0.08);
}
.footer p, .footer a { color: #ffffff !important; }

/* Mobile tweaks */
@media (max-width: 930px) {
  .hero-image {
    max-width: 100% !important;
    border-radius: 0 !important;
  }
  .herocontent {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    width: 100% !important;
  }
  .herotext2 { text-align: center !important; }
  .herocontent { padding: 24px 20px !important; }
  /* Ensure mobile CTA layout stacks: Call button on top, Helpline below */
  .mobile-only-list {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
  }
  .mobile-only-list .button,
  .mobile-only-list .call-button {
    width: 100% !important;
    max-width: 320px !important;
    box-sizing: border-box !important;
  }
  .mobile-only-list .openPopup {
    order: 2;
    margin-top: 0 !important;
  }
  /* Also stack CTA + helpline in shared helpline wrappers */
  .helpline {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
  }
  .helpline .button,
  .helpline .call-button {
    width: 100% !important;
    max-width: 320px !important;
    box-sizing: border-box !important;
  }
  .helpline .openPopup {
    order: 2;
    margin-top: 0 !important;
  }

  /* Header hero: ensure Call button and Helpline Info stack and fit viewport */
  .heropop .freecall {
    position: static !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
  }
  .heropop .freecall .call-button,
  .heropop .freecall .button {
    width: 100% !important;
    max-width: 320px !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    text-align: center !important;
    font-size: 20px !important;
    padding: 12px 16px !important;
  }
  .heropop .freecall .openPopup {
    margin-top: 0 !important;
  }
}

/* Ensure common wrappers center their inline content (like inline-flex buttons) */
.logo,
.herocontent,
.inhero-text,
.inhero-foot-text,
.helpline,
.desktop,
.seencontainer,
.faq-container,
.treatment,
.carousel-container,
.gallery,
.mobile-only-list,
.mobiletreatment,
.popup1,
.popup2 {
  text-align: center !important;
}

/* Make small action buttons size to content and center */
.openPopup,
.helplineinfo {
  display: block !important;
  width: auto !important;
  margin: 8px auto 0 !important;
}

/* Add info icon to all Helpline Information buttons and size it to font size */
.openPopup {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
}

.openPopup::before {
  content: '';
  display: inline-block;
  width: 1em; /* match font size */
  height: 1em; /* match font size */
  background: url('./images/more-info-color.png') no-repeat center / contain;
}

/* Hide any inline icon duplicates inside buttons that already include an <img> */
.openPopup .button-icon {
  display: none !important;
}

/* Header-only: make Helpline Information button white text for contrast */
.hero-image .openPopup {
  color: #ffffff !important;
}
.hero-image .openPopup::before {
  background: url('./images/more-info_white.png') no-repeat center / contain;
}

/* Center large sections within a comfortable width */
.treatment, .faq-container, .desktop-reviews, .mobile-reviews, .seenin, .table-container {
  max-width: 1200px;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Lightbox overlay for gallery */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.lightbox-overlay.open {
  display: flex;
}
.lightbox-inner {
  position: relative;
  max-width: min(92vw, 1200px);
  max-height: 90vh;
}
.lightbox-image {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
.lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,0.9);
  color: #0f172a;
  font-size: 28px;
  line-height: 40px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.lightbox-close:hover {
  background: #ffffff;
}

/* Reviews */
.reviews-wrapper { padding: 16px 0 40px; }
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.google-reviews-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.google-logo {
  width: 140px;
  height: auto;
}
.google-reviews-content h1 {
  margin: 0;
  text-align: center;
}
@media (max-width: 930px) {
  .google-logo { width: 120px; }
}
.review-card {
  background: var(--card);
  border: 1px solid rgba(2,6,23,0.06);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 18px 20px 20px;
}
.review-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 8px;
}
.review-author-name { font-weight: 700; color: #0f172a; }
.review-count { color: #64748b; font-size: 13px; }
.review-rating-date { display: flex; align-items: center; justify-content: space-between; margin: 10px 0 12px; }
.review-star { color: #fbbf24; font-size: 18px; }
.review-date { color: #94a3b8; font-size: 13px; }
.review-text { color: #334155; line-height: 1.6; }

@media (max-width: 930px) {
  .reviews-grid { gap: 12px; }
  .review-card { padding: 16px; }
}

/* Phone refinements for Google Reviews */
@media (max-width: 600px) {
  .reviews-wrapper { padding: 12px 0 28px; }
  .google-reviews-content { gap: 6px; }
  .google-logo { margin-top: 16px; }
  .reviews-grid { gap: 10px; grid-template-columns: 1fr; }
  .review-card { padding: 14px 16px; border-radius: 12px; }
  .review-header { gap: 10px; margin-bottom: 6px; }
  .review-rating-date { margin: 8px 0 10px; }
}


/* As Seen In: deep charcoal full-width background override */
.seenin {
  background: #111111 !important; /* deep charcoal */
  width: 100% !important;
  max-width: none !important; /* override earlier 1200px cap */
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Center inner content within a comfortable width */
.seencontainer {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}
