/*
  R3D Method responsive/mobile overrides
  Created: 2026-06-23
  Purpose: fix mobile and phone-landscape layout without changing desktop/laptop styling.
*/

@media only screen and (max-width: 768px),
  only screen and (max-width: 1024px) and (max-height: 520px) and (orientation: landscape) {
  html {
    max-width: 100dvw;
    overflow-x: clip;
    scroll-padding-top: 7.2rem;
    width: 100%;
    width: 100dvw;
  }

  body {
    max-width: 100dvw;
    overflow-x: visible;
    overflow-y: auto;
    width: 100%;
    width: 100dvw;
  }

  #root {
    max-width: 100dvw;
    width: 100%;
  }

  .home-container,
  .hero-section,
  .packs-section,
  .free-trial-container,
  .free-trial-items,
  .r3d-student-section,
  .slider-container,
  .backtest-section,
  .video-slider-container,
  .about-section,
  .contact-section {
    max-width: 100%;
    width: 100%;
  }

  .navBar {
    display: none !important;
  }

  .mobile-navbar {
    align-items: center;
    display: flex !important;
    justify-content: space-between;
    left: 0;
    min-height: 6.8rem;
    padding: calc(1rem + env(safe-area-inset-top, 0px)) 1.6rem 1rem;
    right: 0;
    top: 0;
    width: 100%;
    width: 100dvw;
    max-width: 100dvw;
  }

  .mobile-navbar::before {
    background: url("/static/media/navbar_logo_img.5c9e95e816b534ff6def.webp") left center / contain no-repeat;
    color: #fff;
    content: "R3D\A METHOD";
    display: flex;
    flex: 0 0 auto;
    font-family: rubik, Montserrat, sans-serif;
    font-size: clamp(1.25rem, 3.6vw, 1.55rem);
    font-weight: 700;
    height: 4.8rem;
    letter-spacing: 0.08rem;
    line-height: 0.95;
    padding-left: 4rem;
    pointer-events: none;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.45);
    white-space: pre;
    align-items: center;
    width: clamp(13rem, 38vw, 17rem);
  }

  #menu-icon {
    align-items: center;
    display: flex;
    flex: 0 0 4.8rem;
    height: 4.8rem;
    justify-content: center;
    margin: 0;
    min-height: 4.8rem;
    min-width: 4.8rem;
  }

  .mobile-menu-container {
    align-items: center;
    background:
      radial-gradient(circle at 18% 14%, rgba(197, 167, 255, 0.18), transparent 28rem),
      radial-gradient(circle at 86% 72%, rgba(122, 0, 255, 0.16), transparent 22rem),
      linear-gradient(135deg, rgba(6, 4, 10, 0.96), rgba(12, 8, 19, 0.94) 48%, rgba(0, 0, 0, 0.97));
    box-sizing: border-box;
    display: none;
    height: 100svh;
    height: 100dvh;
    inset: 0;
    justify-content: center;
    max-height: 100dvh;
    max-width: 100dvw;
    min-height: 100svh;
    overflow-x: clip;
    overflow-y: hidden;
    padding: max(0.8rem, env(safe-area-inset-top, 0px)) 1rem max(0.8rem, env(safe-area-inset-bottom, 0px));
    position: fixed;
    touch-action: manipulation;
    width: 100%;
    width: 100dvw;
  }

  .mobile-menu-container-visible {
    animation: r3d-mobile-menu-backdrop-in 160ms ease-out both;
    display: flex !important;
  }

  html:has(.mobile-menu-container-visible),
  body:has(.mobile-menu-container-visible) {
    overflow: hidden !important;
    overscroll-behavior: none;
  }

  .mobile-menu {
    align-items: stretch;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0) 28%),
      radial-gradient(circle at 88% 15%, rgba(197, 167, 255, 0.14), transparent 19rem),
      linear-gradient(160deg, rgba(4, 4, 7, 0.98), rgba(18, 13, 27, 0.98) 52%, rgba(3, 3, 5, 0.99));
    border: 0.1rem solid rgba(197, 167, 255, 0.2);
    border-radius: clamp(1.8rem, 5vw, 2.4rem);
    box-shadow:
      0 2.4rem 7rem rgba(0, 0, 0, 0.65),
      0 0 3.5rem rgba(122, 88, 189, 0.16),
      inset 0 0 0 0.1rem rgba(255, 255, 255, 0.04);
    display: none;
    flex-direction: column;
    gap: clamp(0.8rem, 1.45dvh, 1.2rem);
    height: min(72rem, 100%);
    justify-content: flex-start;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    padding: clamp(1.6rem, 4dvh, 2.4rem) clamp(1.4rem, 4vw, 2rem) clamp(1.6rem, 3dvh, 2.2rem);
    position: relative;
    scrollbar-width: none;
    width: min(calc(100dvw - 2rem), 42rem);
  }

  .mobile-menu-visible {
    animation: r3d-mobile-menu-panel-in 180ms ease-out both;
    display: flex !important;
  }

  .mobile-menu::before {
    align-items: center;
    background: url("/static/media/navbar_logo_img.5c9e95e816b534ff6def.webp") left center / 4.1rem auto no-repeat;
    border-bottom: 0.1rem solid rgba(197, 167, 255, 0.18);
    color: #fff;
    content: "R3D\A METHOD";
    display: flex;
    flex: 0 0 auto;
    font-family: rubik, Montserrat, sans-serif;
    font-size: clamp(1.35rem, 3.6vw, 1.6rem);
    font-weight: 700;
    letter-spacing: 0.08rem;
    line-height: 0.98;
    margin: 0 5.4rem 0.8rem 0;
    min-height: 5.2rem;
    padding-left: 5rem;
    position: relative;
    text-shadow: 0 0 0.6rem rgba(255, 255, 255, 0.34), 0 0 1.6rem rgba(197, 167, 255, 0.22);
    white-space: pre;
    z-index: 3;
  }

  .mobile-menu::after {
    background:
      linear-gradient(115deg, transparent 0 15%, rgba(197, 167, 255, 0.42) 15% 16.5%, transparent 16.5% 35%),
      linear-gradient(106deg, transparent 0 56%, rgba(150, 47, 191, 0.34) 56% 57.5%, transparent 57.5% 100%);
    content: "";
    height: 12rem;
    left: 1.2rem;
    opacity: 0.55;
    pointer-events: none;
    position: absolute;
    right: 1.2rem;
    top: 6.8rem;
    z-index: 1;
  }

  .mobile-menu .navbar-mobile-image {
    bottom: 2rem;
    filter: drop-shadow(0 0 2rem rgba(197, 167, 255, 0.22));
    height: min(54%, 34rem);
    max-width: 34rem;
    opacity: 0.12;
    pointer-events: none;
    position: absolute;
    right: -7rem;
    top: auto;
    width: 82%;
    z-index: 1;
  }

  .mobile-menu .mobile-menu-item {
    align-items: center;
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.095), rgba(197, 167, 255, 0.045)),
      rgba(7, 7, 10, 0.54);
    border: 0.1rem solid rgba(255, 255, 255, 0.11);
    border-radius: 1.4rem;
    box-shadow: inset 0 0 0 0.1rem rgba(197, 167, 255, 0.035), 0 0.8rem 2rem rgba(0, 0, 0, 0.18);
    color: rgba(255, 255, 255, 0.92);
    display: flex;
    font-family: lilita, Montserrat, sans-serif;
    font-size: clamp(1.65rem, 4.6vw, 2rem);
    justify-content: flex-start;
    letter-spacing: 0.08rem;
    line-height: 1;
    min-height: 4.8rem;
    padding: 0.95rem 1.25rem;
    position: relative;
    text-align: left;
    text-transform: uppercase;
    transform: translateZ(0);
    white-space: nowrap;
    width: 100%;
    z-index: 3;
  }

  .mobile-menu .mobile-menu-item::before {
    background: linear-gradient(180deg, #c5a7ff, #6c1fa1 55%, #8d0f23);
    border-radius: 999rem;
    box-shadow: 0 0 1.2rem rgba(197, 167, 255, 0.42);
    content: "";
    flex: 0 0 0.32rem;
    height: 1.9rem;
    margin-right: 1.1rem;
  }

  .mobile-menu .mobile-menu-item:hover,
  .mobile-menu .mobile-menu-item:active {
    background:
      linear-gradient(90deg, rgba(197, 167, 255, 0.18), rgba(139, 14, 36, 0.1)),
      rgba(13, 10, 18, 0.7);
    border-color: rgba(197, 167, 255, 0.3);
    box-shadow: inset 0 0 0 0.1rem rgba(197, 167, 255, 0.09), 0 0 2rem rgba(122, 88, 189, 0.18);
    color: #fff;
    scale: 1;
  }

  .mobile-menu .close-btn {
    align-items: center;
    background: rgba(255, 255, 255, 0.055);
    border: 0.1rem solid rgba(197, 167, 255, 0.22);
    border-radius: 50%;
    box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.24);
    box-sizing: border-box;
    color: rgba(255, 255, 255, 0.88);
    display: flex;
    font-size: 2rem;
    height: 4.4rem;
    justify-content: center;
    left: auto;
    margin: 0;
    min-height: 4.4rem;
    min-width: 4.4rem;
    padding: 0;
    position: absolute;
    right: clamp(1.2rem, 4vw, 1.8rem);
    top: clamp(1.2rem, 3dvh, 1.8rem);
    width: 4.4rem;
    z-index: 5;
  }

  .mobile-menu .close-btn:hover,
  .mobile-menu .close-btn:active {
    background: rgba(197, 167, 255, 0.14);
    border-color: rgba(197, 167, 255, 0.38);
    color: #fff;
    scale: 1;
  }

  .mobile-menu .navbar-social-media-mobile {
    align-items: center;
    border-top: 0.1rem solid rgba(197, 167, 255, 0.16);
    display: flex;
    gap: 1.2rem;
    justify-content: center !important;
    margin-top: auto;
    min-height: 4.8rem;
    padding-top: clamp(1.2rem, 2dvh, 1.8rem);
    position: relative;
    width: 100% !important;
    z-index: 3;
  }

  .mobile-menu .social-media-icon-container {
    box-shadow: inset 0 0 0 0.1rem rgba(255, 255, 255, 0.14), 0 0.8rem 2rem rgba(0, 0, 0, 0.24);
    flex: 0 0 4.6rem;
    height: 4.6rem;
    min-height: 4.4rem;
    min-width: 4.4rem;
    padding: 0.2rem;
    width: 4.6rem;
  }

  .mobile-menu .social-media-icon-container:hover,
  .mobile-menu .social-media-icon-container:active {
    box-shadow: inset 0 0 0 0.1rem rgba(255, 255, 255, 0.2), 0 0 1.7rem rgba(197, 167, 255, 0.24);
    scale: 1;
    transform: translateY(-0.1rem);
  }

  .mobile-menu .social-media-icon {
    font-size: 2rem;
    pointer-events: none;
  }

  .home-container .hero-section {
    background:
      radial-gradient(ellipse at 50% 44%, rgba(123, 92, 180, 0.2), rgba(0, 0, 0, 0) 42%),
      linear-gradient(180deg, #000 0%, #050407 50%, #000 100%);
    box-sizing: border-box;
    height: auto;
    isolation: isolate;
    min-height: 100svh;
    min-height: 100dvh;
    overflow: visible;
    padding: calc(6.8rem + env(safe-area-inset-top, 0px)) 0 calc(5.2rem + env(safe-area-inset-bottom, 0px));
  }

  .home-container .hero-section::before {
    background-image: url("/static/media/mobile-navbar-background.a836e6cfa5e344ca62a4.webp");
    background-position: right 2% top 12%;
    background-repeat: no-repeat;
    background-size: clamp(15rem, 43vw, 21rem) auto;
    content: "";
    inset: 0;
    opacity: 0.16;
    pointer-events: none;
    position: absolute;
    z-index: 1;
  }

  .home-container .hero-section::after {
    background:
      linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.08) 28%, rgba(0, 0, 0, 0.16) 56%, #000 100%),
      radial-gradient(ellipse at 50% 52%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.36) 72%, rgba(0, 0, 0, 0.72) 100%);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
    z-index: 2;
  }

  .home-container .hero-section video {
    height: 100%;
    inset: 0;
    max-width: none;
    min-height: 100%;
    object-fit: cover;
    object-position: 24% center;
    opacity: 0.96;
    position: absolute;
    width: 100%;
    z-index: 0;
  }

  .home-container .hero-section .top-gradient {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.34) 48%, rgba(0, 0, 0, 0) 100%);
    height: min(32rem, 42%);
    pointer-events: none;
    z-index: 3;
  }

  .home-container .hero-section .bottom-gradient {
    background: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0.78) 38%, rgba(0, 0, 0, 0) 100%);
    height: 52%;
    pointer-events: none;
    z-index: 3;
  }

  .home-container .hero-section .logo {
    left: 50%;
    max-width: calc(100dvw - 3rem);
    top: 48%;
    transform: translate(-50%, -50%);
    z-index: 4;
  }

  .home-container .hero-section #logo-hero {
    max-width: calc(100dvw - 3rem);
    width: clamp(24rem, 76vw, 34rem);
  }

  .home-container .hero-section .scroll-down {
    bottom: max(2rem, calc(1.4rem + env(safe-area-inset-bottom, 0px)));
    z-index: 4;
  }

  .packs-section {
    background:
      linear-gradient(180deg, #000 0%, #07020c 12%, #25043a 48%, #6c1fa1 100%);
    padding: clamp(3rem, 8vw, 4rem) clamp(1.6rem, 5vw, 2rem) clamp(4rem, 10vw, 5rem);
  }

  .packs-section .packs-container,
  .packs-section .packs-container-column {
    flex-direction: column !important;
    gap: clamp(1.8rem, 5.5vw, 2.6rem) !important;
    margin: 0 auto;
    max-width: 46rem;
    padding: clamp(1.8rem, 5vw, 3rem) 0;
    width: 100%;
  }

  .packs-section .pack-card {
    align-items: stretch;
    justify-content: center;
    margin: 0 auto;
    max-width: 44rem;
    position: relative;
    width: 100%;
  }

  .packs-section .pack-card-wrap-content {
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0) 28%),
      linear-gradient(135deg, rgba(3, 2, 6, 0.98), rgba(30, 8, 46, 0.98));
    border: 0.1rem solid rgba(197, 167, 255, 0.2);
    border-radius: 2.4rem;
    box-shadow:
      0 1.8rem 4.2rem rgba(0, 0, 0, 0.46),
      0 0 2.4rem rgba(108, 31, 161, 0.18),
      inset 0 0 0 0.1rem rgba(255, 255, 255, 0.04);
    height: clamp(25rem, 72vw, 32rem) !important;
    max-width: 44rem;
    overflow: hidden;
    width: 100% !important;
  }

  .packs-section .pack-card-image {
    border-bottom-left-radius: 2.4rem;
    border-top-right-radius: 2.4rem;
    box-shadow: inset 0 -8rem 6rem rgba(0, 0, 0, 0.36);
    height: 100%;
    max-width: 100%;
    overflow: hidden;
    width: 100%;
  }

  .packs-section .pack-card-image::after {
    background:
      linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.72) 100%),
      radial-gradient(circle at 82% 20%, rgba(197, 167, 255, 0.14), transparent 16rem);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
    z-index: 1;
  }

  .packs-section .lighting-symbol {
    height: clamp(19rem, 66%, 26rem);
    opacity: 0.96;
    right: -0.8rem;
    top: 1rem;
    z-index: 0;
  }

  .packs-section .card-text {
    align-items: flex-start;
    gap: 0.45rem;
    padding: clamp(1.6rem, 5vw, 2.2rem);
    z-index: 2;
  }

  .packs-section .card-text h1 {
    font-family: lilita, Montserrat, sans-serif;
    font-size: clamp(2rem, 6vw, 2.6rem);
    letter-spacing: 0.02rem;
    line-height: 1;
    text-align: left;
    text-shadow: 0 0 1.2rem rgba(255, 255, 255, 0.34);
    width: 100%;
  }

  .packs-section .card-text p {
    font-family: Montserrat, sans-serif !important;
    font-size: clamp(1.15rem, 3.4vw, 1.35rem);
    font-weight: 600;
    line-height: 1.35;
    max-width: 24rem;
    opacity: 0.9;
    text-align: left;
  }

  .packs-section .pack-card:not(.pack-card-wrap-content) {
    background:
      linear-gradient(150deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 30%),
      linear-gradient(145deg, rgba(5, 3, 8, 0.98), rgba(39, 6, 59, 0.98) 58%, rgba(10, 2, 15, 0.98));
    border: 0.1rem solid rgba(197, 167, 255, 0.22);
    border-radius: 2.4rem;
    box-shadow:
      0 2rem 4.8rem rgba(0, 0, 0, 0.5),
      0 0 2.8rem rgba(108, 31, 161, 0.2),
      inset 0 0 0 0.1rem rgba(255, 255, 255, 0.04);
    padding: clamp(1.5rem, 4.5vw, 2rem);
  }

  .packs-section .pack-card-content-mobile {
    align-items: center;
    max-width: 100%;
    padding: clamp(1rem, 3.5vw, 1.4rem) 0 0;
    width: 100% !important;
  }

  .packs-section .pack-card-content.pack-card-content-invisible,
  .packs-section .pack-card-content.pack-card-content-invisible-reverse,
  .packs-section .pack-card-content-mobile.pack-card-content-invisible,
  .packs-section .pack-card-content-mobile.pack-card-content-invisible-reverse {
    display: none !important;
    transform: none !important;
    visibility: hidden;
  }

  .packs-section .pack-card-content-mobile img,
  .packs-section .pack-header {
    height: auto;
    max-width: 100%;
    width: min(31rem, 82vw);
  }

  .packs-section .pack-card-content-mobile .pack-desc {
    background: rgba(0, 0, 0, 0.2);
    border: 0.1rem solid rgba(255, 255, 255, 0.12);
    border-radius: 1.6rem;
    font-size: clamp(1.45rem, 3.8vw, 1.68rem);
    line-height: 1.55;
    margin-top: 1rem;
    max-width: 100%;
    padding: clamp(1.3rem, 4vw, 1.6rem) !important;
    text-align: left;
    width: 100% !important;
  }

  .packs-section .join-us-btn {
    align-items: center;
    display: inline-flex;
    font-size: clamp(2.7rem, 8vw, 3.4rem);
    height: auto;
    justify-content: center;
    line-height: 1;
    margin-top: 1.6rem;
    max-width: 32rem;
    min-height: 4.8rem;
    padding: 0.5rem 2rem 0.8rem;
    width: min(100%, 32rem);
  }

  .packs-section .return-icon {
    align-items: center;
    background: rgba(0, 0, 0, 0.28);
    border: 0.1rem solid rgba(255, 255, 255, 0.16);
    border-radius: 999rem;
    display: flex;
    height: 4.8rem;
    justify-content: center;
    left: 1.2rem !important;
    margin: 0;
    min-height: 4.8rem;
    min-width: 4.8rem;
    top: 1.2rem;
    width: 4.8rem;
  }

  .packs-section .review-btn {
    align-items: center;
    border: 0.1rem solid rgba(197, 167, 255, 0.24);
    border-radius: 1.6rem;
    box-shadow: 0 1.2rem 2.8rem rgba(0, 0, 0, 0.36), 0 0 1.8rem rgba(197, 167, 255, 0.18);
    display: inline-flex;
    justify-content: center;
    margin-top: clamp(0.2rem, 2vw, 1rem);
    max-width: min(100%, 28rem);
    min-height: 5.2rem;
    padding: 0.8rem 2.6rem;
    width: auto;
  }

  .packs-section .review-btn h3 {
    font-size: clamp(3.4rem, 10vw, 4.8rem);
    line-height: 0.95;
  }

  .join-us-btn,
  .review-btn,
  .free-trial-button,
  .contact-form form button {
    min-height: 4.8rem;
  }

  .review-btn {
    display: inline-flex;
    justify-content: center;
    max-width: calc(100vw - 2rem);
    padding-left: clamp(2rem, 10vw, 6rem);
    padding-right: clamp(2rem, 10vw, 6rem);
  }

  .return-icon,
  .return-icon-to-left,
  .return-icon-to-right,
  .back-icon {
    min-height: 4.8rem;
    min-width: 4.8rem;
  }

  .free-trial-container h1 {
    font-size: clamp(3.6rem, 13vw, 5rem);
    letter-spacing: clamp(0.35rem, 2.4vw, 1rem);
    line-height: 1.05;
    max-width: 100%;
  }

  .free-trial-container h2 {
    font-size: clamp(1.6rem, 5vw, 2rem);
    letter-spacing: clamp(0.35rem, 2.2vw, 1rem);
  }

  .free-trial-items {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: clamp(3rem, 8vw, 5rem);
    justify-content: center;
    max-width: 72rem;
    padding: 0 1rem 6rem;
    width: 100%;
  }

  .free-trial-item-container {
    max-width: 36rem;
    width: min(100%, 36rem);
  }

  .free-trial-button {
    max-width: 36rem;
    width: min(90vw, 36rem);
  }

  .free-trial-button span {
    font-size: clamp(2.4rem, 8vw, 3rem);
  }

  .r3d-student-content {
    padding: clamp(1.6rem, 5vw, 2rem);
  }

  .r3d-student-logo {
    height: clamp(10rem, 26vw, 15rem);
  }

  .slider-container,
  .slider {
    height: clamp(28rem, calc(100dvh - 16rem), 70rem);
  }

  .r3d-student-section #r3d-student-section,
  .r3d-student-section .slider-container,
  .r3d-student-section .slider,
  .backtest-section .video-slider-container,
  .backtest-section .video-slider {
    align-self: center;
    max-width: 100dvw !important;
    min-width: 0;
    width: 100dvw !important;
  }

  .slide {
    height: clamp(24rem, calc(100dvh - 20rem), 62rem);
    max-width: calc(100vw - 2rem);
  }

  .video-slider-container,
  .video-slider {
    min-height: clamp(24rem, calc(100dvh - 18rem), 52rem);
  }

  .video-slide {
    max-width: calc(100vw - 2rem);
  }

  /*
    Phase 5: mobile reviews and media carousel polish.
    Scoped only to the testimonials/review section and video pages.
  */
  .r3d-student-section {
    background:
      radial-gradient(circle at 50% 20%, rgba(197, 167, 255, 0.13), transparent 26rem),
      radial-gradient(circle at 50% 72%, rgba(108, 31, 161, 0.38), transparent 34rem),
      linear-gradient(180deg, #030006 0%, #16041f 44%, #07000d 100%);
    overflow-x: clip;
    padding-bottom: max(2rem, env(safe-area-inset-bottom, 0px));
  }

  .r3d-student-section #r3d-student-section {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0 auto;
    overflow: visible;
    width: 100% !important;
  }

  .r3d-student-section .slider-container {
    height: clamp(42rem, calc(100dvh - 12rem), 70rem);
    margin: 0 auto;
    overflow: visible;
    padding: 0 clamp(1.2rem, 4vw, 1.8rem);
    width: 100% !important;
  }

  .r3d-student-section .slider {
    height: 100%;
    overflow: visible;
    width: 100% !important;
  }

  .r3d-student-section .slide {
    background: rgba(4, 3, 7, 0.72);
    border: 0.1rem solid rgba(197, 167, 255, 0.18);
    border-radius: 2.1rem;
    box-shadow:
      0 1.6rem 4rem rgba(0, 0, 0, 0.45),
      0 0 2rem rgba(108, 31, 161, 0.2);
    height: clamp(38rem, calc(100dvh - 16rem), 64rem);
    max-height: calc(100dvh - 13rem);
    max-width: calc(100dvw - 3.2rem);
    object-fit: contain;
    overflow: visible;
    transform-origin: center center;
    width: auto;
  }

  .r3d-student-section .slide.center {
    filter: none;
    opacity: 1;
    transform: scale(1) translateY(0);
    z-index: 4;
  }

  .r3d-student-section .slide.left,
  .r3d-student-section .slide.right {
    filter: none;
    opacity: 0.32;
    z-index: 2;
  }

  .r3d-student-section .slide.left {
    transform: translateX(clamp(-16rem, -42vw, -12rem)) scale(0.72);
  }

  .r3d-student-section .slide.right {
    transform: translateX(clamp(12rem, 42vw, 16rem)) scale(0.72);
  }

  .r3d-student-section .slide.hidden {
    opacity: 0;
    transform: scale(0.72) translateY(0);
    z-index: 1;
  }

  .r3d-student-section #r3d-student-section::before {
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(197, 167, 255, 0.12)),
      rgba(6, 3, 10, 0.78);
    border: 0.1rem solid rgba(197, 167, 255, 0.18);
    border-radius: 999rem;
    color: rgba(255, 255, 255, 0.8);
    content: "Swipe reviews • 7 total";
    display: inline-flex;
    font-family: Montserrat, sans-serif;
    font-size: clamp(1.1rem, 3.2vw, 1.3rem);
    font-weight: 700;
    letter-spacing: 0.04rem;
    line-height: 1;
    padding: 0.9rem 1.4rem;
    position: relative;
    text-transform: uppercase;
    z-index: 5;
  }

  .backtest-section {
    background:
      radial-gradient(circle at 50% 30%, rgba(197, 167, 255, 0.12), transparent 28rem),
      radial-gradient(circle at 50% 72%, rgba(108, 31, 161, 0.38), transparent 36rem),
      linear-gradient(180deg, #030006 0%, #1b0528 52%, #07000d 100%);
    min-height: 100dvh;
    overflow-x: clip;
  }

  .backtest-section .video-slider-container {
    align-items: center;
    display: flex;
    flex-direction: column !important;
    gap: 1.2rem;
    height: auto;
    justify-content: center;
    margin: 0 auto;
    min-height: clamp(36rem, calc(100dvh - 22rem), 58rem);
    overflow: visible;
    padding: 1rem clamp(1.4rem, 4vw, 2rem) max(1.6rem, env(safe-area-inset-bottom, 0px));
    width: 100% !important;
  }

  .backtest-section .video-slider {
    height: clamp(30rem, calc(100dvh - 27rem), 52rem);
    max-width: 72rem;
    overflow: visible;
    width: 100% !important;
  }

  .backtest-section .video-slide {
    aspect-ratio: 16 / 9;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 28%),
      #050208;
    border: 0.1rem solid rgba(197, 167, 255, 0.2);
    border-radius: 1.8rem;
    box-shadow:
      0 1.4rem 3.4rem rgba(0, 0, 0, 0.42),
      0 0 2rem rgba(108, 31, 161, 0.18);
    height: auto !important;
    max-width: calc(100dvw - 3rem);
    overflow: hidden;
    transform-origin: center center;
    width: min(calc(100dvw - 3rem), 58rem);
  }

  .backtest-section .video-slide.video-center {
    filter: none;
    opacity: 1;
    transform: scale(1) translateY(0);
    z-index: 4;
  }

  .backtest-section .video-slide.video-left,
  .backtest-section .video-slide.video-right {
    filter: none;
    opacity: 0.42;
    z-index: 2;
  }

  .backtest-section .video-slide.video-left {
    transform: translateY(clamp(-15rem, -23dvh, -11rem)) scale(0.78);
  }

  .backtest-section .video-slide.video-right {
    transform: translateY(clamp(11rem, 23dvh, 15rem)) scale(0.78);
  }

  .backtest-section .video-slide.video-hidden {
    opacity: 0;
    transform: scale(0.7) translateY(0);
    z-index: 1;
  }

  .backtest-section .iframe-wrapper,
  .backtest-section .video-iframe {
    border-radius: 1.7rem;
    height: 100%;
    width: 100%;
  }

  .backtest-section .video-slider-container::after {
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(197, 167, 255, 0.12)),
      rgba(6, 3, 10, 0.78);
    border: 0.1rem solid rgba(197, 167, 255, 0.18);
    border-radius: 999rem;
    color: rgba(255, 255, 255, 0.8);
    content: "Swipe/tap videos • play center";
    display: inline-flex;
    font-family: Montserrat, sans-serif;
    font-size: clamp(1.05rem, 3.1vw, 1.25rem);
    font-weight: 700;
    letter-spacing: 0.04rem;
    line-height: 1;
    padding: 0.9rem 1.4rem;
    position: relative;
    text-transform: uppercase;
    z-index: 5;
  }

  .about-container {
    padding: calc(7.2rem + env(safe-area-inset-top, 0px)) clamp(1.6rem, 5vw, 3rem) 3rem;
  }

  .about-r3d {
    font-size: clamp(3.8rem, 12vw, 5rem);
    letter-spacing: clamp(0.45rem, 2.8vw, 1rem);
    line-height: 1.05;
  }

  .about-content {
    max-width: 72rem;
  }

  .about-method {
    font-size: clamp(1.9rem, 6vw, 2.4rem);
    letter-spacing: clamp(0.35rem, 2.4vw, 1rem);
  }

  .about-text-card {
    gap: 2.4rem;
    margin: 2rem clamp(1rem, 4vw, 2rem);
  }

  .about-text-card > p {
    font-size: clamp(1.5rem, 4.1vw, 1.7rem);
    line-height: 1.55;
    width: 100%;
  }

  .about-card-desc-part p {
    font-size: clamp(1.6rem, 4vw, 1.7rem);
    line-height: 1.55;
  }

  .contact-container {
    align-items: center;
    gap: 3rem;
    padding: calc(7.2rem + env(safe-area-inset-top, 0px)) clamp(1.6rem, 5vw, 3rem) 3rem;
  }

  .contact-form,
  .contact-infos {
    max-width: 68rem;
    width: 100%;
  }

  .contact-form > div,
  .contact-form > div > div,
  .contact-form form {
    gap: 2rem;
    max-width: 68rem;
    width: 100% !important;
  }

  .contact-double-input {
    gap: 2rem;
  }

  .contact-input input,
  .contact-input label,
  .contact-input textarea {
    font-size: 1.6rem;
  }

  .contact-input input,
  .contact-input textarea {
    padding: 1.4rem 2rem;
  }

  .contact-input textarea {
    min-height: 16rem;
  }

  .contact-form form button {
    padding: 1.2rem 3rem;
  }
}

