/*
 * CENTRSPINA — Головна сторінка
 * Файл: wp-content/themes/YOUR-THEME/css/homepage.css
 * Підключення у functions.php:
 *
 * add_action('wp_enqueue_scripts', function(){
 *   if (is_front_page()) {
 *     wp_enqueue_style('csh-fonts',
 *       'https://fonts.googleapis.com/css2?family=Fraunces:wght@400;700&family=DM+Sans:wght@400;500;600&display=swap',
 *       [], null);
 *     wp_enqueue_style('csh-home',
 *       get_template_directory_uri().'/css/homepage.css',
 *       ['csh-fonts'],
 *       filemtime(get_template_directory().'/css/homepage.css'));
 *   }
 * });
 */

/* ── ЗМІННІ ─────────────────────────────────────────────── */
.cs-home {
  --navy:   #0A1F35;
  --blue:   #1255CC;
  --teal:   #00897B;
  --teal2:  #00BFA5;
  --sky:    #EBF4FF;
  --warm:   #FAFAF7;
  --text:   #1A2B3C;
  --muted:  #5A6A7A;
  --border: #D8E4F0;
  --r:      14px;

  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
}

/* Скинути стилі теми всередині .cs-home */
.cs-home *, .cs-home *::before, .cs-home *::after {
  box-sizing: border-box;
}
.cs-home h1, .cs-home h2, .cs-home h3 {
  font-family: 'Fraunces', serif;
  line-height: 1.25;
  margin: 0;
}
.cs-home h1 { font-size: clamp(1.9rem, 5vw, 3rem); font-weight: 700; }
.cs-home h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; color: var(--navy); }
.cs-home h3 { font-size: 1rem; font-weight: 600; }
.cs-home h4 { font-size: .92rem; font-weight: 600; margin: 0 0 4px; }
.cs-home p  { margin: 0; }
.cs-home a  { text-decoration: none; color: inherit; }

/* ── УТИЛІТИ ─────────────────────────────────────────────── */
.csh-con     { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.csh-sec     { padding: 72px 0; }
.csh-sec--alt { background: var(--warm); }
.csh-sec--dark { background: var(--navy); }
.csh-label   {
  font-size: .7rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--teal2);
  display: block; margin-bottom: 8px;
}
.csh-sec-sub { color: var(--muted); font-size: .93rem; margin-bottom: 36px; max-width: 520px; }

