/* RNews.cz static archive — palette lifted from the original WordPress
   "Publication" theme (accent #ef7d0b, darks #222/#333/#444). */

:root {
  --accent: #ef7d0b;
  --dark: #222;
  --dark2: #333;
  --dark3: #444;
  --border: #ddd;
  --bg-light: #eee;
  --text: #333;
  --max-width: 1140px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #fff;
  color: var(--text);
  font-family: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

a { color: var(--dark); text-decoration: none; box-shadow: inset 0 -1px 0 currentColor; }
a:hover, a:focus { color: var(--accent); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { font-family: "Oswald", "Lato", sans-serif; font-weight: 700; line-height: 1.25; color: var(--dark); }

.body-wrapper { width: 100%; }

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--bg-light);
}
.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 24px;
}
.site-logo-link { box-shadow: none; display: inline-block; max-height: 108px; max-width: 324px; vertical-align: middle; }
.site-logo { display: block; height: auto; max-height: 108px; max-width: 100%; width: auto; }
.site-description {
  margin: 4px 0 0;
  color: #777;
  font-size: 14px;
}

.main-navigation {
  background: var(--dark);
}
.main-navigation ul {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
}
.main-navigation li { margin: 0; }
.main-navigation a {
  display: block;
  padding: 12px 16px;
  color: #fff;
  font-family: "Oswald", sans-serif;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: none;
}
.main-navigation a:hover, .main-navigation a:focus {
  background: var(--accent);
  color: #fff;
}

/* Layout */
.main-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  gap: 40px;
  align-items: flex-start;
}
.content-area {
  flex: 1 1 auto;
  min-width: 0;
}

