/* ══════════════════════════════════════════
   ГБУЗ РБ РКПБ — shared.css
   Общие стили для всех страниц сайта
══════════════════════════════════════════ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #1a1a2e;
  background: #fff;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ── CSS Variables ── */
:root {
  --green:        #1a8c5a;
  --green-light:  #e8f7f0;
  --green-mid:    #2ab374;
  --purple:       #6b3fa0;
  --purple-light: #f0eaf9;
  --purple-mid:   #8b5cc8;
  --amber:        #d07b12;
  --amber-light:  #fff4e6;
  --amber-mid:    #f59e0b;
  --navy:         #1a1a2e;
  --slate:        #4a5568;
  --silver:       #e2e8f0;
  --white:        #ffffff;
  --shadow-sm:    0 2px 8px rgba(0,0,0,.08);
  --shadow-md:    0 8px 32px rgba(0,0,0,.12);
  --shadow-lg:    0 20px 60px rgba(0,0,0,.16);
  --radius:       16px;
  --radius-sm:    10px;
  --transition:   0.3s cubic-bezier(.4,0,.2,1);
}

/* ── Utility ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-header { margin-bottom: 2.5rem; }

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: .5rem;
}
.section-sub {
  font-size: 1.05rem;
  color: var(--slate);
  max-width: 640px;
}
.badge {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: .75rem;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }

/* reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .65s ease, transform .65s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ── Header ── */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--silver);
  transition: box-shadow var(--transition);
}
#header.scrolled { box-shadow: var(--shadow-md); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}
.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--green), var(--purple));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 900; font-size: .95rem;
  letter-spacing: -.5px; flex-shrink: 0;
}
.logo-text { line-height: 1.15; }
.logo-text strong { display: block; font-size: .95rem; font-weight: 700; color: var(--navy); }
.logo-text span { font-size: .72rem; color: var(--slate); }