/* ── КНОПКИ ──────────────────────────────────────────────── */
.csh-btn-primary {
  display: inline-block;
  background: var(--teal2); color: #fff;
  padding: 13px 26px; border-radius: 9px;
  font-weight: 700; font-size: .9rem;
  transition: background .2s, transform .15s;
  white-space: nowrap;
}
.csh-btn-primary:hover { background: var(--teal); transform: translateY(-2px); color: #fff; }
.csh-btn-ghost {
  display: inline-block;
  border: 1px solid rgba(255,255,255,.25); color: rgba(255,255,255,.82);
  padding: 13px 20px; border-radius: 9px;
  font-size: .9rem; font-weight: 600;
  transition: border-color .2s;
}
.csh-btn-ghost:hover { border-color: rgba(255,255,255,.6); color: #fff; }
.csh-btn-full { display: block; text-align: center; margin-top: 16px; }
.csh-btn-white {
  display: inline-block;
  background: #fff; color: var(--navy);
  padding: 14px 32px; border-radius: 9px;
  font-weight: 800; font-size: .9rem;
  transition: transform .15s;
}
.csh-btn-white:hover { transform: translateY(-2px); color: var(--navy); }
.csh-btn-outline-w {
  display: inline-block;
  border: 2px solid rgba(255,255,255,.3); color: #fff;
  padding: 14px 28px; border-radius: 9px;
  font-weight: 700; font-size: .9rem;
  transition: border-color .2s;
}
.csh-btn-outline-w:hover { border-color: #fff; color: #fff; }

/* ── HERO ────────────────────────────────────────────────── */
.csh-hero {
  background: linear-gradient(140deg, var(--navy) 0%, #0D2D50 50%, #133F6E 100%);
  padding: 80px 0 72px;
  position: relative;
  overflow: hidden;
}
.csh-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 50% 60% at 80% 30%, rgba(0,191,165,.12) 0%, transparent 70%);
  pointer-events: none;
}
.csh-hero-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 56px;
  align-items: center;
  position: relative;
}
.csh-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0,191,165,.15); border: 1px solid rgba(0,191,165,.35);
  color: rgba(255,255,255,.9); padding: 5px 14px; border-radius: 100px;
  font-size: 12px; font-weight: 600; margin-bottom: 20px;
}
.csh-eyebrow-dot {
  width: 6px; height: 6px; background: var(--teal2); border-radius: 50%;
  animation: csh-pulse 2s infinite;
}
@keyframes csh-pulse { 0%,100%{opacity:1} 50%{opacity:.3} }
.csh-hero h1 { color: #fff; margin-bottom: 16px; }
.csh-hero h1 em { color: var(--teal2); font-style: normal; }
.csh-hero-sub { color: rgba(255,255,255,.75); font-size: 1rem; margin-bottom: 32px; max-width: 500px; }
.csh-hero-btns { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 44px; }

.csh-hero-stats { display: flex; gap: 24px; }
.csh-stat { border-right: 1px solid rgba(255,255,255,.12); padding-right: 24px; }
.csh-stat:last-child { border-right: none; }
.csh-stat strong { display: block; font-family: 'Fraunces', serif; font-size: 1.8rem; font-weight: 700; color: #fff; line-height: 1; }
.csh-stat span { font-size: 11px; color: rgba(255,255,255,.48); margin-top: 4px; display: block; }

/* Hero card */
.csh-hero-card {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r); padding: 24px;
}
.csh-card-ttl { font-size: 11px; color: rgba(255,255,255,.4); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; }
.csh-irow { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.csh-irow:last-of-type { border-bottom: none; margin-bottom: 0; }
.csh-irow-ico { width: 32px; height: 32px; background: rgba(0,191,165,.2); border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 14px; line-height: 32px; text-align: center; }
.csh-irow-l { font-size: 11px; color: rgba(255,255,255,.42); margin-bottom: 1px; }
.csh-irow-v { font-size: 13px; color: #fff; font-weight: 600; }

/* ── TRUST ───────────────────────────────────────────────── */
.csh-trust { background: #0D2D50; padding: 15px 24px; border-bottom: 1px solid rgba(255,255,255,.06); }
.csh-trust-inner { display: flex; align-items: center; justify-content: space-around; gap: 12px; flex-wrap: wrap; }
.csh-trust-item {
  color: rgba(255,255,255,.65); font-size: 12px; font-weight: 500;
  padding-left: 16px; position: relative;
}
.csh-trust-item::before {
  content: '✓'; position: absolute; left: 0;
  color: var(--teal2); font-weight: 800;
}

/* ── SERVICES ────────────────────────────────────────────── */
.csh-svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.csh-svc-card {
  display: block;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--r); padding: 20px 16px;
  position: relative; overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  color: var(--text);
}
.csh-svc-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: var(--teal2); transform: scaleX(0); transform-origin: left;
  transition: transform .25s;
}
.csh-svc-card:hover { box-shadow: 0 8px 28px rgba(10,31,53,.1); transform: translateY(-3px); }
.csh-svc-card:hover::after { transform: scaleX(1); }
.csh-svc-ico { display: inline-flex; width: 42px; height: 42px; border-radius: 11px; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 12px; }
.csh-ico--teal   { background: #E8F8F5; }
.csh-ico--blue   { background: var(--sky); }
.csh-ico--amber  { background: #FFFDE7; }
.csh-ico--purple { background: #F3F0FF; }
.csh-svc-card h3 { font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--text); }
.csh-svc-card p  { font-size: 12px; color: var(--muted); line-height: 1.5; }
.csh-price { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 700; color: var(--teal); background: #E8F8F5; padding: 3px 10px; border-radius: 100px; }
.csh-badge { position: absolute; top: 10px; right: 10px; background: var(--navy); color: #fff; font-size: 9px; font-weight: 700; padding: 3px 8px; border-radius: 100px; letter-spacing: .04em; }

/* Diagnostic banner */
.csh-diag-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  border-radius: var(--r); padding: 32px;
  color: #fff; text-decoration: none;
  transition: opacity .2s;
}
.csh-diag-banner:hover { opacity: .92; }
.csh-diag-badge { display: inline-block; background: rgba(0,191,165,.2); border: 1px solid rgba(0,191,165,.4); color: #fff; padding: 4px 13px; border-radius: 100px; font-size: 11px; font-weight: 600; margin-bottom: 10px; }
.csh-diag-banner h3 { font-family: 'Fraunces', serif; font-size: 1.2rem; font-weight: 700; margin-bottom: 7px; }
.csh-diag-banner p  { color: rgba(255,255,255,.72); font-size: 13px; }

/* ── DISEASES ────────────────────────────────────────────── */
.csh-dis-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.csh-dis-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--r); padding: 20px;
  transition: box-shadow .2s, transform .2s;
}
.csh-dis-card:hover { box-shadow: 0 6px 20px rgba(10,31,53,.08); transform: translateY(-2px); }
.csh-dis-card h4 { font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.csh-dis-card p  { font-size: 12px; color: var(--muted); }

/* ── WHY US ──────────────────────────────────────────────── */
.csh-why-grid { display: grid; grid-template-columns: 1fr 380px; gap: 56px; align-items: start; }
.csh-why-list { display: flex; flex-direction: column; gap: 18px; margin-top: 28px; }
.csh-why-item { display: flex; gap: 14px; align-items: flex-start; }
.csh-why-num {
  width: 32px; height: 32px; flex-shrink: 0;
  background: var(--navy); color: #fff;
  border-radius: 9px; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; font-family: 'Fraunces', serif;
}
.csh-why-item h4 { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.csh-why-item p  { font-size: 12px; color: var(--muted); }
.csh-why-visual {
  background: linear-gradient(135deg, var(--sky), #E8F8F5);
  border: 1px solid var(--border); border-radius: 18px;
  min-height: 300px; padding: 32px;
  display: flex; flex-direction: column; align-items: flex-start;
  justify-content: flex-end; gap: 10px;
}
.csh-why-badge {
  display: inline-block; background: #fff; border: 1px solid var(--border);
  border-radius: 100px; padding: 6px 14px; font-size: 12px; font-weight: 600; color: var(--text);
}
.csh-why-photo-note { font-size: 11px; color: var(--muted); margin-top: 8px; }

/* ── TEAM ────────────────────────────────────────────────── */
.csh-team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.csh-team-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--r); padding: 22px 16px; text-align: center;
  transition: box-shadow .2s;
}
.csh-team-card:hover { box-shadow: 0 6px 20px rgba(10,31,53,.08); }
.csh-team-av {
  width: 56px; height: 56px; border-radius: 50%;
  margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 700; font-family: 'Fraunces', serif; color: #fff;
}
.csh-av--blue   { background: var(--blue); }
.csh-av--green  { background: var(--teal); }
.csh-av--amber  { background: #B45309; }
.csh-av--purple { background: #7C3AED; }
.csh-team-card h4 { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.csh-team-card p  { font-size: 11px; color: var(--muted); }
.csh-team-spec { display: inline-block; margin-top: 9px; font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 100px; }
.csh-ts--rehab { background: #E8F8F5; color: var(--teal); }
.csh-ts--ortho { background: var(--sky);  color: var(--blue); }
.csh-ts--kines { background: #F3F0FF; color: #7C3AED; }
.csh-ts--dir   { background: #FEF9E7; color: #B45309; }

/* ── REVIEWS ─────────────────────────────────────────────── */
.csh-rev-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.csh-rev-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--r); padding: 22px; position: relative;
}
.csh-rev-src { position: absolute; top: 14px; right: 14px; background: #4285F4; color: #fff; font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 100px; }
.csh-rev-stars { color: #F59E0B; font-size: .88rem; letter-spacing: 1px; margin-bottom: 11px; }
.csh-rev-card > p { font-size: 12px; color: var(--text); font-style: italic; line-height: 1.68; margin-bottom: 15px; }
.csh-rev-author { display: flex; align-items: center; gap: 10px; }
.csh-rev-av { width: 32px; height: 32px; border-radius: 50%; background: var(--sky); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--blue); flex-shrink: 0; }
.csh-rev-author b  { display: block; font-size: 12px; font-weight: 700; }
.csh-rev-author span { display: block; font-size: 11px; color: var(--muted); }

/* ── CTA ─────────────────────────────────────────────────── */
.csh-cta-box {
  background: linear-gradient(140deg, var(--navy), var(--blue));
  border-radius: 20px; padding: 52px 48px;
  display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center;
  position: relative; overflow: hidden;
}
.csh-cta-box::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 50% 80% at 50% 120%, rgba(0,191,165,.18) 0%, transparent 70%);
  pointer-events: none;
}
.csh-cta-box h2 { color: #fff; margin-bottom: 10px; position: relative; }
.csh-cta-box > div > p { color: rgba(255,255,255,.72); font-size: .95rem; margin-bottom: 26px; position: relative; }
.csh-cta-btns { display: flex; gap: 12px; flex-wrap: wrap; position: relative; }
.csh-cta-pills { display: flex; gap: 18px; margin-top: 18px; flex-wrap: wrap; position: relative; }
.csh-cta-pills span { color: rgba(255,255,255,.58); font-size: 12px; padding-left: 15px; position: relative; }
.csh-cta-pills span::before { content: '✓ '; position: absolute; left: 0; color: var(--teal2); font-weight: 800; }
.csh-cta-right { text-align: right; position: relative; flex-shrink: 0; }
.csh-cta-phone { display: block; font-family: 'Fraunces', serif; color: #fff; font-size: 1.55rem; font-weight: 700; margin-bottom: 6px; }
.csh-cta-phone:hover { color: var(--teal2); }
.csh-cta-right > p { color: rgba(255,255,255,.9); font-size: 12px; margin-bottom: 3px; }
.csh-cta-hours { color: #fff !important; font-weight: 600 !important; }
.csh-cta-map { display: inline-block; margin-top: 12px; color: rgba(255,255,255,.85); font-size: 12px; }
.csh-cta-map:hover { color: rgba(255,255,255,.75); }

/* ── CONTACTS ────────────────────────────────────────────── */
.csh-contact-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border); border-radius: 18px; overflow: hidden; margin-top: 28px;
}
.csh-cont-col { padding: 34px 26px; border-right: 1px solid var(--border); }
.csh-cont-col:last-child { border-right: none; }
.csh-cont-ico { font-size: 1.6rem; margin-bottom: 11px; }
.csh-cont-col h3 { margin-bottom: 9px; font-size: 1rem; }
.csh-cont-col p  { font-size: 13px; color: var(--muted); line-height: 1.7; }
.csh-cont-col a  { color: var(--blue); font-weight: 600; font-size: 13px; }
.csh-cont-phone  { font-size: 1.15rem; font-weight: 800; display: block; margin-bottom: 8px; color: var(--blue); }
.csh-sch-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.csh-sch-row:last-child { border-bottom: none; }
.csh-sch-row span:last-child { font-weight: 700; color: var(--blue); }
.csh-sch-closed span:last-child { color: var(--muted); font-weight: 400; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .csh-hero-grid,
  .csh-cta-box,
  .csh-why-grid   { grid-template-columns: 1fr; }
  .csh-hero-card,
  .csh-cta-right  { display: none; }
  .csh-svc-grid,
  .csh-dis-grid,
  .csh-team-grid,
  .csh-rev-grid   { grid-template-columns: 1fr 1fr; }
  .csh-contact-grid { grid-template-columns: 1fr; }
  .csh-cont-col   { border-right: none; border-bottom: 1px solid var(--border); }
  .csh-cont-col:last-child { border-bottom: none; }
  .csh-diag-banner { flex-direction: column; }
}

@media (max-width: 560px) {
  .csh-sec        { padding: 52px 0; }
  .csh-svc-grid,
  .csh-dis-grid,
  .csh-rev-grid,
  .csh-team-grid  { grid-template-columns: 1fr; }
  .csh-cta-box    { padding: 32px 20px; }
  .csh-hero       { padding: 56px 0 48px; }
}

/* ── ВІДГУКИ (Widgets for Google Reviews) ────────────────── */
/*
 * Плагін виводить власні стилі.
 * Ці правила лише вирівнюють контейнер під наш дизайн.
 * Якщо потрібно перевизначити стилі плагіну —
 * використовуй .csh-reviews-wrap .grw-* селектори.
 */
.csh-sec--reviews { background: var(--warm); }

.csh-reviews-wrap {
  margin-top: 32px;
  /* Знімаємо зайві відступи які плагін може додавати */
  width: 100%;
}

/* Заглушка поки не налаштовано Place ID */
.csh-reviews-notice {
  background: var(--sky);
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  font-size: 13px;
  color: var(--muted);
}
.csh-reviews-notice a {
  color: var(--blue);
  font-weight: 600;
}
.csh-reviews-notice code {
  background: var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

/* ── ВИПРАВЛЕННЯ КОЛЬОРІВ CTA ── */
.cs-home .csh-cta-right p,
.cs-home .csh-cta-right > p,
.cs-home .csh-sec--dark .csh-cta-right p {
  color: #fff !important;
}
.cs-home .csh-cta-hours,
.cs-home .csh-sec--dark .csh-cta-hours {
  color: #fff !important;
  font-weight: 600 !important;
}
.cs-home .csh-cta-map,
.cs-home .csh-cta-map:link,
.cs-home .csh-cta-map:visited {
  color: rgba(255,255,255,.85) !important;
}
.cs-home .csh-btn-outline-w,
.cs-home .csh-btn-outline-w:link,
.cs-home .csh-btn-outline-w:visited {
  color: #fff !important;
  border-color: rgba(255,255,255,.4) !important;
}

/* ── ВИПРАВЛЕННЯ: тема перевизначає колір через a { color: #e36 } ── */
.cs-home a.csh-cta-phone,
.cs-home a.csh-cta-phone:link,
.cs-home a.csh-cta-phone:visited,
.cs-home a.csh-cta-phone:hover { color: #fff; }

.cs-home .csh-cta-right a,
.cs-home .csh-cta-right a:link,
.cs-home .csh-cta-right a:visited { color: rgba(255,255,255,.85) !important; }

.cs-home .csh-cta-right p { color: rgba(255,255,255,.9) !important; }

.cs-home p.csh-cta-hours { color: #fff !important; }

.cs-home a.csh-btn-outline-w,
.cs-home a.csh-btn-outline-w:link,
.cs-home a.csh-btn-outline-w:visited { color: #fff !important; }

/* ── ВИПРАВЛЕННЯ: hover на посиланнях + колір кнопки ── */

/* Hover на всіх посиланнях всередині .cs-home */
.cs-home a:hover { opacity: 0.85; }

/* Кнопка "Записатися" — білий текст */
.cs-home a.csh-btn-primary,
.cs-home a.csh-btn-primary:link,
.cs-home a.csh-btn-primary:visited,
.cs-home a.csh-btn-primary:hover { color: #fff !important; }

/* Кнопка "Всі процедури" — білий текст */
.cs-home a.csh-btn-ghost,
.cs-home a.csh-btn-ghost:link,
.cs-home a.csh-btn-ghost:visited { color: rgba(255,255,255,.82) !important; }
.cs-home a.csh-btn-ghost:hover   { color: #fff !important; opacity: 1; }

/* Hover на телефоні у CTA */
.cs-home a.csh-cta-phone:hover { color: var(--teal2) !important; opacity: 1; }

/* Hover на "На карті" */
.cs-home a.csh-cta-map:hover { color: #fff !important; opacity: 1; }

/* Hover на картках послуг */
.cs-home a.csh-svc-card:hover { color: var(--text) !important; }

/* Hover на діагностичному банері */
.cs-home a.csh-diag-banner:hover { color: #fff !important; opacity: .92; }

/* Hover на суміжних процедурах */
.cs-home a.csh-rel-card:hover h3,
.cs-home a.csh-rel-card:hover p { color: #fff !important; }

/* ── Діагностичний банер — білий текст ── */
.cs-home a.csh-diag-banner,
.cs-home a.csh-diag-banner:link,
.cs-home a.csh-diag-banner:visited,
.cs-home .csh-diag-banner h3,
.cs-home .csh-diag-banner p { color: #fff !important; }
