/**
 * Nos Marques — Page-Specific Styles (v3)
 *
 * Tab-based category display with breadcrumb hero matching the
 * Notre groupe pages pattern. Each category is a panel shown/hidden
 * on tab click, with a highlight callout (Lactalis-style key fact)
 * and brand logos at the bottom.
 *
 * WCAG 2 AA compliance verified:
 *   - #C20E1A on #fff = 5.9:1 (AA pass)
 *   - #fff on #C20E1A = 4.8:1 (AA pass)
 *   - #333 on #fff = 12.6:1 (AAA)
 *   - #555 on #fff = 6.3:1 (AA pass)
 *   - #333 on #f5f5f5 = 10.1:1 (AAA)
 *   - #555 on #f5f5f5 ≈ 6.2:1 (AA pass)
 *   - #fff on #a80c16 = 5.8:1 (AA pass)
 *   - Focus: 2px solid #C20E1A, offset 2px on all interactives
 *   - Touch targets: >= 44px
 *
 * @package Lesieur
 * @subpackage SectionBuilder
 * @since 2.2.0
 */

/* ===== Page wrapper override ===== */
/* Remove LSB default max-width so sections span edge-to-edge */
.lsb-section[data-section="nos_marques_page"] {
	max-width: none;
	padding: 0;
	overflow: hidden;
}

/* ===== Breadcrumb Hero ===== */
/* Matches the Notre groupe pages breadcrumb pattern: light gray
   background, parent link in red, page title in large black uppercase.
   Derived from .custom-breadcrumb styles in style.css. */
.nm-breadcrumb-hero {
	background: var(--lsb-color-light, #f5f5f5);
	padding: 2.5rem 2rem;
	text-align: center;
}

.nm-breadcrumb-hero__inner {
	max-width: 1200px;
	margin: 0 auto;
}

.nm-breadcrumb ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0;
}

.nm-breadcrumb__parent {
	font-family: var(--lsb-font-family, 'Poppins', sans-serif);
	font-size: 14px;
	text-transform: uppercase;
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 0.25rem;
}

