/* ==========================================================================
   SZGMU Clinic — site.css 
   ========================================================================== */

/* ===== Theme tokens ===== */
:root{
  --c-primary:#00447a;
  --c-accent:#00a1d9;
  --c-primary-dark:#002f54;

  --c-bg:#f7f7f7;
  --c-surface:#ffffff;
  --c-border:#e0e4ec;

  --c-text:#111827;
  --c-muted:#6b7280;

  --radius:14px;
  --radius-lg:18px;

  --shadow: 0 10px 30px rgba(0,0,0,.06);
  --shadow-2: 0 18px 55px rgba(0,0,0,.10);

  --container:1080px;
  --ease: cubic-bezier(.2,.8,.2,1);
}

/* ===== Base ===== */
html{ scroll-behavior:smooth; }
body{
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-bg);
  text-rendering: optimizeLegibility;
}

main.container{ max-width: var(--container); }

/* links */
a{ color: var(--c-primary); text-decoration:none; }
a:hover, a:focus{ color: var(--c-primary-dark); text-decoration:underline; }

/* headings — modern */
h1,h2,h3,h4,h5{
  color:#0f172a;
  font-weight: 900;
  letter-spacing: -0.02em;
}
h1{ font-size: clamp(1.55rem, 2.2vw, 2.1rem); }
h2{ font-size: clamp(1.25rem, 1.7vw, 1.6rem); }
h3{ font-size: 1.1rem; }

.display-8{
  font-size: clamp(1.55rem, 2.2vw, 2.15rem);
  line-height: 1.1;
}

.lead{ font-size: 1.05rem; color: rgba(15,23,42,.92); }

@media (max-width: 768px){
  body{ font-size: 15.5px; }
}

/* reduce motion */
@media (prefers-reduced-motion: reduce){
  *{ scroll-behavior:auto !important; transition:none !important; animation:none !important; }
}

/* ==========================================================================
   Header (topbar + menu) — cleaned + responsive
   ========================================================================== */

