/********** Template CSS **********/
:root {
    --primary: #06A3DA;
    --secondary: #7eabf7;
    --light: #EEF9FF;
    --dark: #091E3E;

    /* фиксированная высота шапки (подгони под факт) */
    --fixed-header-h: 130px;
}
@media (max-width: 991.98px){
    :root{ --fixed-header-h: 110px; }
}

h1,
h2,
.font-weight-bold {
    font-weight: 700 !important;
}

h3,
h4,
.font-weight-semi-bold {
    font-weight: 600 !important;
}

h5,
h6,
.font-weight-medium {
    font-weight: 500 !important;
}

.btn {
    font-family: 'Jost', sans-serif;
    font-weight: 600;
    transition: .5s;
}

.btn-primary,
.btn-secondary {
    color: #FFFFFF;
}

.btn-primary:hover {
    background: var(--secondary);
    border-color: var(--secondary);
}

.btn-secondary:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-square {
    width: 36px;
    height: 36px;
}

.btn-sm-square {
    width: 28px;
    height: 28px;
}

.btn-lg-square {
    width: 46px;
    height: 46px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding-left: 0;
    padding-right: 0;
    text-align: center;
}

#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
}

.top-shape::before {
    position: absolute;
    content: "";
    width: 35px;
    height: 100%;
    top: 0;
    left: -17px;
    background: var(--primary);
    transform: skew(40deg);
}

.navbar-light .navbar-nav .nav-link {
    font-family: 'Jost', sans-serif;
    padding: 35px 15px;
    font-size: 18px;
    color: var(--dark);
    outline: none;
    transition: .5s;
}

.sticky-top.navbar-light .navbar-nav .nav-link {
    padding: 20px 15px;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: var(--primary);
}

@media (max-width: 991.98px) {
    .navbar-light .navbar-nav .nav-link,
    .sticky-top.navbar-light .navbar-nav .nav-link {
        padding: 10px 0;
    }
}

.carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

@media (max-width: 576px) {
    .carousel-caption h5 {
        font-size: 14px;
        font-weight: 500 !important;
    }

    .carousel-caption h1 {
        font-size: 30px;
        font-weight: 600 !important;
    }
}

.carousel-control-prev,
.carousel-control-next {
    width: 10%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
}

@media (min-width: 991.98px) {
    .banner {
        position: relative;
        margin-top: -90px;
        z-index: 1;
    }
}

.section-title h5::before {
    position: absolute;
    content: "";
    width: 45px;
    height: 3px;
    right: -55px;
    bottom: 11px;
    background: var(--primary);
}

.section-title h5::after {
    position: absolute;
    content: "";
    width: 15px;
    height: 3px;
    right: -75px;
    bottom: 11px;
    background: var(--secondary);
}

.twentytwenty-wrapper {
    height: 100%;
}

/* (Оставлено как в шаблоне; эти фоны не используются в твоём index.html) */
.hero-header {
    background: linear-gradient(rgba(9, 30, 62, .85), rgba(9, 30, 62, .85)), url(../img/carousel-1.webp) center center no-repeat;
    background-size: cover;
}

.bg-appointment {
    background: linear-gradient(rgba(9, 30, 62, .85), rgba(9, 30, 62, .85)), url(../img/carousel-1.webp) center center no-repeat;
    background-size: cover;
}

.appointment-form {
    background: rgba(6, 163, 218, .7);
}

.service-item img,
.service-item .bg-light,
.service-item .bg-light h5,
.team-item .team-text {
    transition: .5s;
}

.service-item:hover img {
    transform: scale(1.15);
}

.team-item .team-text::after,
.service-item .bg-light::after {
    position: absolute;
    content: "";
    top: 50%;
    bottom: 0;
    left: 15px;
    right: 15px;
    border-radius:100px / 15px;
    box-shadow: 0 0 15px rgba(0, 0, 0, .7);
    opacity: 0;
    transition: .5s;
    z-index: -1;
}

