/* 
  arsomnis styles - migrated from Drupal 7
  Mobile-first responsive design
*/

/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Cardo', Georgia, serif;
  font-size: 18px;
  line-height: 1.6;
  color: #333;
  background: #eee;
  padding: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

header { margin-bottom: 2rem; border-bottom: 1px solid #ddd; padding-bottom: 1rem; position: relative; }

nav { display: flex; flex-direction: column; gap: 0.75rem; align-items: flex-start; width: 100%; }
nav a { color: #555; text-decoration: none; }
nav a:hover { color: #000; text-decoration: underline; }

/* Mobile-first: nav-left takes full width, logo first then nav items */
.nav-left { display: flex; flex-direction: column; gap: 0.75rem; width: 100%; }

/* Logo: 48px on mobile, 64px on desktop */
.site-title { font-size: 1.2rem; font-weight: 700; letter-spacing: 0.05em; }
.site-title a { color: #222; text-decoration: none; display: flex; align-items: center; }
.site-logo { height: 48px; width: auto; display: block; }

/* Nav items: horizontal scroll on mobile, flex-wrap on larger */
.nav-items { display: flex; gap: 0.5rem 1rem; flex-wrap: wrap; }
.nav-items a { white-space: nowrap; }

/* Language switcher: absolute top-right on mobile, inline on desktop */
.nav-right { 
    position: absolute; 
    top: 0.75rem; 
    right: 1.5rem; 
    display: flex; 
    gap: 0.5rem; 
    font-size: 0.85rem; 
    z-index: 10; 
}
.nav-right a { color: #8b0000; }
.nav-right .current { color: #555; font-weight: 700; }

/* Desktop: inline layout */
@media (min-width: 768px) {
    nav { flex-direction: row; align-items: flex-end; }
    .nav-left { flex-direction: row; align-items: flex-end; width: auto; gap: 0; }
    .site-logo { height: 64px; }
    .nav-items { flex-wrap: nowrap; margin-left: 1.5rem; }
    .nav-right { position: static; margin-left: auto; flex-direction: row; align-items: flex-end; }
}

.site-title a { color: #222; text-decoration: none; }
main { min-height: 60vh; }
h1 { font-size: 1.8rem; margin-bottom: 1rem; font-weight: 400; }
h2 { font-size: 1.4rem; margin: 1.5rem 0 0.5rem; font-weight: 400; }
p { margin-bottom: 1rem; }
img { max-width: 100%; height: auto; }
.content img { display: block; margin: 1rem 0; border: 1px solid #eee; }
.content a { color: #8b0000; text-decoration: underline; }
.category-link { display: inline-block; color: #888; font-size: 0.9rem; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.1em; text-decoration: none; }
.category-link:hover { color: #333; }
.back-link { display: inline-block; margin-top: 2rem; color: #555; }
.article-grid { columns: 1; column-gap: 1.5rem; }
@media (min-width: 540px) { .article-grid { columns: 2; } }
@media (min-width: 820px) { .article-grid { columns: 3; column-gap: 1.5rem; } }
@media (min-width: 1080px) { .article-grid { columns: 4; column-gap: 1.5rem; } }
.article-grid > * { break-inside: avoid; margin-bottom: 1.5rem; display: inline-block; width: 100%; }
.article-card { border: 1px solid #eee; padding: 0; background: #fff; overflow: hidden; }
.article-card:hover { border-color: #ccc; }
.article-card { text-decoration: none; color: inherit; display: block; }
.card-img-wrap { width: 100%; overflow: hidden; line-height: 0; }
.card-img-wrap img { width: 100%; height: auto; display: block; }
.card-body { padding: 1rem; }
.article-card h2 { font-size: 1.2rem; margin: 0.25rem 0; }
.article-card h2 a { color: #222; text-decoration: none; }
.article-card h2 a:hover { text-decoration: underline; }
.article-card p { color: #666; font-size: 0.95rem; }
.summary { color: #555; font-size: 1.1rem; line-height: 1.5; margin: 0.5rem 0 1.5rem; font-style: italic; }
.missing-image { display: flex; align-items: center; justify-content: center; background: #eee; border: 2px dashed #ccc; padding: 2rem; margin: 1rem 0; color: #999; text-align: center; min-height: 120px; }
footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid #ddd; font-size: 0.85rem; color: #999; }
footer a { color: #8b0000; }
.language-switcher { margin: 1.5rem 0; font-size: 0.9rem; padding: 0.5rem 0; border-top: 1px solid #eee; border-bottom: 1px solid #eee; }
.language-switcher .current { font-weight: 700; }
.language-switcher a { color: #8b0000; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.gallery-item { border: 1px solid #eee; padding: 0.5rem; background: #fff; }
.book-nav { margin: 1.5rem 0; padding: 1rem; background: #f5f5f0; border-left: 3px solid #8b0000; }
.book-nav h3 { font-size: 1rem; margin-bottom: 0.5rem; color: #555; }
.book-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.book-nav li a { color: #8b0000; font-size: 0.9rem; }