/*
 * ntw_line_panels — expanding line panels (1.8.0, Mateco pattern).
 *
 * Desktop: one row, the open panel wide, the others narrow with a rotated title.
 * Which panel is open is a CLASS (`.is-open`), set by line-panels-widget.js on hover,
 * focus and click; the first one is open in the server render, so the no-JS page
 * shows one complete panel. Below 900px: a stacked list, every panel open.
 */
.ntw-lpanels__list { display: flex; gap: 10px; height: clamp(420px, 42vw, 560px); margin: 0; padding: 0; list-style: none; }
.ntw-lpanel {
	position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; border-radius: var(--r);
	background: var(--ntw-w-overlay, #0D110E); cursor: pointer; transition: flex-grow .55s var(--ease);
}
.ntw-lpanel.is-open { flex-grow: 6; cursor: default; }
/*
 * 1.8.1: two classes. Elementor's `.elementor img { height: auto }` is (0,1,1) and
 * beat the one-class rule, so the photo shrank to its natural height at the top of
 * the panel and the rest showed the flat panel fill. Every panel is now a full-bleed
 * cover photo.
 */
.ntw-lpanel .ntw-lpanel__img {
	position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; max-width: none; object-fit: cover;
	border-radius: 0; transition: transform .8s var(--ease);
}
/*
 * Overlay = the "Lớp phủ ảnh" colour control. Two layers of the same colour:
 * ::before a flat tint (strong on a narrow panel, where the rotated title runs the
 * full height; light on the open one), ::after a bottom gradient under the text.
 * Measured worst case (white photo): narrow tint .6 → white type ≥ 5:1; open panel
 * bottom 30% ≥ .85 combined.
 */
.ntw-lpanel::before,
.ntw-lpanel::after { content: ''; position: absolute; z-index: 1; inset: 0; pointer-events: none; transition: opacity .45s var(--ease); }
.ntw-lpanel::before { background: var(--ntw-w-overlay, #0D110E); opacity: .6; }
.ntw-lpanel.is-open::before { opacity: .22; }
.ntw-lpanel::after {
	background: linear-gradient(180deg, transparent 18%, var(--ntw-w-overlay, #0D110E) 100%);
	opacity: .92;
}
.ntw-lpanel.is-open .ntw-lpanel__img { transform: scale(1.03); }
.ntw-lpanel__spine {
	position: absolute; z-index: 2; left: 50%; bottom: 28px; transform: translateX(-50%) rotate(180deg);
	writing-mode: vertical-rl; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-height: calc(100% - 56px); color: #fff; font: 600 15px/1 var(--f-display);
	letter-spacing: .02em; transition: opacity .3s;
}
.ntw-lpanel.is-open .ntw-lpanel__spine { opacity: 0; }
.ntw-lpanel__body {
	position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: clamp(20px, 3vw, 40px);
	max-width: 620px; opacity: 0; visibility: hidden; transform: translateY(14px);
	transition: opacity .35s .15s, transform .45s .15s var(--ease), visibility 0s .5s;
}
.ntw-lpanel.is-open .ntw-lpanel__body { opacity: 1; visibility: visible; transform: none; transition-delay: .2s, .2s, 0s; }
.ntw-w .ntw-lpanel :is(h3, p) { color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.ntw-w .ntw-lpanel .ntw-lpanel__lede { color: rgba(255, 255, 255, .84); }
.ntw-lpanel__count { margin: 0 0 6px; font-size: 12.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.ntw-w .ntw-lpanel .ntw-lpanel__count { color: var(--ntw-w-accent, #7ED957); }
.ntw-lpanel__title { margin: 0 0 10px; font: 600 clamp(1.5rem, 2.4vw, 2.1rem)/1.2 var(--f-display); }
.ntw-lpanel__lede { margin: 0 0 18px; }
@media (max-width: 899px) {
	.ntw-lpanels__list { flex-direction: column; height: auto; }
	.ntw-lpanel, .ntw-lpanel.is-open { flex: none; min-height: 320px; cursor: default; }
	.ntw-lpanel__spine { display: none; }
	.ntw-lpanel::before, .ntw-lpanel.is-open::before { opacity: .3; }
	.ntw-lpanel__body { opacity: 1; visibility: visible; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.ntw-lpanel, .ntw-lpanel__img, .ntw-lpanel__body { transition: none; }
}
