/* In Pictures: the section page (/Section/153 and its blocks) and the photo story page (Detail-photo).
   A dark, image-first surface inside the normal header and footer. Prefix ipx-. */

.ipx {
    --ipx-bg: #0c0d10;
    --ipx-surface: #15171c;
    --ipx-line: rgba(255, 255, 255, .09);
    --ipx-text: #f3f4f6;
    --ipx-muted: #a3a8b3;
    --ipx-red: #e0242b;
    --ipx-radius: 14px;
    --ipx-max: 1440px;
    background: var(--ipx-bg);
    color: var(--ipx-text);
    font-family: "Barlow", "Maven Pro", sans-serif;
    padding-bottom: 64px;
    overflow: hidden;
}
.ipx a { color: inherit; text-decoration: none; }
.ipx-inner { max-width: var(--ipx-max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 767px) { .ipx-inner { padding: 0 16px; } }

/* ---------- head ---------- */
.ipx-head { padding: 36px 0 18px; }
.ipx-crumb { display: flex; gap: 8px; align-items: center; color: var(--ipx-muted); font-size: 14px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.ipx-crumb a:hover { color: #fff; }
.ipx .ipx-title { color: #fff; margin: 6px 0 0; font-size: clamp(34px, 5vw, 60px); font-weight: 800; letter-spacing: -.02em; line-height: 1; display: flex; align-items: center; gap: 14px; }
.ipx-title::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--ipx-red); box-shadow: 0 0 0 6px rgba(224, 36, 43, .18); flex: none; }
.ipx-chips { display: flex; gap: 8px; margin-top: 20px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.ipx-chips::-webkit-scrollbar { display: none; }
.ipx-chip { flex: none; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--ipx-line); color: var(--ipx-muted); font-weight: 600; font-size: 14px; transition: background .2s, color .2s, border-color .2s; }
.ipx-chip:hover { color: #fff; border-color: rgba(255, 255, 255, .3); }
.ipx-chip.is-on { background: #fff; color: #111; border-color: #fff; }

/* ---------- shared: image tile ---------- */
.ipx-img { position: relative; overflow: hidden; background: var(--ipx-surface); border-radius: var(--ipx-radius); }
.ipx-img img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.001); transition: transform .8s cubic-bezier(.2, .7, .2, 1), filter .5s; }
a:hover .ipx-img img, a:focus-visible .ipx-img img { transform: scale(1.06); }
.ipx-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .78) 100%); pointer-events: none; }
.ipx-img.is-plain::after { background: linear-gradient(180deg, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, .35) 100%); }
.ipx-count { position: absolute; top: 12px; right: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #fff; font-size: 13px; font-weight: 700; }
.ipx-count svg { width: 15px; height: 15px; }
.ipx-time { color: var(--ipx-muted); font-size: 13px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.ipx a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: var(--ipx-radius); }

/* ---------- hero ---------- */
.ipx-hero { display: block; position: relative; margin-top: 8px; }
.ipx-hero .ipx-img { aspect-ratio: 21 / 9; border-radius: 18px; }
@media (max-width: 991px) { .ipx-hero .ipx-img { aspect-ratio: 4 / 3; } }
.ipx-hero-text { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: clamp(18px, 4vw, 48px); max-width: 980px; }
.ipx-hero-text h2 { margin: 10px 0 10px; font-size: clamp(26px, 3.6vw, 50px); line-height: 1.05; font-weight: 800; letter-spacing: -.015em; text-wrap: balance; color: #fff; }
.ipx .ipx-hero-text p { margin: 0; padding: 0; max-width: 680px; color: rgba(255, 255, 255, .82); font-size: clamp(15px, 1.3vw, 18px); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ipx-cta { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; padding: 11px 20px; border-radius: 999px; background: #fff; color: #111 !important; font-weight: 700; font-size: 15px; transition: gap .2s; }
.ipx-hero:hover .ipx-cta { gap: 14px; }
.ipx-label { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ipx-label::before { content: ""; width: 22px; height: 3px; background: var(--ipx-red); border-radius: 2px; }

/* ---------- mosaic ---------- */
.ipx-mosaic { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 210px; gap: 14px; margin-top: 14px; }
.ipx-mosaic > a { position: relative; display: block; }
.ipx-mosaic > a .ipx-img { height: 100%; }
.ipx-mosaic > a:first-child { grid-column: span 2; grid-row: span 2; }
.ipx-tile-text { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 16px; }
.ipx-tile-text h3 { margin: 0; color: #fff; font-size: 17px; line-height: 1.25; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ipx-mosaic > a:first-child h3 { font-size: clamp(20px, 2vw, 28px); }
@media (max-width: 991px) { .ipx-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 190px; } }
@media (max-width: 575px) { .ipx-mosaic { grid-template-columns: minmax(0, 1fr); grid-auto-rows: 240px; } .ipx-mosaic > a:first-child { grid-column: auto; grid-row: span 1; } }

/* ---------- rows (one per block) ---------- */
.ipx-row { margin-top: 48px; }
.ipx-row-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 14px; }
.ipx .ipx-row-head h2 { color: #fff; margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.ipx-row-head h2 a:hover { color: var(--ipx-red); }
.ipx-row-head .ipx-more { margin-left: auto; color: var(--ipx-muted); font-weight: 600; font-size: 14px; white-space: nowrap; }
.ipx-row-head .ipx-more:hover { color: #fff; }
/* Row arrows: the home page's round arrows (reels.css), centred on the 4:3 pictures; hidden on phones (swipe). */
.ipx-row-body { --per-view: 4; position: relative; container-type: inline-size; }
.ipx-row-body > .arrow { display: none; }
@media (min-width: 768px) {
    .ipx-row-body > .arrow { position: absolute; z-index: 3; top: calc((100cqw - (var(--per-view) - 1) * 16px) / var(--per-view) * 3 / 8); transform: translateY(-50%); width: 3rem; height: 3rem; padding: 0; display: flex; align-items: center; justify-content: center; border: none; border-radius: 50%; background-color: rgba(0, 0, 0, .5); color: #fffceb; line-height: 1; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); transition: background-color .2s, opacity .2s; }
    .ipx-row-body > .left-arrow { left: .5rem; }
    .ipx-row-body > .right-arrow { right: .5rem; }
    .ipx-row-body > .arrow:hover { background-color: rgba(0, 0, 0, .75); }
    .ipx-row-body > .arrow .material-icons { display: block; font-size: 2rem; line-height: 1; pointer-events: none; }
    .ipx-row-body > .arrow:disabled { opacity: 0; pointer-events: none; }
}
@media (max-width: 1199px) { .ipx-row-body { --per-view: 3; } }
@media (min-width: 1680px) { .ipx-row-body > .left-arrow { left: -4rem; } .ipx-row-body > .right-arrow { right: -4rem; } .ipx-row-body > .arrow { box-shadow: none; background-color: rgba(255, 255, 255, .14); } .ipx-row-body > .arrow:hover { background-color: rgba(255, 255, 255, .28); } }
.ipx-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 16px) / 4); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding-bottom: 4px; }
.ipx-track::-webkit-scrollbar { display: none; }
.ipx-track > a { scroll-snap-align: start; display: block; }
@media (max-width: 1199px) { .ipx-track { grid-auto-columns: calc((100% - 2 * 16px) / 3); } }
@media (max-width: 767px) { .ipx-track { grid-auto-columns: 72%; } }

.ipx-card .ipx-img { aspect-ratio: 4 / 3; }
.ipx-card h3 { margin: 12px 0 6px; font-size: 18px; line-height: 1.3; font-weight: 700; color: var(--ipx-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color .2s; }
.ipx-card:hover h3 { color: #fff; text-decoration: underline; text-decoration-color: var(--ipx-red); text-underline-offset: 4px; }

/* ---------- grid ---------- */
.ipx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px 18px; }
.ipx-pager { display: flex; justify-content: center; gap: 12px; margin-top: 40px; }
.ipx-pager a { padding: 12px 22px; border-radius: 999px; border: 1px solid var(--ipx-line); font-weight: 700; }
.ipx-pager a:hover { background: #fff; color: #111; }
.ipx-empty { padding: 90px 16px; text-align: center; color: var(--ipx-muted); font-size: 18px; }
.ipx-empty strong { display: block; color: #fff; font-size: 24px; margin-bottom: 6px; }

/* reveal on scroll (only when JS runs; respects reduced motion) */
.ipx-js .ipx-reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.ipx-js .ipx-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .ipx-js .ipx-reveal { opacity: 1; transform: none; transition: none; }
    .ipx-img img, .ipx-track { transition: none; scroll-behavior: auto; }
}

/* =================== photo story page =================== */
.ipx-story-hero { position: relative; min-height: min(82vh, 820px); display: flex; align-items: flex-end; isolation: isolate; }
.ipx-story-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.ipx-story-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(12, 13, 16, .25) 0%, rgba(12, 13, 16, 0) 30%, rgba(12, 13, 16, .7) 72%, var(--ipx-bg) 100%); }
.ipx-story-hero .ipx-inner { width: 100%; padding-bottom: 36px; }
.ipx-story-hero h1 { margin: 14px 0 16px; max-width: 1050px; font-size: clamp(32px, 5vw, 68px); line-height: 1.02; font-weight: 800; letter-spacing: -.02em; color: #fff; text-wrap: balance; }
.ipx-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; color: rgba(255, 255, 255, .78); font-size: 15px; font-weight: 600; }
.ipx-meta a:hover { color: #fff; text-decoration: underline; }
.ipx-meta .ipx-dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .6; }
.ipx-hero-zoom { white-space: nowrap; position: absolute; right: 24px; bottom: 36px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; border: 0; background: rgba(0, 0, 0, .5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; font: 700 14px "Barlow", sans-serif; cursor: pointer; }
.ipx-hero-zoom:hover { background: rgba(0, 0, 0, .75); }
@media (max-width: 767px) { .ipx-hero-zoom { position: static; margin-top: 16px; } }

.ipx-lead { max-width: 760px; margin: 30px auto 0; font-size: clamp(19px, 1.8vw, 23px); line-height: 1.55; color: #e5e7eb; font-weight: 500; }
.ipx-bar { max-width: 760px; margin: 22px auto 0; display: flex; flex-wrap: wrap; gap: 10px; padding-bottom: 22px; border-bottom: 1px solid var(--ipx-line); }
.ipx-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--ipx-line); background: transparent; color: #fff; font: 700 14px "Barlow", sans-serif; cursor: pointer; transition: background .2s; }
.ipx-btn:hover { background: rgba(255, 255, 255, .1); }
.ipx-btn svg { width: 17px; height: 17px; }
.ipx-btn.is-done { border-color: #22c55e; color: #86efac; }

.ipx-body { margin-top: 34px; font-size: 19px; line-height: 1.75; color: #d6d9df; }
.ipx-body > *:not(figure) { max-width: 760px; margin-left: auto; margin-right: auto; padding: 0 24px; box-sizing: content-box; }
.ipx-body p { margin-top: 0; margin-bottom: 1.1em; }
.ipx-body h2 { color: #fff; font-size: 28px; line-height: 1.25; margin: 1.4em auto .5em; }
.ipx-body blockquote { border-left: 3px solid var(--ipx-red); padding-left: 20px !important; font-style: italic; color: #fff; font-size: 22px; }
.ipx-body a { color: #fff; text-decoration: underline; text-decoration-color: var(--ipx-red); text-underline-offset: 3px; }
.ipx-body figure, .ipx-body > p > img:only-child { display: block; margin: 44px auto; max-width: 1180px; padding: 0 24px; }
.ipx-body figure img, .ipx-body img { display: block; width: 100%; height: auto; max-height: 86vh; object-fit: contain; border-radius: 12px; background: #000; cursor: zoom-in; }
.ipx-body figcaption { max-width: 760px; margin: 14px auto 0; display: flex; gap: 12px; font-size: 15px; line-height: 1.5; color: var(--ipx-muted); }
.ipx-body figcaption .ipx-n { flex: none; color: #fff; font-weight: 800; font-variant-numeric: tabular-nums; }
.ipx-body .pt-credit { color: #6b7280; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; margin-left: 6px; white-space: nowrap; }
@media (max-width: 767px) { .ipx-body figure { padding: 0; } .ipx-body figure img { border-radius: 0; } .ipx-body figcaption { padding: 0 16px; } }

.ipx-tags { max-width: 760px; margin: 40px auto 0; padding: 22px 24px 0; border-top: 1px solid var(--ipx-line); display: flex; flex-wrap: wrap; gap: 8px; box-sizing: content-box; }
.ipx-tags a { padding: 6px 14px; border-radius: 999px; background: var(--ipx-surface); color: var(--ipx-muted); font-weight: 600; font-size: 14px; }
.ipx-tags a:hover { color: #fff; background: #23262e; }

/* ---------- lightbox ---------- */
.ipx-lb { position: fixed; inset: 0; z-index: 10000; background: rgba(5, 6, 8, .97); display: none; flex-direction: column; color: #fff; font-family: "Barlow", sans-serif; }
.ipx-lb.is-open { display: flex; animation: ipx-fade .25s ease; }
@keyframes ipx-fade { from { opacity: 0; } }
.ipx-lb-top { display: flex; align-items: center; gap: 12px; padding: 14px 18px; }
.ipx-lb-count { font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.ipx-lb-title { color: var(--ipx-muted, #a3a8b3); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.ipx-lb-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .08); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; transition: background .2s; }
.ipx-lb-btn:hover { background: rgba(255, 255, 255, .2); }
.ipx-lb-btn svg { width: 20px; height: 20px; }
.ipx-lb-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 76px; touch-action: pan-y; }
.ipx-lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; transition: opacity .25s, transform .25s; }
.ipx-lb-stage img.is-loading { opacity: .25; }
.ipx-lb-prev, .ipx-lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.ipx-lb-prev { left: 16px; }
.ipx-lb-next { right: 16px; }
@media (max-width: 767px) { .ipx-lb-stage { padding: 0; } .ipx-lb-prev, .ipx-lb-next { display: none; } }
.ipx-lb-cap { max-width: 900px; margin: 0 auto; padding: 14px 20px 6px; text-align: center; color: #d1d5db; font-size: 15px; line-height: 1.5; min-height: 30px; }
.ipx-lb-cap .pt-credit { color: #6b7280; font-size: 12.5px; text-transform: uppercase; margin-left: 6px; }
.ipx-lb-thumbs { display: flex; gap: 8px; padding: 10px 18px 18px; overflow-x: auto; justify-content: safe center; scrollbar-width: thin; }
.ipx-lb-thumbs button { flex: none; width: 72px; height: 52px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; padding: 0; background: #111; cursor: pointer; opacity: .5; transition: opacity .2s, border-color .2s; }
.ipx-lb-thumbs button.is-on { opacity: 1; border-color: #fff; }
.ipx-lb-thumbs button:hover { opacity: .9; }
.ipx-lb-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ipx-lb-grid { position: absolute; inset: 72px 0 0; overflow-y: auto; padding: 8px 18px 40px; display: none; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; align-content: start; background: rgba(5, 6, 8, .98); }
.ipx-lb.is-grid .ipx-lb-grid { display: grid; }
.ipx-lb-grid button { aspect-ratio: 4 / 3; border: 0; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer; background: #111; position: relative; }
.ipx-lb-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.ipx-lb-grid button:hover img { transform: scale(1.05); }
.ipx-lb-grid span { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .6); font-size: 12px; font-weight: 700; }
body.ipx-lock { overflow: hidden; }