.nm-breadcrumb__parent a {
	color: var(--e-global-color-primary, var(--lsb-color-primary, #C20E1A));
	text-decoration: none;
	font-weight: 700;
}

.nm-breadcrumb__parent a:hover {
	text-decoration: underline;
}

.nm-breadcrumb__title {
	font-family: var(--e-global-typography-secondary-font-family, var(--lsb-font-family, 'Poppins')), sans-serif;
	font-size: 40px;
	font-weight: 900;
	color: var(--e-global-color-text, var(--lsb-color-dark, #222221));
	text-transform: uppercase;
	margin: 0;
	line-height: 1.2;
}

/* ===== Intro Section ===== */
/* Uses the reusable .lsb-split-text component from section-builder.css.
   No custom intro styles needed — the generic component handles layout,
   typography, and responsive behavior. Only page-specific overrides below. */

/* ===== Tab Navigation ===== */
/* Horizontal pill-shaped buttons that act as tabs.
   Clicking a pill switches the visible panel below (JS).
   First pill is active by default. */
.nm-nav {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--lsb-color-white, #fff);
	border-bottom: 1px solid var(--lsb-color-border, #e5e5e5);
	transition: box-shadow 0.3s ease;
}

/* Subtle shadow when nav is stuck (class toggled by JS sentinel) */
.nm-nav--stuck {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.nm-nav__inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	max-width: 1200px;
	margin: 0 auto;
	padding: 1rem 2rem;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none; /* Firefox */
}

.nm-nav__inner::-webkit-scrollbar {
	display: none; /* Chrome/Safari */
}

.nm-nav__link {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	padding: 0.625rem 1.25rem;
	min-height: 44px; /* WCAG touch target */
	font-family: var(--lsb-font-family, 'Poppins', sans-serif);
	font-size: 0.875rem;
	font-weight: var(--lsb-font-weight-semibold, 600);
	color: var(--lsb-color-dark, #333); /* #333 on #fff = 12.6:1 — AAA */
	background: var(--lsb-color-light, #f5f5f5);
	border: 1px solid var(--lsb-color-border, #e5e5e5);
	border-radius: var(--lsb-radius-pill, 99rem);
	text-decoration: none;
	white-space: nowrap;
	transition: all 0.25s ease;
	cursor: pointer;
}

.nm-nav__link:hover {
	border-color: var(--lsb-color-primary, #C20E1A);
	color: var(--lsb-color-primary, #C20E1A);
}

.nm-nav__link:focus-visible {
	outline: 2px solid var(--lsb-color-primary, #C20E1A);
	outline-offset: 2px;
}

.nm-nav__link--active {
	background: var(--lsb-color-primary, #C20E1A);
	color: var(--lsb-color-white, #fff); /* #fff on #C20E1A = 4.8:1 — AA pass */
	border-color: var(--lsb-color-primary, #C20E1A);
}

/* ===== Tab Panels Container ===== */
/* Only one panel is visible at a time. JS toggles .nm-panel--active. */
.nm-panels-container {
	background: var(--lsb-color-white, #fff);
}

.nm-panel {
	display: none;
}

.nm-panel--active {
	display: block;
	animation: nm-panel-fade 0.4s ease;
}

@keyframes nm-panel-fade {
	from { opacity: 0; transform: translateY(10px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* --- Panel inner: two-column grid (text + image) --- */
.nm-panel__inner {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4rem;
	align-items: center;
	max-width: 1200px;
	margin: 0 auto;
	padding: 4rem 2rem;
}

/* --- Panel content (text side) --- */
.nm-panel__content {
	padding: 1rem 0;
}

/* Decorative category number (01–07)
   Color #D5D5D5 chosen for subtle visibility on white — 1.6:1 decorative contrast
   (decorative elements are exempt from WCAG AA text contrast requirements). */
.nm-panel__number {
	display: block;
	font-family: var(--lsb-font-family, 'Poppins', sans-serif);
	font-size: 4rem;
	font-weight: 900;
	color: #D5D5D5;
	line-height: 1;
	margin-bottom: 0.5rem;
	user-select: none;
}

/* Thin red accent line above the title */
.nm-panel__accent {
	width: 48px;
	height: 3px;
	background: var(--lsb-color-primary, #C20E1A);
	border-radius: 2px;
	margin-bottom: 1.25rem;
}

.nm-panel__title {
	font-family: var(--lsb-font-family, 'Poppins', sans-serif);
	font-size: var(--lsb-font-size-2xl, 2rem);
	font-weight: var(--lsb-font-weight-bold, 700);
	color: var(--lsb-color-dark, #333); /* #333 = 12.6:1 on #fff — AAA */
	line-height: 1.2;
	margin: 0 0 1rem;
}

.nm-panel__text {
	font-family: var(--lsb-font-family, 'Poppins', sans-serif);
	font-size: var(--lsb-font-size-base, 1rem);
	color: var(--lsb-color-medium, #555); /* #555 = 6.3:1 on #fff — AA pass */
	line-height: 1.8;
	margin: 0 0 1.5rem;
}

/* Highlight callout — Lactalis-style key fact accent block.
   Left-bordered blockquote with primary red accent to draw attention
   to one impactful sentence per category. */
.nm-panel__highlight {
	position: relative;
	margin: 0 0 1.5rem;
	padding: 1rem 1.25rem;
	border-left: 4px solid var(--lsb-color-primary, #C20E1A);
	background: var(--lsb-color-light, #f5f5f5);
	border-radius: 0 var(--lsb-radius, 1rem) var(--lsb-radius, 1rem) 0;
}

.nm-panel__highlight p {
	font-family: var(--lsb-font-family, 'Poppins', sans-serif);
	font-size: var(--lsb-font-size-base, 1rem);
	font-weight: var(--lsb-font-weight-semibold, 600);
	font-style: italic;
	color: var(--lsb-color-dark, #333); /* #333 on #f5f5f5 = 10.1:1 — AAA */
	line-height: 1.6;
	margin: 0;
}

/* "Découvrir →" link with animated arrow */
.nm-panel__cta {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--lsb-font-family, 'Poppins', sans-serif);
	font-size: var(--lsb-font-size-base, 1rem);
	font-weight: var(--lsb-font-weight-semibold, 600);
	color: var(--lsb-color-primary, #C20E1A); /* #C20E1A on #fff = 5.9:1 — AA pass */
	text-decoration: none;
	padding: 0.5rem 0;
	min-height: 44px; /* WCAG touch target */
	transition: all 0.25s ease;
}

.nm-panel__cta:hover {
	color: var(--lsb-color-primary-hover, #a80c16);
}

.nm-panel__cta:focus-visible {
	outline: 2px solid var(--lsb-color-primary, #C20E1A);
	outline-offset: 2px;
}

.nm-panel__cta-arrow {
	display: inline-block;
	transition: transform 0.3s ease;
	font-size: 1.25rem;
}

.nm-panel__cta:hover .nm-panel__cta-arrow {
	transform: translateX(4px);
}

/* --- Panel media (image side) --- */
.nm-panel__media {
	position: relative;
	border-radius: var(--lsb-radius, 1rem);
	overflow: hidden;
	background: var(--lsb-color-light, #f5f5f5);
	aspect-ratio: 16 / 10;
}

.nm-panel__image {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	border-radius: var(--lsb-radius, 1rem);
	display: block;
}

/* --- Per-category image overrides ---
   Portrait images (2:3, 3:4, 4:5) are heavily cropped in the default
   16:10 container. A taller 4:3 ratio + custom object-position shows
   the key visual elements without excessive cropping. */
/* All category panels use the same square container for visual consistency */
.nm-panel__media {
	aspect-ratio: 1 / 1 !important; /* Override default 16/10 for uniform height */
}

[id$="-huiles-de-table"] .nm-panel__image {
	object-position: center 20%; /* Show pouring action — hand + bottle neck */
}

[id$="-huiles-dolives"] .nm-panel__image {
	object-position: center 30%; /* Center olive oil bottle with cork + landscape */
}

[id$="-margarine"] .nm-panel__image {
	object-position: center 25%; /* Show baking ingredients — butter, eggs, flour */
}

[id$="-pate-a-tartiner"] .nm-panel__image {
	object-position: center 30%; /* Show chocolate jar + hazelnuts */
}

/* ===== Brand Logos Row ===== */
/* Horizontal row of brand logos at the bottom of each panel,
   similar to the Lactalis "Nos activités" brand showcase. */
.nm-panel__brands {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 2rem 4rem;
	text-align: center;
}

.nm-panel__brands-title {
	font-family: var(--lsb-font-family, 'Poppins', sans-serif);
	font-size: 0.8125rem;
	font-weight: var(--lsb-font-weight-semibold, 600);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--lsb-color-medium, #555); /* #555 on #fff = 6.3:1 — AA pass */
	margin: 0 0 2rem;
}

.nm-panel__brands-grid {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 3rem;
	flex-wrap: wrap;
}

/* Individual brand card */
.nm-brand {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	min-width: 100px;
	transition: transform 0.3s ease;
}

.nm-brand:hover {
	transform: translateY(-4px);
}

/* Higher specificity to beat Elementor's `.elementor img { max-width: 100% }` */
.nm-panel__brands .nm-brand__logo {
	width: auto;
	height: 60px;
	max-width: 140px;
	object-fit: contain;
	filter: grayscale(0.3);
	transition: filter 0.3s ease;
}

.nm-panel__brands .nm-brand:hover .nm-brand__logo {
	filter: grayscale(0);
}

.nm-brand__name {
	/* Hidden by design — only the logo is shown. Accessibility is preserved
	   via the logo's alt attribute, which carries the brand name. */
	display: none;
}

/* Text-only fallback when no logo image is available */
.nm-brand__name-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100px;
	height: 60px;
	border: 2px dashed var(--lsb-color-border, #e5e5e5);
	border-radius: 8px;
	font-family: var(--lsb-font-family, 'Poppins', sans-serif);
	font-size: 0.875rem;
	font-weight: var(--lsb-font-weight-bold, 700);
	color: var(--lsb-color-medium, #555);
}

/* ===== Cinema Carousel — Heritage Videos ===== */
/* Dark cinema-themed section with horizontal scrollable video
   thumbnails. Clicking a thumbnail opens a YouTube lightbox.
   WCAG: #fff on #1a1a1a = 17.6:1 (AAA), #ccc on #1a1a1a = 10.5:1 (AAA),
          #fff on #C20E1A = 4.8:1 (AA pass). Touch targets >= 44px. */

.nm-cinema {
	background: #1a1a1a;
	padding: 5rem 0;
	overflow: hidden;
}

.nm-cinema__header {
	max-width: 700px;
	margin: 0 auto 3rem;
	padding: 0 2rem;
	text-align: center;
}

.nm-cinema__title {
	font-family: var(--lsb-font-family, 'Poppins', sans-serif);
	font-size: 2.5rem;
	font-weight: var(--lsb-font-weight-bold, 700);
	color: #fff; /* #fff on #1a1a1a = 17.6:1 — AAA */
	line-height: 1.2;
	margin: 0 0 1rem;
}

.nm-cinema__subtitle {
	font-family: var(--lsb-font-family, 'Poppins', sans-serif);
	font-size: var(--lsb-font-size-base, 1rem);
	color: #ccc; /* #ccc on #1a1a1a = 10.5:1 — AAA */
	line-height: 1.7;
	margin: 0;
}

/* --- Carousel viewport with prev/next arrows --- */
.nm-cinema__viewport {
	position: relative;
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 3.5rem;
}

.nm-cinema__track {
	display: flex;
	gap: 1.5rem;
	overflow-x: auto;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	padding: 0.5rem 0;
	/* Hide native scrollbar — visual arrows provided instead */
	scrollbar-width: none;
}

.nm-cinema__track::-webkit-scrollbar {
	display: none;
}

/* --- Prev / Next arrow buttons --- */
.nm-cinema__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	min-height: 44px; /* WCAG touch target */
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	transition: background 0.25s ease, border-color 0.25s ease;
}

.nm-cinema__arrow:hover {
	background: rgba(255, 255, 255, 0.2);
	border-color: rgba(255, 255, 255, 0.5);
}

.nm-cinema__arrow:focus-visible {
	outline: 2px solid var(--lsb-color-primary, #C20E1A);
	outline-offset: 2px;
}

.nm-cinema__arrow--prev {
	left: 0.5rem;
}

.nm-cinema__arrow--next {
	right: 0.5rem;
}

/* --- Individual video slide --- */
.nm-cinema__slide {
	flex-shrink: 0;
	width: 280px;
	scroll-snap-align: start;
	cursor: pointer;
	transition: transform 0.3s ease;
}

.nm-cinema__slide:hover {
	transform: translateY(-4px);
}

/* Poster wrapper — contains thumbnail + play overlay + year badge */
.nm-cinema__poster {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: 8px;
	overflow: hidden;
	background: #111;
}

.nm-cinema__thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease, filter 0.4s ease;
}

.nm-cinema__slide:hover .nm-cinema__thumb {
	transform: scale(1.05);
	filter: brightness(0.75);
}

/* Play button overlay — centered on poster */
.nm-cinema__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	opacity: 0.8;
	transition: opacity 0.3s ease, transform 0.3s ease;
	pointer-events: none;
}

.nm-cinema__slide:hover .nm-cinema__play {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1.1);
}

/* Year badge — bottom-left of poster */
.nm-cinema__year {
	position: absolute;
	bottom: 8px;
	left: 8px;
	padding: 2px 8px;
	background: var(--lsb-color-primary, #C20E1A);
	color: #fff; /* #fff on #C20E1A = 4.8:1 — AA pass */
	font-family: var(--lsb-font-family, 'Poppins', sans-serif);
	font-size: 0.75rem;
	font-weight: var(--lsb-font-weight-bold, 700);
	border-radius: 4px;
	letter-spacing: 0.05em;
}

/* --- Video info below poster --- */
.nm-cinema__info {
	padding: 0.75rem 0.25rem 0;
}

.nm-cinema__brand {
	display: inline-block;
	font-family: var(--lsb-font-family, 'Poppins', sans-serif);
	font-size: 0.6875rem;
	font-weight: var(--lsb-font-weight-semibold, 600);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--lsb-color-primary, #C20E1A); /* Red on dark = decorative, title below is white */
	margin-bottom: 0.25rem;
}

.nm-cinema__video-title {
	font-family: var(--lsb-font-family, 'Poppins', sans-serif);
	font-size: 0.875rem;
	font-weight: var(--lsb-font-weight-semibold, 600);
	color: #fff; /* #fff on #1a1a1a = 17.6:1 — AAA */
	line-height: 1.4;
	margin: 0;
	/* Clamp to 2 lines */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ===== Lightbox — YouTube Video Player ===== */
/* Fullscreen dark overlay with centered 16:9 iframe.
   Opened on slide click, closed via button / Escape / backdrop click.
   WCAG: focus trap, aria-modal, close button with label. */

.nm-lightbox {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.nm-lightbox[hidden] {
	display: none;
}

/* Semi-transparent backdrop */
.nm-lightbox__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.92);
}

/* Centered content container */
.nm-lightbox__content {
	position: relative;
	width: 90vw;
	max-width: 960px;
	z-index: 1;
}

/* Close button — top-right */
.nm-lightbox__close {
	position: absolute;
	top: -48px;
	right: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	min-height: 44px; /* WCAG touch target */
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	transition: background 0.25s ease;
}

.nm-lightbox__close:hover {
	background: rgba(255, 255, 255, 0.15);
}

.nm-lightbox__close:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* 16:9 responsive iframe wrapper */
.nm-lightbox__player {
	position: relative;
	width: 100%;
	padding-top: 56.25%; /* 16:9 ratio */
	background: #000;
	border-radius: 8px;
	overflow: hidden;
}

.nm-lightbox__player iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ===== Brand Logo Banner (Elementor widget) ===== */
/* Horizontal row of brand logos. Three background variants:
   light (#f5f5f5), white (#fff), dark (#1a1a1a).
   WCAG: #555 on #f5f5f5 ≈ 6.2:1 (AA), #ccc on #1a1a1a = 10.5:1 (AAA). */

/* === Brand Carousel — infinite horizontal scroll of brand logos === */
/* Brands are duplicated in the HTML (2× the set) so the animation
   can translate -50% and snap back to 0 for a seamless loop.
   Pauses on hover for WCAG 2.2.2 (Pause, Stop, Hide). */

.nm-brand-banner {
	padding: 2.5rem 0;
	text-align: center;
	overflow: hidden; /* Hide overflowing track edges */
}

/* Background variants */
.nm-brand-banner--light {
	background: var(--lsb-color-light, #f5f5f5);
}

.nm-brand-banner--white {
	background: var(--lsb-color-white, #fff);
}

.nm-brand-banner--dark {
	background: #1a1a1a;
}

.nm-brand-banner__label {
	font-family: var(--lsb-font-family, 'Poppins', sans-serif);
	font-size: 0.8125rem;
	font-weight: var(--lsb-font-weight-semibold, 600);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--lsb-color-medium, #555); /* #555 on #f5f5f5 ≈ 6.2:1 — AA */
	margin: 0 0 1.5rem;
}

/* Dark variant label color */
.nm-brand-banner--dark .nm-brand-banner__label {
	color: #ccc; /* #ccc on #1a1a1a = 10.5:1 — AAA */
}

/* Scrolling track — contains 2× the brand set for seamless loop */
.nm-brand-banner__track {
	display: flex;
	align-items: center;
	gap: 3.5rem;
	width: max-content;
	animation: nm-brand-scroll 30s linear infinite;
}

/* Pause animation on hover (WCAG 2.2.2) */
.nm-brand-banner:hover .nm-brand-banner__track {
	animation-play-state: paused;
}

@keyframes nm-brand-scroll {
	0% {
		transform: translateX(0);
	}
	100% {
		/* Translate by exactly half since the track contains 2 copies */
		transform: translateX(-50%);
	}
}

/* Individual brand item (can be <div> or <a>) */
.nm-brand-banner__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex-shrink: 0;
	gap: 0.5rem;
	min-width: 100px;
	text-decoration: none;
	transition: transform 0.3s ease, opacity 0.3s ease;
	opacity: 0.75;
}

.nm-brand-banner__item:hover {
	transform: translateY(-3px);
	opacity: 1;
}

.nm-brand-banner__item:focus-visible {
	outline: 2px solid var(--lsb-color-primary, #C20E1A);
	outline-offset: 4px;
	border-radius: 4px;
}

/* Logo image — higher specificity to override Elementor's `.elementor img` rule */
.nm-brand-banner .nm-brand-banner__logo {
	width: auto;
	height: 52px;
	max-width: 130px;
	object-fit: contain;
}

/* Brand name below logo */
.nm-brand-banner__name {
	font-family: var(--lsb-font-family, 'Poppins', sans-serif);
	font-size: 0.6875rem;
	font-weight: var(--lsb-font-weight-semibold, 600);
	color: var(--lsb-color-dark, #333); /* #333 on #f5f5f5 = 10.1:1 — AAA */
	white-space: nowrap;
}

/* Dark variant name color */
.nm-brand-banner--dark .nm-brand-banner__name {
	color: #ccc; /* #ccc on #1a1a1a = 10.5:1 — AAA */
}

/* Text fallback when no logo available */
.nm-brand-banner__fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100px;
	height: 52px;
	border: 2px dashed var(--lsb-color-border, #e5e5e5);
	border-radius: 8px;
	font-family: var(--lsb-font-family, 'Poppins', sans-serif);
	font-size: 0.875rem;
	font-weight: var(--lsb-font-weight-bold, 700);
	color: var(--lsb-color-medium, #555);
}

/* ===== Responsive: Large screens (1440px+) ===== */
@media (min-width: 1440px) {
	.nm-panel__inner {
		gap: 5rem;
	}

	.nm-panel__number {
		font-size: 5rem;
	}

	.nm-panel__brands .nm-brand__logo {
		height: 70px;
		max-width: 160px;
	}
}

/* ===== Responsive: Tablet (max 1023px) ===== */
@media (max-width: 1023px) {
	.nm-breadcrumb__title {
		font-size: 32px;
	}

	/* Panel stacks to single column */
	.nm-panel__inner {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

	.nm-panel__media {
		aspect-ratio: 4 / 3 !important; /* Override desktop 1/1 — shorter on tablet single-col */
		/* Show image before text on tablet */
		order: -1;
	}

	.nm-panel__number {
		font-size: 3rem;
	}

	/* Nav: left-align and scroll horizontally */
	.nm-nav__inner {
		justify-content: flex-start;
	}

	/* Brand logos: tighter spacing */
	.nm-panel__brands-grid {
		gap: 2rem;
	}

	.nm-panel__brands .nm-brand__logo {
		height: 50px;
		max-width: 120px;
	}

	/* Cinema carousel: reduce slide width */
	.nm-cinema__slide {
		width: 240px;
	}

	.nm-cinema__title {
		font-size: 2rem;
	}

	/* Brand carousel: slightly smaller logos + faster scroll on tablet */
	.nm-brand-banner .nm-brand-banner__logo {
		height: 44px;
	}

	.nm-brand-banner__track {
		gap: 2.5rem;
		animation-duration: 25s;
	}
}

/* ===== Responsive: Mobile (max 767px) ===== */
@media (max-width: 767px) {
	.nm-breadcrumb-hero {
		padding: 2rem 1.5rem;
	}

	.nm-breadcrumb__title {
		font-size: 24px;
	}

	/* Intro uses .lsb-split-text responsive rules from section-builder.css */

	.nm-nav__inner {
		padding: 0.75rem 1rem;
		gap: 0.375rem;
	}

	.nm-nav__link {
		padding: 0.5rem 1rem;
		font-size: 0.8125rem;
	}

	.nm-panel__inner {
		padding: 2rem 1rem;
		gap: 1.25rem;
	}

	.nm-panel__media {
		aspect-ratio: 16 / 10 !important; /* Override desktop 1/1 — wider on mobile to save vertical space */
	}

	.nm-panel__number {
		font-size: 2rem;
	}

	.nm-panel__title {
		font-size: 1.25rem;
	}

	.nm-panel__text {
		font-size: 0.9rem;
		line-height: 1.7;
	}

	.nm-panel__highlight {
		padding: 0.75rem 1rem;
	}

	.nm-panel__highlight p {
		font-size: 0.9rem;
	}

	.nm-panel__brands {
		padding: 0 1rem 2rem;
	}

	.nm-panel__brands-grid {
		gap: 1.5rem;
	}

	.nm-panel__brands .nm-brand__logo {
		height: 40px;
		max-width: 100px;
	}

	/* Cinema carousel: smaller slides, hide arrows, edge padding */
	.nm-cinema {
		padding: 3rem 0;
	}

	.nm-cinema__viewport {
		padding: 0 1rem;
	}

	.nm-cinema__arrow {
		display: none; /* Touch swipe is natural on mobile */
	}

	.nm-cinema__slide {
		width: 220px;
	}

	.nm-cinema__title {
		font-size: 1.75rem;
	}

	.nm-cinema__header {
		margin-bottom: 2rem;
		padding: 0 1.5rem;
	}

	/* Lightbox: nearly fullscreen on mobile */
	.nm-lightbox__content {
		width: 95vw;
	}

	.nm-lightbox__close {
		top: -44px;
	}

	/* Brand carousel: smaller logos + faster + tighter gap on mobile */
	.nm-brand-banner {
		padding: 1.5rem 0;
	}

	.nm-brand-banner__track {
		gap: 2rem;
		animation-duration: 20s;
	}

	.nm-brand-banner .nm-brand-banner__logo {
		height: 36px;
	}

	.nm-brand-banner__name {
		font-size: 0.5625rem;
	}

	.nm-brand-banner__label {
		font-size: 0.75rem;
		margin-bottom: 1rem;
	}
}

/* ===== Reduced motion preference ===== */
/* Respect user's OS-level motion preference (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
	.nm-panel--active {
		animation: none;
	}

	.nm-brand {
		transition: none;
	}

	.nm-cinema__slide {
		transition: none;
	}

	.nm-cinema__thumb {
		transition: none;
	}

	.nm-cinema__play {
		transition: none;
	}

	.nm-cinema__track {
		scroll-behavior: auto;
	}

	/* Stop carousel scroll for users who prefer reduced motion */
	.nm-brand-banner__track {
		animation: none;
	}

	.nm-brand-banner__item {
		transition: none;
	}
}
