/* pages.css – additions for the inner pages (buecher, profil, digitalia).
   Load after style.css. Uses only neutral colours so it works in light and dark mode. */

main img { max-width: 100%; height: auto; }
a { overflow-wrap: anywhere; }

/* ---- Book entries with cover images ---- */
.entry { display: flow-root; padding-bottom: 1.5rem; margin-bottom: 1.5rem;
         border-bottom: 1px solid rgba(128,128,128,.35); }
.entry:last-child { border-bottom: 0; margin-bottom: 0; }
.entry .subtitle { margin: -.25rem 0 .75rem; font-weight: 400; font-style: italic; opacity: .85; }

.float-figure { float: left; width: 155px; max-width: 40%; margin: .25rem 1.25rem .75rem 0; }
.float-figure img { display: block; width: 100%; height: auto; border-radius: 4px;
                    box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.float-figure figcaption { margin-top: .5rem; font-size: .8rem; line-height: 1.35; opacity: .85; }
@media (max-width: 30rem) {
  .float-figure { float: none; max-width: 155px; margin: 0 auto 1rem; }
}

/* ---- Long sidebars must not stick, or the lower part becomes unreachable ---- */
.sidebar-long { position: static !important; max-height: none !important; overflow: visible !important; }
.sidebar section + section { margin-top: 1.75rem; }

/* ---- Book list ---- */
.booklist { list-style: none; margin: 1rem 0 0; padding: 0; }
.booklist li { padding: .75rem 0; border-top: 1px solid rgba(128,128,128,.35); }
.booklist p { margin: 0; }
.booklist .btitle { font-weight: 700; font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif; }
.booklist .bookinfo { margin-top: .2rem; font-size: .85rem; opacity: .8; }
.booklist .isbn { white-space: nowrap; font-variant-numeric: tabular-nums; }
.booklist .descr { margin-top: .4rem; font-size: .9rem; }

/* ---- Profile ---- */
.profile { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 40rem) { .profile { grid-template-columns: minmax(150px, 260px) 1fr; } }
.profile img { display: block; width: 100%; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.3); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; margin: 0 0 1.25rem; }
.facts dt { opacity: .7; }
.facts dd { margin: 0; font-weight: 700; }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { margin: .35rem 0; }
.likes, .dislikes { list-style: none; margin: 0; padding: 0; }
.likes li, .dislikes li { padding: .2rem 0 .2rem 1.6rem; position: relative; }
.likes li::before, .dislikes li::before { position: absolute; left: 0; font-weight: 700; }
.likes li::before { content: "\2713"; color: #2e8b57; }
.dislikes li::before { content: "\2715"; color: #c0392b; }

/* ---- Long-form text (digitalia) ---- */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 0; }
.rank-list { columns: 2; column-gap: 2rem; max-width: 26rem; padding-left: 1.75rem; }
.rank-list li { margin: .15rem 0; break-inside: avoid; }

/* ================= Additions for foto, musik and the reading lists ================= */

.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
                   overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Sidebar images keep their own proportions on these pages */
.sidebar figure img { aspect-ratio: auto; object-fit: fill; }

/* Parent section highlighted in the main navigation (sub pages) */
#nav a[aria-current="true"] { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }

/* ---- Breadcrumbs and cross links ---- */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem .5rem; margin: 0 0 1.25rem; padding: 0; font-size: .9rem; }
.crumbs li + li::before { content: "\203A"; margin-right: .5rem; opacity: .6; }
.crumbs [aria-current="page"] { font-weight: 600; }
.see-also { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid rgba(128,128,128,.35); }

/* ---- Reading lists (Kriegsliteratur, postmoderne Romane) ---- */
.era + .era { margin-top: 1.5rem; }
.era h3 { padding-bottom: .3rem; border-bottom: 2px solid var(--accent); }
.era h4 { margin: 1.1rem 0 .3rem; font-size: 1rem; font-family: var(--font-body); font-style: italic; }
.readlist { list-style: none; margin: 0 0 .5rem; padding: 0; }
.readlist li { padding: .3rem 0 .3rem 1.25rem; text-indent: -1.25rem; margin-left: 0; }
.readlist li > * { text-indent: 0; }
.readlist cite { font-style: italic; }
.readlist .year, .readlist .meta { white-space: nowrap; opacity: .75; font-size: .92em; }
.readlist .empty { opacity: .6; }
.readlist.books li { border-top: 1px solid rgba(128,128,128,.25); padding-top: .6rem; padding-bottom: .6rem; }
.readlist .author { font-weight: 600; }

/* ---- Video embeds ---- */
.video { aspect-ratio: 16 / 9; width: 100%; margin: 0 0 1rem; background: #000; border-radius: 8px; overflow: hidden; }
.video iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ---- Photo gallery ---- */
.gallery { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem;
           grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); }
.gallery figure { margin: 0; }
.gallery a { display: block; border-radius: 8px; overflow: hidden; }
.gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .25s; }
.gallery a:hover img { transform: scale(1.04); }
.gallery figcaption { margin-top: .4rem; font-size: .85rem; line-height: 1.35; }
.gallery figcaption strong, .gallery figcaption span { display: block; }
.gallery figcaption span { opacity: .8; }
@media (prefers-reduced-motion: reduce) { .gallery img { transition: none; } }

/* ---- Lightbox ---- */
.lightbox { padding: 0; border: 0; border-radius: 12px; background: #111; color: #eee;
            max-width: min(96vw, 60rem); max-height: 96vh; overflow: hidden; }
