/* ==========================================================================
   Relax FM global top spacing under fixed glass menu
   v1.0.256
   --------------------------------------------------------------------------
   Fixed header does not reserve document height. This late layer gives the
   first content block a consistent, visible clearance after the menu.
   ========================================================================== */

:root {
  --rfm-top-clearance-home-desktop: 162px;
  --rfm-top-clearance-page-desktop: 154px;
  --rfm-top-clearance-home-mobile: 66px;
  --rfm-top-clearance-page-mobile: 118px;
}

@media (min-width: 769px) {
  body.home .rfm-inner-align-container.rfm-home-top-stage,
  body.front-page .rfm-inner-align-container.rfm-home-top-stage,
  body .rfm-inner-align-container.rfm-home-top-stage {
    margin-top: var(--rfm-top-clearance-home-desktop) !important;
  }

  body .rfm-recordings-page,
  body .rfm-laidos-grid-page {
    margin-top: var(--rfm-top-clearance-page-desktop) !important;
  }

  body .rfm-laidos-grid-page,
  body .rfm-laidos-day-card {
    scroll-margin-top: calc(var(--rfm-top-clearance-page-desktop) - 14px) !important;
  }
}

@media (max-width: 768px) {
  body.home .rfm-inner-align-container.rfm-home-top-stage,
  body.front-page .rfm-inner-align-container.rfm-home-top-stage,
  body .rfm-inner-align-container.rfm-home-top-stage {
    margin-top: var(--rfm-top-clearance-home-mobile) !important;
  }

  body .rfm-recordings-page,
  body .rfm-laidos-grid-page {
    margin-top: var(--rfm-top-clearance-page-mobile) !important;
  }

  body .rfm-laidos-grid-page,
  body .rfm-laidos-day-card {
    scroll-margin-top: calc(var(--rfm-top-clearance-page-mobile) - 8px) !important;
  }
}

@media (max-width: 380px) {
  :root {
    --rfm-top-clearance-home-mobile: 64px;
    --rfm-top-clearance-page-mobile: 115px;
  }
}


/* v1.0.693 - Mobile homepage compact first-content offset.
   The first mobile homepage element is the "Zinute i studija" button.
   After the compact sticky header, the old 115-120px homepage top clearance
   left a large empty gap. Keep only a tight gap below the real menu height. */
@media (max-width: 768px) {
  :root {
    --rfm-top-clearance-home-mobile: 66px !important;
  }

  body.home .rfm-inner-align-container.rfm-home-top-stage,
  body.front-page .rfm-inner-align-container.rfm-home-top-stage,
  body .rfm-inner-align-container.rfm-home-top-stage {
    margin-top: 66px !important;
  }
}

@media (max-width: 380px) {
  :root {
    --rfm-top-clearance-home-mobile: 64px !important;
  }

  body.home .rfm-inner-align-container.rfm-home-top-stage,
  body.front-page .rfm-inner-align-container.rfm-home-top-stage,
  body .rfm-inner-align-container.rfm-home-top-stage {
    margin-top: 64px !important;
  }
}
