/* Desktop direction layout from the group training section. */
.group-heading, .group-quick, .group-team, .group-installments, .group-first-visit, .lpg-choice .group-booking { display: none; }

@media (min-width: 900px) {
  body[data-desktop-page] { --group-width: min(1080px, calc(100% - 80px)); }
  body[data-desktop-page] > main,
  body[data-desktop-page] .student-home-shell :is(header, .club-footer) {
    width: var(--group-width); max-width: none; margin-inline: auto;
  }
  body[data-desktop-page] .student-home-shell header {
    padding: 0; height: 70px; align-items: center;
  }
  .student-home-shell header nav { display: flex; align-items: center; }
  .student-home-shell :is(header, footer) a { text-decoration: none; }
  .student-home-shell header .header-contact > a { margin: 0; }
  body[data-desktop-page] main { padding: 18px 0 56px; }
  body[data-desktop-page] :is(.return, .review-back) { display: none !important; }
  body[data-desktop-page] .student-home-shell { width: 100%; max-width: none; margin-inline: 0; }
  main[data-home-shell] { display: flex; flex-direction: column; }
  .group-heading {
    display: flex; align-items: center; column-gap: 18px; row-gap: 8px; flex-wrap: wrap;
    margin: 0 0 22px;
  }
  .group-heading .group-back {
    display: inline-flex; align-items: center; gap: 8px; color: #526272;
    font: 450 14px/1.1 DesktopOnest, Onest, Arial, sans-serif; text-decoration: none;
  }
  .group-back svg { box-sizing: content-box; width: 16px; height: 16px; padding: 9px; background: white; border-radius: 50%; }
  #group-overview h1 {
    font: 600 clamp(23px, 2.05vw, 30px)/1.1 DesktopOnest, Onest, Arial, sans-serif !important;
    margin: 0; letter-spacing: -.035em !important;
  }
  #group-overview p {
    margin: 0 0 0 auto; font: 400 clamp(13px, 1.18vw, 17px)/1.2 DesktopOnest, Onest, Arial, sans-serif !important;
    color: #44435b; text-wrap: balance;
  }
  body[data-desktop-page] .group-hero {
    display: grid; grid-template-columns: minmax(0, .96fr) minmax(0, 1fr); gap: 20px;
    align-items: stretch; padding: 0 !important; margin: 0;
  }
  .group-copy > :is(.eyebrow, .group-legacy-title, p, .actions) { display: none !important; }
  .group-hero .group-copy {
    display: grid; align-content: stretch; grid-template-columns: minmax(0, 1fr) 36%;
    grid-template-rows: max-content 1fr; gap: 12px;
    padding-top: 16px; min-width: 0;
  }
  .group-quick { display: grid; grid-column: 1/-1; grid-row: 1; align-content: start; gap: 14px; }
  .group-quick-row { display: flex; gap: 7px; }
  .group-quick a {
    position: relative; flex: 1 0 auto; display: grid; place-items: center;
    padding: 12px 6px; min-height: 44px; white-space: nowrap;
    border-radius: 13px; background: #fff; color: #100e30; text-decoration: none;
    font: 550 clamp(12px, 1vw, 15px)/1.15 DesktopOnest, Onest, Arial, sans-serif;
  }
  .group-quick-row:first-child a:nth-last-child(-n+2):not([aria-current="page"]) { background: #f7f1fc; }
  .group-quick a small {
    position: absolute; right: 3px; top: -9px; padding: 3px 6px;
    border-radius: 6px; background: #c40d35; color: white; transform: rotate(6deg);
    font-size: 10px; font-weight: 600; line-height: 1.1;
  }
  .group-hero .group-copy > .desktop-price[data-price-key] {
    grid-area: 2 / 1;
    place-self: center stretch;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-width: 0;
    margin: 0;
    padding: 0;
    color: #000029;
    text-align: center;
  }
  .group-hero .group-copy > .desktop-price[data-price-key] > small:first-of-type {
    order: -1;
    padding: 14px 10px 0;
    color: inherit;
    font: 550 clamp(14px, 1.1vw, 16px)/1.2 DesktopOnest, Onest, Arial, sans-serif !important;
  }
  .group-hero .group-copy > .desktop-price[data-price-key] > b {
    padding: 4px 10px 11px;
    color: inherit;
    font: 700 clamp(32px, 2.6vw, 38px)/1.05 DesktopRubik, Rubik, Arial, sans-serif !important;
  }
  .group-hero .group-copy > .desktop-price[data-price-key] > small + small {
    padding: 9px 10px 10px;
    color: #485566;
    font: 450 13px/1.25 DesktopOnest, Onest, Arial, sans-serif !important;
    text-wrap: balance;
  }
  .group-hero .brand-yellow {
    grid-area: 2 / 2; align-self: end; justify-self: end; width: 100%; max-width: 180px;
    margin: 0; line-height: 0; pointer-events: none;
  }
  .group-hero .brand-yellow svg { width: 100%; height: auto; }
  .group-team {
    display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 9px; margin: 24px 0;
  }
  .group-team a {
    display: flex; min-width: 0; flex-direction: column; align-items: stretch; text-align: center;
    overflow: hidden; border-radius: 15px; padding: 0 0 11px; text-decoration: none;
    background: linear-gradient(150deg, #fff5f3, #f9f5de 48%, #e1d9f3); color: #100e30;
  }
  .group-team a:nth-child(3n+2) { background: linear-gradient(150deg, #fff5df, #f9f4eb 50%, #e6d3df); }
  .group-team .trainer-portrait { position: relative; width: 100%; aspect-ratio: .87; overflow: hidden; }
  .group-team .trainer-portrait img {
    position: absolute; top: var(--portrait-top, 4px); left: 50%; width: var(--portrait-width, 100%);
    max-width: none; height: auto; transform: translateX(calc(-1 * var(--portrait-center, 50%)));
    mask-image: linear-gradient(to bottom, black 82%, transparent);
  }
  .group-team a > span { margin-top: 5px; font-size: clamp(14px, 1.1vw, 17px); line-height: 1.1; font-weight: 600; }
  .group-team a > small { margin-top: 3px; color: #51516a; font-size: clamp(11px, .93vw, 14px); line-height: 1.1; }
  .group-installments {
    position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center;
    min-height: 236px; margin: 0; padding: 24px 34px; background: #fff1f1; border-radius: 24px;
  }
  .group-installments .home-podeli-copy { position: relative; z-index: 1; width: 70%; }
  .group-installments .home-podeli-brands, .group-installments .home-podeli-bank { display: flex; align-items: center; }
  .group-installments .home-podeli-brands { gap: 22px; margin-bottom: 9px; }
  .group-installments .home-podeli-brands img { width: 106px; height: auto; }
  .group-installments .home-podeli-bank { gap: 4px; color: #d92229; font-weight: 600; font-size: 15px; }
  .group-installments .home-podeli-bank svg { width: 21px; height: 21px; }
  body[data-desktop-page] .group-installments h2, body[data-desktop-page] #directions h2 {
    margin: 0; font: 600 clamp(22px, 1.9vw, 28px)/1.1 DesktopOnest, Onest, Arial, sans-serif !important;
    letter-spacing: -.03em !important;
  }
  body[data-desktop-page] .group-installments p { margin: 10px 0 14px; color: #49455b; font-size: 16px; line-height: 1.2; }
  .group-installments .home-podeli-cta {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px; margin: 0;
    padding: 10px 18px; border: none; border-radius: 24px; background: #15132f; color: #fff;
    font: 600 14px/1.15 DesktopOnest, Onest, Arial, sans-serif; text-decoration: none;
  }
  .group-installments .home-podeli-copy > small { display: inline-block; vertical-align: middle; margin-left: 12px; color: #57596c; font-size: 12px; }
  .group-installments .home-podeli-art { position: absolute; right: 4%; bottom: -9%; width: 26%; height: 114%; object-fit: contain; }
  body[data-desktop-page] main > #directions { padding: 0; margin: 28px 0 48px !important; }
  #directions .section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 18px; }
  .group-quick a, .group-team a, .group-back, .group-first-visit, .group-installments .home-podeli-cta { transition: translate .4s ease-in-out, background-color .2s ease; }
  .group-quick a[aria-current="page"] { background: #c40d35; color: white; }
  .group-quick a[aria-current="page"] small { background: #fff; color: #a90e30; }
  .personal-hero > .expert-note, .group-copy > .trainer-contact, .group-copy > .pill, .stretch-art-title { display: none; }

  /* Keep the complete figure inside the photograph column. */
  main#group-workouts .stretch-art {
    display: grid; place-items: center; position: relative; align-self: stretch;
    width: 100%; min-width: 0; aspect-ratio: 1.55; margin: 0; padding: 0;
    border-radius: 22px; transform: none; overflow: hidden;
    background: linear-gradient(115deg, #d6e6f4, #f2e5ef 55%, #e5e6f6);
  }
  main#group-workouts .stretch-art > :is(.interval-figure, .ruchnov-hero) {
    position: absolute; inset: 0; display: block; width: 100%; height: 100%;
    max-height: none; max-width: none; box-sizing: border-box; padding: 8px 10px 0; margin: 0;
    object-fit: contain; object-position: center bottom;
    mask-image: linear-gradient(#000 82%, transparent 100%);
  }

  main#group-workouts .functional-collage {
    width: 100%; box-sizing: border-box; padding: 22px 16px 30px;
    grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(3px, .55vw, 8px); align-items: center;
  }
  .functional-collage a { padding: 3px; border-radius: 10px; }
  .functional-collage a:nth-child(odd) { transform: translateY(-8%) rotate(-3deg); }
  .functional-collage a:nth-child(even) { transform: translateY(8%) rotate(3deg); }
  .functional-collage a img { border-radius: 7px; }
  .stretch-art .group-first-visit {
    display: block; position: absolute; left: 12px; bottom: 12px; padding: 8px 11px;
    border-radius: 12px; transform: rotate(-3deg); background: #fff8ee; color: #100e30;
    font-size: clamp(12px, .97vw, 14px); text-decoration: none;
  }
  #directions .section-title .eyebrow { margin-bottom: 8px; }
  #directions .section-title p { margin: 8px 0 0; }
  #directions .lpg-notes {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch; gap: 18px; margin: 24px 0 0;
  }
  #directions .lpg-notes > div { min-width: 0; padding: 23px; background: #fffaf1; border-radius: 20px; transform: rotate(-.6deg); }
  #directions .lpg-notes > div:nth-child(2) { transform: rotate(.6deg); background: #f3e8f1; }
  #directions .lpg-notes h3 { font-size: clamp(18px, 1.5vw, 21px); margin: 12px 0 10px; text-wrap: balance; }
  #directions .lpg-notes p, #group-workouts .lpg-choice p { text-wrap: pretty; }
  #group-workouts .lpg-choice {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center; gap: 26px; margin: 0 0 32px !important;
  }
  #group-workouts .lpg-choice > div:first-child { padding-inline: 18px; }
  #group-workouts .lpg-choice h2 { margin: 0 0 14px; }
  #group-workouts .choice-paper { background: #fffaf1; border-radius: 22px; padding: 22px 26px; transform: rotate(1deg); }
  #group-workouts .choice-paper h3 { margin: 14px 0 10px; }
  #group-workouts .choice-paper ol { margin-block: 0; }
  #group-workouts .choice-paper li { padding: 7px 0 7px 4px; }
  #group-workouts .lpg-choice .pill { margin-top: 18px; }
  #group-workouts .lpg-choice .group-booking { display: inline-flex; }
  #group-workouts .lpg-choice .group-original-link { display: none; }

  @media (max-width: 1079px) {
    #directions .lpg-notes > div { padding-inline: clamp(14px, calc(5vw - 31px), 23px); }
    #directions .lpg-notes h3 { font-size: clamp(16px, 1.75vw, 19px) !important; }
    #group-workouts .choice-paper { padding-inline: clamp(20px, 2.15vw, 26px); }
    #group-workouts .choice-paper li { font-size: clamp(15.5px, 1.68vw, 17px) !important; }
  }
  #group-workouts .choice-paper ol { padding-inline-start: 1.4em; }
  #group-workouts .choice-paper li { font-size: clamp(14.5px, 1.42vw, 16px) !important; text-wrap: balance; }
  @media (max-width: 1119px) {
    #directions .lpg-notes p { font-size: 15px; text-wrap: balance; }
    #directions .lpg-notes h3 { font-size: clamp(16px, 1.75vw, 19.5px) !important; }
    #group-workouts .choice-paper { padding-inline: 16px; }
  }
  @media (max-width: 999px) {
    #group-workouts .lpg-choice { grid-template-columns: minmax(0, 1fr) minmax(448px, 1fr); }
  }
  @media (max-width: 1040px) {
    .group-heading { gap: 10px; }
    body[data-desktop-page] .group-hero { grid-template-columns: minmax(0, 1.09fr) minmax(0, 1fr); gap: 16px; }
    .group-quick-row { gap: 4px; }
    .group-quick a { padding-inline: 5px; }
    .group-hero .brand-yellow { max-width: 146px; }
  }
  @media (hover: hover) {
    :is(.group-quick a, .group-team a, .group-back, .group-first-visit, .group-installments .home-podeli-cta, .lpg-choice .pill):is(:hover, :focus-visible) { translate: 0 -4px; }
    :is(.group-quick a, .group-first-visit, .group-installments .home-podeli-cta, .lpg-choice .pill):is(:hover, :focus-visible) { background: #c40d35; color: #fff; }
  }
  @media (prefers-reduced-motion: reduce) {
    :is(.group-quick a, .group-team a, .group-back, .group-first-visit, .group-installments .home-podeli-cta, .lpg-choice .pill) { transition: none !important; translate: none !important; }
  }
  main#group-workouts[data-home-shell],
  main#group-workouts[data-home-shell] :not(svg, svg *) { line-height: 1.1 !important; }
}
