/* The seasonal skin borrows only the existing reserved padding; keep all anchor offsets and control geometry. */
:root {
  /* Rendered closed header: 137px on desktop, 184px with two rows, 118px on mobile. */
  --gardis-anchor-clearance: 153px;
  /* The smooth-scroll handler measures before it sets the URL fragment. */
  --gardis-managed-anchor-offset: var(--gardis-anchor-clearance);
}

@media (min-width: 661px) and (max-width: 1023px) {
  :root { --gardis-anchor-clearance: 200px; }
}

@media (max-width: 660px) {
  :root { --gardis-anchor-clearance: 134px; }
}

@media (scripting: none) {
  /* The shared header is not sticky without JavaScript. */
  :root { --gardis-anchor-clearance: 16px; }
}

:target,
:is(#gardis-kontaktni-formular, #gardis-showroom-prohlidka,
    #gardis-jak-funguje-pergola, #gardis-pergoly-typy, #kalkulace),
body[data-gardis-legal] #content .glp-anchor,
[data-gardis-faq] [id] {
  /* Elementor can apply its old offset as an ordinary inline style. */
  scroll-margin-top: var(--gardis-managed-anchor-offset) !important;
}

section[data-gardis-faq] { --gfaq-anchor-offset: var(--gardis-anchor-clearance); }
/* Keep the sticky contents panel aligned with the chapter it links to. */
body[data-gardis-legal] { --glp-anchor-clearance: var(--gardis-anchor-clearance); }

.gardis-site-header .gardis-header-season {
  --season-top: 46px;
  --season-bottom: 26px;
  position: relative;
  isolation: isolate;
  padding-block: var(--season-top) var(--season-bottom);
}

/* Grow the original artwork into the decorative space, not the sticky header.
   The reserved height is the former 13vw logo at 1280:465, with its 44px link minimum. */
@media screen {
  /* Legacy link transitions must not interpolate the logo width through nearby
     controls when a device rotates or the viewport changes breakpoints. */
  .gardis-header-season .gardis-header-brand,
  .gardis-header-season .gardis-header-brand img { transition-property: color, filter, opacity; }
  .gardis-header-season .gardis-header-brand {
    position: relative;
    min-width: 0;
    width: clamp(140px, calc(18.75vw - 60px), 180px);
    height: clamp(44px, 4.72265625vw, 50.859375px);
  }
  .gardis-header-season .gardis-header-brand img {
    position: absolute;
    top: 50%;
    inset-inline-start: 0;
    transform: translateY(-50%);
    width: 100%;
    height: auto;
  }
}

/* The navigation switches to a larger font at 1200px. Ease its horizontal
   spacing back to the normal 12px as the single row gains room. */
@media screen and (min-width: 1200px) and (max-width: 1279px) {
  .gardis-header-season .gardis-header-links > li > a {
    padding-inline: clamp(7px, calc(8vw - 89px), 12px);
  }
}

/* On the two-row tablet header, grow upwards, away from the navigation below. */
@media screen and (min-width: 661px) and (max-width: 1023px) {
  .gardis-header-season .gardis-header-brand { width: min(100%, 150px); }
  .gardis-header-season .gardis-header-brand img { top: auto; bottom: 0; transform: none; }
}

@media screen and (max-width: 660px) {
  .gardis-site-header .gardis-header-season {
    width: calc(100% - 14px);
    padding-inline: 9px;
    column-gap: 5px;
  }
  .gardis-header-season .gardis-header-brand {
    width: min(100%, clamp(87px, 29vw, 125px));
    height: 44px;
  }
}

.gardis-header-season > :not(.gardis-winter-ornament) { z-index: 1; }
.gardis-header-season > .gardis-header-nav { z-index: 2; }

/* One decorative, non-interactive layer. Nothing here contributes to layout
   or becomes part of a link's accessible name. Art is served locally. */
@media screen and (forced-colors: none) {
  .gardis-header-season .gardis-winter-ornament {
    position: absolute;
    z-index: 0;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
    pointer-events: none;
    background: linear-gradient(175deg, #daeae3 0%, #fcfdfa 52% 70%, #cddfe0 110%);
  }
  html[data-gardis-theme="night"] .gardis-header-season .gardis-winter-ornament {
    background: linear-gradient(175deg, #183f36 0%, #1a312b 52% 70%, #31514a 110%);
  }
  .gardis-winter-top, .gardis-winter-bottom {
    position: absolute;
    inset-inline: 0;
    pointer-events: none;
    background-repeat: no-repeat;
    background-size: 100% 100%;
  }
  .gardis-winter-top {
    top: 0;
    height: var(--season-top);
    background-image: url("header-christmas-top.svg");
  }
  .gardis-winter-bottom {
    bottom: 0;
    height: var(--season-bottom);
    background-image: url("header-christmas-bottom.svg");
  }
  /* The original <img> remains unchanged. Match its actual ratio, not the
     larger tap target, when laying snow, holly and the star over its roof. */
  .gardis-header-season .gardis-header-brand::after {
    content: "";
    position: absolute;
    pointer-events: none;
    inset-inline-start: 0;
    width: 100%;
    aspect-ratio: 100 / 46.328125;
    top: 50%;
    transform: translateY(-60.793%);
    background: url("header-christmas-logo.svg") center / 100% 100% no-repeat;
  }
  @media (min-width: 661px) and (max-width: 1023px) {
    .gardis-header-season .gardis-header-brand::after { top: auto; bottom: 0; transform: none; }
  }
}
@media (max-width: 660px) {
  .gardis-site-header .gardis-header-season {
    --season-top: 38px;
    --season-bottom: 22px;
  }
  #wrapper-navbar[data-menu-open="true"] .gardis-header-season {
    --season-top: 17px;
    --season-bottom: 8px;
  }
  #wrapper-navbar[data-menu-open="true"] .gardis-winter-bottom { display: none; }
}
@media (max-width: 660px) and (scripting: enabled) {
  .gardis-header-season .gardis-header-nav {
    max-height: calc(100dvh - 82px - var(--season-top) - var(--season-bottom));
  }
}