.lightbox::backdrop { background: rgba(0,0,0,.8); }
.lightbox figure { margin: 0; }
.lightbox img { display: block; max-width: 100%; max-height: 75vh; width: auto; height: auto; margin: 0 auto; }
.lightbox figcaption { padding: .75rem 3.5rem; text-align: center; font-size: .95rem; }
.lightbox figcaption strong, .lightbox figcaption span { display: block; }
.lb-btn { position: absolute; width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%;
          background: rgba(0,0,0,.6); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.lb-btn:hover { background: rgba(0,0,0,.85); }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); }
.lb-prev { left: .5rem; }
.lb-next { right: .5rem; }
.lb-close { top: .5rem; right: .5rem; }

/* ---- Instagram embed (falls back to the plain quote if the script is blocked) ---- */
.instagram-media { margin: 0 !important; padding: 1rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.instagram-media p { margin: 0 0 .75rem; }

/* ================= Additions for single articles (antiquarisch, archiv, besprechungen) ================= */

/* Article pages without a sidebar: one column */
.layout.layout-single { grid-template-columns: minmax(0, 1fr); }

.subtitle { margin: -.25rem 0 .75rem; font-style: italic; opacity: .85; }
.imprint { margin-bottom: 1.25rem; }

/* Photo of a single book (cover, title page ...) */
.book-photo { margin: 1.25rem 0 0; max-width: 32rem; }
.book-photo img { display: block; width: 100%; height: auto; border-radius: 4px;
                  box-shadow: 0 2px 10px rgba(0,0,0,.3); }
.book-photo figcaption { margin-top: .5rem; font-size: .85rem; opacity: .8; }

/* ================= Overview of articles (antiquarisch) ================= */
.tiles { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 1rem;
         grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); }
.tiles li { margin: 0; }
.tiles a { display: flex; flex-direction: column; align-items: center; gap: .35rem; height: 100%;
           padding: 1rem; text-align: center; text-decoration: none; color: inherit;
           border: 1px solid rgba(128,128,128,.35); border-radius: 8px; }
.tiles a:hover, .tiles a:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.tiles img { display: block; height: 120px; width: auto; max-width: 100%; margin-bottom: .4rem;
             border-radius: 3px; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.tile-title { font-weight: 700; line-height: 1.3; }
.tile-sub, .tile-year { font-size: .85rem; opacity: .8; }

/* ================= Archive articles (Derrida, Istanbul ...) ================= */
.prose .lead { font-weight: 700; }
.prose .subtitle { margin-top: -.25rem; }

blockquote.zitat { margin: 1.25rem 0; padding: .1rem 0 .1rem 1rem; border-left: 4px solid var(--accent); }
blockquote.zitat p { margin: .5rem 0; }
blockquote.zitat .source, .sidebar .source { font-size: .85rem; opacity: .8; }
blockquote.zitat .source a { word-break: break-all; }
.sidebar blockquote.zitat { margin: 1rem 0; }
.sidebar figure { margin: .75rem 0; }

/* Overview tiles without a thumbnail (archiv) */
.tiles-text a { justify-content: center; min-height: 6.5rem; }

/* ================= Book reviews (besprechungen) ================= */
.review h2 { margin-bottom: .75rem; }
.review h3 { margin: 1.75rem 0 .5rem; }
.review h3::before { content: "\25CA\00a0"; color: var(--accent); }   /* the lozenge from the old headings */
.review .imprint { clear: both; margin-top: 1.75rem; padding-top: 1rem; border-top: 1px solid rgba(128,128,128,.35); }
.prose .float-cover { float: left; width: 90px; height: auto; margin: .25rem 1rem .25rem 0; border-radius: 3px;
                      box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.sidebar blockquote.zitat p { font-size: .95rem; }
.sidebar .source { margin: .75rem 0 0; }

/* ================= Overview of reviews (besprechungen) ================= */
.previews { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 1rem; }
.previews li { padding: 1rem 1.25rem; border: 1px solid rgba(128,128,128,.35); border-radius: 8px; }
.previews li:hover, .previews li:focus-within { border-color: var(--accent); background: var(--accent-soft); }
.previews h3 { margin: 0 0 .15rem; font-size: 1.15rem; line-height: 1.3; }
.previews h3 a { text-decoration: none; }
.previews h3 a:hover, .previews h3 a:focus-visible { text-decoration: underline; }
.previews .by { font-weight: 400; font-size: .85em; opacity: .8; }
.previews .year { margin: 0; font-size: .85rem; opacity: .7; }
.previews .preview-text { margin: .6rem 0 0; font-size: .95rem; line-height: 1.5; max-width: 70ch; }

/* ================= Sidebars of the reviews ================= */
.sidebar-long { position: static; max-height: none; overflow: visible; }
.sidebar figure img { display: block; max-width: 100%; height: auto; border-radius: 4px;
                      box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.sidebar figcaption { margin-top: .5rem; font-size: .85rem; opacity: .85; }
.sidebar hr { margin: 1rem 0; border: 0; border-top: 1px solid rgba(128,128,128,.35); }
.sidebar h4 { margin: 1rem 0 .4rem; font-size: 1rem; line-height: 1.3; }
.linklist { margin: 0; font-size: .9rem; }
.linklist dt { margin-top: .9rem; font-weight: 700; }
.linklist dd { margin: .25rem 0 0; }
.linklist ul { margin: 0; padding-left: 1.1rem; }
.linklist li { margin: .2rem 0; overflow-wrap: anywhere; }
.sidebar .disclaimer { margin-top: 1rem; font-size: .85rem; opacity: .85; }
