/* Soviet Photo Archive — magazine section styles. Builds on modern.css tokens. */

.mag-hero { display:flex; justify-content:space-between; gap:24px; align-items:flex-start; flex-wrap:wrap; }
.mag-hero h1 { margin:.2em 0; }

.mag-searchbar { padding-top:16px; padding-bottom:16px; }
.mag-search-form { display:flex; gap:10px; }
.mag-search-form input[type="text"] { flex:1 1 auto; }

/* Issue grid (archive landing) */
.mag-year { }
.mag-issue-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:18px; margin-top:12px; }
.mag-issue-card { display:flex; flex-direction:column; text-decoration:none; color:inherit; }
.mag-cover { display:block; aspect-ratio:2/3; overflow:hidden; border-radius:8px; background:rgba(128,128,128,.14); box-shadow:0 2px 10px rgba(0,0,0,.25); }
.mag-cover img { width:100%; height:100%; object-fit:contain; display:block; transition:transform .25s ease; }
.mag-issue-card:hover .mag-cover img { transform:scale(1.04); }
.mag-cover-empty { display:flex; align-items:center; justify-content:center; width:100%; height:100%; font-size:.8rem; opacity:.6; }
.mag-issue-meta { display:flex; justify-content:space-between; align-items:baseline; gap:8px; margin-top:8px; }
.mag-issue-meta em { font-style:normal; opacity:.7; font-size:.85rem; }

/* Issue page header */
.mag-issue-headrow { display:flex; gap:24px; align-items:flex-start; flex-wrap:wrap; }
.mag-issue-cover { flex:0 0 auto; }
.mag-issue-cover img { width:220px; max-width:40vw; border-radius:8px; box-shadow:0 3px 14px rgba(0,0,0,.3); display:block; }
.mag-issue-summary { margin-top:10px; max-width:60ch; }