.team-item:hover .team-text::after,
.service-item:hover .bg-light::after {
    opacity: 1;
}

.bg-offer {
    background:url(../img/carousel-1.webp) center center no-repeat;
    background-size: cover;
}

.offer-text {
    background: rgba(6, 163, 218, .85);
}

.price-carousel .owl-nav {
    position: absolute;
    width: calc(100% + 45px);
    height: 45px;
    top: calc(50% - 22.5px);
    left: -22.5px;
    display: flex;
    justify-content: space-between;
    opacity: 0;
    transition: .5s;
}

.price-carousel:hover .owl-nav {
    opacity: 1;
}

.price-carousel .owl-nav .owl-prev,
.price-carousel .owl-nav .owl-next {
    position: relative;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    background: var(--primary);
    border-radius: 2px;
    font-size: 22px;
    transition: .5s;
}

.price-carousel .owl-nav .owl-prev:hover,
.price-carousel .owl-nav .owl-next:hover {
    background: var(--secondary);
}

.bg-testimonial {
    background: url(../img/carousel-2.webp) center center no-repeat;
    background-size: cover;
}

.testimonial-carousel {
    background: rgba(6, 163, 218, .85);
}

.testimonial-carousel .owl-nav {
    position: absolute;
    width: calc(100% + 46px);
    height: 46px;
    top: calc(50% - 23px);
    left: -23px;
    display: flex;
    justify-content: space-between;
    z-index: 1;
}

.testimonial-carousel .owl-nav .owl-prev,
.testimonial-carousel .owl-nav .owl-next {
    position: relative;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    background: var(--primary);
    border-radius: 2px;
    font-size: 22px;
    transition: .5s;
}

.testimonial-carousel .owl-nav .owl-prev:hover,
.testimonial-carousel .owl-nav .owl-next:hover {
    background: var(--secondary);
}

/* Оверлей для каждого слайда */
.carousel-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 30, 62, .85);
    z-index: 1;
}

/* Текст и кнопки будут поверх оверлея */
.carousel-caption {
    position: relative;
    z-index: 2;
}

/* Убедимся, что изображение под оверлеем */
.carousel-item img {
    position: relative;
    z-index: 0;
}

/* FIX CLS: резервируем место под изображения карусели */
.carousel-item img.carousel-img,
.carousel-item img.d-block.w-100 {
    width: 100%;
    height: auto;
    aspect-ratio: 1600 / 843;
    object-fit: cover;
}

/* Fixed header */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1050;
}

/* Smooth hide Topbar */
.container-fluid.bg-light {
    transition: transform 0.3s ease;
    z-index: 1050;
    will-change: transform;
}

/* Navbar */
.navbar {
    transition: transform 0.3s ease;
    z-index: 1040;
    will-change: transform;
}

/* Safe offset under fixed header (no JS => no CLS jumps) */
body {
    padding-top: var(--fixed-header-h);
}

/* Remove gaps */
.fixed-header > * {
    margin: 0;
    padding: 0;
    border: 0;
}

/* Engere Navigationseinträge */
.navbar-nav > li {
    margin-left: 8px !important;
    margin-right: 8px !important;
}

.nav-link {
    padding-left: 6px !important;
    padding-right: 6px !important;
}


/* === Carousel crop control (final & safe) === */
#header-carousel .carousel-item{
  height: clamp(520px, 70vh, 760px);
  min-height: 520px;
  position: relative;
}

#header-carousel .carousel-item > img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center -55%;
}



/* ===== Premium Start (static hero) ===== */
.full-bleed{
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding: 0 !important;
}

.hero-static{
  position: relative;
  min-height: clamp(560px, 78vh, 820px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-static .hero-bg{
  position: absolute;
  inset: 0;
  background: url("../img/carousel-2.jpg") center center / cover no-repeat;
  transform: scale(1.02);
}

.hero-static .hero-overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9,30,62,.65) 0%, rgba(9,30,62,.78) 100%);
}