.header-nav { display: flex; align-items: center; gap: 2px; }
.header-nav a {
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-size: .84rem;
  font-weight: 500;
  color: var(--slate);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.header-nav a:hover,
.header-nav a.active { color: var(--navy); background: #f5f5fa; }
.header-nav a.nav-green:hover,
.header-nav a.nav-green.active  { background: var(--green-light);  color: var(--green); }
.header-nav a.nav-purple:hover,
.header-nav a.nav-purple.active { background: var(--purple-light); color: var(--purple); }
.header-nav a.nav-amber:hover,
.header-nav a.nav-amber.active  { background: var(--amber-light);  color: var(--amber); }

.header-phone {
  display: flex; align-items: center; gap: 7px;
  font-size: .88rem; font-weight: 600;
  color: var(--navy); flex-shrink: 0;
}
.header-phone svg { color: var(--green); }
.burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px; }
.burger span { display: block; width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: var(--transition); }

/* ── Colour accents ── */
.green-accent  .badge { background: var(--green-light);  color: var(--green); }
.purple-accent .badge { background: var(--purple-light); color: var(--purple); }
.amber-accent  .badge { background: var(--amber-light);  color: var(--amber); }
.green-accent  .section-title em { color: var(--green);  font-style: normal; }
.purple-accent .section-title em { color: var(--purple); font-style: normal; }
.amber-accent  .section-title em { color: var(--amber);  font-style: normal; }

/* ── Section hero strip ── */
.section-hero {
  border-radius: var(--radius);
  padding: 56px 48px;
  margin-bottom: 3rem;
  position: relative; overflow: hidden;
  color: #fff;
}
.section-hero.green-grad  { background: linear-gradient(135deg,#0d6e45,var(--green) 50%,#3dd68c); }
.section-hero.purple-grad { background: linear-gradient(135deg,#3b1d6b,var(--purple) 50%,#a78bfa); }
.section-hero.amber-grad  { background: linear-gradient(135deg,#7c4a06,var(--amber) 50%,#fbbf24); }
.section-hero-blob {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: rgba(255,255,255,.06);
}
.section-hero-blob.b1 { width:280px;height:280px; right:-60px;top:-60px; }
.section-hero-blob.b2 { width:160px;height:160px; right:70px;bottom:-60px; }
.section-hero-content { position: relative; z-index: 2; max-width: 700px; }
.section-hero h1 { font-size: clamp(1.7rem,3.5vw,2.4rem); font-weight: 800; margin-bottom: .6rem; }
.section-hero p  { font-size: 1rem; opacity: .88; margin-bottom: 1.5rem; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 50px;
  font-size: .9rem; font-weight: 600;
  cursor: pointer; border: none; transition: all var(--transition);
}
.btn-white { background: #fff; }
.btn-white.green  { color: var(--green); }
.btn-white.purple { color: var(--purple); }
.btn-white.amber  { color: var(--amber); }
.btn-white:hover  { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.2); }

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px; border-radius: 50px;
  font-size: .95rem; font-weight: 700;
  cursor: pointer; border: none; color: #fff;
  transition: all var(--transition);
}
.btn-primary.green  { background: var(--green); }
.btn-primary.purple { background: var(--purple); }
.btn-primary.amber  { background: var(--amber); }
.btn-primary:hover  { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,.25); filter: brightness(1.08); }

/* ── Stats ── */
.stats-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-bottom: 3rem; }
.stat-card {
  background: var(--white); border: 1px solid var(--silver);
  border-radius: var(--radius); padding: 28px 24px; text-align: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.stat-num { font-size: 2.2rem; font-weight: 800; line-height: 1; margin-bottom: .25rem; }
.green-accent  .stat-num { color: var(--green); }
.purple-accent .stat-num { color: var(--purple); }
.amber-accent  .stat-num { color: var(--amber); }
.stat-label { font-size: .85rem; color: var(--slate); line-height: 1.4; }

/* ── Cards ── */
.card {
  background: var(--white); border: 1px solid var(--silver);
  border-radius: var(--radius); padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.card-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 1rem;
}
.green-icon  { background: var(--green-light); }
.purple-icon { background: var(--purple-light); }
.amber-icon  { background: var(--amber-light); }
.card h4 { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; color: var(--navy); }
.card p  { font-size: .88rem; color: var(--slate); line-height: 1.6; }

/* ── Price tabs ── */
.price-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 1.5rem; }
.price-tab {
  padding: 8px 18px; border-radius: 50px;
  font-size: .85rem; font-weight: 600;
  cursor: pointer; border: 2px solid var(--silver);
  background: var(--white); color: var(--slate);
  transition: all var(--transition);
}
.price-tab.active.green  { background: var(--green);  border-color: var(--green);  color: #fff; }
.price-tab.active.purple { background: var(--purple); border-color: var(--purple); color: #fff; }
.price-tab.active.amber  { background: var(--amber);  border-color: var(--amber);  color: #fff; }
.price-panel { display: none; }
.price-panel.active { display: block; }
.price-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px dashed var(--silver);
  font-size: .9rem; gap: 16px;
}
.price-row:last-child { border-bottom: none; }
.price-name { color: var(--slate); flex: 1; }
.price-val  { font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.green-accent  .price-val { color: var(--green); }
.purple-accent .price-val { color: var(--purple); }
.amber-accent  .price-val { color: var(--amber); }
.price-sub { font-size: .78rem; color: #94a3b8; margin-left: .5rem; font-weight: 400; }

/* ── Contact box ── */
.contact-box {
  border-radius: var(--radius); padding: 40px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
  align-items: start; margin-top: 2rem;
}
.contact-box.green-bg  { background: linear-gradient(135deg,#f0fdf6,var(--green-light));  border:1px solid #b2e0cd; }
.contact-box.purple-bg { background: linear-gradient(135deg,#f5f0ff,var(--purple-light)); border:1px solid #c4aee8; }
.contact-box.amber-bg  { background: linear-gradient(135deg,#fffbf0,var(--amber-light));  border:1px solid #f5d68e; }
.contact-list { display: flex; flex-direction: column; gap: 16px; }
.contact-item { display: flex; align-items: flex-start; gap: 14px; }
.contact-item-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.green-accent  .contact-item-icon { background: var(--green-light); }
.purple-accent .contact-item-icon { background: var(--purple-light); }
.amber-accent  .contact-item-icon { background: var(--amber-light); }
.contact-item-label { font-size: .75rem; color: var(--slate); margin-bottom: 2px; }
.contact-item-val   { font-size: .95rem; font-weight: 600; color: var(--navy); }
.schedule-grid { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: .9rem; }
.schedule-grid dt { font-weight: 600; color: var(--slate); }
.schedule-grid dd { color: var(--navy); }

/* ── Forms ── */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .82rem; font-weight: 600; color: var(--slate); margin-bottom: 5px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 11px 14px; font-size: .9rem;
  border: 1.5px solid var(--silver); border-radius: var(--radius-sm);
  color: var(--navy); background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none; font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--green); box-shadow: 0 0 0 3px rgba(26,140,90,.12);
}
.form-input.purple:focus, .form-select.purple:focus {
  border-color: var(--purple); box-shadow: 0 0 0 3px rgba(107,63,160,.12);
}
.form-input.amber:focus, .form-select.amber:focus {
  border-color: var(--amber); box-shadow: 0 0 0 3px rgba(208,123,18,.12);
}
.form-textarea { min-height: 100px; resize: vertical; }
.form-success {
  display: none; padding: 16px 20px;
  background: var(--green-light); border: 1px solid #b2e0cd;
  border-radius: var(--radius-sm); color: var(--green);
  font-size: .9rem; font-weight: 600; text-align: center;
}

/* ── CTA strip ── */
.cta-strip {
  border-radius: var(--radius); padding: 40px;
  text-align: center; color: #fff; margin: 2rem 0;
}
.cta-strip.green-cta  { background: linear-gradient(135deg,var(--green),#3dd68c); }
.cta-strip.purple-cta { background: linear-gradient(135deg,var(--purple),var(--purple-mid)); }
.cta-strip.amber-cta  { background: linear-gradient(135deg,var(--amber),var(--amber-mid)); }
.cta-strip h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: .4rem; }
.cta-strip p  { font-size: .95rem; opacity: .88; margin-bottom: 1.5rem; }
.cta-phone {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.2); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.3);
  padding: 12px 28px; border-radius: 50px;
  font-size: 1rem; font-weight: 700; color: #fff;
  transition: background var(--transition), transform var(--transition);
}
.cta-phone:hover { background: rgba(255,255,255,.3); transform: scale(1.04); }

/* ── Section divider ── */
.section-divider {
  height: 3px;
  background: linear-gradient(90deg,var(--green),var(--purple),var(--amber));
  opacity: .2;
}

/* ── Footer ── */
#footer {
  background: linear-gradient(135deg,#0f0c29,#1a1a2e);
  color: rgba(255,255,255,.75);
  padding: 64px 0 32px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 3rem; }
.footer-brand .logo-text strong { color: #fff; }
.footer-brand .logo-text span   { color: rgba(255,255,255,.45); }
.footer-desc { font-size: .86rem; line-height: 1.7; margin: 1rem 0 1.4rem; color: rgba(255,255,255,.55); }
.footer-contacts { display: flex; flex-direction: column; gap: 9px; }
.footer-contact-item { display: flex; align-items: flex-start; gap: 9px; font-size: .86rem; color: rgba(255,255,255,.65); }
.footer-col-title { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.38); margin-bottom: .9rem; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: .86rem; color: rgba(255,255,255,.6); transition: color var(--transition); }
.footer-links a:hover { color: #fff; }
.footer-link-green:hover  { color: var(--green-mid) !important; }
.footer-link-purple:hover { color: var(--purple-mid) !important; }
.footer-link-amber:hover  { color: var(--amber-mid) !important; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 22px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: .78rem; color: rgba(255,255,255,.38); flex-wrap: wrap; gap: 12px;
}
.footer-disclaimer { font-size: .73rem; color: rgba(255,255,255,.3); margin-top: .5rem; line-height: 1.6; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .footer-grid  { grid-template-columns: 1fr 1fr; gap: 32px; }
  .grid-4       { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .header-nav { display: none; }
  .burger     { display: flex; }
  .header-nav.open {
    display: flex; flex-direction: column;
    position: absolute; top: 68px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--silver);
    padding: 12px 16px; box-shadow: var(--shadow-md); gap: 2px;
  }
  .header-nav.open a { width: 100%; }
  .header-phone span { display: none; }
  .section-hero { padding: 32px 20px; }
  .stats-row    { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .contact-box  { grid-template-columns: 1fr; padding: 24px 20px; }
  .footer-grid  { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .section { padding: 56px 0; }
}
@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr; }
  .price-tabs { gap: 6px; }
  .price-tab  { padding: 6px 12px; font-size: .78rem; }
}
