/* Portrait/mobile layout layer
   Loaded only for portrait screens and small devices so desktop/landscape keeps its layout. */

@media (orientation: portrait), (max-width: 768px) {
  html,
  body {
    overflow-x: hidden;
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100%;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  html.scroll-locked,
  body.scroll-locked {
    overflow: hidden !important;
    overflow-y: hidden !important;
    height: 100vh !important;
    height: 100dvh !important;
  }

  html.lenis,
  html.lenis body,
  html.lenis-stopped,
  html.lenis-stopped body {
    overflow-y: auto !important;
    height: auto !important;
  }

  body {
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
  }

  .site-header {
    min-height: 64px;
    padding: 10px 0;
    background: rgba(8, 8, 8, 0.94);
    border-bottom: 1px solid rgba(212, 175, 55, 0.18);
  }

  .header-container {
    padding-inline: 14px;
  }

  .header-logo-img {
    width: 62px;
    height: auto;
  }

  .header-right {
    gap: 10px;
  }

  .mobile-nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 9px;
    border-radius: 8px;
  }

  .hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    margin: 0;
    background-color: var(--color-gold) !important;
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.45);
  }

  .nav-menu {
    position: fixed;
    top: 64px;
    left: 50%;
    width: min(440px, calc(100vw - 20px));
    max-height: calc(100svh - 84px);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, -10px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    background: rgba(8, 8, 8, 0.94);
    border: 1px solid rgba(212, 175, 55, 0.22);
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    z-index: 1000;
  }

  .nav-menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
  }

  body.nav-open .nav-menu {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translate(-50%, 0) !important;
  }

  .nav-menu ul {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 15px;
    font-size: 0.92rem;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.08);
    border-radius: 12px;
    color: var(--color-ivory);
    text-transform: none;
  }

  .nav-link::before,
  .nav-link::after {
    display: none;
  }

  .nav-link:hover,
  .nav-link.active {
    color: var(--color-gold);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.14), rgba(212, 175, 55, 0.04));
    border-color: rgba(212, 175, 55, 0.34);
    text-shadow: none;
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.08) inset;
  }

  .nav-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.55) inset;
  }

  .hero-section {
    min-height: 100svh;
    height: auto;
    padding: 82px 14px 44px;
    touch-action: pan-y;
  }

  .hero-content-centered,
  .hero-video-centered-container,
  .hero-details-block {
    touch-action: pan-y;
  }

  button,
  a,
  input,
  select,
  textarea,
  .cta-btn,
  .accordion-header,
  .fan-arrow-btn,
  .filter-chip,
  .checkbox-label {
    touch-action: manipulation;
  }

  .hero-header-block .hero-welcome {
    font-size: 0.74rem;
    letter-spacing: 2.5px;
  }

  .hero-header-block .hero-title-top {
    font-size: clamp(2.05rem, 11vw, 3.15rem);
    letter-spacing: 1.5px;
  }

  .hero-header-block .hero-title-sub {
    font-size: 0.88rem;
    letter-spacing: 1.8px;
  }

  .hero-video-centered-container {
    width: 100%;
    height: auto;
    max-width: 100%;
  }

  .hero-video-frame {
    aspect-ratio: 16 / 10;
    height: auto;
    border-radius: 10px;
  }

  .hero-details-block .hero-description {
    max-width: 32rem;
    padding: 0;
    font-size: 0.94rem;
    line-height: 1.6;
  }

  .stacked-slides-container {
    display: block;
    height: auto;
    overflow: visible;
    scroll-snap-type: none;
    touch-action: pan-y;
  }

  .stacked-slide,
  .scroll-slide {
    position: relative !important;
    height: auto !important;
    min-height: auto !important;
    width: 100%;
    padding: 76px 10px 96px !important;
    display: flex !important;
    align-items: stretch !important;
    overflow: visible;
    scroll-snap-align: none;
    touch-action: pan-y;
  }

  .slide-card {
    width: 100%;
    max-width: 100%;
    height: auto !important;
    min-height: 0;
    border-radius: 8px !important;
    overflow: visible;
    touch-action: pan-y;
  }

  .slide-grid,
  #kungfu .slide-grid,
  #yoga .slide-grid,
  #records .slide-grid,
  #events .slide-grid {
    grid-template-columns: 1fr !important;
    align-items: start;
    gap: 16px !important;
    padding: 16px 12px !important;
    height: auto !important;
    min-height: 0;
    width: 100% !important;
    max-width: 100%;
    overflow: visible;
    box-sizing: border-box;
  }

  #kungfu .slide-interactive,
  #yoga .slide-interactive,
  #records .slide-interactive,
  #events .slide-interactive,
  #kungfu .slide-info,
  #yoga .slide-info,
  #records .slide-info,
  #events .slide-info {
    order: initial;
    width: 100%;
    max-width: 100%;
    min-width: 0 !important;
    height: auto;
    max-height: none;
    overflow: visible;
    min-height: 0;
  }

  .slide-number {
    font-size: 0.72rem;
    letter-spacing: 2.5px;
    padding: 2px 0;
  }

  .slide-number::after {
    width: 34px;
  }

  .slide-title,
  #kungfu .slide-title,
  #yoga .slide-title,
  #records .slide-title,
  #events .slide-title {
    font-size: clamp(1.62rem, 8.4vw, 2.3rem) !important;
    line-height: 1.04;
    margin-bottom: 4px;
  }

  .slide-description {
    font-size: 0.92rem;
    line-height: 1.58;
  }

  .widget-title {
    font-size: clamp(1.05rem, 5vw, 1.35rem);
    line-height: 1.15;
  }

  .widget-intro {
    font-size: 0.84rem;
    line-height: 1.45;
    margin-bottom: 4px !important;
  }

  #yoga-preview-box,
  #records-preview-box,
  #events .slide-media-box {
    height: auto !important;
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  #kungfu .interactive-box,
  #yoga .interactive-box,
  #records .interactive-box,
  #events .interactive-box {
    width: 100%;
    max-width: 100%;
    min-width: 0 !important;
    height: auto !important;
    max-height: none;
    overflow: visible;
    padding: 14px;
    border-radius: 8px;
    touch-action: pan-y;
  }

  #kungfu .fan-layout,
  #yoga .fan-layout,
  #records .fan-layout {
    height: clamp(190px, 28svh, 250px) !important;
    max-width: 100%;
    overflow: visible;
  }

  #kungfu .fan-pagination-controls,
  #yoga .fan-pagination-controls,
  #records .fan-pagination-controls {
    margin-top: 0.65rem !important;
    gap: 0.7rem !important;
    flex-wrap: wrap;
  }

  .fan-arrow-btn {
    width: 40px;
    height: 40px;
  }

  .fan-dots {
    max-width: 136px;
    overflow-x: auto;
    padding: 4px 0;
  }

  .fan-card {
    max-width: min(62vw, 220px);
    max-height: 100%;
    border-radius: 8px !important;
  }

  .bouncy-accordion {
    gap: 0.6rem;
  }

  .accordion-header {
    padding: 0.72rem 0.78rem;
    min-height: 48px;
  }

  .accordion-title {
    font-size: 0.92rem;
    line-height: 1.25;
  }

  .accordion-title-wrap {
    min-width: 0;
    gap: 0.65rem;
  }

  .accordion-icon {
    flex: 0 0 auto;
    padding: 0.38rem;
    border-radius: 8px;
  }

  .accordion-content {
    padding: 0 0.82rem 0.9rem;
    font-size: 0.86rem;
    line-height: 1.55;
  }

  .slide-meta {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .slide-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .slide-actions .cta-btn {
    width: 100%;
    min-height: 46px;
  }

  #records .records-copy-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 8px;
  }

  #records .slide-media-box,
  #records-preview-box {
    width: 100% !important;
    max-width: 100% !important;
  }

  #records .slide-media-image,
  #records-preview-image {
    width: 100%;
    max-width: 100%;
  }

  #records .records-copy-panel .widget-title {
    font-size: 1rem;
  }

  #records .records-copy-panel .catchy-heading {
    font-size: 0.95rem;
  }

  #records .records-copy-panel .catchy-text {
    font-size: 0.86rem;
    line-height: 1.5;
  }

  #records .fading-scroll-wrapper {
    margin: 0.55rem 0 !important;
  }

  #records .fading-scroll-area {
    height: 8.5rem;
  }

  #records .records-copy-panel .catchy-stats-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  #records .records-copy-panel .catchy-stat {
    padding: 10px 12px;
  }

  #events .input-row,
  #events .focus-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  #events .focus-option,
  #events .configurator-option,
  #events .package-card {
    min-width: 0;
  }

  body.is-scrolling,
  body.is-scrolling .glass-card,
  body.is-scrolling .microsite-section,
  body.is-scrolling .site-header,
  body.is-scrolling .interactive-box {
    pointer-events: auto !important;
  }

  .contact-cta-section {
    min-height: 100svh;
    padding: 78px 12px 36px !important;
    align-items: stretch;
  }

  .contact-cta-inner {
    justify-content: flex-start;
    align-items: stretch;
  }

  .contact-cta-section .section-title {
    font-size: clamp(1.38rem, 6.2vw, 1.95rem);
    line-height: 1.12;
    text-align: center;
    margin-bottom: 10px;
  }

  .contact-cta-copy {
    max-width: 100%;
    margin-bottom: 16px;
    font-size: 0.88rem;
    line-height: 1.5;
    text-align: left;
  }

  .contact-form-card {
    width: 100%;
    max-width: none;
    padding: 16px;
    border-radius: 8px;
    max-height: none;
    overflow: visible;
  }

  #wa-contact-form .form-row,
  .contact-submit-row {
    grid-template-columns: 1fr !important;
    gap: 0;
  }

  #wa-contact-form .form-group {
    margin-bottom: 13px;
  }

  #wa-contact-form label {
    font-size: 0.72rem;
    margin-bottom: 6px;
    letter-spacing: 1px;
  }

  #wa-contact-form input,
  #wa-contact-form select,
  #wa-contact-form textarea {
    min-height: 46px;
    padding: 12px 13px;
    font-size: 0.95rem;
    border-radius: 7px;
  }

  #wa-contact-form textarea {
    min-height: 88px;
  }

  #wa-contact-form .checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #wa-contact-form .checkbox-label {
    justify-content: center;
    min-height: 40px;
    padding: 8px 10px;
    font-size: 0.82rem;
    text-align: center;
    white-space: normal;
  }

  .contact-submit-row {
    margin-top: 8px;
  }

  .contact-submit-row .cta-btn {
    min-height: 48px;
    letter-spacing: 1.8px;
  }

  .floating-insta-btn,
  .floating-youtube-btn,
  .floating-whatsapp-btn,
  .floating-call-btn,
  .floating-email-btn {
    left: auto;
    bottom: max(8px, env(safe-area-inset-bottom)) !important;
    width: 40px;
    height: 40px;
    z-index: 1200;
    background: rgba(8, 8, 8, 0.86);
  }

  .floating-email-btn {
    right: calc(50% + 84px);
  }

  .floating-call-btn {
    right: calc(50% + 42px);
  }

  .floating-whatsapp-btn {
    right: calc(50% - 20px);
  }

  .floating-youtube-btn {
    right: calc(50% - 82px);
  }

  .floating-insta-btn {
    right: calc(50% - 124px);
  }

  body.contact-section-active .floating-insta-btn,
  body.contact-section-active .floating-youtube-btn,
  body.contact-section-active .floating-whatsapp-btn,
  body.contact-section-active .floating-call-btn,
  body.contact-section-active .floating-email-btn,
  body.contact-section-active #scroll-to-top-btn {
    opacity: 0;
    pointer-events: none;
    transform: translateY(120%);
  }

  .microsite-layout {
    display: block;
    height: auto;
    min-height: 100svh;
    overflow: visible;
  }

  .microsite-sidebar {
    display: none;
  }

  .microsite-content {
    height: 100vh !important;
    height: 100dvh !important;
    padding: 0;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: none;
  }

  .microsite-back-btn {
    top: 12px;
    right: 12px;
    max-width: calc(100vw - 24px);
    min-height: 42px;
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 0.72rem;
    letter-spacing: 1px;
    z-index: 10100;
  }

  .microsite-section {
    min-height: auto;
    margin: 0;
    padding: 74px 14px 28px;
    border-radius: 0;
    scroll-snap-align: none;
  }

  .microsite-section.hero-banner {
    min-height: 100svh;
    padding: 82px 18px 38px;
    justify-content: flex-end;
  }

  .microsite-section.hero-banner .ms-section-container {
    width: 100%;
    padding-top: 0;
  }

  .hero-banner .ms-banner-image-container::after {
    background:
      linear-gradient(180deg, rgba(3, 3, 3, 0.54) 0%, rgba(3, 3, 3, 0.18) 38%, rgba(3, 3, 3, 0.92) 100%),
      linear-gradient(90deg, rgba(3, 3, 3, 0.68) 0%, rgba(3, 3, 3, 0.16) 100%);
  }

  .hero-banner .ms-banner-img {
    object-position: center center;
  }

  .ms-badge,
  .hero-banner .ms-badge {
    margin-bottom: 12px;
    padding: 5px 10px;
    font-size: 0.62rem;
    letter-spacing: 1.6px;
  }

  .ms-title,
  .hero-banner .ms-title {
    margin-bottom: 14px;
    font-size: clamp(2.15rem, 13vw, 3.45rem);
    line-height: 1;
    letter-spacing: 0.4px;
  }

  .founder-quote,
  .hero-banner .founder-quote {
    width: 100%;
    margin-bottom: 14px;
    padding-left: 14px;
    font-size: clamp(0.98rem, 4.2vw, 1.12rem);
    line-height: 1.48;
  }

  .ms-desc,
  .hero-banner .ms-desc {
    width: 100%;
    font-size: 0.96rem;
    line-height: 1.62;
  }

  .ms-section-title {
    font-size: clamp(1.7rem, 8.5vw, 2.25rem);
    line-height: 1.08;
  }

  .ms-banner-image-container {
    height: auto;
    aspect-ratio: 16 / 10;
    margin-bottom: 18px;
    border-radius: 8px;
    position: relative;
  }

  .hero-banner .ms-banner-image-container {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
    aspect-ratio: auto !important;
  }
}

@media (orientation: portrait) and (max-width: 420px) {
  #wa-contact-form .checkbox-group {
    grid-template-columns: 1fr;
  }

  .contact-form-card {
    padding: 14px;
  }

  .slide-grid,
  #kungfu .slide-grid,
  #yoga .slide-grid,
  #records .slide-grid,
  #events .slide-grid {
    padding: 14px 10px !important;
  }
}