.hero-static .hero-content{
  position: relative;
  z-index: 2;
  padding: 34px 0;
}

.hero-kicker{
  color: rgba(255,255,255,.88);
  letter-spacing: 1px;
  font-weight: 600;
  font-size: 0.95rem;
}

.hero-title{
  color: #fff;
  font-weight: 800;
  line-height: 1.08;
  font-size: clamp(2.1rem, 3.6vw + 1rem, 4rem);
  text-shadow: 0 2px 10px rgba(0,0,0,.35);
}

.hero-sub{
  color: rgba(255,255,255,.90);
  max-width: 60ch;
  font-size: 1.1rem;
}

.hero-trust{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.10);
  color: rgba(255,255,255,.92);
  font-size: .95rem;
  backdrop-filter: blur(3px);
}

.hero-card{
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(9,30,62,.12);
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(0,0,0,.18);
  padding: 18px;
}

.hero-card-title{
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 8px;
}

.hero-card-phone{
  display: inline-block;
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--dark);
  text-decoration: none;
  margin-bottom: 6px;
}

.hero-card-meta{
  color: rgba(9,30,62,.75);
  margin-bottom: 10px;
}

/* Banner cards a bit more premium */
.banner .bg-primary,
.banner .bg-secondary{
  border-radius: 18px;
}

/* Services cards: consistent, premium hover */
.service-item{
  border-radius: 16px;
  overflow: hidden;
}

.service-item img{
  transition: transform .4s ease;
}

.service-item:hover img{
  transform: scale(1.08);
}


/* ===== Mobile: CTA-Buttons in "Termin vereinbaren" sauber zentrieren ===== */
@media (max-width: 991.98px){

  /* кнопки на сервис-страницах имеют класс .svc-btn (не .btn) */
  .svc-sidebar .svc-cta .svc-actions{
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    row-gap: 12px !important;
  }

  .svc-sidebar .svc-cta .svc-actions .svc-btn{
    width: min(360px, 100%) !important;
    display: flex !important;
    justify-content: center !important;
    text-align: center !important;
    margin: 0 auto !important;
  }
}

/* ===== Hero buttons: Termin vereinbaren (no wrap) ===== */
 .hero-static .btn{
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 260px;
}

@media (max-width: 576px){
  .hero-static .btn{
    min-width: 0;
    width: 90%;
    max-width: 360px;
  }
}

/* =========================
   Doctolib embed fixes (appointment.html)
   - Mobile: scroll inside iframe, swipe on widget scrolls page until first tap
   - Desktop: let iframeResizer grow the iframe; no max-height clipping
   ========================= */
#doctolib-iframe-container{ position: relative; }
#appointment-iframe{ width: 100%; border: 0; display: block; }

@media (min-width: 992px){
  /* Desktop: no clipping; height driven by iframeResizer */
  #doctolib-iframe-container{ height: auto !important; overflow: visible !important; }
  #appointment-iframe{ min-height: 680px; max-height: none !important; overflow: visible !important; }
}

@media (max-width: 991.98px){
  /* Mobile: fixed viewport-like area; scroll inside iframe */
  #doctolib-iframe-container{ height: calc(100vh - var(--fixed-header-h) - 18px); overflow: hidden; }
  #appointment-iframe{ height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  /* "scroll-page" shield */
  #doctolib-mobile-shield{
    position: absolute; inset: 0;
    display: none;
    background: transparent;
    z-index: 5;
  }
  #doctolib-mobile-shield.is-visible{ display: block; }
  #doctolib-mobile-shield .doctolib-shield-hint{
    position: absolute; left: 50%; top: 12px; transform: translateX(-50%);
    background: rgba(9,30,62,.78);
    color: #fff;
    padding: 10px 12px;
    border-radius: 999px;
    font-size: 14px;
    line-height: 1;
    pointer-events: none;
    max-width: calc(100% - 24px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* When locked, prevent interacting with iframe so swipe scrolls page */
  #appointment-iframe.doctolib-locked{ pointer-events: none; }
}