/* Sidebar — dark, matching the original theme's .widget-area */
.widget-area {
  flex: 0 0 300px;
  background: var(--dark);
  color: #fff;
  padding: 24px;
  border-radius: 4px;
}
.widget {
  margin-bottom: 32px;
}
.widget:last-child { margin-bottom: 0; }
.widget-title {
  font-family: "Oswald", sans-serif;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  border-bottom: 1px solid rgba(255,255,255,0.15);
  padding-bottom: 8px;
  margin: 0 0 12px;
}
.widget-title a { color: inherit; box-shadow: none; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.widget a { color: #ddd; box-shadow: none; }
.widget a:hover { color: var(--accent); }
.widget .count { color: #888; font-size: 13px; }
.tagcloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-cloud-link {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  font-size: 12px;
  color: #ddd;
  box-shadow: none;
}
.tag-cloud-link:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.widget_facebook_likebox .fb-page { max-width: 100%; }

/* Post list / cards */
.post-list { display: flex; flex-direction: column; gap: 32px; }
.post-card {
  display: flex;
  gap: 20px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.post-thumbnail { flex: 0 0 260px; box-shadow: none; }
.post-thumbnail img { border-radius: 4px; aspect-ratio: 4/3; object-fit: cover; }
.post-card-body { flex: 1 1 auto; min-width: 0; }
.entry-meta { font-size: 13px; color: #888; margin-bottom: 6px; }
.entry-meta a {
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.5px;
  box-shadow: none;
  margin-right: 8px;
}
.entry-title { font-size: 24px; margin: 0 0 8px; }
.entry-title a { box-shadow: none; }
.entry-summary { color: #555; }
.post-date { white-space: nowrap; }

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.pagination a { color: var(--accent); font-weight: 700; box-shadow: none; }

/* Single post */
.single-post .hero {
  margin: 0 0 32px;
  border-radius: 4px;
  overflow: hidden;
}
.single-post .post-thumbnail.hero img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 4px;
}
.entry-header { margin-bottom: 24px; }
.single-post .entry-title { font-size: 36px; margin: 4px 0 12px; }
.single-post .entry-meta a { margin-right: 10px; }

.entry-content { font-size: 18px; }
.entry-content > * + * { margin-top: 1.2em; }
.entry-content h2, .entry-content h3 { margin-top: 1.6em; }
.entry-content img { border-radius: 4px; margin: 0 auto; }
.entry-content blockquote {
  margin: 0;
  padding-left: 20px;
  border-left: 4px solid var(--accent);
  color: #555;
  font-style: italic;
}
.entry-content iframe { max-width: 100%; }

/* Tables -- WP articles embed plain <table> spec sheets with no classes */
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}
.entry-content th, .entry-content td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}
.entry-content th { background: var(--bg-light); font-weight: 700; }
.entry-content tr:nth-child(even) td { background: #fafafa; }

/* Jetpack tiled galleries: the scraped markup carries inline pixel
   width/height calculated for the original theme's fixed 672px column
   (e.g. style="width:197px;height:103px"). Left as-is, those absolute
   dimensions don't reflow for our layout -- wrapper divs stack as blocks
   while keeping a fixed inline height, so overflowing thumbnails spill
   into the next paragraph. Override to a responsive wrapping flex grid
   instead, ignoring the original packed-masonry pixel math entirely. */
.entry-content .tiled-gallery,
.entry-content .gallery-row,
.entry-content .gallery-group {
  display: flex !important;
  flex-wrap: wrap;
  width: auto !important;
  height: auto !important;
  gap: 4px;
}
.entry-content .tiled-gallery-item {
  width: auto !important;
  height: auto !important;
}
.entry-content .tiled-gallery-item img {
  width: auto !important;
  height: 160px !important;
  max-width: 100% !important;
  max-height: none;
  border-radius: 4px;
}
.entry-content .tiled-gallery-caption { display: none; }

.tags-links { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 6px; }
.tags-links .tag-cloud-link { color: #555; border-color: var(--border); }
.tags-links .tag-cloud-link:hover { color: #fff; }

/* Archived comments */
.comments-area {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid var(--dark);
}
.comments-title { font-size: 22px; }
.comments-closed-notice {
  background: var(--bg-light);
  border-left: 4px solid var(--accent);
  padding: 10px 16px;
  font-size: 14px;
  color: #555;
}
.comment-list, .children { list-style: none; margin: 0; padding: 0; }
.children { padding-left: 32px; }
.comment-body {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.comment-author { display: flex; align-items: center; gap: 10px; }
.comment-author .avatar { border-radius: 50%; background: var(--bg-light); }
.comment-author .fn { font-weight: 700; color: var(--dark); font-style: normal; }
.comment-metadata { font-size: 12px; color: #999; margin-bottom: 8px; }
.comment-metadata a { color: inherit; box-shadow: none; }
.comment-content p { margin: 0.4em 0; }

/* Archive / taxonomy pages */
.archive-header { margin-bottom: 24px; }
.page-title { font-size: 28px; border-bottom: 2px solid var(--accent); padding-bottom: 8px; display: inline-block; }
.taxonomy-term-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.taxonomy-term-list a {
  display: inline-block;
  padding: 8px 16px;
  background: var(--bg-light);
  border-radius: 4px;
  box-shadow: none;
}
.taxonomy-term-list a:hover { background: var(--accent); color: #fff; }

/* Footer */
.site-footer {
  background: var(--dark);
  color: #aaa;
  text-align: center;
  padding: 24px;
  margin-top: 40px;
  font-size: 14px;
}
.site-footer a { color: #ddd; box-shadow: none; }
.site-footer a:hover { color: var(--accent); }

/* Responsive */
@media (max-width: 820px) {
  .main-content { flex-direction: column; }
  .widget-area { flex: 1 1 auto; width: 100%; }
  .post-card { flex-direction: column; }
  .post-thumbnail { flex: none; }
}

/* Lightbox -- opens in-page instead of navigating to a (dead) WP attachment page */
a.lightbox-link { box-shadow: none; cursor: zoom-in; }
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(17, 17, 17, 0.92);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 40px;
  cursor: zoom-out;
}
.lightbox-overlay.active { display: flex; }
.lightbox-overlay img {
  max-width: 90vw;
  max-height: 85vh;
  width: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  cursor: default;
}
.lightbox-caption {
  color: #ddd;
  margin-top: 12px;
  font-size: 14px;
  text-align: center;
  max-width: 80vw;
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
  padding: 8px;
}
.lightbox-close:hover { color: var(--accent); }
body.lightbox-open { overflow: hidden; }