@media only screen and (max-width: 1024px) and (max-height: 520px) and (orientation: landscape) {
  .mobile-menu-container {
    padding: max(0.6rem, env(safe-area-inset-top, 0px)) 0.8rem max(0.6rem, env(safe-area-inset-bottom, 0px));
  }

  .mobile-menu {
    border-radius: 1.6rem;
    gap: 0.6rem;
    height: 100%;
    padding: 1rem 1.2rem;
    width: min(calc(100dvw - 1.6rem), 56rem);
  }

  .mobile-menu::before {
    background-size: 3.4rem auto;
    font-size: 1.25rem;
    margin: 0 4.8rem 0.4rem 0;
    min-height: 4.4rem;
    padding-left: 4.3rem;
  }

  .mobile-menu::after {
    height: 8rem;
    top: 5.6rem;
  }

  .mobile-menu .navbar-mobile-image {
    bottom: -1rem;
    height: 70%;
    opacity: 0.09;
    right: -4rem;
    width: 48%;
  }

  .mobile-menu .close-btn {
    height: 4.4rem;
    min-height: 4.4rem;
    min-width: 4.4rem;
    right: 1rem;
    top: 0.9rem;
    width: 4.4rem;
  }

  .mobile-menu .mobile-menu-item {
    font-size: clamp(1.45rem, 2.6dvh, 1.65rem);
    min-height: 4.4rem;
    padding: 0.65rem 1.1rem;
  }

  .mobile-menu .navbar-social-media-mobile {
    min-height: 4.4rem;
    padding-top: 0.8rem;
  }

  .mobile-menu .social-media-icon-container {
    flex-basis: 4.4rem;
    height: 4.4rem;
    width: 4.4rem;
  }

  .home-container .hero-section {
    padding: calc(4.8rem + env(safe-area-inset-top, 0px)) 0 calc(3.2rem + env(safe-area-inset-bottom, 0px));
  }

  .home-container .hero-section::before {
    background-position: left 5% top 12%;
    background-size: clamp(10rem, 18vw, 14rem) auto;
    opacity: 0.1;
  }

  .home-container .hero-section video {
    object-position: center center;
  }

  .home-container .hero-section .logo {
    top: 52%;
  }

  .home-container .hero-section #logo-hero {
    width: min(38vw, 34rem);
  }

  .home-container .hero-section .scroll-down {
    bottom: max(1.6rem, env(safe-area-inset-bottom, 0px));
  }

  .packs-section {
    min-height: 100dvh;
    padding: calc(5.6rem + env(safe-area-inset-top, 0px)) clamp(1.2rem, 2.6vw, 1.8rem) 3rem;
  }

  .packs-section .packs-container:not(.packs-container-column) {
    align-items: stretch;
    flex-direction: row !important;
    gap: clamp(0.8rem, 1.6vw, 1.4rem) !important;
    justify-content: center;
    max-width: 100%;
    padding: 0.8rem 0 1.2rem;
  }

  .packs-section .packs-container-column {
    max-width: min(100%, 70rem);
    padding: 0.8rem 0 1.2rem;
  }

  .packs-section .pack-card-wrap-content {
    border-radius: 1.8rem;
    height: min(64dvh, 26rem) !important;
    max-width: calc((100dvw - 5.2rem) / 3);
    width: calc((100dvw - 5.2rem) / 3) !important;
  }

  .packs-section .pack-card-image {
    border-bottom-left-radius: 1.8rem;
    border-top-right-radius: 1.8rem;
  }

  .packs-section .lighting-symbol {
    height: 82%;
    right: -1.4rem;
    top: 0.4rem;
  }

  .packs-section .card-text {
    padding: 1rem;
  }

  .packs-section .card-text h1 {
    font-size: clamp(1.35rem, 2.25vw, 1.8rem);
  }

  .packs-section .card-text p {
    font-size: clamp(0.92rem, 1.55vw, 1.08rem);
    line-height: 1.25;
    max-width: 100%;
  }

  .packs-section .pack-card:not(.pack-card-wrap-content) {
    max-width: min(calc(100dvw - 3rem), 70rem);
    padding: 1.2rem;
  }

  .packs-section .pack-card-content-mobile {
    padding-top: 0;
  }

  .packs-section .pack-card-content-mobile img,
  .packs-section .pack-header {
    width: min(26rem, 42vw);
  }

  .packs-section .pack-card-content-mobile .pack-desc {
    font-size: clamp(1.28rem, 1.95vw, 1.48rem);
    line-height: 1.42;
    margin-top: 0.8rem;
    padding: 1rem 1.2rem !important;
  }

  .packs-section .join-us-btn {
    font-size: clamp(2.2rem, 4vw, 3rem);
    margin-top: 1rem;
    min-height: 4.6rem;
    width: min(100%, 26rem);
  }

  .packs-section .review-btn {
    min-height: 4.8rem;
    padding: 0.7rem 2rem;
  }

  .packs-section .review-btn h3 {
    font-size: clamp(3rem, 5vw, 4.2rem);
  }

  .free-trial-container h1 {
    font-size: clamp(3.2rem, 9vw, 4.4rem);
  }

  .free-trial-items {
    gap: 3rem;
  }

  .r3d-student-section .r3d-student-content,
  .backtest-section .r3d-student-content {
    padding: 0.8rem 1rem;
  }

  .r3d-student-section .r3d-student-logo,
  .backtest-section .r3d-student-logo {
    height: clamp(5.6rem, 15dvh, 7.2rem);
    margin-top: 0;
  }

  .r3d-student-section .backtest-button,
  .r3d-student-section .voice-over-button {
    margin: 1.1rem 1.4rem;
  }

  .r3d-student-section .backtest-button img,
  .r3d-student-section .voice-over-button img {
    height: 3.6rem;
  }

  .r3d-student-section .slider-container {
    height: clamp(20rem, calc(100dvh - 10rem), 31rem);
    padding: 0 1.2rem;
  }

  .r3d-student-section .slide {
    border-radius: 1.4rem;
    height: min(calc(100dvh - 12rem), 29rem);
    max-width: calc(100dvw - 3rem);
  }

  .r3d-student-section .slide.left {
    transform: translateX(clamp(-19rem, -25dvw, -13rem)) scale(0.64);
  }

  .r3d-student-section .slide.right {
    transform: translateX(clamp(13rem, 25dvw, 19rem)) scale(0.64);
  }

  .r3d-student-section #r3d-student-section::before {
    font-size: 1rem;
    padding: 0.7rem 1.1rem;
  }

  .backtest-section {
    justify-content: flex-start;
    padding-top: calc(5.4rem + env(safe-area-inset-top, 0px));
  }

  .backtest-section .back-icon {
    left: 1.4rem;
    top: calc(5.8rem + env(safe-area-inset-top, 0px));
  }

  .backtest-section .back-icon img {
    height: 3.8rem;
  }

  .backtest-section .video-slider-container {
    gap: 0.5rem;
    min-height: 0;
    padding: 0.2rem clamp(1.4rem, 3vw, 2rem) max(0.8rem, env(safe-area-inset-bottom, 0px));
  }

  .backtest-section .video-slider {
    height: clamp(19rem, calc(100dvh - 14rem), 25rem);
    max-width: 100%;
  }

  .backtest-section .video-slide {
    border-radius: 1.5rem;
    width: min(50dvw, 42rem);
  }

  .backtest-section .video-slide.video-left {
    transform: translateX(clamp(-29rem, -32dvw, -22rem)) scale(0.56);
  }

  .backtest-section .video-slide.video-right {
    transform: translateX(clamp(22rem, 32dvw, 29rem)) scale(0.56);
  }

  .backtest-section .iframe-wrapper,
  .backtest-section .video-iframe {
    border-radius: 1.4rem;
  }

  .backtest-section .video-slider-container::after {
    font-size: 1rem;
    padding: 0.65rem 1rem;
  }

  .about-container,
  .contact-container {
    padding-top: calc(6.8rem + env(safe-area-inset-top, 0px));
  }

  .about-text-card {
    margin-bottom: 3rem;
  }
}

@keyframes r3d-mobile-menu-backdrop-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes r3d-mobile-menu-panel-in {
  from {
    opacity: 0;
    transform: translateY(1rem) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-menu-container-visible,
  .mobile-menu-visible,
  .mobile-menu .mobile-menu-item,
  .mobile-menu .close-btn,
  .mobile-menu .social-media-icon-container {
    animation: none !important;
    transform: none !important;
    transition: none !important;
  }

  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    animation-delay: 0ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}