/* ---------- TOPBAR ---------- */
.szgmu-topbar{
  background: linear-gradient(180deg,#004b84 0%,#00447a 60%,#003663 100%);
  color:#fff;
  font-size: .875rem;
}

.szgmu-topbar a{ color:#fff; text-decoration:none; }
.szgmu-topbar a:hover{ text-decoration: underline; }

/* чтобы не прилипало к краям */
.szgmu-topbar .container{
  padding-left: 16px;
  padding-right: 16px;
}

/* разрешаем flex-элементам сжиматься */
.szgmu-topbar .container,
.szgmu-topbar .d-flex,
.szgmu-topbar .szgmu-title{
  min-width: 0;
}

/* Эмблема */
.szgmu-emblem{
  height: 120px;      
  width: auto;
  flex: 0 0 auto;
}

/* Заголовки */
.szgmu-title{ min-width: 0; }

.szgmu-title-main{
  font-weight: 900;
  font-size: 1.06rem;    
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.1;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* подзаголовок  */
.szgmu-title-sub{
  font-size: .80rem;
  line-height: 1.22;
  opacity: .9;
  max-width: 520px;
  margin: 2px 0 0 0;

  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* правые блоки */
.szgmu-topbar-right{
  max-width: 420px;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

/* ---------- TOPBAR responsive ---------- */
@media (max-width: 991.98px){
  .szgmu-emblem{ height: 64px; }      
  .szgmu-title-sub{ max-width: 360px; }
  .szgmu-title-main{ font-size: 1.0rem; }
}

/* телефон */
@media (max-width: 767.98px){
  .szgmu-topbar .container{
    padding-left: 12px;
    padding-right: 12px;
    gap: 12px !important;
  }

  .szgmu-emblem{ height: 56px; }

  .szgmu-title-sub{ display:none; }

  .szgmu-topbar-right{
    text-align: left !important;
    max-width: none;
  }

  /* прячем "горячую линию" (первый .szgmu-topbar-right), оставляем последний блок */
  .szgmu-topbar-right:first-of-type{ display:none; }
}

@media (max-width: 360px){
  .szgmu-emblem{ height: 50px; }
  .szgmu-title-main{ font-size: .95rem; }
}

/* ---------- MENU ---------- */
.szgmu-menu{
  position: sticky;
  top: 0;
  z-index: 1030;
  background: linear-gradient(180deg,#00a1d9 0%,#0090c3 100%);
  border-bottom: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 10px 26px rgba(0,0,0,.08);
}

.szgmu-menu .container{
  padding-left: 16px;
  padding-right: 16px;
}

@media (max-width: 575.98px){
  .szgmu-menu .container{
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* делаем меню чутьпотоньше, но чтобы всё влезало */
.szgmu-menu .navbar-nav .nav-link{
  color:#fff !important;
  font-weight: 850;
  font-size: .92rem;
  padding: .58rem .82rem;     
  border-radius: 12px;
  transition: background-color .18s ease, transform .18s ease;
  white-space: nowrap;
}

.szgmu-menu .navbar-nav .nav-link:hover,
.szgmu-menu .navbar-nav .nav-link:focus{
  background: rgba(0,0,0,.10);
  transform: translateY(-1px);
}

.szgmu-menu .navbar-nav .nav-link.active{
  background: rgba(0,0,0,.18);
}

/* toggler */
.navbar-toggler-white{ border-color: rgba(255,255,255,.55); }
.navbar-toggler-white:focus{ box-shadow: 0 0 0 .15rem rgba(255,255,255,.45); }
.navbar-toggler-white .navbar-toggler-icon{
  background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.92)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* search */
.szgmu-search-input{
  max-width: 260px;
  width: 100%;
  border-radius: 999px;
  border: 0;
  font-size: .85rem;
  padding: .48rem .95rem;
}
.szgmu-search-input:focus{ box-shadow: 0 0 0 .15rem rgba(255,255,255,.60); }

/* mobile expanded menu */
@media (max-width: 767.98px){
  .szgmu-menu .navbar-collapse{
    padding: 10px 0 14px;
  }

  .szgmu-menu .navbar-nav{
    gap: 8px;
  }

  .szgmu-menu .navbar-nav .nav-link{
    white-space: normal;
    width: 100%;
    padding: 12px 14px;
  }
}


/* ==========================================================================
   Core components
   ========================================================================== */

.sz-page{ background: transparent; }

.sz-section{
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 22px;
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
}
.sz-section::before{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(700px 240px at 10% 0%, rgba(0,161,217,.10), transparent 60%),
    radial-gradient(700px 240px at 90% 50%, rgba(0,68,122,.08), transparent 60%);
  pointer-events:none;
  opacity: .95;
}
.sz-section > *{ position:relative; }

.sz-title{ color: var(--c-primary-dark); }

.sz-card{
  border-radius: var(--radius);
  border: 1px solid rgba(0,0,0,.06);
  background:
    radial-gradient(640px 220px at 20% 0%, rgba(0,161,217,.08), transparent 60%),
    #fff;
  box-shadow: 0 10px 22px rgba(0,0,0,.06);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
  overflow: hidden;
}
.sz-card:hover{
  transform: translateY(-4px);
  border-color: rgba(0,161,217,.28);
  box-shadow: 0 16px 40px rgba(0,0,0,.12);
}

/* compatibility  */
.card-soft,
section.hero-main,
.border.rounded-3{
  border-radius: var(--radius-lg) !important;
  border-color: var(--c-border) !important;
}
.card-soft{
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}
section.hero-main{
  background: linear-gradient(135deg,#ffffff 0%, #f0f6fb 60%, #f8f4ef 100%);
  border: 1px solid #e4ecf5;
  box-shadow: var(--shadow);
  padding: 2.2rem;
}

@media (max-width: 768px){
  .sz-section{ padding: 18px; }
  section.hero-main{ padding: 1.4rem 1rem; }
}

/* ==========================================================================
   Buttons / forms
   ========================================================================== */

.btn{ font-size: .95rem; }

.btn-primary{
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-accent) 100%);
  border: none;
  border-radius: 14px;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(0,68,122,.18);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), filter .18s var(--ease);
}
.btn-primary:hover{
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 18px 42px rgba(0,68,122,.24);
}

.btn-outline-primary{
  border-radius: 14px;
  border-color: rgba(0,68,122,.30);
  color: var(--c-primary);
  font-weight: 900;
}
.btn-outline-primary:hover{
  background: rgba(0,68,122,.06);
  border-color: rgba(0,161,217,.55);
  color: var(--c-primary-dark);
}
.sz-btn-outline{}

/* forms */
.form-control, .form-select{
  border-radius: 12px;
  border-color: rgba(0,0,0,.12);
  font-size: .95rem;
}
.form-control:focus, .form-select:focus{
  border-color: rgba(0,161,217,.65);
  box-shadow: 0 0 0 .2rem rgba(0,161,217,.18);
}
.form-check-input:checked{ background: var(--c-primary); border-color: var(--c-primary); }

/* ==========================================================================
   Home: hero slider + hero card
   ========================================================================== */

/* safety */
.szgmu-hero-slide,
.szgmu-hero-overlay,
.szgmu-hero-overlay-inner{
  overflow: hidden;
}

.szgmu-hero-slider{
  background: transparent;
}

/* Slide shell */
.szgmu-hero-slide{
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: var(--shadow-2);
  transform: translateZ(0);
}

/* Image */
.szgmu-hero-bg{
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;

  filter: saturate(1.06) contrast(1.04);
  transform: scale(1.02);
  will-change: transform, filter;
}

/* Ken Burns animation on active slide */
.carousel-item.active .szgmu-hero-bg{
  animation: szgmuKenBurns 9s ease-out both;
}

@keyframes szgmuKenBurns{
  from { transform: scale(1.06); filter: saturate(1.02) contrast(1.02) brightness(.98); }
  to   { transform: scale(1.12); filter: saturate(1.12) contrast(1.06) brightness(1.02); }
}

/* Overlay */
.szgmu-hero-overlay{
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0,47,84,.86) 0%, rgba(0,47,84,.46) 48%, rgba(0,47,84,.06) 74%),
    radial-gradient(820px 340px at 18% 18%, rgba(0,161,217,.26), transparent 60%);
}

/* Overlay inner */
.szgmu-hero-overlay-inner{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 18px; /* safe default padding */
  min-width: 0;
}

/* Text block (glass card) */
.szgmu-hero-text{
  max-width: 760px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;

  color: #fff;
  text-shadow: 0 10px 30px rgba(0,0,0,.35);

  background: rgba(0,0,0,.12);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Text reveal animation */
.carousel-item .szgmu-hero-text{
  opacity: 0;
  transform: translateY(10px);
}
.carousel-item.active .szgmu-hero-text{
  animation: szgmuHeroTextIn .55s ease-out .08s both;
}
@keyframes szgmuHeroTextIn{
  from { opacity:0; transform: translateY(14px); }
  to   { opacity:1; transform: translateY(0); }
}

/* Fix bootstrap padding in your markup */
@media (max-width: 575.98px){
  .szgmu-hero-text.p-4{ padding: 12px !important; }
}

/* Typography inside hero text */
.szgmu-hero-text h2{
  margin: 0 0 10px 0 !important;
  font-weight: 900;
  line-height: 1.12;
  font-size: clamp(1.05rem, 4.2vw, 1.7rem);

  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* If you keep text-uppercase on title: make it nicer */
.szgmu-hero-text h2.text-uppercase{
  letter-spacing: .06em;
}

.szgmu-hero-text p{
  margin: 0 0 10px 0;
  line-height: 1.38;
  font-size: clamp(.95rem, 3.1vw, 1.08rem);

  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Buttons row: prevent overflow + make modern pills */
.szgmu-hero-text .mb-1{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 0 !important;
}

.szgmu-hero-text .mb-1 .btn{
  white-space: normal;
  border-radius: 999px;
  font-weight: 800;
}

/* stack buttons on very small phones */
@media (max-width: 360px){
  .szgmu-hero-text .mb-1 .btn{ width: 100%; }
}

/* Indicators (dots) — nicer */
.carousel-indicators{
  margin-bottom: 12px;
}
.carousel-indicators [data-bs-target]{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background-color: rgba(255,255,255,.55);
  border: 0;
  transition: width .2s ease, transform .2s ease, background-color .2s ease;
}
.carousel-indicators .active{
  background-color: #fff;
  width: 22px;
  transform: scale(1.05);
}

/* Controls (arrows) — glass circles */
.carousel-control-prev,
.carousel-control-next{
  width: 54px;
  opacity: 1;
}
.carousel-control-prev-icon,
.carousel-control-next-icon{
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background-size: 55% 55%;
  background-color: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.20);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}
.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon{
  background-color: rgba(0,0,0,.38);
}

/* =========================
   Responsive heights + layout
   ========================= */
@media (max-width: 991.98px){
  .szgmu-hero-bg{ 
    height: auto;          
    max-height: 160px;     
    object-fit: contain;; 
  }
  .szgmu-hero-overlay-inner{ padding: 14px; }
}

@media (max-width: 767.98px){
  .szgmu-hero-bg{ 
    height: auto;          
    max-height: 160px;     
    object-fit: contain;
  }

  .szgmu-hero-overlay{
    background: linear-gradient(180deg, rgba(0,0,0,.08) 0%, rgba(0,0,0,.74) 100%);
  }

  .szgmu-hero-overlay-inner{
    padding: 12px;
    align-items: flex-end;
  }

  .szgmu-hero-text{
    text-align: center;
    text-shadow: 0 8px 18px rgba(0,0,0,.35);
    margin: 0 auto;
    max-width: 560px;
  }

  /* Clamp long description */
  .szgmu-hero-text p.mb-3{
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .carousel-control-prev,
  .carousel-control-next{ width: 44px; }
  .carousel-control-prev-icon,
  .carousel-control-next-icon{ width: 40px; height: 40px; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce){
  .carousel-item.active .szgmu-hero-bg{ animation: none !important; }
  .carousel-item.active .szgmu-hero-text{ animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* =========================
   Hero card below slider (keep yours + small polish)
   ========================= */
.sz-hero.hero-card{
  border-radius: calc(var(--radius-lg) + 2px);
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.06);
  background:
    radial-gradient(900px 320px at 15% 0%, rgba(0,161,217,.14), transparent 55%),
    radial-gradient(900px 320px at 85% 40%, rgba(0,68,122,.12), transparent 55%),
    #fff;
  box-shadow: var(--shadow-2);
}
.hero-card-text{ min-width:0; }
.hero-card-text .lead{ color: rgba(17,24,39,.86); }
.hero-card-image{ background: linear-gradient(180deg, rgba(0,68,122,.06), transparent 60%); }
.hero-img-fit{
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,.16);
  max-width: 100%;
  height: auto;
}

/* ==========================================================================
   Callback2 (обратная связь)
   ========================================================================== */

.callback2{
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius-lg) + 2px);
  border: 1px solid rgba(0,68,122,.18);
  background:
    radial-gradient(900px 320px at 12% 0%, rgba(0,161,217,.20), transparent 55%),
    radial-gradient(900px 320px at 92% 40%, rgba(0,68,122,.18), transparent 55%),
    #fff;
  box-shadow: var(--shadow-2);
  padding: 22px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.callback2:hover{
  transform: translateY(-4px);
  border-color: rgba(0,161,217,.42);
  box-shadow: 0 24px 70px rgba(0,0,0,.14);
}

@media (max-width: 575.98px){
  .callback2{ padding: 16px; }
}

.callback2__glow{
  pointer-events:none;
  position:absolute;
  inset:-2px;
  background: radial-gradient(520px 220px at 25% 25%, rgba(0,161,217,.22), transparent 60%);
  opacity:0;
  transition: opacity .25s var(--ease);
}
.callback2:hover .callback2__glow{ opacity: 1; }

.callback2__left{ padding: 4px 6px; }
.callback2__text{ color: rgba(17,24,39,.88); }

.callback2__kicker{
  display:inline-flex;
  align-items:center;
  gap:.55rem;
  padding:.45rem .75rem;
  border-radius: 999px;
  background: rgba(0,68,122,.08);
  color: var(--c-primary);
  font-weight: 900;
  font-size: .92rem;
  margin-bottom: .9rem;
}

.callback2__icon{
  display:inline-flex;
  width: 38px;
  height: 38px;
  align-items:center;
  justify-content:center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-accent) 100%);
  color:#fff;
  box-shadow: 0 12px 26px rgba(0,68,122,.24);
}

.callback2__title{
  font-weight: 950;
  color: var(--c-primary-dark);
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: .85rem;
}

.callback2__badges{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
  margin-bottom: 1rem;
}

.cb-badge{
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  padding:.38rem .65rem;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 800;
  border: 1px solid rgba(0,0,0,.06);
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(17,24,39,.85);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.cb-badge::before{
  content:"";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(0,161,217,.12);
}
.cb-badge--time::before{ background: var(--c-accent); }
.cb-badge--nosspam::before{ background: #198754; }
.cb-badge--care::before{ background: #0d6efd; }

.callback2:hover .cb-badge{
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(0,0,0,.06);
}

.callback2__right{
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,.07);
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 16px;
}

.callback2__right-title{
  font-weight: 950;
  color: var(--c-primary-dark);
  margin-bottom: .2rem;
  letter-spacing: -0.01em;
}
.callback2__right-subtitle{
  color: var(--c-muted);
  margin-bottom: .95rem;
}

.callback2__btn{
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-accent) 100%);
  border: none;
  color:#fff;
  font-weight: 950;
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 16px 34px rgba(0,68,122,.22);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), filter .18s var(--ease);
}
.callback2__btn:hover{
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 20px 44px rgba(0,68,122,.28);
  color:#fff;
}
.callback2__btn-arrow{ transition: transform .18s var(--ease); }
.callback2__btn:hover .callback2__btn-arrow{ transform: translateX(4px); }

.callback2__note{
  margin-top: .65rem;
  font-size: .82rem;
  color: rgba(17,24,39,.62);
  line-height: 1.25;
}

/* Modal polish */
.modal-content{
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 30px 80px rgba(0,0,0,.18);
}
.modal-header{
  background:
    radial-gradient(700px 220px at 15% 0%, rgba(0,161,217,.14), transparent 60%),
    #fff;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

/* ==========================================================================
   Reviews stars + thumbnails
   ========================================================================== */

.review-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom: 8px;
}
.review-stars, .review-stars .star{ color:#f5b301 !important; }

.review-item .img-thumbnail{
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 12px 26px rgba(0,0,0,.10);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.review-item .js-review-photo:hover .img-thumbnail{
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(0,0,0,.14);
}

/* ==========================================================================
   RichText images — responsive (Wagtail)
   ========================================================================== */

.richtext img, .rich-text img, .block-rich_text img{
  max-width: 100%;
  height: auto;
  display:block;
}
.richtext figure, .rich-text figure, .block-rich_text figure{
  max-width: 100%;
  margin: .9rem 0;
}

.richtext .align-left, .rich-text .align-left, .block-rich_text .align-left{
  float:left; margin:.25rem 1rem .75rem 0; max-width: 50%;
}
.richtext .align-right, .rich-text .align-right, .block-rich_text .align-right{
  float:right; margin:.25rem 0 .75rem 1rem; max-width: 50%;
}
@media (max-width: 768px){
  .richtext .align-left, .rich-text .align-left, .block-rich_text .align-left,
  .richtext .align-right, .rich-text .align-right, .block-rich_text .align-right{
    float:none; max-width: 100%; margin:.6rem 0;
  }
}

/* ==========================================================================
   Animations
   ========================================================================== */

/* default: no hiding */
.sz-section, .sz-card, .callback2, .sz-hero.hero-card, .szgmu-hero-slide{
  opacity: 1;
  transform: none;
}

/* when JS enabled */
html.js .sz-section,
html.js .sz-card,
html.js .callback2,
html.js .sz-hero.hero-card,
html.js .szgmu-hero-slide{
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
html.js .is-inview.sz-section,
html.js .is-inview.sz-card,
html.js .is-inview.callback2,
html.js .is-inview.sz-hero.hero-card,
html.js .is-inview.szgmu-hero-slide{
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Footer
   ========================================================================== */

/* ===== Footer base ===== */
.site-footer{
  background:#0f5f73;
  color:#fff;
  border-top:1px solid rgba(255,255,255,.12);
}

/* Внутренние отступы контейнера  */
.site-footer .container{
  padding-left: 16px;
  padding-right: 16px;
}

.site-footer__inner{
  padding: 24px 0;
  display:grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

@media (min-width: 576px){
  .site-footer .container{
    padding-left: 20px;
    padding-right: 20px;
  }
  .site-footer__inner{
    padding: 28px 0;
    gap: 24px;
  }
}

@media (min-width: 992px){
  .site-footer__inner{
    padding: 40px 0;
    grid-template-columns: 1fr 1.2fr;
    gap: 36px;
  }
}

.site-footer__title{
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 12px 0;
  letter-spacing: .2px;
}

.site-footer__copy{
  margin-top: 14px;
  font-size: .9rem;
  color: rgba(255,255,255,.78);
}

/* ===== Links ===== */
.site-footer__links{
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  gap:10px;
}

.site-footer__links a{
  color: rgba(255,255,255,.92);
  text-decoration:none;
  border-bottom:1px solid transparent;

  /* чтобы длинные ссылки не ломали верстку */
  overflow-wrap: anywhere;
  word-break: normal;
}

.site-footer__links a:hover{
  color:#fff;
  border-bottom-color: rgba(255,255,255,.6);
}

/* ===== Social buttons (mobile friendly) ===== */
.site-footer__social{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:stretch;
}

/* На очень узких экранах в 2 колонки,
   чтобы не слипались и не упирались в края */
.social-btn{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;

  padding: 12px 14px;
  min-height: 44px;           
  border-radius: 12px;

  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.16);

  color:#fff;
  text-decoration:none;

  transition: transform .12s ease, background .12s ease, border-color .12s ease;

 
  flex: 1 1 calc(50% - 6px);   
}

/* Если экран совсем узкий в одну колонку */
@media (max-width: 360px){
  .social-btn{
    flex-basis: 100%;
    max-width: none;
  }
}

/* Начиная с планшета по размеру контента */
@media (min-width: 768px){
  .social-btn{
    flex: 0 0 auto;
    justify-content:flex-start;
    max-width: none;
  }
}

.social-btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.22);
}

.social-btn__text{
  font-weight: 600;
  font-size: .95rem;
  line-height: 1;
  white-space: nowrap; 
}

.social-btn__icon{
  width: 22px;
  height: 22px;
  display:inline-block;

  background: currentColor;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-size: contain;
          mask-repeat: no-repeat;
          mask-position: center;

  flex: 0 0 22px;
}

/*  Icons   */
.social-btn--vk .social-btn__icon{
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12.9 16.2c-1.4 0-2.4-1.2-3.1-2.4-.5.5-1 1.1-1 1.6 0 .7.2 1.2.2 1.2H6.8s-.5-1.6-.5-3.3c0-2.7 1.8-6.7 1.8-6.7h2.4s-1.2 3-1.2 4c0 .7.1 1.1.3 1.1.4 0 1.3-2.1 2-5.1h2.5c-.9 4.5-2.2 7.1-2.2 7.1.6 1 1.2 1.6 1.8 1.6.9 0 1.2-1 1.2-2.2 0-1.1-.3-1.9-.3-1.9h2.3s.4 1 .4 2.5c0 2.4-1 4.5-3.2 4.5z'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12.9 16.2c-1.4 0-2.4-1.2-3.1-2.4-.5.5-1 1.1-1 1.6 0 .7.2 1.2.2 1.2H6.8s-.5-1.6-.5-3.3c0-2.7 1.8-6.7 1.8-6.7h2.4s-1.2 3-1.2 4c0 .7.1 1.1.3 1.1.4 0 1.3-2.1 2-5.1h2.5c-.9 4.5-2.2 7.1-2.2 7.1.6 1 1.2 1.6 1.8 1.6.9 0 1.2-1 1.2-2.2 0-1.1-.3-1.9-.3-1.9h2.3s.4 1 .4 2.5c0 2.4-1 4.5-3.2 4.5z'/%3E%3C/svg%3E");
}

.social-btn--tg .social-btn__icon{
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.7 4.6 2.9 11.5c-1.2.5-1.2 1.1-.2 1.4l4.6 1.4 1.7 5.1c.2.6.1.8.7.8.5 0 .7-.2 1-.5l2.2-2.2 4.6 3.4c.9.5 1.5.2 1.7-.8l3-14.2c.3-1.3-.5-1.8-1.5-1.3zM7.9 13.8l10.6-6.7c.5-.3.9-.1.6.2L10.4 15c-.3.3-.5.6-.5 1l-.2 2.2-1.4-4.4c-.2-.5 0-.7.6-1z'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.7 4.6 2.9 11.5c-1.2.5-1.2 1.1-.2 1.4l4.6 1.4 1.7 5.1c.2.6.1.8.7.8.5 0 .7-.2 1-.5l2.2-2.2 4.6 3.4c.9.5 1.5.2 1.7-.8l3-14.2c.3-1.3-.5-1.8-1.5-1.3zM7.9 13.8l10.6-6.7c.5-.3.9-.1.6.2L10.4 15c-.3.3-.5.6-.5 1l-.2 2.2-1.4-4.4c-.2-.5 0-.7.6-1z'/%3E%3C/svg%3E");
}

/* Accessibility */
.social-btn:focus-visible,
.site-footer__links a:focus-visible{
  outline: 2px solid rgba(255,255,255,.75);
  outline-offset: 3px;
}
/* ===========================
   Wagtail richtext images 
   ===========================

/* любые richtext картинки — адаптивные */
.richtext img,
.rich-text img,
.block-rich_text img,
img.richtext-image{
  max-width: 100% !important;
  height: auto !important;
  display: block;
}

/* выравнивания Wagtail: left/right */
img.richtext-image.left{
  float: left;
  margin: .25rem 1rem .75rem 0;
  max-width: 50% !important;
}

img.richtext-image.right{
  float: right;
  margin: .25rem 0 .75rem 1rem;
  max-width: 50% !important;
}

/* fullwidth (если используется) */
img.richtext-image.full-width,
img.richtext-image.fullwidth{
  float: none;
  margin: .75rem 0;
  width: 100% !important;
  max-width: 100% !important;
}

/* Мобильная версия: отключаем float и делаем 100% ширину */
@media (max-width: 768px){
  img.richtext-image.left,
  img.richtext-image.right{
    float: none !important;
    margin: .6rem 0 !important;
    max-width: 100% !important;
    width: 100% !important; 
  }
}

/* Модалка врача: выравнивание фото и текста */
.szgmu-hero-slider .modal-content,
.modal-content {
  border-radius: 0.75rem;
}

/* Фото в модалке */
.sz-doctor-photo-wrapper {
  display: inline-block;
}

.sz-doctor-photo {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Текстовый столбец модалки */
.sz-doctor-modal-text-col {
  font-size: 0.9rem;
}

/* Аккуратные отступы у richtext внутри модалки */
.sz-doctor-richtext p {
  margin-bottom: 0.35rem;
}

.sz-doctor-richtext ul,
.sz-doctor-richtext ol {
  margin-bottom: 0.35rem;
}

/* Чтоб текст не прилипал к фото на широких экранах */
.sz-doctor-modal-row {
  margin-top: 0.25rem;
}

/* Мобильная адаптация модалки врача */
@media (max-width: 767.98px) {
  .sz-doctor-modal-photo-col {
    margin-bottom: 0.5rem;
  }

  .sz-doctor-photo-wrapper {
    margin-bottom: 0.5rem;
  }

  .sz-doctor-modal-text-col {
    font-size: 0.9rem;
  }
}

/* Фото в карточке врача*/
.sz-card .sz-doctor-avatar {
  display: block;
  margin-left: auto;
  margin-right: auto;  
  width: 220px;
  height: 260px;
  object-fit: cover;   
  border-radius: 0.75rem; 
}


/* Контейнер с фото маршрута: кладём в ряд, с переносом */
.sz-route-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Каждый элемент (одна картинка) */
.sz-route-photo-item {
  flex: 0 0 calc(33.333% - 12px);  /* две картинки в ряд; поменяйте на 33.333% для 3-х */
}

/* Картинка занимает всю плитку */
.sz-route-photo-item img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* На мобильных — по одной */
@media (max-width: 767.98px) {
  .sz-route-photo-item {
    flex: 0 0 100%;
  }
}

/* Оформление блока "Фото входа" */
.sz-entrance-photo-wrap {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 10px 22px rgba(0,0,0,.06);
}

/* Страница записи: чуть компактнее вертикальные отступы */
.sz-page-booking .sz-section {
  padding-top: 14px;
  padding-bottom: 14px;
}

/* Карточки на записи: одинаковый стиль, не слишком "толстые" */
.sz-card-booking {
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
}

/* Кнопки на странице записи: один размер, одинаковый вид */
.sz-page-booking .booking-btn {
  min-width: 190px;
}

/* Текст-muted через класс, чтобы не использовать inline-стили */
.text-muted {
  color: rgba(34, 34, 34, 0.65) !important;
}

/* Оформление блока "Фото входа" */
.sz-entrance-photo-wrap {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 10px 22px rgba(0,0,0,.06);
}

.sz-banner-img {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 10px 22px rgba(0,0,0,.06);
  
}


.sz-section,
.sz-card,
.sz-banner-img {
  cursor: default;
}


/* Телефоны */
.szgmu-phone {
  font-size: 1rem;      /* крупнее, чем .small; подбери размер */
}

@media (min-width: 992px) {
  .szgmu-phone {
    font-size: 1.05rem; /* можно ещё чуть крупнее на десктопе */
  }
}

/* Контейнер блока обратной связи */
.szgmu-callback-box {
  border: 1px solid #d6dde8;      /* спокойный контур */
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  background-color: #ffffff;
}

/* Логотип */
.szgmu-callback-logo img {
  max-width: 80px;
  height: auto;
}

/* Заголовок "Обратная связь" */
.szgmu-callback-heading {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #002f5d;                 /* базовый синий под СЗГМУ */
}

/* Подзаголовок слева */
.szgmu-callback-subtitle {
  font-size: 0.95rem;
  color: #5c6b80;
  line-height: 1.5;
}

/* Текст из Wagtail */
.szgmu-callback-text {
  font-size: 0.9rem;
  color: #5c6b80;
}

/* Правая часть */
.szgmu-callback-right-title {
  font-size: 1rem;
  font-weight: 600;
  color: #002f5d;
  margin-bottom: 0.25rem;
}

.szgmu-callback-right-subtitle {
  font-size: 0.9rem;
  color: #5c6b80;
}

/* Кнопка */
.szgmu-callback-btn {
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Подпись под кнопкой */
.szgmu-callback-note {
  font-size: 0.8rem;
  color: #7a8899;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 992px) {
  .szgmu-callback-box {
    padding: 2rem 2.25rem;
  }
  .szgmu-callback-note {
    margin-right: 0;
  }
}

.szgmu-callback-kicker {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #002f5d;
}

.szgmu-callback-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background-color: #e3ecf7;
  color: #002f5d;
}

.szgmu-callback-kicker-text {
  line-height: 1;
}