/* Atelier redesign — editorial private-practice identity. */
:root {
  --primary: #713f3a;
  --primary-light: #a4655a;
  --primary-dark: #2a2523;
  --gold: #b56d55;
  --gold-light: #e9d6ca;
  --bg: #f4f0eb;
  --bg-card: #fffdfa;
  --text: #2d2a28;
  --text-light: #756d68;
  --shadow: 0 16px 36px rgba(63, 43, 37, .07);
  --shadow-hover: 0 24px 50px rgba(63, 43, 37, .13);
  --radius: 0px;
  --button-radius: 12px;
}

html { background: var(--bg); }
body {
  background: var(--bg) !important;
  color: var(--text) !important;
  font-size: 16px;
  letter-spacing: .005em;
}
body::before {
  content: '';
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: .55;
  background-image: radial-gradient(rgba(87, 67, 58, .08) .55px, transparent .6px);
  background-size: 6px 6px;
}
h1, h2, h3, .logo, .section-title, .hero h1, .page-hero h1 {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-weight: 600 !important;
  letter-spacing: -.04em !important;
}
p { line-height: 1.78; }
a { text-underline-offset: 3px; }
.container { max-width: 1260px !important; }

/* Header */
header {
  position: sticky !important;
  padding: 17px 0 !important;
  background: rgba(244, 240, 235, .94) !important;
  border-bottom: 1px solid rgba(42, 37, 35, .15) !important;
  box-shadow: none !important;
  backdrop-filter: blur(16px);
}
header.scrolled { background: rgba(255, 253, 250, .97) !important; }
.header-inner { align-items: center !important; }
.logo { color: var(--primary-dark) !important; font-size: 25px !important; line-height: .95; }
.logo .highlight, .highlight, .gold { color: var(--primary) !important; }
.logo-sub { margin-top: 7px !important; color: var(--text-light) !important; letter-spacing: .18em !important; font-size: 8px !important; }
.nav-links { gap: clamp(13px, 1.6vw, 26px) !important; }
.nav-links a { color: var(--text) !important; font-size: 10px !important; letter-spacing: .11em !important; text-transform: uppercase; font-weight: 600 !important; }
.nav-links a::after { background: var(--primary) !important; height: 1px !important; bottom: -7px !important; }
.header-right { gap: 12px !important; }
.header-right .phone { font-size: 13px !important; color: var(--text) !important; }
.social-icons a { width: 28px !important; height: 28px !important; border: 1px solid rgba(42,37,35,.14) !important; border-radius: 50% !important; background: transparent !important; font-size: 12px !important; }

