@import url('https://fonts.googleapis.com/css2?family=Playfair:ital,opsz,wght@0,5..1200,300..900;1,5..1200,300..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300..700&display=swap');
@import url("https://use.typekit.net/clb5ytl.css");

:root {
  --font-body: 'Quicksand', sans-serif;
  --font-playfair: 'Playfair', serif;
  --font-atb: 'above-the-beyond', sans-serif;
  --cmk-body-before-shift-y: 0px;
  --cmk-body-before-bottom: -50%;

  --color-body: #F5F2F0;
  --color-primary: #5d4842f0;
  --color-secondary: #BFD4CB;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-body);
  color: #222222;
}

body::before {
  content: '';
  position: fixed;
  right: 0;
  bottom: var(--cmk-body-before-bottom);
  width: clamp(280px, 68vw, 1340px);
  aspect-ratio: 1 / 1;
  background-image: url('../images/cmk_bg_item.png');
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  pointer-events: none;
  z-index: 0;
  opacity: 0.1;
  will-change: bottom;
}

body > *:not(header) {
  position: relative;
  z-index: 1;
}

@media (max-width: 1023px) {
  body::before {
    width: clamp(130px, 60vw, 780px);
    right: 0;
    bottom: 0;
  }
}

.hero-section-shell {
  margin-top: var(--cmk-header-height, 0px);
  height: calc(100vh - var(--cmk-header-height, 0px));
  min-height: 420px;
  display: flex;
  flex-direction: column;
}

.hero-slider-shell {
  flex: 1 1 auto;
  min-height: 0;
}

.hero-bottom-bar {
  flex: 0 0 clamp(82px, 10vh, 120px);
}

/* fonts */
.atb {
  font-family: above-the-beyond, sans-serif;
  font-weight: 400;
  font-style: normal;
}

.playfair { 
  font-family: "Playfair", serif;
}

.quicksand {
  font-family: "Quicksand", sans-serif;
}

body.mobile-menu-open {
  overflow: hidden;
}

.decorative em {
  font-family: var(--font-atb) !important;
  text-transform: capitalize;
  font-size: 32px;
}

@media(max-width: 1280px) {
    .decorative em {
      font-size: 20px !important;
  }
}

.mobile-menu-panel {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 60;
  background: rgba(245, 242, 240, 0.98);
  backdrop-filter: blur(10px);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mobile-menu-panel.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
}

.mobile-menu-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.mobile-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.15rem;
}

.mobile-menu-list a {
  font-size: clamp(1.4rem, 5vw, 2.1rem);
  color: var(--color-primary);
}

.button {
  transition: all ease-in-out 300ms;
  cursor: pointer;
}

.button:hover {
  background-color: var(--color-secondary);
}

.swiper-slide {
  height: 486px;
}

.hero-swiper .swiper-slide {
  height: 100%;
}

.reviews-swiper .swiper-wrapper {
  align-items: stretch;
}

.reviews-swiper .swiper-slide {
  height: auto;
}

.reviews-swiper .review-card {
  height: 100%;
}

.active {
  background-color: var(--color-secondary);
}

.headerContactWrapper {
  max-height: 80px;
  opacity: 1;
  transform: translateY(0);
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}

.headerContactWrapper.is-hidden-on-scroll {
  max-height: 0;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.headerLogo {
  filter: brightness(0) invert(1);
  transform: scale(1);
  transform-origin: left center;
  transition: transform 0.25s ease;
}

.headerLogo.is-small-on-scroll {
  transform: scale(0.82);
}

.desktop-main-menu a {
  color: #ffffff;
  transition: color 0.25s ease, opacity 0.25s ease;
}

.desktop-main-menu a:hover,
.desktop-main-menu a:focus-visible {
  color: var(--color-secondary);
  opacity: 1;
}

.desktop-main-menu a.active,
.desktop-main-menu .active > a,
.mobile-menu-list a.active,
.mobile-menu-list .active > a {
  color: var(--color-secondary);
  background: transparent;
  text-decoration: none;
}

.hero-swiper-timer {
  width: clamp(140px, 22vw, 260px);
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  overflow: hidden;
}

.hero-swiper-timer-fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #ffffff;
  transform-origin: left center;
  transform: scaleX(1);
}

.servicesGrid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.5rem;
}

.serviceCard {
  cursor: pointer;
  width: 100%;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: left;
  border: 1px solid var(--color-primary);
  border-radius: 2rem;
  background: transparent;
  color: var(--color-primary);
  transition: all ease-in-out 300ms;
}

.serviceCard:hover {
  background: var(--color-secondary);
  color: var(--color-primary);
}

.serviceCardExcerpt {
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.serviceCardContent {
  display: none;
}

.servicesModal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 1.5rem 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.servicesModal.is-open {
  visibility: visible;
  opacity: 1;
}

.servicesModalBackdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.servicesModalDialog {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100vw - 2rem));
  max-width: 920px;
  max-height: 60vh;
  margin: 0;
  background: #ffffff;
  border-radius: 1.5rem;
  padding: 2.25rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.servicesModalClose {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  font-size: 1.25rem;
  line-height: 1;
}

.servicesModalBody {
  color: #222222;
  font-size: 1.0625rem;
  line-height: 1.75;
}

