/* Per-product lineup images: hidden on desktop (scroll-linked image used there) */
.lineup-item-img {
  display: none;
}
.lineup-num-mobile {
  display: none;
}

@media (max-width: 768px) {
  /* Reduce full-viewport hero white space on product & research pages */
  .own-products-title {
    height: auto;
    min-height: auto;
    padding-top: calc(var(--header-height) + var(--space-sm));
    padding-bottom: var(--space-sm);
  }
  .own-products-title .headline-en {
    font-size: clamp(2.2rem, 7vw, 2.8rem);
    line-height: 1.15;
  }

  /* Research page packshot images: avoid oversized viewport tiles */
  .research-page .section-packshots {
    padding-top: var(--space-md);
  }
  .research-page .packshot-tile img {
    height: auto;
    max-height: 60vh;
  }

  /* Product evaluation: compress hero so video appears sooner on mobile */
  .page-white #hero.own-products-title {
    height: auto;
    min-height: auto;
    padding-top: calc(var(--header-height) + var(--space-xs));
    padding-bottom: 0;
  }
  .page-white #hero.own-products-title .headline-en {
    font-size: clamp(2rem, 6vw, 2.6rem);
    line-height: 1.1;
  }
  .page-white #overview.section-about {
    padding-top: var(--space-xs);
    margin-top: 0;
  }

  /* Simplify PURO stage & lineup for narrow viewports */
  .ih-image-stage {
    height: auto;
  }
  .ih-image-sticky {
    position: relative;
    height: auto;
  }
  .ih-image {
    height: auto;
  }
  .puro-pin-logo-wrap {
    position: static;
    width: 100%;
    justify-content: center;
    opacity: 1;
    margin: var(--space-2xl) 0 var(--space-xl);
  }
  .puro-scroll-stage {
    background-color: var(--color-white);
  }
  .puro-text-inner {
    padding: 0 var(--space-md);
  }
  .puro-side-text {
    opacity: 1;
    pointer-events: auto;
    margin-bottom: var(--space-2xl);
  }
  .lineup-sticky {
    position: static;
    top: auto;
    min-height: auto;
    margin-bottom: var(--space-2xl);
  }
  /* Mobile: hide the single scroll-linked image; show one image per product below */
  .lineup-sticky .lineup-image-wrap {
    display: none;
  }
  .lineup-index-row {
    justify-content: center;
  }
  .lineup-image-wrap {
    max-width: 260px;
    margin: 0 auto;
  }
  .lineup-right {
    padding-top: 0;
    gap: var(--space-3xl);
  }

  /* Mobile lineup: one image per product above each name/description */
  .lineup-item-img {
    display: block;
    margin-bottom: var(--space-md);
    max-width: 200px;
  }
  .lineup-item-img img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
  }
  .lineup-item {
    display: flex;
    flex-direction: column;
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-top: 1px solid var(--color-light-gray);
  }
  .lineup-item:first-child {
    padding-top: var(--space-lg);
  }

  /* Lineup numbers beside each product name; hide large sticky number */
  .lineup-index-block,
  .lineup-index-number {
    display: none;
  }
  .lineup-name {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 0.4rem;
  }
  .lineup-num-mobile {
    display: inline-block;
    font-size: clamp(1.8rem, 8vw, 2.4rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
  }

  /* Company page: tighter, more readable mobile layout */
  .section-company-profile {
    margin-top: 0;
    padding: var(--space-3xl) 0;
  }
  .section-company-profile .inner {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }
  .company-info-table th,
  .company-info-table td {
    padding: var(--space-md) var(--space-md);
    font-size: var(--text-sm);
  }
  .company-info-table th {
    white-space: nowrap;
  }
  .section-location {
    padding: var(--space-3xl) 0;
  }
  .section-faq {
    padding: var(--space-3xl) 0;
  }

  /* Ensure culture / about text blocks are fully visible and readable */
  .about-stacked-container {
    overflow: visible;
  }
  .about-stacked {
    height: auto !important;
    min-height: auto !important;
    padding: var(--space-md) 0 var(--space-2xl) !important;
    padding-top: var(--space-md) !important;
    overflow: visible !important;
  }
  .about-stacked > .inner.about-row {
    height: auto !important;
    min-height: 0 !important;
    grid-template-columns: 1fr !important;
    align-items: flex-start !important;
    gap: 0 !important;
    row-gap: var(--space-md) !important;
    overflow: visible !important;
  }
  .about-stacked .section-label {
    margin-bottom: var(--space-xs);
  }
  .about-stacked .about-heading {
    margin-top: 0;
    margin-bottom: var(--space-sm);
  }
  /* Show text before image on mobile so more copy is visible above the fold */
  .about-stacked .about-text {
    order: 1;
    margin-bottom: 0;
    padding: 0 !important;
    padding-top: 0 !important;
  }
  .about-stacked .about-image {
    order: 2;
    max-width: 100%;
    min-height: 0;
    margin: 0 !important;
    margin-top: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  .about-stacked .about-image img {
    height: auto !important;
    max-height: none !important;
    width: 100% !important;
    object-fit: contain !important;
    display: block;
  }
  .culture-stacked-section {
    padding: var(--space-2xl) 0 var(--space-3xl);
    padding-top: var(--space-xl);
  }
  .culture-stacked-section:first-of-type {
    padding-top: var(--space-lg);
  }
  .culture-stacked-headline {
    margin-bottom: var(--space-2xl);
  }
  .culture-stacked-image {
    overflow: visible;
  }
  .culture-stacked-image img {
    height: auto;
    max-height: none;
    width: 100%;
    object-fit: contain;
  }
  .culture-stacked-content .content-block p,
  .culture-stacked-content .value-desc {
    font-size: var(--text-base);
    line-height: 1.9;
  }

  /* Culture hero: less top gap on mobile */
  .culture-hero {
    padding-top: var(--header-height);
  }
  .culture-hero-text {
    padding: var(--space-lg) var(--space-md) var(--space-xl);
    padding-top: var(--space-md);
  }

  /* Mobile nav dropdown: remove floating white boxes over hero */
  .nav-dropdown-menu {
    background-color: transparent;
    border: none;
    box-shadow: none;
    padding-top: 0;
  }
  .header.scrolled .nav-dropdown-menu,
  .header.header-solid .nav-dropdown-menu {
    background-color: transparent;
    border: none;
    box-shadow: none;
  }

  /* Ensure hamburger icon is visible on solid (white) headers at all scroll positions */
  .header.header-solid .menu-toggle span {
    background-color: var(--color-primary);
  }

  /*
   * When hamburger menu is open on scrolled pages, the header's backdrop-filter
   * creates a containing block and clips the fixed nav. Disable it so the
   * full-height menu is visible on all sections (not only hero).
   */
  .header:has(.nav-main.active) {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  /*
   * On product/page-white pages the header gets .header-hidden on scroll and
   * disappears (opacity:0), taking the hamburger with it. Keep the header
   * visible on mobile so the menu toggle is always available.
   */
  .page-white .header.header-hidden {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* Extra safety: never hide header on mobile */
  .header.header-hidden {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
  }

  /* Open nav panel: solid background on all pages so menu is readable over any content */
  .nav-main.active,
  .nav-main {
    background-color: var(--color-white) !important;
  }

  /* Mobile global nav: cleaner layout & spacing */
  .nav-main {
    align-items: center;
    padding: var(--space-2xl) var(--space-md) var(--space-4xl);
    gap: var(--space-xl);
    overflow-y: auto;
  }

  .nav-main .nav-link,
  .nav-main .nav-link-has-dropdown {
    font-size: 1.1rem;
    font-weight: 600;
  }

  .nav-dropdown {
    width: 100%;
    align-items: center;
  }

  .nav-dropdown-menu {
    gap: 4px;
    margin-top: 8px;
  }

  .nav-dropdown-item {
    font-size: 0.95rem;
  }
}

