/* Phone and small-tablet layout for the LOEV site. Desktop styles live inline in each page. */
html { -webkit-text-size-adjust: 100%; }
.menu-btn, .mobile-cta, .swipe-hint, .menu-extra, .menu-desc { display: none; }

@media (max-width: 720px) {
  /* Header: logo on the left, menu button on the right, links in a drop-down sheet */
  .site-header .nav { flex-wrap: wrap !important; gap: 0 !important; padding: 10px 16px !important; align-items: center !important; }
  .site-header .nav > a:first-child { margin-right: auto; }
  .site-header .nav > a:first-child img { height: 30px !important; }
  .site-actions { display: none !important; }
  .menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 12px; border: 1px solid #DDE1DC;
    background: #FFFFFF; color: #15201C; cursor: pointer; padding: 0;
  }
  .menu-btn .icon-close { display: none; }
  html.nav-open .menu-btn .icon-open { display: none; }
  html.nav-open .menu-btn .icon-close { display: block; }
  .site-nav { display: none !important; }
  html.nav-open, html.nav-open body { overflow: hidden; }
  html.nav-open .site-header { background: #F4F5F2 !important; }
  html.nav-open .site-nav {
    display: flex !important; flex-direction: column !important; gap: 0 !important;
    position: fixed; left: 0; right: 0; top: var(--menu-top, 65px); bottom: 0; z-index: 30;
    background: #F4F5F2; border-top: 1px solid #DDE1DC;
    padding: 8px 16px calc(20px + env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain;
    animation: menu-in 0.22s ease-out;
  }
  @keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
  html.nav-open .site-nav > a {
    position: relative; display: flex; flex-direction: column; justify-content: center; gap: 2px;
    min-height: 72px; padding: 10px 40px 10px 14px; margin: 0 -14px; border-radius: 16px;
    color: #15201C !important; border-bottom: 1px solid #E4E7E2;
  }
  html.nav-open .site-nav > a::after {
    content: ""; position: absolute; right: 18px; top: 50%; width: 9px; height: 9px; margin-top: -5px;
    border-right: 2px solid #8A948F; border-top: 2px solid #8A948F; transform: rotate(45deg);
  }
  html.nav-open .site-nav > a[aria-current="page"] { background: #E3F5EC; border-bottom-color: transparent; }
  html.nav-open .site-nav > a[aria-current="page"]::after { border-color: #0A6B45; }
  html.nav-open .site-nav > a:active { background: #E7EAE5; }
  .menu-label { font-family: 'Space Grotesk', Inter, sans-serif; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
  html.nav-open .site-nav > a[aria-current="page"] .menu-label { color: #0A6B45; }
  html.nav-open .menu-desc { display: block; }
  .menu-desc { font-size: 14px; font-weight: 400; color: #55605B; }
  html.nav-open .menu-extra { display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding-top: 24px; }
  .menu-primary, .menu-secondary {
    display: flex; align-items: center; justify-content: center; min-height: 52px; border-radius: 999px;
    font-size: 16px; font-weight: 600; text-decoration: none;
  }
  .menu-primary { background: #0A6B45; color: #FFFFFF !important; }
  .menu-secondary { background: #FFFFFF; color: #15201C !important; border: 1px solid #C9CFC9; }
  .menu-contact { margin: 6px 0 0; text-align: center; font-size: 14px; color: #55605B; }
  html.nav-open .mobile-cta { transform: translateY(110%); }

  /* 16px side gutters everywhere */
  #page-root section { padding-left: 16px !important; padding-right: 16px !important; }
  #page-root footer > div { padding-left: 16px !important; padding-right: 16px !important; }

  /* Wide photo banners keep a phone-friendly shape */
  .photo-banner { aspect-ratio: auto !important; min-height: 0 !important; height: 240px; border-radius: 20px !important; }
  .photo-banner:has(.banner-caption) { height: 340px; }
  .banner-caption { left: 12px !important; right: 12px !important; bottom: 12px !important; max-width: none !important; padding: 14px 16px !important; }

  /* Forms stack into one column */
  .form-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .form-grid > *, .form-grid input, .form-grid select, .form-grid textarea { min-width: 0; width: 100%; box-sizing: border-box; }

  /* Comparison table: swipe sideways with the spec names pinned */
  .swipe-hint { display: block; margin: -12px 0 12px; font-size: 14px; color: #55605B; }
  #compare table { min-width: 620px !important; }
  #compare th[scope="row"], #compare thead th:first-child {
    position: sticky; left: 0; z-index: 1; background: #FFFFFF; min-width: 130px;
    box-shadow: 1px 0 0 #DDE1DC;
  }

  /* Sticky call to action at the bottom of the screen */
  .mobile-cta {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(244,245,242,0.96); border-top: 1px solid #DDE1DC;
    transition: transform 0.25s ease;
  }
  .mobile-cta a {
    display: flex; align-items: center; justify-content: center; min-height: 52px;
    border-radius: 999px; background: #0A6B45; color: #FFFFFF !important;
    font-weight: 600; font-size: 16px; text-decoration: none;
  }
  .mobile-cta.is-hidden { transform: translateY(110%); }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .mobile-cta { transition: none; }
}