.servicesModalBody p {
  margin-bottom: 1rem;
}

.servicesModalBody > :first-child,
.servicesModalBody .serviceCardContentText > :first-child {
  margin-top: 0;
}

.servicesModalBody > :last-child,
.servicesModalBody .serviceCardContentText > :last-child {
  margin-bottom: 0;
}

.servicesModalBody h1,
.servicesModalBody h2,
.servicesModalBody h3,
.servicesModalBody h4,
.servicesModalBody h5,
.servicesModalBody h6 {
  font-family: var(--font-playfair);
  color: var(--color-primary);
  line-height: 1.2;
  margin-top: 1.5rem;
  margin-bottom: 0.875rem;
}

.servicesModalBody h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
}

.servicesModalBody h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.1rem);
}

.servicesModalBody h3 {
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
}

.servicesModalBody ul,
.servicesModalBody ol {
  margin: 0.75rem 0 1rem;
  padding-left: 1.4rem;
}

.servicesModalBody ul {
  list-style: disc;
}

.servicesModalBody ol {
  list-style: decimal;
}

.servicesModalBody li {
  margin-bottom: 0.45rem;
}

.servicesModalBody a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

.servicesModalBody a:hover {
  color: #3f312c;
}

.servicesModalBody blockquote {
  margin: 1.2rem 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--color-secondary);
  background: #f8f5f3;
  border-radius: 0.5rem;
}

/* Schedule Modal Styles */
.scheduleModal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 1.5rem 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.scheduleModal.is-open {
  visibility: visible;
  opacity: 1;
}

.scheduleModalBackdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.scheduleModalDialog {
  position: relative;
  z-index: 1;
  background: #ffffff;
  border-radius: 1.5rem;
  padding: 2.25rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.scheduleModalClose {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  font-size: 1.25rem;
  line-height: 1;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.scheduleModalClose:hover {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  color: #ffffff;
}

.servicesModalBody img {
  width: 100%;
  height: auto;
  border-radius: 0.875rem;
  margin: 0.5rem 0 1.1rem;
}

.servicesModalBody hr {
  border: 0;
  border-top: 1px solid #d8d8d8;
  margin: 1.25rem 0;
}

body.services-modal-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .servicesModalDialog {
    border-radius: 1.125rem;
    padding: 1.5rem;
    max-height: calc(100dvh - 2rem);
    max-height: calc(100vh - 2rem);
  }
}

.footerMap {
  min-height: 320px;
}

@media (max-width: 767px) {
  .aboutSwiper .swiper-slide {
    height: 316px;
  }
}

@media (min-width: 1280px) {
  .footerMap {
    min-height: 100%;
  }
}

@media (min-width: 768px) {
  .servicesGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .servicesGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ── Single Content (single-lekarze, single-pracownicy etc.) ── */

.singleContent {
  font-family: var(--font-playfair), "Playfair Display", serif;
  color: var(--color-primary);
  line-height: 1.625;
}

.singleContent > :first-child { margin-top: 0; }
.singleContent > :last-child  { margin-bottom: 0; }

.singleContent p {
  margin-bottom: 1.1rem;
}

.singleContent h1,
.singleContent h2,
.singleContent h3,
.singleContent h4,
.singleContent h5,
.singleContent h6 {
  font-family: var(--font-playfair), "Playfair Display", serif;
  color: var(--color-primary);
  font-weight: 600;
  line-height: 1.2;
  margin-top: 2rem;
  margin-bottom: 0.875rem;
}

.singleContent p { font-size: clamp(1.05rem, 1.6vw, 1.25rem); }
.singleContent h1 { font-size: clamp(2rem,   4vw,   2.75rem); }
.singleContent h2 { font-size: clamp(1.65rem, 3.2vw, 2.2rem);  }
.singleContent h3 { font-size: clamp(1.4rem,  2.6vw, 1.8rem);  }
.singleContent h4 { font-size: clamp(1.2rem,  2vw,   1.5rem);  }
.singleContent h5 { font-size: clamp(1.05rem, 1.6vw, 1.25rem); }
.singleContent h6 { font-size: 1rem; }

.singleContent ul,
.singleContent ol {
  margin: 0.75rem 0 1.1rem;
  padding-left: 1.5rem;
}

.singleContent ul {
  list-style: none;
  padding-left: 0;
}

.singleContent ul li {
  padding-left: 1.5rem;
  position: relative;
}

.singleContent ul li::before {
  content: '';
  position: absolute;
  left: 0.75em;
  top: 0.75em;
  width: 0.3em;
  height: 0.3em;
  background-color: currentColor;
  flex-shrink: 0;
}

.singleContent ol {
  list-style: decimal;
}

.singleContent li {
  margin-bottom: 0.5rem;
}

.singleContent a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

.singleContent a:hover {
  opacity: 0.75;
}

.singleContent blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--color-secondary);
  background: #f8f5f3;
  border-radius: 0.5rem;
  font-style: italic;
}

.singleContent hr {
  border: 0;
  border-top: 1px solid #d8d8d8;
  margin: 2rem 0;
}

.singleContent img {
  width: 100%;
  height: auto;
  border-radius: 0.875rem;
  margin: 0.5rem 0 1.25rem;
}

.singleContent strong { font-weight: 700; }
.singleContent em     { font-style: italic; }