/* ==========================================================================
   Tablet / laptop (< 1502px) – fluid reszponzív, fix 16px, nincs viewport-skálázás
   PC pixelpontos lap: sheet.css @ min-width 1502px
   Telefon: sheet-mobile.css @ max-width 899px
   ========================================================================== */

@media (max-width: 1501px) {
  html:has(body.page-sheet) {
    overflow-x: clip;
  }

  body.page-sheet {
    overflow-x: clip;
    max-width: 100vw;
  }

  .page-sheet {
    font-size: 16px;
    --sheet: 100%;
    --pad: clamp(1.25rem, 4vw, 3.5rem);
    --col-l: 100%;
    --col-r: 100%;
    --photo-h: auto;
    overflow-x: clip;
  }

  .page-sheet .page-shell,
  .page-sheet .sheet {
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
  }

  .page-home .page-shell {
    overflow-x: visible;
  }

  .page-home .sheet {
    overflow-x: visible;
  }

  /* Főoldal: keskenyebb oldalsó margó = szélesebb tartalom */
  .page-home {
    --pad: clamp(1.25rem, 3vw, 11em);
  }

  .page-sheet:not(.page-home) .page-shell,
  .page-sheet:not(.page-home) .sheet {
    overflow-x: visible;
  }

  .page-sheet:not(.page-home) .page-shell {
    --sheet-bleed: calc(max(0px, (100vw - 93.8975em) / 2));
  }

  .page-sheet img {
    max-width: 100%;
    height: auto;
  }

  .page-sheet .sheet-top__photo img,
  .page-sheet .sheet-person__photo img {
    max-width: none;
    height: 100%;
    object-fit: cover;
  }

  .page-sheet .sheet-top__photo .menu-toggle--labeled {
    position: absolute;
    top: 1em;
    right: 1.25em;
    z-index: 12;
  }

  /* ---- Szekciók ---- */
  .sheet-section {
    padding: clamp(2.5rem, 5vw, 3.5rem) clamp(1.25rem, 4vw, 3rem);
  }

  .sheet-section--tint {
    position: relative;
    background-color: #fdfaf9 !important;
    box-shadow: 0 0 0 100vmax #fdfaf9;
    clip-path: inset(0 -100vmax);
  }

  .sheet-section__title {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    line-height: 1.2;
  }

  .sheet-section__lead {
    font-size: clamp(1rem, 2.2vw, 1.1875rem);
    line-height: 1.45;
    max-width: none;
  }

  .sheet-prose,
  .sheet-list {
    font-size: 0.9375rem;
    max-width: none;
  }

  /* ---- Csapat ---- */
  .sheet-team {
    padding-block: clamp(2.5rem, 5vw, 3.5rem);
    padding-inline: 0;
    width: 100%;
    max-width: 100%;
  }

  .sheet-team__inner {
    width: 100%;
    max-width: 100%;
    padding-inline: clamp(1.25rem, 4vw, 3rem);
  }

  .sheet-team__title {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    line-height: 1.2;
  }

  .sheet-team__lead {
    font-size: clamp(1rem, 2.2vw, 1.1875rem);
    line-height: 1.5;
    max-width: none;
    margin-bottom: clamp(2rem, 4vw, 3rem);
  }

  .sheet-team__row,
  .sheet-team__row--two,
  .sheet-team__row--2,
  .sheet-team__row--3 {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 2.5rem;
    padding-inline: 0;
    margin-left: 0 !important;
    margin-inline: 0;
    justify-content: stretch;
    justify-items: stretch;
  }

  .sheet-person {
    width: 100%;
    max-width: none;
  }

  .sheet-person--horiz {
    grid-template-columns: 6.5rem minmax(0, 1fr);
    width: 100%;
  }

  .sheet-person__bio {
    max-width: none !important;
  }

  /* ---- CTA / footer: tartalom reszponzív, háttér edge-to-edge ---- */
  .sheet-cta,
  .page-sheet .sheet-cta {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    grid-template-columns: unset !important;
    min-height: 0 !important;
    width: 100%;
    max-width: 100%;
    padding: clamp(2.5rem, 5vw, 3.5rem) clamp(1.25rem, 4vw, 3rem) !important;
  }

  .page-sheet:not(.page-home) .sheet-cta {
    box-shadow: 0 0 0 100vmax var(--cta-bg, #d5ccbc);
    clip-path: inset(0 -100vmax);
  }

  .sheet-cta__headline {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    line-height: 1.28;
    border-right: 0;
    padding-right: 0;
    width: 100%;
  }

  .sheet-cta__body {
    padding-left: 0;
    width: 100%;
  }

  .sheet-cta__text {
    font-size: 0.9375rem;
    max-width: none;
  }

  .page-sheet .sheet-footer {
    width: 100%;
    max-width: 100%;
    gap: 2rem;
    padding: clamp(2.5rem, 5vw, 3.5rem) clamp(1.25rem, 4vw, 3rem) !important;
    font-size: 0.875rem;
    line-height: 1.35;
  }

  .page-sheet:not(.page-home) .sheet-footer {
    box-shadow: 0 0 0 100vmax #292422;
    clip-path: inset(0 -100vmax);
  }

  .page-sheet .sheet-footer__col {
    margin-left: 0 !important;
  }

  .page-sheet .sheet-footer__logo {
    width: var(--footer-logo-w);
    max-width: var(--footer-logo-w);
    flex-shrink: 0;
  }

  .page-sheet .sheet-footer__logo img {
    width: 100%;
    height: auto;
    max-height: var(--footer-logo-h);
    object-fit: contain;
  }

  /* ---- Főoldal ---- */
  .page-home {
    --photo-h: auto;
    --col-l: 100%;
    --col-r: 100%;
  }

  .sheet-stats {
    padding: clamp(2.5rem, 5vw, 3.5rem) clamp(1.25rem, 4vw, 3rem);
    width: 100%;
    box-shadow: none !important;
    clip-path: none !important;
  }

  .sheet-stats__title {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    margin-bottom: 1.5rem;
  }
}

/* Aloldal hero: szöveg mindig a fejléckép fölött (900+, kétoszlop) */
@media (min-width: 900px) {
  body.page-sheet:not(.page-home) .sheet-top {
    overflow: visible;
  }

  body.page-sheet:not(.page-home):not(.page-rolunk) .sheet-top__left {
    position: relative;
    z-index: 3;
    background: #fff;
  }

  body.page-sheet:not(.page-home) .sheet-top__photo {
    position: relative;
    z-index: 1;
    width: calc(100% + var(--sheet-bleed, 0px));
    max-width: none;
    margin-right: calc(-1 * var(--sheet-bleed, 0px));
    overflow: hidden;
  }
}

/* Tablet: kétoszlop hero + szekciók (rolunk: rolunk-responsive.css) */
@media (min-width: 900px) and (max-width: 1501px) {
  body.page-sheet:not(.page-home):not(.page-rolunk) .sheet-top {
    display: grid !important;
    grid-template-columns: minmax(0, 34.75fr) minmax(0, 65.25fr);
    grid-template-rows: minmax(clamp(16rem, 38vw, 35.8125rem), auto) auto;
    width: 100%;
    overflow: visible;
    align-items: start;
    min-height: 0 !important;
  }

  body.page-sheet:not(.page-home):not(.page-rolunk) .sheet-top:not(:has(.sheet-top__right-prose)) {
    grid-template-rows: minmax(clamp(16rem, 38vw, 35.8125rem), auto);
  }

  body.page-sheet:not(.page-home):not(.page-rolunk) .sheet-top__left {
    display: flex !important;
    flex-direction: column;
    grid-column: 1;
    grid-row: 1 / 3;
    padding:
      clamp(1.25rem, 2.5vw, 1.9375rem)
      0
      clamp(2rem, 3vw, 3.125rem)
      clamp(1.25rem, 4vw, 3.5rem) !important;
    min-width: 0;
  }

  body.page-sheet:not(.page-home):not(.page-rolunk) .sheet-top:not(:has(.sheet-top__right-prose)) .sheet-top__left {
    grid-row: 1;
  }

  body.page-sheet:not(.page-home):not(.page-rolunk) .sheet-top__hero {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  body.page-sheet:not(.page-home):not(.page-rolunk) .sheet-top__photo {
    grid-column: 2;
    grid-row: 1;
    order: unset;
    height: auto;
    min-height: clamp(16rem, 38vw, 35.8125rem);
    aspect-ratio: 1100 / 573;
    align-self: stretch;
  }

  .page-home .sheet-top__photo {
    aspect-ratio: 4080 / 1770;
    min-height: clamp(12rem, 32vw, 28rem);
  }

  body.page-sheet:not(.page-home):not(.page-rolunk) .sheet-top__right-prose {
    grid-column: 2;
    grid-row: 2;
    order: unset;
    width: 100%;
    max-width: none;
    padding:
      clamp(1.5rem, 3vw, 2.125rem)
      clamp(1rem, 2vw, 2.1875rem)
      clamp(2rem, 3vw, 3.125rem)
      clamp(1rem, 4vw, 3rem) !important;
    font-size: 0.9375rem;
    line-height: 1.65;
  }

  body.page-sheet:not(.page-home):not(.page-rolunk) .sheet-top__logo {
    width: 8.625rem;
    margin-left: 0 !important;
  }

  body.page-sheet:not(.page-home):not(.page-rolunk) .sheet-top__title {
    margin-top: clamp(1.25rem, 2.5vw, 5.125rem) !important;
    padding-right: 0;
    max-width: none;
    font-size: clamp(1.75rem, 2.8vw, 2.4375rem);
    line-height: 1.1;
    white-space: normal;
  }

  body.page-sheet:not(.page-home):not(.page-rolunk) .sheet-top__subtitle,
  body.page-sheet:not(.page-home):not(.page-rolunk) .sheet-top__taglines {
    margin-top: clamp(1rem, 2vw, 2.75rem) !important;
    padding-right: 0;
    max-width: none;
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    line-height: 1.35;
    white-space: normal;
    margin-right: 0 !important;
  }

  body.page-sheet:not(.page-home):not(.page-rolunk) .sheet-top__intro {
    margin-top: clamp(1rem, 2vw, 1.5rem) !important;
    padding-right: 0;
    max-width: none;
    width: auto !important;
    font-size: 0.9375rem;
    line-height: 1.65;
    margin-right: 0 !important;
  }

  body.page-sheet:not(.page-home):not(.page-rolunk) .sheet-top__left-prose {
    margin-top: clamp(1.5rem, 3vw, 2.5rem);
    padding: 0;
    padding-right: clamp(0.5rem, 2vw, 1.5rem);
    max-width: none;
    width: 100% !important;
    font-size: 0.9375rem;
    line-height: 1.65;
  }

  body.page-sheet:not(.page-home):not(.page-rolunk) .sheet-top__left-prose p,
  body.page-sheet:not(.page-home):not(.page-rolunk) .sheet-top__right-prose p {
    font-size: 0.9375rem;
    max-width: none;
  }

  .sheet-two-col {
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 4vw, 3rem);
  }

  .sheet-team__row--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .sheet-team__row--3 .sheet-person:last-child {
    grid-column: 1 / -1;
  }

  .sheet-team__row--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .sheet-cta,
  .page-sheet .sheet-cta {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    text-align: left;
  }

  .sheet-cta__headline {
    border-right: 1px solid rgba(12, 11, 10, 0.15);
    padding-right: clamp(1rem, 2vw, 2rem);
  }

  .sheet-cta__body {
    padding-left: 0;
  }

  .page-sheet .sheet-footer {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    text-align: left;
  }
}

@media (min-width: 1200px) and (max-width: 1501px) {
  .sheet-team__row--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .sheet-team__row--3 .sheet-person:last-child {
    grid-column: auto;
  }
}