/* Buttons */
.btn-consult, .btn-primary, .booking-form .btn-submit, .contact-form .btn-submit {
  min-height: 45px;
  padding: 12px 24px !important;
  border: 1px solid var(--primary) !important;
  border-radius: var(--button-radius) !important;
  color: #fff !important;
  background: linear-gradient(135deg, #7c4842 0%, #683632 100%) !important;
  box-shadow: 0 7px 19px rgba(78, 42, 39, .16), inset 0 1px 0 rgba(255,255,255,.14) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: .09em !important;
  text-transform: uppercase;
  transition: background .25s ease, color .25s ease, transform .25s ease, box-shadow .25s ease !important;
}
.btn-consult:hover, .btn-primary:hover, .booking-form .btn-submit:hover, .contact-form .btn-submit:hover {
  color: #fffdfa !important;
  background: linear-gradient(135deg, #8a5049 0%, #713f3a 100%) !important;
  box-shadow: 0 11px 25px rgba(78, 42, 39, .22), inset 0 1px 0 rgba(255,255,255,.16) !important;
  transform: translateY(-1px) !important;
}
.btn-outline {
  border-radius: var(--button-radius) !important;
  border: 1px solid var(--primary-dark) !important;
  color: var(--primary-dark) !important;
  background: rgba(255,253,250,.58) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72), 0 5px 14px rgba(78,42,39,.05) !important;
  font-size: 11px !important;
  letter-spacing: .09em !important;
  text-transform: uppercase;
}

/* A consistent, softened treatment for every rectangular action. */
.btn-edu, .service-detailed .btn-wrap .btn-service, .profi-fallback-button,
.profi-booking-host .pg-button, #profiGuideBooking .pg-button {
  border: 1px solid rgba(91,45,41,.88) !important;
  border-radius: var(--button-radius) !important;
  background: linear-gradient(135deg, #7c4842 0%, #683632 100%) !important;
  box-shadow: 0 7px 19px rgba(78,42,39,.16), inset 0 1px 0 rgba(255,255,255,.14) !important;
  transition: transform .22s ease, background .22s ease, box-shadow .22s ease !important;
}

/* Fast booking launcher: the external calendar is created only after user intent. */
.booking-fast-launcher,
.profi-inline-trigger {
  font: 700 13px/1 Inter, sans-serif !important;
  letter-spacing: .08em !important;
  cursor: pointer !important;
}
.profi-inline-trigger[aria-busy="true"],
.booking-fast-launcher[aria-busy="true"] {
  opacity: .72 !important;
  cursor: wait !important;
}
.booking-status {
  position: fixed;
  z-index: 2147483001;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: min(520px, calc(100% - 32px));
  padding: 12px 16px;
  border: 1px solid rgba(113,63,58,.18);
  border-radius: 12px;
  background: #fffdfa;
  color: #3f302c;
  box-shadow: 0 14px 40px rgba(44,35,31,.22);
  text-align: center;
  font: 600 13px/1.5 Inter, sans-serif;
}
.booking-status[hidden] { display: none !important; }
.booking-status.is-error { border-color: rgba(145,56,42,.35); }
.booking-status a { color: #713f3a; text-decoration: underline; text-underline-offset: 2px; }
.btn-edu:hover, .service-detailed .btn-wrap .btn-service:hover,
.profi-fallback-button:hover, .profi-booking-host .pg-button:hover,
#profiGuideBooking .pg-button:hover {
  background: linear-gradient(135deg, #8a5049 0%, #713f3a 100%) !important;
  box-shadow: 0 11px 25px rgba(78,42,39,.22), inset 0 1px 0 rgba(255,255,255,.16) !important;
  transform: translateY(-1px) !important;
}
.btn-service-outline, .education-nav-button, .mobile-book, .messenger-btn,
.booking-info .messenger-row .msg-btn, .contact-chip, .home-review-branches a {
  border-radius: var(--button-radius) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72), 0 5px 14px rgba(78,42,39,.05) !important;
  transition: transform .22s ease, border-color .22s ease, background .22s ease, box-shadow .22s ease !important;
}
.btn-service-outline, .education-nav-button, .mobile-book {
  border: 1px solid rgba(113,63,58,.30) !important;
  background: rgba(255,253,250,.62) !important;
  color: var(--primary-dark) !important;
}
.btn-service-outline:hover, .education-nav-button:hover:not(:disabled), .mobile-book:hover {
  border-color: var(--primary) !important;
  background: rgba(113,63,58,.09) !important;
  box-shadow: 0 8px 18px rgba(78,42,39,.10), inset 0 1px 0 rgba(255,255,255,.7) !important;
  transform: translateY(-1px) !important;
}
.booking-info .messenger-row .msg-btn, .messenger-btn {
  border: 1px solid rgba(255,255,255,.22) !important;
  box-shadow: 0 7px 17px rgba(45,29,27,.13), inset 0 1px 0 rgba(255,255,255,.18) !important;
}
.booking-info .messenger-row .msg-btn:hover, .messenger-btn:hover {
  box-shadow: 0 10px 22px rgba(45,29,27,.19), inset 0 1px 0 rgba(255,255,255,.2) !important;
  transform: translateY(-1px) !important;
}
.contact-chip, .home-review-branches a { border-radius: 10px !important; }
.btn-consult:focus-visible, .btn-primary:focus-visible, .btn-outline:focus-visible,
.btn-edu:focus-visible, .btn-service:focus-visible, .btn-service-outline:focus-visible,
.education-nav-button:focus-visible, .mobile-book:focus-visible, .messenger-btn:focus-visible,
.msg-btn:focus-visible, .profi-fallback-button:focus-visible {
  outline: 2px solid #d9ab98;
  outline-offset: 3px;
}

/* Editorial hero */
.hero, .page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #d7cdc2 !important;
}
.hero { padding: clamp(62px, 8vw, 116px) 0 !important; }
.hero::before, .page-hero::before {
  content: 'ПСИХОТЕРАПИЯ';
  position: absolute;
  z-index: -1;
  left: -2vw;
  bottom: -8vw;
  color: rgba(255, 253, 250, .35);
  font: 600 clamp(80px, 16vw, 260px)/.8 'Playfair Display', serif;
  letter-spacing: -.08em;
  white-space: nowrap;
}
.hero-grid { align-items: center !important; gap: clamp(40px, 7vw, 110px) !important; }
.hero-content { max-width: 670px; }
.hero-badge, .section-label, .eyebrow {
  display: inline-block;
  color: var(--primary) !important;
  font-family: Inter, sans-serif !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: .17em !important;
  text-transform: uppercase !important;
}
.hero-badge { padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; }
.hero h1 { max-width: 770px; color: var(--primary-dark) !important; font-size: clamp(42px, 5vw, 76px) !important; line-height: .98 !important; }
.hero h1 .highlight { font-style: italic; }
.hero p { color: #4d4541 !important; font-size: 17px !important; max-width: 590px; }
.hero-photo > div { max-width: 455px !important; border: 12px solid #f8f5f0 !important; border-radius: 0 !important; box-shadow: 18px 18px 0 rgba(113,63,58,.18) !important; }
.counter-wrapper { border-top: 1px solid rgba(42,37,35,.23); gap: 0 !important; margin-top: 40px !important; padding-top: 19px !important; }
.counter-item { padding-right: 22px !important; margin-right: 22px !important; border-right: 1px solid rgba(42,37,35,.2); }
.counter-item:last-child { border: 0; }
.counter-item .number, .counter-item .plus { color: var(--primary) !important; }

/* Rhythm and sections */
.section-divider { height: 1px !important; background: rgba(42,37,35,.16) !important; }
.about, .education, .services, .states, .reviews, .booking, .cta, .article-section { padding: clamp(62px, 8vw, 118px) 0 !important; }
.education, .reviews, .cta { background: #e8e0d7 !important; }
.section-title { font-size: clamp(36px, 4.2vw, 59px) !important; line-height: 1.04 !important; color: var(--primary-dark) !important; }
.section-sub { max-width: 650px !important; color: var(--text-light) !important; }
.about-photo .photo-wrapper, .photo-wrapper { border-radius: 0 !important; border: 0 !important; box-shadow: -16px 16px 0 var(--gold-light) !important; }
.about-photo img { border-radius: 0 !important; }
.text-block { border-left: 1px solid var(--primary) !important; padding-left: 21px !important; }

/* Cards become quiet editorial sheets */
.edu-card, .service-card, .review-card, .states-category, .cta-box,
.article-card, .price-card, .contact-card, .form-card {
  background: var(--bg-card) !important;
  border: 1px solid rgba(42,37,35,.16) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.edu-card, .service-card, .review-card, .states-category { transition: transform .25s ease, border-color .25s ease !important; }
.edu-card:hover, .service-card:hover, .review-card:hover, .states-category:hover { transform: translateY(-5px) !important; border-color: var(--primary) !important; box-shadow: none !important; }
.edu-card .year, .tag, .service-card .price, .price, .review-stars { color: var(--primary) !important; }
.states-category h3, .service-card h3, .edu-card h3 { color: var(--primary-dark) !important; }
.education-navigation { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 24px; }
.services-scroll { outline: none; }
.telegram-icon, footer .social .telegram-icon { width: 18px !important; height: 18px !important; min-width: 18px !important; max-width: 18px !important; vertical-align: -.16em !important; display: inline-block !important; object-fit: contain !important; }
.social-icons .telegram-icon { width: 14px !important; height: 14px !important; min-width: 14px !important; max-width: 14px !important; }
.max-icon, footer .social .max-icon { width: 18px !important; height: 18px !important; min-width: 18px !important; max-width: 18px !important; vertical-align: -.16em !important; display: inline-block !important; object-fit: contain !important; }
.social-icons .max-icon { width: 14px !important; height: 14px !important; min-width: 14px !important; max-width: 14px !important; }
.services-navigation { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 24px; }
.education-nav-button { min-height: 38px; padding: 9px 14px; border: 1px solid rgba(42,37,35,.24); border-radius: 0; background: transparent; color: var(--primary-dark); font: 700 10px/1 Inter, sans-serif; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; transition: .2s; }
.education-nav-button:hover:not(:disabled) { background: var(--primary); border-color: var(--primary); color: #fffdfa; }
.education-nav-button:disabled { cursor: default; opacity: .36; }
.education-navigation .scroll-indicator { margin: 0 !important; color: var(--text-light) !important; font-size: 11px !important; }
.services-navigation .scroll-indicator { margin: 0 !important; color: var(--text-light) !important; font-size: 11px !important; }
.mobile-hint { display: none; }
#servicesScroll { align-items: stretch !important; }
#servicesScroll > div {
  display: flex !important;
  flex-direction: column;
}
.service-booking-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 42px;
  margin-top: auto;
  padding: 11px 15px;
  border: 1px solid rgba(113,63,58,.16);
  border-radius: 9px;
  background: rgba(113,63,58,.07);
  color: var(--primary);
  cursor: pointer;
  font: 700 10px/1.1 Inter, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  box-shadow: 0 5px 16px rgba(45,29,27,.05);
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.service-booking-button::after {
  content: '→';
  font: 400 18px/0.7 'Playfair Display', serif;
  letter-spacing: 0;
  transition: transform .2s ease;
}
.service-booking-button:hover { border-color: rgba(113,63,58,.28); background: rgba(113,63,58,.12); color: var(--primary-dark); transform: translateY(-1px); }
.service-booking-button:hover::after { transform: translateX(4px); }
div[style*="background: #ffffff"], div[style*="background:#ffffff"] {
  background: var(--bg-card) !important;
  border-radius: 0 !important;
  border-color: rgba(42,37,35,.16) !important;
  box-shadow: none !important;
}
span[style*="border-radius: 60px"], span[style*="border-radius:60px"] { border-radius: 0 !important; }

/* Forms */
.booking-form, .contact-form {
  position: relative;
  background: #2d2927 !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: clamp(27px, 4vw, 46px) !important;
  box-shadow: 15px 15px 0 rgba(113,63,58,.22) !important;
}
.profi-booking-card .section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: #e3b19e !important;
  font: 700 12px/1.15 Inter, sans-serif !important;
  letter-spacing: .14em !important;
  text-transform: uppercase;
}
.booking-calendar-mark {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid currentColor;
  border-radius: 8px;
  opacity: .9;
}
.booking-calendar-mark::before {
  content: '';
  position: absolute;
  top: 8px;
  right: 5px;
  left: 5px;
  border-top: 1px solid currentColor;
}
.booking-calendar-mark::after {
  content: '•••';
  position: absolute;
  right: 0;
  bottom: 4px;
  left: 0;
  font: 700 11px/1 Inter, sans-serif;
  letter-spacing: 2px;
  text-align: center;
}
.profi-booking-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #713f3a, #d4a786, #713f3a);
}
.profi-booking-card h3 {
  max-width: 540px;
  margin: 0 !important;
  color: #fffdfa !important;
  font-size: clamp(28px, 3.3vw, 42px) !important;
  line-height: 1.12 !important;
  text-align: left !important;
}
.profi-booking-card .booking-card-accent { color: #e3b19e !important; }
.booking-card-copy {
  max-width: 540px;
  margin: 16px 0 0 !important;
  color: rgba(255,253,250,.72) !important;
  font: 400 15px/1.65 Inter, sans-serif !important;
  text-align: left;
}
.booking-card-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 8px;
  margin-top: 24px;
}
.booking-card-steps span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(255,253,250,.16);
  color: rgba(255,253,250,.82);
  font: 600 11px/1.2 Inter, sans-serif;
  letter-spacing: .04em;
}
.booking-card-steps b {
  display: inline-grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  border-radius: 50%;
  background: #e3b19e;
  color: #2d2927;
  font-size: 10px;
}
.booking-card-note {
  margin: 13px 0 0 !important;
  color: rgba(255,253,250,.58) !important;
  font: 500 11px/1.45 Inter, sans-serif !important;
  letter-spacing: .025em;
  text-align: center;
}
.booking-card-note::before { content: '✓'; margin-right: 6px; color: #e3b19e; font-weight: 800; }
.booking-form label, .contact-form label { color: #f5eee7 !important; letter-spacing: .04em; }
.booking-form input, .booking-form select, .booking-form textarea,
.contact-form input, .contact-form textarea {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255,253,250,.34) !important;
  border-radius: 0 !important;
  padding: 12px 0 !important;
  color: #fff !important;
}
.booking-form input::placeholder, .booking-form textarea::placeholder,
.contact-form input::placeholder, .contact-form textarea::placeholder { color: rgba(255,253,250,.55) !important; }
.booking-form input:focus, .booking-form select:focus, .booking-form textarea:focus,
.contact-form input:focus, .contact-form textarea:focus { border-bottom-color: #e3b19e !important; box-shadow: none !important; }
.booking-form .btn-submit, .contact-form .btn-submit { width: 100%; margin-top: 10px; border-color: #e3b19e !important; background: linear-gradient(135deg, #f0c5b1 0%, #dca58e 100%) !important; color: #2d2927 !important; }
.booking-form .btn-submit:hover, .contact-form .btn-submit:hover { color: #2d2927 !important; background: linear-gradient(135deg, #f5d0c0 0%, #e7b097 100%) !important; }
.form-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.form-consent { display: flex !important; gap: 8px; margin-top: 15px; color: rgba(255,253,250,.68) !important; font-size: 11px !important; font-weight: 400 !important; line-height: 1.5; }
.form-consent input { width: 14px !important; min-width: 14px; height: 14px; margin: 2px 0 0 !important; accent-color: #e3b19e; }
.form-consent a { color: #f1c0ad !important; text-decoration: underline; }

/* ProfiGuide lives in an on-site modal, not in a new browser tab. */
.profi-modal-open { overflow: hidden !important; }
.profi-booking-host { display: flex; justify-content: center; margin-top: 24px; }
.profi-fallback-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 15px 27px;
  border: 1px solid var(--primary);
  border-radius: var(--button-radius);
  background: var(--primary);
  color: #fffdfa;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(113,63,58,.18);
  font: 700 12px/1.2 Inter, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: transform .2s ease, background .2s ease;
}
.profi-fallback-button:hover { background: #5e302d; transform: translateY(-2px); }
.profi-booking-note { margin: 13px auto 0; color: var(--text-light); font-size: 13px; }
.profi-fallback-modal[hidden] { display: none !important; }
.profi-fallback-modal { position: fixed; z-index: 2147483000; inset: 0; display: grid; place-items: center; padding: 22px; }
.profi-fallback-backdrop { position: absolute; inset: 0; background: rgba(35,28,25,.72); backdrop-filter: blur(5px); }
.profi-fallback-dialog { position: relative; width: min(960px,100%); height: min(780px,calc(100vh - 44px)); overflow: hidden; background: #fffdfa; box-shadow: 0 28px 80px rgba(0,0,0,.38); }
.profi-fallback-header { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 22px; border-bottom: 1px solid rgba(113,63,58,.16); }
.profi-fallback-header span { color: var(--primary); font: 700 10px/1 Inter,sans-serif; letter-spacing: .13em; }
.profi-fallback-header h2 { margin: 6px 0 0; color: #2d2927; font-size: 22px; }
.profi-fallback-close { width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; background: #f3ebe5; color: var(--primary); cursor: pointer; font-size: 31px; line-height: 1; }
.profi-fallback-frame-wrap { height: calc(100% - 82px); background: #fffdfa; }
.profi-fallback-frame-wrap iframe { display: block; width: 100%; height: 100%; border: 0; background: #fffdfa; }
.profi-booking-host .pg-button {
  position: static !important;
  width: auto !important;
  min-height: 48px;
  height: auto !important;
  padding: 14px 25px !important;
  border: 1px solid var(--primary) !important;
  border-radius: var(--button-radius) !important;
  box-shadow: none !important;
  font: 700 11px/1.2 Inter, sans-serif !important;
  letter-spacing: .09em;
  text-transform: uppercase;
  animation: none !important;
}
.profi-booking-card .profi-booking-host .pg-button {
  width: 100% !important;
  min-height: 54px !important;
  padding: 16px 20px !important;
}

/* Floating ProfiGuide launcher: keep the booking button above every section
   and make its placement independent from the SDK's default styles. */
body > .pg-button,
.profi-floating-button {
  position: fixed !important;
  right: max(18px, env(safe-area-inset-right)) !important;
  bottom: max(18px, env(safe-area-inset-bottom)) !important;
  z-index: 2147483646 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 66px !important;
  min-width: 66px !important;
  height: 66px !important;
  min-height: 66px !important;
  padding: 8px !important;
  overflow: hidden !important;
  border: 2px solid #fffdfa !important;
  border-radius: 50% !important;
  background: #713f3a !important;
  color: #fffdfa !important;
  box-shadow: 0 12px 30px rgba(45, 29, 27, .34) !important;
  font: 700 10px/1.05 Inter, sans-serif !important;
  letter-spacing: .03em !important;
  text-align: center !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
}
body > .pg-button:hover,
.profi-floating-button:hover { background: #5e302d !important; transform: translateY(-2px); }

#profiGuideBooking .pg-button {
  position: static !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 52px !important;
  padding: 15px 25px !important;
  border: 1px solid #e3b19e !important;
  border-radius: var(--button-radius) !important;
  color: #fffdfa !important;
  background: #713f3a !important;
  box-shadow: none !important;
  font: 700 11px/1.2 Inter, sans-serif !important;
  letter-spacing: .09em !important;
  text-transform: uppercase !important;
}
#profiGuideBooking .pg-button:hover { background: #5e302d !important; transform: none !important; }
.pg-modal { border: 10px solid #f4f0eb; box-shadow: 0 28px 70px rgba(0,0,0,.3); }
.pg-modal-close-btn { color: var(--primary) !important; }

/* Footer */
footer { background: #2d2927 !important; border-top: 1px solid #b56d55 !important; color: rgba(255,253,250,.68) !important; }
footer a { color: #f1c0ad !important; }
footer [style*="primary-dark"] { color: #fffdfa !important; }
.premium-icon {
  position: relative;
  display: inline-grid !important;
  width: 42px;
  height: 42px;
  place-items: center;
  margin: 0 0 14px;
  border: 1px solid rgba(113,63,58,.42);
  background: linear-gradient(135deg, rgba(113,63,58,.075), rgba(181,109,85,.02));
  color: var(--primary);
}
.premium-icon::before, .premium-icon::after { box-sizing: border-box; }
.premium-icon--online::before { content: ''; width: 16px; height: 11px; border: 1.5px solid currentColor; }
.premium-icon--online::after { content: ''; position: absolute; width: 5px; height: 7px; margin-left: 20px; border: 1.5px solid currentColor; border-left: 0; }
.premium-icon--place::before { content: ''; width: 13px; height: 13px; border: 1.5px solid currentColor; transform: rotate(45deg); }
.premium-icon--place::after { content: ''; position: absolute; width: 3px; height: 3px; background: currentColor; transform: rotate(45deg); }
.premium-icon--pair::before { content: '∞'; font: 400 25px/1 'Playfair Display', Georgia, serif; }
.premium-icon--compass::before { content: '✦'; font: 400 22px/1 Georgia, serif; }
.premium-icon--layers::before { content: '≡'; font: 400 26px/.8 Georgia, serif; }
.premium-icon--shield::before { content: ''; width: 15px; height: 18px; border: 1.5px solid currentColor; clip-path: polygon(50% 0,100% 18%,88% 75%,50% 100%,12% 75%,0 18%); }
.premium-icon--focus::before { content: ''; width: 15px; height: 15px; border: 1.5px solid currentColor; border-radius: 50%; }
.premium-icon--focus::after { content: ''; position: absolute; width: 4px; height: 4px; background: currentColor; border-radius: 50%; }
.premium-icon--depth::before { content: '∿'; font: 400 28px/.8 Georgia, serif; }
.premium-icon--path::before { content: '↗'; font: 400 25px/.8 Georgia, serif; }
.premium-icon--balance::before { content: '⌁'; font: 400 25px/.8 Georgia, serif; }
.premium-icon--quote::before { content: '“'; font: 600 32px/.7 'Playfair Display', Georgia, serif; }
.cat-header .premium-icon { flex: 0 0 35px; width: 35px; height: 35px; margin: 0 13px 0 0; }
.states-category h3 .premium-icon { width: 30px; height: 30px; margin: 0 10px 0 0; vertical-align: middle; }
.branch-address { color: inherit; text-decoration-color: rgba(181,109,85,.55); }
.branch-address:hover { color: var(--gold) !important; }
.footer-branches { display: grid; gap: 7px; margin-top: 18px; }
.footer-branches-title { color: #fffdfa; font: 600 11px/1.1 Inter, sans-serif; letter-spacing: .1em; text-transform: uppercase; }
footer .footer-branches .branch-address { position: relative; padding-left: 17px; color: #f1c0ad !important; font-size: 13px; }
footer .footer-branches .branch-address::before { content: '⌖'; position: absolute; left: 0; color: #e3b19e; }
.footer-details { display: grid; gap: 7px; margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255,253,250,.15); }
footer .footer-details a { color: #f1c0ad !important; font-size: 13px; }
footer .footer-details .footer-phone { color: #fffdfa !important; font-weight: 600; }
footer .footer-details .branch-address { position: relative; padding-left: 17px; }
footer .footer-details .branch-address::before { content: '⌖'; position: absolute; left: 0; color: #e3b19e; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 7px 14px; margin-top: 5px; }
.footer-legal a { font-size: 11px !important; text-decoration: underline; text-underline-offset: 3px; }
.footer-unified { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(220px,.8fr) minmax(240px,.9fr); gap: 28px; align-items: start; padding: 8px 0; }
.footer-unified p { margin: 0; }
.footer-unified .footer-subtitle { margin-top: 5px; color: rgba(255,253,250,.63); font-size: 12px; }
.footer-unified .social { margin-top: 15px; }
.footer-unified .footer-details { margin-top: 0; padding-top: 0; border-top: 0; }
.footer-company { color: rgba(255,253,250,.55); font-size: 11px; line-height: 1.5; }
.footer-unified .footer-legal { display: grid; gap: 9px; margin: 0; }
.contact-chip { display: inline-flex; align-items: center; min-height: 30px; padding: 5px 16px; border: 1px solid rgba(113,63,58,.18); background: rgba(113,63,58,.04); color: var(--text-light); font-size: 12px; text-decoration: none; transition: .2s ease; }
.contact-chip:hover { color: var(--primary); border-color: rgba(113,63,58,.42); background: rgba(113,63,58,.08); }
.contact-chip .telegram-icon, .contact-chip .max-icon { margin-right: 7px; }
.reviews-branches { padding: clamp(58px,7vw,94px) 0; background: #fffdfa; }
.reviews-branches-intro { margin-bottom: 30px; }
.reviews-branches-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; max-width: 1180px; margin: 0 auto; }
.branch-review-card { display: flex; flex-direction: column; padding: 32px; border: 1px solid rgba(42,37,35,.18); background: var(--bg-card); }
.branch-review-card h3 { margin: 0 0 8px; color: var(--primary-dark); font-size: 27px; }
.branch-review-card p { margin: 0 0 20px; color: var(--text-light); }
.yandex-review-widget { position: relative; min-height: 500px; margin: 0 0 23px; overflow: hidden; border: 1px solid rgba(42,37,35,.12); border-radius: 2px; background: #fffdfa; }
.yandex-review-widget iframe { display: block; width: 100%; height: 500px; border: 0; }
.branch-review-button { display: inline-flex; align-items: center; gap: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--primary); color: var(--primary) !important; font: 700 10px/1.2 Inter,sans-serif; letter-spacing: .09em; text-transform: uppercase; text-decoration: none; }
.branch-review-button span { font: 400 19px/10px 'Playfair Display',serif; }
.branch-review-button:hover { color: var(--primary-dark) !important; }
.home-review-branches { display: flex; align-items: center; justify-content: center; gap: 13px; flex-wrap: wrap; margin-top: 28px; }
.home-review-branches > span { color: var(--text-light); font: 700 10px/1.1 Inter,sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.home-review-branches a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border: 1px solid rgba(113,63,58,.22); color: var(--primary) !important; font: 700 10px/1.1 Inter,sans-serif; letter-spacing: .06em; text-decoration: none; text-transform: uppercase; }
.home-review-branches a:hover { background: rgba(113,63,58,.06); border-color: var(--primary); }
.home-review-branches b { font: 400 16px/1 'Playfair Display',serif; }
.logo[role="link"] { cursor: pointer; }
.diploma-item { cursor: zoom-in !important; }
.diploma-lightbox-open { overflow: hidden !important; }
.diploma-lightbox[hidden] { display: none !important; }
.diploma-lightbox { position: fixed; z-index: 2147483647; inset: 0; display: grid; place-items: center; padding: 30px; background: rgba(32,26,24,.87); }
.diploma-lightbox img { display: block; max-width: min(900px,100%); max-height: calc(100vh - 60px); object-fit: contain; box-shadow: 0 26px 70px rgba(0,0,0,.44); }
.diploma-lightbox-close { position: fixed; top: 16px; right: 18px; width: 42px; height: 42px; border: 1px solid rgba(255,253,250,.6); border-radius: 50%; background: transparent; color: #fffdfa; font-size: 30px; line-height: 1; cursor: pointer; }
.home-work-steps { scroll-snap-type: x mandatory; }
.schedule-right .interior-img { aspect-ratio: 4 / 3 !important; }
.schedule-right .interior-img img { object-fit: contain !important; object-position: center bottom !important; background: #eee6dd; }

@media (max-width: 900px) {
  .nav-links { gap: 10px !important; }
  .nav-links a { font-size: 9px !important; }
  .header-right .phone { display: none; }
  body > .mobile-menu { z-index: 999 !important; }
  body > .mobile-menu.open { display: flex !important; }
}
@media (max-width: 768px) {
  body { padding-top: 78px !important; }
  header { position: fixed !important; top: 0 !important; right: 0 !important; left: 0 !important; z-index: 1000 !important; padding: 13px 0 !important; }
  .hero { padding: 55px 0 68px !important; }
  .hero::before { bottom: -2vw; font-size: 27vw; }
  .hero-photo > div { margin: 0 auto; box-shadow: 10px 10px 0 rgba(113,63,58,.18) !important; }
  .counter-wrapper { flex-wrap: wrap; gap: 12px !important; }
  .counter-item { margin-right: 10px !important; padding-right: 10px !important; }
  .booking-form, .contact-form { box-shadow: 9px 9px 0 rgba(113,63,58,.22) !important; }
  .service-booking-button { min-height: 44px; }
  .education-navigation, .services-navigation { display: none; }
  .profi-fallback-modal { padding: 0; }
  .profi-fallback-dialog { width: 100%; height: 100%; }
  .profi-fallback-header { min-height: 72px; padding: 12px 16px; }
  .profi-fallback-header h2 { font-size: 18px; }
  .profi-fallback-frame-wrap { height: calc(100% - 72px); }
  /* ProfiGuide popup: compact on phones, while its inner booking view
     remains fully scrollable. */
  .pg-modal {
    height: 80vh !important;
    max-height: 80vh !important;
  }
  @supports (height: 1svh) {
    .pg-modal { height: 80svh !important; max-height: 80svh !important; }
  }
  .pg-modal iframe,
  .pg-modal [class*="content"],
  .pg-modal [class*="body"] { max-height: 100% !important; }
  .mobile-menu { position: fixed !important; z-index: 999 !important; top: 78px !important; height: calc(100dvh - 78px) !important; }
  .home-work-steps { display: flex !important; overflow-x: auto !important; grid-template-columns: none !important; padding: 4px 4px 16px !important; scroll-snap-type: x mandatory; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
  .home-work-steps > div { flex: 0 0 min(82vw,310px); scroll-snap-align: start; }
  .reviews-branches-grid { grid-template-columns: 1fr; }
  .branch-review-card { padding: 26px 22px; }
  .diploma-lightbox { padding: 16px; }
  .diploma-lightbox img { max-height: calc(100vh - 32px); }
  .footer-details { margin-top: 16px; }
  .footer-unified { grid-template-columns: 1fr; gap: 19px; }
  .footer-unified .footer-legal { gap: 8px; }
}

/* Final button polish: the compact radius and restrained depth are retained at every breakpoint. */
.service-booking-button {
  border-radius: var(--button-radius) !important;
  border-color: rgba(113,63,58,.24) !important;
  background: rgba(113,63,58,.065) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.74), 0 6px 16px rgba(78,42,39,.06) !important;
}
.service-booking-button:hover {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.74), 0 10px 20px rgba(78,42,39,.11) !important;
}
.profi-booking-host .pg-button, #profiGuideBooking .pg-button {
  border-radius: var(--button-radius) !important;
  background: linear-gradient(135deg, #7c4842 0%, #683632 100%) !important;
  box-shadow: 0 7px 19px rgba(78,42,39,.16), inset 0 1px 0 rgba(255,255,255,.14) !important;
}
.profi-booking-host .pg-button:hover, #profiGuideBooking .pg-button:hover {
  background: linear-gradient(135deg, #8a5049 0%, #713f3a 100%) !important;
  box-shadow: 0 11px 25px rgba(78,42,39,.22), inset 0 1px 0 rgba(255,255,255,.16) !important;
}

/* Mobile navigation is a page-level overlay, deliberately above the content
   and below the fixed header. This avoids clipping by the header's blur layer. */
@media (max-width: 900px) {
  header { z-index: 10002 !important; }
  .mobile-menu-state { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
  .mobile-menu-state:checked ~ header .burger span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .mobile-menu-state:checked ~ header .burger span:nth-child(2) { opacity: 0; }
  .mobile-menu-state:checked ~ header .burger span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
  .mobile-menu-state:checked ~ header .burger { position: relative; z-index: 10003; touch-action: manipulation; }
  body > #mobileMenu {
    position: fixed !important;
    inset: 0 !important;
    display: none;
    height: 100dvh !important;
    min-height: 100vh !important;
    padding: 92px 24px 34px !important;
    z-index: 10001 !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
  }
  .mobile-menu-state:checked ~ #mobileMenu { display: flex !important; }
  .mobile-menu-state:checked ~ #mobileMenu + * { pointer-events: none; }
}

@media (max-width: 520px) {
  .profi-booking-card h3 { font-size: 29px !important; }
  .booking-card-copy { font-size: 14px !important; }
  .booking-card-steps span {
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 8px 4px;
    text-align: center;
  }
  .profi-booking-card .profi-booking-host .pg-button {
    min-height: 52px !important;
    padding: 14px 12px !important;
    font-size: 10px !important;
  }
}
