/*
 * Súbor: css/components/shared-sections.css
 * Obsah: Hlavné obsahové sekcie: ceny a rozsah prác, proces, schéma odvodnenia, kvalita a zodpovednosť, referencie s galériou, skrytá kvalita a FAQ. Zahŕňa aj zachované pravidlá sekcií bez aktuálneho obsahu.
 * Použitie: sluzba-betonove_a_oporne_mury.html, sluzba-havarie.html, sluzba-pripojky.html, sluzba-stavba-domu-a-holodomu.html.
 * Zapojenie: <link rel="stylesheet" href="css/components/shared-sections.css">; zachovaj pozíciu v hlavičke podľa css/README.md.
 * Závislosti: HTML triedy a selektory uvedené v pravidlách nižšie, css/general/base.css a farebné premenné témy stránky.
 */
/*
     * CATALOGUE
     */

    /*
     * PRICE / SCOPE
     */

    .pricing-grid {
      display: grid;
      grid-template-columns: 0.9fr 1.1fr;
      gap: 40px;
      align-items: start;
    }

    .factor-list {
      margin: 24px 0 0;
      padding-left: 22px;
    }

    .factor-list li {
      margin-bottom: 10px;
    }

    .pricing-promise {
      padding: 32px;
      background: var(--palette-light);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      text-align: center;
    }

    .pricing-promise .factor-list {
      max-width: 760px;
      margin: 24px auto 0;
      text-align: left;
    }

    .pricing-promise .hero-actions {
      justify-content: center;
    }

    .pricing-compare {
      margin-bottom: 48px;
      padding: 12px 0 0;
    }

    .pricing-compare__header {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 18px;
      margin-bottom: 18px;
      color: var(--text);
      text-transform: uppercase;
      letter-spacing: 0.12em;
      font-size: 12px;
      font-weight: 700;
    }

    .pricing-compare__divider {
      flex: 1;
      height: 1px;
      background: var(--border-strong);
      opacity: 0.7;
    }

    .pricing-compare__title {
      margin-bottom: 10px;
      text-align: center;
      font-size: clamp(36px, 5vw, 68px);
      line-height: 0.96;
      letter-spacing: -0.06em;
    }

    .pricing-compare__lead {
      max-width: 820px;
      margin: 0 auto 28px;
      color: var(--muted);
      text-align: center;
      font-size: 16px;
      line-height: 1.5;
    }

    .pricing-compare__lead strong {
      font-weight: 800;
    }

    .pricing-compare__grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 28px;
      align-items: stretch;
    }

    .pricing-compare__card {
      display: flex;
      flex-direction: column;
      min-width: 0;
      min-height: 100%;
      padding: 24px 22px 18px;
      border: 1px solid var(--border);
      border-radius: 16px;
      background: rgba(255, 255, 255, 0.18);
      box-shadow: 0 8px 20px rgb(0 0 0 / 3%);
    }

    .pricing-compare__card--good {
      background: rgba(64, 121, 90, 0.04);
      border-color: rgba(63, 109, 81, 0.2);
    }

    .pricing-compare__card--bad {
      background: rgba(180, 35, 24, 0.03);
      border-color: rgba(180, 35, 24, 0.2);
    }

    .pricing-compare__card-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 6px;
    }

    .pricing-compare__card h3 {
      margin: 0;
      font-size: clamp(22px, 2vw, 34px);
      line-height: 1.15;
      letter-spacing: -0.04em;
    }

    .pricing-compare__badge {
      display: grid;
      place-items: center;
      width: 38px;
      height: 38px;
      border-radius: 50%;
      font-size: 24px;
      font-weight: 800;
      line-height: 1;
    }

    .pricing-compare__badge--good {
      background: rgba(47, 107, 79, 0.12);
      color: var(--success);
      border: 1px solid rgba(47, 107, 79, 0.25);
    }

    .pricing-compare__badge--bad {
      background: rgba(180, 35, 24, 0.08);
      color: var(--error);
      border: 1px solid rgba(180, 35, 24, 0.2);
    }

    .pricing-compare__card p {
      margin-bottom: 16px;
      color: var(--muted);
      font-size: 16px;
      line-height: 1.5;
    }

    .pricing-compare__list {
      display: grid;
      gap: 10px;
      padding: 0;
      margin: 0;
      list-style: none;
    }

    .pricing-compare__item {
      display: flex;
      align-items: center;
      gap: 10px;
      min-height: 46px;
      padding: 8px 12px;
      border-radius: 10px;
      background: rgba(130, 121, 111, 0.06);
      border: 1px solid rgba(130, 121, 111, 0.12);
      color: var(--text);
      font-size: 15px;
      line-height: 1.4;
    }

    .pricing-compare__item--bad {
      background: rgba(180, 35, 24, 0.03);
      border-color: rgba(180, 35, 24, 0.12);
    }

    .pricing-compare__icon {
      display: inline-grid;
      place-items: center;
      width: 22px;
      height: 22px;
      border-radius: 50%;
      flex-shrink: 0;
      font-size: 18px;
      font-weight: 800;
      line-height: 1;
    }

    .pricing-compare__icon--good {
      background: rgba(47, 107, 79, 0.14);
      color: var(--success);
    }

    .pricing-compare__icon--bad {
      background: rgba(180, 35, 24, 0.1);
      color: var(--error);
    }

    .pricing-compare__footer {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-top: 16px;
      padding: 12px 14px;
      border: 1px solid rgba(47, 107, 79, 0.18);
      font-size: 15px;
      font-weight: 700;
      line-height: 1.4;
      color: var(--text);
    }

    .pricing-compare__footer--good {
      background: rgba(47, 107, 79, 0.08);
      border-radius: 10px;
      color: var(--success);
    }

    .pricing-compare__footer--bad {
      background: rgba(180, 35, 24, 0.08);
      border-radius: 0 0 10px 10px;
      color: var(--error);
    }

    .pricing-compare__check {
      display: inline-grid;
      place-items: center;
      width: 26px;
      height: 26px;
      flex-shrink: 0;
      border-radius: 50%;
      background: rgba(47, 107, 79, 0.12);
      color: var(--success);
      font-size: 18px;
      font-weight: 800;
    }

    .pricing-compare__alert {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      width: 100%;
      margin-top: 16px;
      padding: 12px 14px;
      border-radius: 10px;
      background: rgba(180, 35, 24, 0.08);
      border: 1px solid rgba(180, 35, 24, 0.18);
      color: var(--error);
      font-size: 16px;
      font-weight: 800;
      line-height: 1.3;
    }

    .pricing-compare__alert-icon {
      display: inline-grid;
      place-items: center;
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: rgba(180, 35, 24, 0.12);
      color: var(--error);
      font-size: 20px;
    }

    .pricing-compare__bottom {
      margin-top: 26px;
      text-align: center;
      font-size: clamp(22px, 2.6vw, 34px);
      font-weight: 700;
      line-height: 1.15;
      letter-spacing: -0.05em;
      color: var(--text);
    }

    .pricing-compare__bottom strong {
      display: block;
      font-weight: 800;
    }

    .pricing-example {
      position: relative;
      min-width: 0;
      margin: 0;
      overflow: hidden;
      border-radius: 16px;
      background: #18251e;
      color: #fff;
      isolation: isolate;
    }

    .pricing-example > img {
      width: 100%;
      height: auto;
      aspect-ratio: 3 / 4;
      object-fit: cover;
    }

    .pricing-example__price {
      position: absolute;
      top: 20px;
      left: 20px;
      padding: 12px 18px;
      border-radius: 12px;
      background: #21563b;
      box-shadow: 0 4px 20px rgb(0 0 0 / 18%);
    }

    .pricing-example--bad .pricing-example__price {
      background: #952d25;
    }

    .pricing-example__price span {
      display: block;
      font-size: 12px;
      font-weight: 600;
    }

    .pricing-example__price strong {
      display: block;
      font-size: clamp(28px, 3vw, 40px);
      line-height: 1.15;
      letter-spacing: -0.04em;
    }

    .pricing-example__leaders {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
      color: #b5f4cb;
      filter: drop-shadow(0 1px 2px rgb(0 0 0 / 70%));
    }

    .pricing-example--bad .pricing-example__leaders {
      color: #ffc1b8;
    }

    .pricing-example__leaders polyline {
      fill: none;
      stroke: currentColor;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
      vector-effect: non-scaling-stroke;
    }

    .pricing-example__leaders circle {
      fill: currentColor;
      stroke: #fff;
      stroke-width: 1.5;
      vector-effect: non-scaling-stroke;
    }

    .pricing-example figcaption {
      position: absolute;
      inset: 0;
    }

    .pricing-example__points {
      margin: 0;
      padding: 0;
      list-style: none;
    }

    .pricing-example__points li {
      position: absolute;
      left: var(--label-x);
      top: var(--label-y);
      width: 38%;
      padding: 9px 11px;
      border: 1px solid rgb(181 244 203 / 70%);
      border-radius: 8px;
      background: rgb(15 48 31 / 94%);
      box-shadow: 0 3px 12px rgb(0 0 0 / 20%);
      font-size: 14px;
      font-weight: 600;
      line-height: 1.35;
    }

    .pricing-example--bad .pricing-example__points li {
      border-color: rgb(255 193 184 / 70%);
      background: rgb(76 25 20 / 94%);
    }

    .pricing-example__price {
      z-index: 1;
    }

    .pricing-compare__note {
      margin: 12px 0 0;
      color: var(--muted);
      text-align: center;
      font-size: 12px;
    }

    @media (max-width: 767px) {
      .pricing-compare__header {
        gap: 10px;
        font-size: 10px;
        letter-spacing: 0.08em;
      }

      .pricing-compare__title {
        font-size: clamp(30px, 10vw, 46px);
      }

      .pricing-compare__lead {
        font-size: 15px;
      }

      .pricing-compare__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
      }

      .pricing-compare__card--good { order: 1; }
      .pricing-example--good { order: 2; }
      .pricing-compare__card--bad { order: 3; }
      .pricing-example--bad { order: 4; }

      .pricing-example__price {
        top: 14px;
        left: 14px;
        padding: 10px 14px;
      }

      .pricing-example__points li {
        padding: 6px 7px;
        font-size: 11px;
        border-radius: 6px;
      }

      .pricing-compare__card {
        padding: 18px 16px 14px;
      }

      .pricing-compare__card-header {
        align-items: flex-start;
      }

      .pricing-compare__card h3 {
        font-size: 24px;
      }

      .pricing-compare__item {
        min-height: 42px;
        padding: 7px 10px;
        font-size: 13px;
      }

      .pricing-compare__footer {
        font-size: 13px;
      }

      .pricing-compare__alert {
        font-size: 14px;
      }

      .pricing-compare__bottom {
        font-size: 22px;
      }
    }

    .form-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 20px;
    }

    .field {
      display: grid;
      gap: 8px;
    }

    .field--full {
      grid-column: 1 / -1;
    }

    .field label {
      font-size: 14px;
      font-weight: 700;
    }

    .field input,
    .field select,
    .field textarea {
      width: 100%;
      min-height: 52px;
      padding: 12px 14px;
      color: var(--text);
      background: var(--palette-light);
      border: 1px solid var(--border-strong);
      border-radius: 8px;
    }

    .field textarea {
      min-height: 140px;
      resize: vertical;
    }

    .pricing-statement {
      margin-top: 24px;
      padding: 20px;
      background: var(--accent-soft);
      border-left: 4px solid var(--accent);
      border-radius: 8px;
    }

    .pricing-statement p:last-child {
      margin-bottom: 0;
    }

    /*
     * PROCESS
     */

    .process-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 20px;
    }

    .process-step {
      display: grid;
      grid-template-columns: 44px 1fr;
      gap: 16px;
    }

    .step-number {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background: var(--accent-soft);
      color: var(--accent);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      font-weight: 800;
    }

    .process-step p {
      color: var(--muted);
      font-size: 16px;
    }

    /*
     * DRAINAGE
     */

    .media-split {
      display: grid;
      grid-template-columns: 1.15fr 0.85fr;
      gap: 56px;
      align-items: center;
    }

    .drainage-heading {
      text-align: center;
      margin-inline: auto;
    }

    .drainage-heading h2,
    .drainage-heading p {
      margin-inline: auto;
    }

    .drainage-diagram {
      margin: 0;
    }

    .drainage-diagram>h3,
    .drainage-hint {
      text-align: center;
    }

    .drainage-diagram>h3 {
      font-size: clamp(19px, 2.5vw, 26px);
      margin-bottom: 8px;
    }

    .drainage-hint {
      margin-bottom: 24px;
    }

    .drainage-visual {
      position: relative;
    }

    .drainage-image-wrap {
      position: relative;
    }

    .drainage-image-wrap img {
      display: block;
      width: 100%;
      height: auto;
      border-radius: var(--radius);
    }

    .drainage-point {
      position: absolute;
      left: var(--x);
      top: var(--y);
      transform: translate(-50%, -50%);
      width: 44px;
      height: 44px;
      display: grid;
      place-items: center;
      padding: 0;
      border: 0;
      background: transparent;
      cursor: pointer;
      border-radius: 50%;
    }

    .drainage-point span {
      display: grid;
      place-items: center;
      width: 30px;
      height: 30px;
      background: var(--palette-dark);
      color: var(--palette-light);
      border: 2px solid var(--palette-light);
      border-radius: 50%;
      font-size: 13px;
      font-weight: 700;
      box-shadow: 0 0 0 5px rgb(var(--palette-light-rgb) / 25%), 0 3px 12px rgb(0 0 0 / 25%);
      transition: transform 180ms ease, background 180ms ease;
    }

    .drainage-point:hover span,
    .drainage-point[aria-expanded="true"] span {
      background: var(--palette-taupe);
      transform: scale(1.12);
    }

    .drainage-point:focus-visible,
    .drainage-close:focus-visible {
      outline: 3px solid var(--palette-dark);
      outline-offset: 3px;
    }

    .drainage-info {
      position: absolute;
      left: 0;
      top: 0;
      z-index: 2;
      transform: translateY(-100%);
      width: min(360px, calc(100% - 48px));
      padding: 22px 48px 22px 22px;
      background: var(--palette-light);
      border: 1px solid var(--border);
      border-radius: 12px;
      box-shadow: 0 12px 36px rgb(0 0 0 / 18%);
    }

    .drainage-info[hidden] {
      display: none;
    }

    .drainage-info h4 {
      margin: 0 0 8px;
      font-size: 18px;
    }

    .drainage-info p {
      margin: 0;
      font-size: 14px;
      line-height: 1.6;
    }

    .drainage-close {
      position: absolute;
      top: 4px;
      right: 4px;
      width: 44px;
      height: 44px;
      border: 0;
      background: transparent;
      font-size: 26px;
      cursor: pointer;
      color: inherit;
    }

    .drainage-diagram figcaption {
      margin-top: 16px;
      text-align: center;
    }

    @media (max-width: 767px) {
      .drainage-info {
        width: calc(100% - 16px);
        padding: 16px 44px 16px 16px;
      }

      .drainage-point span {
        width: 26px;
        height: 26px;
        font-size: 12px;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .drainage-point span {
        transition: none;
      }
    }

    /*
     * QUALITY
     */

    .quality-timeline {
      display: grid;
      grid-template-columns: repeat(9, 1fr);
      gap: 8px;
      margin-top: 32px;
    }

    .quality-point {
      min-height: 92px;
      padding: 12px 8px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--palette-light);
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      font-size: 13px;
      font-weight: 700;
    }

    /*
     * RESPONSIBILITY
     */

    .responsibility-grid {
      display: grid;
      grid-template-columns: 0.75fr 1.25fr;
      gap: 48px;
      align-items: center;
    }

    /* REFERENCES */
    .references-heading {
      max-width: 760px;
      margin: 0 auto 36px;
      text-align: center;
    }
    .references-heading h2 { margin-bottom: 0; }
    .reference-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      grid-template-rows: repeat(4, minmax(0, 1fr));
      grid-template-areas: "a a b b" "c d b b" "e e f g" "e e h h";
      width: min(960px, 100%);
      aspect-ratio: 1;
      margin-inline: auto;
      gap: 12px;
    }
    .reference-project:nth-child(1) { grid-area: a; }
    .reference-project:nth-child(2) { grid-area: b; }
    .reference-project:nth-child(3) { grid-area: c; }
    .reference-project:nth-child(4) { grid-area: d; }
    .reference-project:nth-child(5) { grid-area: e; }
    .reference-project:nth-child(6) { grid-area: f; }
    .reference-project:nth-child(7) { grid-area: g; }
    .reference-project:nth-child(8) { grid-area: h; }
    .reference-scroll-hint { display: none; }
    .reference-project {
      position: relative;
      min-width: 0;
      min-height: 0;
      overflow: hidden;
      border: 0;
      border-radius: var(--radius);
      background: var(--palette-dark);
    }
    .reference-project__image {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform .35s ease;
    }
    .reference-project:hover .reference-project__image,
    .reference-project:focus-within .reference-project__image { transform: scale(1.035); }
    .reference-project__open { position: absolute; z-index: 1; inset: 0; width: 100%; border: 0; padding: 0; background: transparent; cursor: zoom-in; border-radius: inherit; }
    .reference-project__open:focus-visible { outline: 3px solid var(--palette-sand); outline-offset: -4px; }
    .reference-project__caption {
      position: absolute;
      inset: auto 0 0;
      padding: 30px 14px 12px;
      background: linear-gradient(to bottom, transparent, rgb(35 35 32 / 22%) 40%, rgb(35 35 32 / 54%));
      color: var(--palette-light);
      text-shadow: 0 1px 4px rgb(0 0 0 / 65%);
    }
    .reference-project__caption h3 {
      margin: 0 0 2px;
      color: var(--palette-light);
      font-size: clamp(14px, 1.4vw, 18px);
      line-height: 1.2;
      letter-spacing: -.02em;
    }
    .reference-project__caption p {
      margin: 0;
      color: var(--palette-light);
      font-size: 12px;
      line-height: 1.3;
    }
    @media (min-width: 768px) and (max-width: 1023px) {
      .reference-grid { gap: 10px; }
      .reference-project__caption { padding: 24px 10px 10px; }
    }
    @media (max-width: 767px) {
      .references-heading { margin-bottom: 24px; }
      .reference-grid {
        grid-template-areas: none; grid-template-columns: none; grid-template-rows: none;
        grid-auto-flow: column; grid-auto-columns: 82%; aspect-ratio: auto;
        gap: 12px; overflow-x: auto; scroll-snap-type: x proximity;
        padding-bottom: 12px; scrollbar-width: thin;
        scrollbar-color: var(--palette-taupe) var(--palette-light-alt);
      }
      .reference-grid .reference-project { grid-area: auto; aspect-ratio: 4 / 3; scroll-snap-align: start; }
      .reference-project__caption { padding: 30px 14px 12px; }
      .reference-project__caption h3 { font-size: 17px; }
      .reference-project__caption p { font-size: 13px; }
      .reference-scroll-hint { display: block; margin: 8px 0 0; color: var(--muted); font-size: 12px; }
    }
    body.reference-gallery-open { overflow: hidden; }
    .reference-gallery {
      width: min(1100px, calc(100% - 24px)); height: min(850px, calc(100dvh - 32px));
      max-width: none; max-height: none; padding: 52px 60px 18px;
      border: 1px solid var(--palette-taupe); border-radius: 12px;
      background: var(--palette-dark); color: var(--palette-light);
    }
    .reference-gallery::backdrop { background: rgb(0 0 0 / 82%); }
    .reference-gallery[open] { display: flex; flex-direction: column; gap: 16px; }
    .reference-gallery__image { width: 100%; flex: 1; min-height: 0; object-fit: contain; touch-action: pan-y; }
    .reference-gallery__footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
    .reference-gallery__footer h3 { margin: 0 0 2px; color: var(--palette-light); font-size: 18px; }
    .reference-gallery__footer p { margin: 0; color: var(--palette-sand); font-size: 13px; }
    .reference-gallery__count { white-space: nowrap; color: var(--palette-sand); font-size: 13px; }
    .reference-gallery__button { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--palette-sand); border-radius: 50%; background: var(--palette-dark); color: var(--palette-light); cursor: pointer; font-size: 28px; line-height: 1; }
    .reference-gallery__button:hover { background: var(--palette-taupe); }
    .reference-gallery__button:focus-visible { outline: 2px solid var(--palette-sand); outline-offset: 3px; }
    .reference-gallery__close { top: 8px; right: 8px; }
    .reference-gallery__previous { left: 8px; top: 50%; transform: translateY(-50%); }
    .reference-gallery__next { right: 8px; top: 50%; transform: translateY(-50%); }
    @media (max-width: 767px) {
      .reference-gallery { padding: 52px 8px 16px; gap: 12px; }
      .reference-gallery__previous, .reference-gallery__next { top: auto; bottom: 16px; transform: none; width: 36px; height: 36px; }
      .reference-gallery__footer { padding-inline: 44px; align-items: start; }
      .reference-gallery__footer h3 { font-size: 16px; }
    }
    @media (prefers-reduced-motion: reduce) {
      .reference-project__image { transition: none; }
    }

    /*
     * HIDDEN QUALITY
     */

    .detail-card {
      min-height: 190px;
    }

    .detail-photo {
      display: block;
      width: 100%;
      aspect-ratio: 4 / 3;
      object-fit: cover;
      border-radius: 10px;
      margin-bottom: 20px;
    }

    .detail-index {
      display: block;
      margin-bottom: 28px;
      color: var(--accent);
      font-size: 13px;
      font-weight: 800;
    }

    /*
     * FAQ
     */

    .faq {
      max-width: 860px;
      margin-inline: auto;
    }

    .faq-item {
      border-bottom: 1px solid var(--border);
    }

    .faq-question {
      width: 100%;
      min-height: 72px;
      padding: 20px 0;
      border: 0;
      background: transparent;
      color: var(--text);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 24px;
      text-align: left;
      font-weight: 700;
    }

    .faq-icon {
      flex: 0 0 auto;
      color: var(--accent);
      font-size: 24px;
    }

    .faq-answer {
      max-width: 760px;
      padding: 0 40px 24px 0;
      color: var(--muted);
    }

    .faq-answer[hidden] {
      display: none;
    }
