/* Mobile-only AgroNetwork stories on the RU home page. */
.home-network-stories,
.home-mobile-listing-cta,
.home-story-viewer {
  display: none;
}

body.home-story-viewer-open {
  overflow: hidden;
}

@media (max-width: 767.98px) {
  body .home-b2b-page .home-b2b-hero {
    width: 100%;
    min-height: 0;
    margin: 0 0 10px;
    padding: 0;
    display: block;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }

  body .home-b2b-page .home-b2b-hero__text {
    max-width: none;
  }

  body .home-b2b-page .home-b2b-hero h1,
  body .home-b2b-page .home-b2b-hero p,
  body .home-b2b-page .home-b2b-btn--primary {
    display: none;
  }

  body .home-b2b-page .home-b2b-hero__actions {
    width: 100%;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body .home-b2b-page .home-b2b-btn--compact {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    height: 44px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: 14px;
    line-height: 1;
    font-weight: 800;
    text-decoration: none;
    box-sizing: border-box;
    transition: transform .16s ease, box-shadow .16s ease,
      background .16s ease, border-color .16s ease;
    -webkit-tap-highlight-color: transparent;
  }

  body .home-b2b-page .home-b2b-btn--compact::after {
    content: "";
    width: 17px;
    height: 17px;
    min-width: 17px;
    display: block;
    order: -1;
    background: currentColor;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
    pointer-events: none;
  }

  body .home-b2b-page .home-b2b-btn--analytics {
    background: #111713;
    color: #fff;
    box-shadow: 0 8px 18px rgba(17, 23, 19, .18);
  }

  body .home-b2b-page .home-b2b-btn--analytics::after {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Crect x='2' y='10' width='3.5' height='7.5' rx='1'/%3E%3Crect x='8.25' y='6' width='3.5' height='11.5' rx='1'/%3E%3Crect x='14.5' y='2.5' width='3.5' height='15' rx='1'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Crect x='2' y='10' width='3.5' height='7.5' rx='1'/%3E%3Crect x='8.25' y='6' width='3.5' height='11.5' rx='1'/%3E%3Crect x='14.5' y='2.5' width='3.5' height='15' rx='1'/%3E%3C/svg%3E");
  }

  body .home-b2b-page .home-b2b-btn--network {
    background: rgba(255, 255, 255, .88);
    color: #0b5c31;
    border-color: rgba(11, 92, 49, .24);
    box-shadow: 0 8px 18px rgba(7, 92, 49, .10);
    backdrop-filter: blur(6px);
  }

  body .home-b2b-page .home-b2b-btn--network::after {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='7' cy='6' r='3'/%3E%3Ccircle cx='14.5' cy='7' r='2.3'/%3E%3Cpath d='M1.5 17c.35-4 2.5-6 5.5-6s5.15 2 5.5 6h-11Z'/%3E%3Cpath d='M12 12.3c3.25-.3 5.4 1.25 6 4.7h-4.15c-.2-1.9-.85-3.45-1.85-4.7Z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='7' cy='6' r='3'/%3E%3Ccircle cx='14.5' cy='7' r='2.3'/%3E%3Cpath d='M1.5 17c.35-4 2.5-6 5.5-6s5.15 2 5.5 6h-11Z'/%3E%3Cpath d='M12 12.3c3.25-.3 5.4 1.25 6 4.7h-4.15c-.2-1.9-.85-3.45-1.85-4.7Z'/%3E%3C/svg%3E");
  }

  body .home-b2b-page .home-b2b-btn--analytics:hover,
  body .home-b2b-page .home-b2b-btn--analytics:focus-visible {
    background: #050806;
    box-shadow: 0 12px 24px rgba(17, 23, 19, .24);
  }

  body .home-b2b-page .home-b2b-btn--network:hover,
  body .home-b2b-page .home-b2b-btn--network:focus-visible {
    background: #fff;
    border-color: rgba(11, 92, 49, .40);
    box-shadow: 0 12px 24px rgba(7, 92, 49, .15);
  }

  body .home-b2b-page .home-b2b-btn--compact:focus-visible {
    outline: 2px solid #078c3c;
    outline-offset: 2px;
  }

  body .home-b2b-page .home-b2b-btn--compact:active {
    transform: scale(.985);
  }

  .home-network-stories {
    width: 100%;
    margin: 2px 0 8px;
    display: block;
    overflow: hidden;
  }

  .home-network-stories__track {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 8px 4px 6px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .home-network-stories__track::-webkit-scrollbar {
    display: none;
  }

  .home-network-story {
    flex: 0 0 78px;
    width: 78px;
    min-width: 78px;
    height: 76px;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    appearance: none;
    cursor: pointer;
    scroll-snap-align: start;
    -webkit-tap-highlight-color: transparent;
  }

  .home-network-story__ring {
    width: 72px;
    height: 72px;
    padding: 3px;
    display: block;
    overflow: hidden;
    border: 3px solid #118f3f;
    border-radius: 50%;
    background: #fff;
    box-sizing: border-box;
  }

  .home-network-story__image,
  .home-network-story__video-preview {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 50%;
    background: #eef7f0;
  }

  .home-network-story__video-preview {
    pointer-events: none;
  }

  .home-network-story:focus-visible .home-network-story__ring {
    outline: 2px solid #075d2d;
    outline-offset: 2px;
  }

  .home-network-story:active .home-network-story__ring {
    transform: scale(.96);
  }

  .home-mobile-listing-cta {
    width: 100%;
    min-height: 44px;
    margin: 0 0 10px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 9px;
    background: #078c3c;
    color: #fff;
    font-size: 14px;
    line-height: 1;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(7, 140, 60, .18);
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
  }

  .home-mobile-listing-cta__plus {
    width: 20px;
    height: 20px;
    min-width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    font-size: 15px;
    line-height: 1;
    font-weight: 900;
    box-sizing: border-box;
  }

  .home-mobile-listing-cta:active {
    transform: scale(.985);
  }

  .home-story-viewer:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    display: flex;
    align-items: stretch;
    justify-content: center;
    background: #000;
    overscroll-behavior: contain;
  }

  .home-story-viewer__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: #000;
  }

  .home-story-viewer__shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    height: 100dvh;
    min-height: 100%;
    overflow: hidden;
    background: #000;
    isolation: isolate;
  }

  .home-story-viewer__progress {
    position: absolute;
    top: max(10px, env(safe-area-inset-top));
    left: 10px;
    right: 54px;
    z-index: 5;
    height: 3px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .34);
    pointer-events: none;
  }

  .home-story-viewer__progress-fill {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: inherit;
    background: #fff;
    transform: scaleX(0);
    transform-origin: left center;
  }

  .home-story-viewer__close {
    position: absolute;
    top: max(20px, calc(env(safe-area-inset-top) + 10px));
    right: 8px;
    z-index: 7;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .34);
    color: #fff;
    font-size: 32px;
    line-height: 1;
    font-weight: 300;
    cursor: pointer;
  }

  .home-story-viewer__stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
  }

  .home-story-viewer__image,
  .home-story-viewer__video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
  }

  .home-story-viewer__image[hidden],
  .home-story-viewer__video[hidden],
  .home-story-viewer__nav {
    display: none;
  }
}