/* Article tiles on the issue page */
.mag-article-tiles { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:14px; margin-top:12px; }
.mag-article-tile { display:flex; flex-direction:column; text-decoration:none; color:inherit; background:rgba(128,128,128,.06); border:1px solid rgba(128,128,128,.16); border-radius:10px; overflow:hidden; transition:transform .15s ease, box-shadow .15s ease; }
.mag-article-tile:hover { transform:translateY(-2px); box-shadow:0 6px 18px rgba(0,0,0,.28); }
.mag-tile-thumb { display:block; aspect-ratio:4/3; overflow:hidden; background:rgba(128,128,128,.14); }
.mag-tile-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.mag-tile-thumb-empty { display:flex; align-items:center; justify-content:center; }
.mag-tile-thumb-empty span { font-size:.68rem; letter-spacing:.08em; text-transform:uppercase; opacity:.5; }
.mag-tile-body { display:flex; flex-direction:column; gap:3px; padding:10px 12px; }
.mag-tile-body strong { font-size:.9rem; line-height:1.3; font-weight:600; }
.mag-tile-body em { font-style:normal; font-size:.76rem; opacity:.62; }
.mag-article-tile.is-textonly { background:rgba(128,128,128,.05); }
.mag-article-tile.is-textonly .mag-tile-body { gap:5px; padding:13px 14px; }
.mag-tile-excerpt { font-size:.8rem; line-height:1.5; opacity:.78; margin-top:2px; }
.mag-tile-more { color:var(--red,#c0392b); font-weight:600; white-space:nowrap; }
.mag-article-tile.is-textonly:hover .mag-tile-more { text-decoration:underline; }

/* Article page with right-hand ad rail */
.mag-article-layout { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:28px; align-items:start; max-width:1080px; margin-inline:auto; }
.mag-article-layout .mag-article { margin-inline:0; }
.mag-article-rail { position:sticky; top:16px; }
.mag-ad-label { display:block; font-size:.62rem; letter-spacing:.1em; text-transform:uppercase; opacity:.45; margin-bottom:4px; text-align:center; }
.mag-article-rail ins { background:rgba(128,128,128,.08); border-radius:6px; }
@media (max-width:1040px) { .mag-article-layout { grid-template-columns:1fr; } .mag-article-rail { display:none; } }

/* Article page */
.mag-article { max-width:700px; margin-inline:auto; }
.mag-article h1 { font-size:1.5rem; }
.mag-article-body { font-size:.95rem; line-height:1.62; }
.mag-article-body p { margin:0 0 1em; }
.mag-article-body h2 { font-size:1.15rem; margin:1.4em 0 .5em; }
.mag-article-body h3 { font-size:1rem; margin:1.3em 0 .4em; }
.mag-issue-head h1 { font-size:1.5rem; }
.mag-standfirst { font-size:1rem; font-style:italic; opacity:.8; }
.mag-article-body figure { margin:1.4em 0; }
.mag-article-body img { border-radius:6px; }
.mag-article-body blockquote { border-left:3px solid var(--red, #c0392b); margin:1.2em 0; padding:.3em 0 .3em 1em; opacity:.92; }
.mag-table { border-collapse:collapse; margin:1.2em 0; font-size:.9rem; display:block; overflow-x:auto; }
.mag-table th, .mag-table td { border:1px solid rgba(128,128,128,.3); padding:4px 10px; text-align:center; }
.mag-table th { font-weight:600; opacity:.85; }
.mag-table td:first-child, .mag-table th:first-child { text-align:left; }
.mag-table-scroll { overflow-x:auto; margin:1.2em 0; }
.mag-table-scroll .mag-table { margin:0; display:table; width:100%; }
.mag-table-compact { font-size:.8rem; white-space:nowrap; }
.mag-table-compact th, .mag-table-compact td { padding:3px 7px; }
.mag-document { border:1px solid rgba(128,128,128,.4); border-left:3px solid var(--red, #c0392b); padding:.6em 1.1em; margin:1.4em 0; background:rgba(128,128,128,.05); font-size:.95rem; }

/* Photo galleries */
.mag-gallery { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:18px; margin-top:12px; }
.mag-article-gallery { margin:18px 0 22px; }
.mag-gallery-item { margin:0; }
.mag-gallery-item img { width:100%; border-radius:8px; display:block; box-shadow:0 2px 10px rgba(0,0,0,.22); }
.mag-gallery-item figcaption { font-size:.9rem; opacity:.85; margin-top:6px; line-height:1.45; }
.mag-credit { opacity:.65; font-style:italic; }

/* Search */
.mag-search-hit { padding:14px 0; border-bottom:1px solid rgba(128,128,128,.22); }
.mag-search-hit:last-child { border-bottom:0; }
.mag-search-hit h2 { margin:0 0 .2em; font-size:1.15rem; }
.mag-snippet { margin:.4em 0 0; opacity:.9; }
.mag-snippet mark, .mag-article-body mark { background:rgba(240,200,80,.5); color:inherit; padding:0 .1em; border-radius:3px; }

/* On-page lightbox */
body.mag-lb-open { overflow:hidden; }
.mag-lightbox { position:fixed; inset:0; z-index:2147483000; background:rgba(0,0,0,.92); display:flex; align-items:center; justify-content:center; padding:24px; }
.mag-lightbox[hidden] { display:none; }
.mag-lb-fig { margin:0; max-width:95vw; max-height:92vh; display:flex; flex-direction:column; align-items:center; }
.mag-lb-fig img { max-width:95vw; max-height:84vh; object-fit:contain; box-shadow:0 6px 40px rgba(0,0,0,.6); background:#111; cursor:default; }
.mag-lb-fig figcaption { color:#eee; font-size:.9rem; line-height:1.45; margin-top:12px; max-width:70ch; text-align:center; }
.mag-lb-fig figcaption .mag-credit { color:#bbb; }
.mag-lb-btn { position:absolute; background:rgba(255,255,255,.12); color:#fff; border:0; cursor:pointer; border-radius:50%; width:48px; height:48px; font-size:1.8rem; line-height:1; display:flex; align-items:center; justify-content:center; transition:background .15s; }
.mag-lb-btn:hover { background:rgba(255,255,255,.28); }
.mag-lb-close { top:18px; right:18px; }
.mag-lb-prev { left:18px; top:50%; transform:translateY(-50%); }
.mag-lb-next { right:18px; top:50%; transform:translateY(-50%); }
.mag-gallery-item a, .mag-issue-cover { cursor:zoom-in; }

@media (max-width:640px) {
  .mag-article-row-thumbs { order:2; }
  .mag-issue-cover img { width:160px; }
}

/* Preview / work-in-progress notice on the archive landing hero (v6) */
.mag-preview-note {
  margin: 14px 0 0; padding: 10px 14px;
  border-left: 4px solid #c0392b;
  background: rgba(192,57,43,.08);
  border-radius: 4px;
  font-size: .95rem; line-height: 1.5;
}
.mag-preview-note strong { color: #c0392b; }
@media (prefers-color-scheme: dark) {
  .mag-preview-note { background: rgba(231,76,60,.12); border-left-color:#e74c3c; }
  .mag-preview-note strong { color:#ff8a7a; }
}
