/* Detail / service subpages — aligned with index.html glass system & typography */

/* Horizontal pill nav — skrytý scrollbar, zachová scroll na dotyku/myši */
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Obal obsahu služeb — dříve vstupní keyframes; reveal řeší styles.css + reveal-on-view.js */

/* -----------------------------------------------------------------------------
   Pill navigace služeb — sklo jako .glass-site-header (light / nav-initial-light)
   ----------------------------------------------------------------------------- */

/* Horizontální scroll; vertikální my/py aby se drobný stín neřezal u hrany */
.service-pills-scroll-wrap {
  margin-block: 1rem;
  margin-bottom: clamp(1rem, 3vw, 1.5rem);
  padding-block: 1rem;
  padding-inline: 0.125rem;
  overflow-x: auto;
  overflow-y: visible;
}

body.detail-page .page-sub-hero__inner.container {
  overflow: visible;
}

.service-pills-shell {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  padding: 0.25rem;
  border-radius: 9999px;
  overflow: visible;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.75) 0%,
    rgba(255, 255, 255, 0.5) 100%
  );
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid rgba(24, 27, 32, 0.14);
  /* Velmi jemný stín (odpovídá shadow-sm + slate-200/50) */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 1px 2px rgba(226, 232, 240, 0.55);
}

@supports not (backdrop-filter: blur(10px)) {
  .service-pills-shell {
    background: rgba(255, 255, 255, 0.92);
  }
}

.service-pills-track {
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.25rem;
}

.service-pills-highlight {
  position: absolute;
  z-index: 0;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  border-radius: 9999px;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, #ec4899 0%, #a855f7 52%, #9333ea 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition:
    left 0.36s cubic-bezier(0.4, 0, 0.2, 1),
    top 0.36s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.36s cubic-bezier(0.4, 0, 0.2, 1),
    height 0.36s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.2s ease;
}

.service-pills-shell.is-pills-ready .service-pills-highlight {
  opacity: 1;
}

.service-pill-link {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none !important;
  text-decoration-thickness: 0;
  border-radius: 9999px;
  color: rgb(71 85 105) !important; /* slate-600 — přebije globální barvu odkazu */
  transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-pill-link:hover {
  color: rgb(71 85 105) !important;
  text-decoration: none !important;
}

.service-pill-link[aria-current="page"] {
  color: #ffffff !important;
}

.service-pill-link[aria-current="page"]:hover {
  color: #ffffff !important;
  text-decoration: none !important;
}

.service-pill-link:not([aria-current="page"]):hover {
  background-color: rgba(15, 23, 42, 0.05);
}

body.detail-page {
  padding-top: calc(var(--header-h) + clamp(1.5rem, 4vw, 2.5rem) + env(safe-area-inset-top, 0px));
}

.detail-page {
  display: block;
}

.detail-main {
  width: 100%;
  margin: 0;
  padding: 0 0 clamp(2rem, 5vw, 3.5rem);
  box-sizing: border-box;
}

/* Hero: same hierarchy as homepage services intro */
.page-sub-hero {
  padding-block: clamp(3rem, 7vw, 5.5rem);
  padding-inline: clamp(1rem, 4vw, 1.5rem);
  overflow: visible;
}

/* Detail služeb: neuměle nenatahovat spodní padding hero → propast k prvnímu textovému bloku */
body.detail-page .page-sub-hero {
  padding-bottom: clamp(0.75rem, 2vw, 1.25rem);
}

.page-sub-hero__inner {
  max-width: min(56rem, 100%);
  margin-inline: auto;
  text-align: center;
  font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", "Plus Jakarta Sans", sans-serif;
  overflow: visible;
}

.page-sub-kicker {
  margin: 0 0 clamp(0.5rem, 1.2vw, 0.75rem);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}

/* H1: large, semibold, slate-900, tracking-tight — reuse homepage utilities */
.page-sub-hero .page-sub-title {
  margin: 0;
  color: #0f172a;
  font-size: clamp(2.15rem, 4.3vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.14;
}

.page-sub-lead {
  margin: clamp(0.7rem, 1.6vw, 1rem) 0 0;
  max-width: 42rem;
  margin-inline: auto;
  color: #64748b;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 400;
  line-height: 1.52;
}

@media (max-width: 640px) {
  .page-sub-lead {
    max-width: none;
  }
}

/* Content blocks: centered readable column + vertical rhythm */
.detail-block {
  padding-block: clamp(2.5rem, 6vw, 4rem);
  padding-inline: clamp(1rem, 4vw, 1.5rem);
}

/* První blok pod hero — bez horního „padding propasti“; mezery řeší perex (mb); menší spodek před CTA */
.detail-main > .service-detail-enter > .detail-block:first-of-type {
  padding-top: 0;
  padding-bottom: clamp(1rem, 3vw, 1.75rem);
}

.detail-block__inner {
  max-width: min(56rem, 100%);
  margin-inline: auto;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.25rem;
}

.detail-card {
  padding: clamp(1.5rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition:
    box-shadow 0.25s ease,
    border-color 0.25s ease,
    transform 0.2s ease;
}

.detail-card:hover {
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.07),
    0 0 0 1px rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.95);
  transform: translateY(-2px);
}

.detail-card h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.detail-card p {
  margin: 0 0 0.85rem;
  color: #334155;
  line-height: 1.7;
}

.detail-card p:last-child {
  margin-bottom: 0;
}

.detail-list {
  margin: 0;
  padding-left: 1.15rem;
}

.detail-list li {
  margin-bottom: 0.5rem;
  color: #334155;
  line-height: 1.65;
}

.detail-list li:last-child {
  margin-bottom: 0;
}

/* Bottom CTA: glass strip + pill gradient button */
.detail-cta-wrap {
  padding-block: clamp(1rem, 3vw, 2rem);
}

.detail-main > .service-detail-enter > .detail-block.detail-cta-wrap {
  padding-top: 0;
}

.detail-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: clamp(1.5rem, 3vw, 2rem);
}

.detail-cta p {
  margin: 0;
  flex: 1 1 16rem;
  font-size: clamp(1rem, 2vw, 1.1rem);
  line-height: 1.55;
  color: var(--text-primary);
}

.detail-cta .btn--final-cta {
  text-decoration: none;
}

@media (max-width: 840px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-cta {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .detail-cta .btn--final-cta {
    width: 100%;
    justify-content: center;
  }
}
