/* =============================================
   Europe Weekly – Main Stylesheet
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --yellow:      #f5f580;
  --yellow-nav:  rgba(245, 245, 128, 0.92);
  --blue-light:  #c5daea;
  --blue-dark:   #1c3252;
  --tag-bg:      #f5f064;
  --tag-text:    #111;
  --text-dark:   #111;
  --text-light:  #fff;
  --more-link:   #1a6ba8;
  --font:        'Arial', Helvetica, sans-serif;
}

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-dark);
  background: #fff;
}

/* ===== SITE HEADER (home) – full-width background ===== */

.site-header {
  position: relative;
  min-height: 500px;
  /* Replace background.jpg with your own image */
  background: url('background.jpg') center / cover no-repeat #FFE607;
}

.site-nav {
  display: inline-block;
  background: var(--yellow-nav);
  padding: 28px 36px 28px;
  min-width: 240px;
  max-width: 320px;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

/* ===== NAV ===== */

.nav-section { margin-bottom: 18px; }

.nav-heading {
  font-size: 1.05rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

.nav-section ul { list-style: none; padding-left: 20px; }
.nav-section ul li { margin-bottom: 3px; }
.nav-section ul li a {
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.nav-section ul li a:hover { text-decoration: underline; }

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.nav-main-link {
  font-size: 1.05rem;
  font-weight: 900;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-dark);
  letter-spacing: 0.02em;
}
.nav-main-link:hover { text-decoration: underline; }

.nav-cms-link {
  font-size: 0.78rem;
  font-weight: 700;
  opacity: 0.55;
  margin-top: 8px;
}

/* ===== ARTICLE HEADER (detail / category pages) ===== */

.article-header {
  background: #fff;
  padding: 20px 36px 0;
}
.article-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}
.article-nav .nav-main-link { font-size: 1.15rem; }

.header-rule {
  border: none;
  border-top: 1.5px solid #ccc;
  margin: 0 -36px;
}

/* ===== MAIN CONTENT ===== */

main { background: var(--blue-light); }
.article-page main { min-height: calc(100vh - 140px); }

/* ===== ARTICLE PREVIEW (home) ===== */

.article-preview { padding: 28px 36px 32px; }

.content-title {
  font-size: 0.95rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 16px;
}

a#preview-title-link {
  text-decoration: none;
  color: inherit;
}
a#preview-title-link:hover .content-title { text-decoration: underline; }

.article-body {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
}
.article-meta { padding-top: 2px; }

/* ===== ARTICLE DETAIL ===== */

.article-main { padding: 28px 36px 48px; }
.article-main .content-title { font-size: 1rem; margin-bottom: 20px; }

/* ===== TAGS (clickable links) ===== */

.tag {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}
.tag:hover { background: #e8e022; }

/* ===== ARTICLE TEXT ===== */

.article-text p {
  margin-bottom: 18px;
  font-size: 0.88rem;
  line-height: 1.6;
}
.more-link { color: var(--more-link); font-size: 0.88rem; text-decoration: none; }
.more-link:hover { text-decoration: underline; }

/* ===== CHART ===== */

.chart-container { margin: 18px 0 20px; }
.chart-container canvas { display: block; }

/* ===== PODCAST SECTION ===== */

.podcast-preview {
  background: var(--blue-dark);
  color: var(--text-light);
  padding: 24px 36px 32px;
}
.podcast-preview .content-title { color: var(--text-light); margin-bottom: 12px; }
.podcast-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }

/* ===== AUDIO PLAYER ===== */

.audio-player { max-width: 520px; margin: 0 auto; }
.progress-bar-wrap { margin-bottom: 12px; }
.progress-bar {
  position: relative;
  height: 5px;
  background: #4a6080;
  border-radius: 3px;
  cursor: pointer;
  margin-bottom: 6px;
}
.progress-fill {
  height: 100%;
  background: #8ab4cc;
  border-radius: 3px;
  width: 0%;
}
.progress-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #c8daea;
}
.time-display {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #a8c0d4;
  margin-top: 4px;
}
.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-top: 14px;
}
.ctrl-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  color: var(--text-light);
}
.ctrl-btn svg { fill: currentColor; }
.ctrl-btn:hover { opacity: 0.75; }
.play-btn svg { width: 44px; height: 44px; }

/* ===== NAV HEADING LINK ===== */

.nav-heading-link {
  text-decoration: none;
  color: inherit;
}
.nav-heading-link:hover { text-decoration: underline; }

/* ===== LIST PAGES (articles / episodes) ===== */

.list-page-heading {
  font-size: 1.1rem;
  margin-bottom: 24px;
}

/* Episode cards on the episodes list page */
.episode-card {
  background: var(--blue-dark);
  color: var(--text-light);
  border-radius: 4px;
  padding: 20px 24px 24px;
  margin-bottom: 20px;
}
.episode-card-title {
  font-size: 0.9rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 10px;
}
.episode-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

/* ===== CATEGORY PAGE ===== */

.cat-page-heading {
  font-size: 1.1rem;
  margin-bottom: 28px;
}
.cat-section { margin-bottom: 32px; }
.cat-section-label {
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #4a6a8a;
  margin-bottom: 14px;
  border-bottom: 1px solid #aac4d8;
  padding-bottom: 6px;
}
.cat-item {
  background: rgba(255,255,255,0.55);
  border-radius: 4px;
  padding: 14px 18px;
  margin-bottom: 12px;
}
.cat-item--episode { background: rgba(255,255,255,0.35); }
.cat-item-title {
  display: block;
  font-weight: 900;
  font-size: 0.88rem;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-dark);
  margin-bottom: 6px;
}
a.cat-item-title:hover { text-decoration: underline; }
.cat-item-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.cat-item-excerpt { font-size: 0.82rem; color: #333; line-height: 1.5; }
.no-results { font-size: 0.85rem; color: #666; font-style: italic; }

/* ===== KEYWORDS & SOURCES (article detail) ===== */

.article-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
  margin-bottom: 6px;
}

.keyword {
  display: inline-block;
  background: #e8edf2;
  color: #445566;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
}

.article-sources {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid #b8cedc;
}
.sources-heading {
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #4a6a8a;
  margin-bottom: 6px;
}
.sources-text {
  font-size: 0.78rem;
  color: #555;
  line-height: 1.6;
}

/* ===== EPISODE CARD (episodes list page) ===== */

.episode-cover {
  display: block;
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 3px 3px 0 0;
  margin: -20px -24px 16px;
  width: calc(100% + 48px);
}

.episode-card-meta { margin-bottom: 14px; }

.episode-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #8ab4cc;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.episode-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.episode-card .keyword {
  background: rgba(255,255,255,0.12);
  color: #c8daea;
}

.episode-notes {
  font-size: 0.82rem;
  color: #8ab0c8;
  line-height: 1.55;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* ===== ADMIN: cover art + row layout ===== */

.admin-cover-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admin-cover-preview {
  max-width: 160px;
  max-height: 120px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid #d0d3d8;
}
.admin-upload-label {
  align-self: flex-start;
  background: #6c757d;
  cursor: pointer;
}
.admin-upload-label:hover { opacity: 0.85; }

.admin-btn--secondary {
  background: #6c757d;
  color: #fff;
}

.admin-field--row {
  flex-direction: row;
  gap: 20px;
}
.admin-field--row > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ===== FOOTER ===== */

.site-footer {
  background: var(--blue-dark);
  color: var(--text-light);
  text-align: center;
  padding: 18px 18px 16px;
  font-size: 0.88rem;
}
.site-footer a { color: var(--text-light); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* Social icon row inside footer */
.footer-social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 10px;
}
.footer-social:empty { margin-bottom: 0; }

.social-link {
  color: var(--text-light);
  display: inline-flex;
  align-items: center;
  opacity: 0.80;
  transition: opacity 0.15s;
  line-height: 1;
}
.social-link:hover { opacity: 1; }
.social-link svg { display: block; }

/* ===== STATIC PAGES (About / Imprint) ===== */

.page-content {
  max-width: 640px;
  font-size: 0.9rem;
  line-height: 1.75;
  color: #333;
}
.page-content p { margin-bottom: 16px; }

/* ===== ADMIN PAGE ===== */

.admin-page { background: #f4f5f7; }

.admin-header {
  background: var(--blue-dark);
  color: var(--text-light);
  padding: 16px 36px;
}
.admin-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-title {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}
.admin-title span { opacity: 0.6; font-weight: 400; }
.admin-header .nav-main-link { color: #a8c8e0; font-size: 0.85rem; font-weight: 400; }

.admin-main { max-width: 860px; margin: 0 auto; padding: 32px 24px 60px; }

.admin-section {
  background: #fff;
  border-radius: 6px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.admin-section-title {
  font-size: 0.95rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.admin-hint {
  font-size: 0.78rem;
  color: #888;
  margin-bottom: 16px;
}

/* Category list */
.admin-cat-list { list-style: none; margin-bottom: 14px; }
.admin-cat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.admin-add-row { display: flex; gap: 10px; }

/* Article/episode items */
.admin-item {
  border: 1px solid #e8eaed;
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 10px;
}
.admin-item-title {
  display: block;
  font-size: 0.82rem;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 10px;
  color: #333;
}
.admin-checks { display: flex; flex-wrap: wrap; gap: 10px; }
.admin-check {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  cursor: pointer;
  color: #444;
}
.admin-check input { cursor: pointer; }

/* Section header (title + Add button side by side) */
.admin-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}
.admin-section-header > div { flex: 1; }

/* Expandable item cards */
.admin-item-card { margin-bottom: 8px; }

.admin-details {
  border: 1px solid #e0e3e8;
  border-radius: 4px;
  overflow: hidden;
}
.admin-summary {
  padding: 11px 14px;
  cursor: pointer;
  font-size: 0.83rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: #f8f9fa;
  user-select: none;
  list-style: none;
}
.admin-summary::-webkit-details-marker { display: none; }
.admin-summary::before { content: '▶ '; font-size: 0.65rem; color: #888; }
.admin-details[open] .admin-summary::before { content: '▼ '; }
.admin-details[open] .admin-summary { background: #eef1f6; }

.admin-form {
  padding: 16px;
  border-top: 1px solid #e0e3e8;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.admin-field { display: flex; flex-direction: column; gap: 4px; }
.admin-label { font-size: 0.78rem; font-weight: 700; color: #444; }
.admin-label small { font-weight: 400; color: #999; }
.admin-textarea {
  padding: 7px 10px;
  border: 1px solid #d0d3d8;
  border-radius: 4px;
  font-size: 0.85rem;
  font-family: var(--font);
  resize: vertical;
}
.admin-textarea:focus { outline: 2px solid #5a9fd4; border-color: transparent; }
.admin-item-actions { display: flex; gap: 10px; margin-top: 4px; }

/* Inputs & buttons */
.admin-input {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid #d0d3d8;
  border-radius: 4px;
  font-size: 0.85rem;
  font-family: var(--font);
}
.admin-input:focus { outline: 2px solid #5a9fd4; border-color: transparent; }

.admin-btn {
  padding: 7px 16px;
  border: none;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  transition: opacity 0.15s;
}
.admin-btn:hover { opacity: 0.85; }
.admin-btn--primary { background: var(--blue-dark); color: #fff; }
.admin-btn--danger  { background: #c0392b; color: #fff; }

.admin-controls {
  display: flex;
  gap: 12px;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

/* Settings subsections */
.admin-subsection {
  padding: 18px 0 16px;
  border-bottom: 1px solid #eef0f3;
}
.admin-subsection--last { border-bottom: none; }

.admin-subsection-title {
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #5a6a80;
  margin-bottom: 12px;
}

.admin-subsection .admin-cover-wrap,
.admin-subsection-fields { max-width: 560px; }

.admin-subsection-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-subsection .admin-textarea { max-width: 560px; width: 100%; }

.admin-save-row { margin-top: 20px; }

/* Season·Episode badge on light backgrounds (episodes list) */
.ep-list-badge {
  color: #3a6a8a;
  display: block;
  margin-bottom: 2px;
}

/* ===== DARK THEME – podcast / episode pages ===== */

.episode-page,
.episodes-page {
  background: var(--blue-dark);
  color: var(--text-light);
}
.episode-page .article-header,
.episodes-page .article-header {
  background: rgba(10, 22, 44, 0.55);
}
.episode-page .article-nav .nav-main-link,
.episodes-page .article-nav .nav-main-link {
  color: rgba(255,255,255,0.82);
}
.episode-page .article-nav .nav-main-link:hover,
.episodes-page .article-nav .nav-main-link:hover { opacity: 0.7; }
.episode-page .header-rule,
.episodes-page .header-rule { border-color: rgba(255,255,255,0.1); }
.episode-page main,
.episodes-page main { background: var(--blue-dark); }
.episode-page .content-title,
.episodes-page .list-page-heading { color: var(--text-light); }
.episode-page .site-footer,
.episodes-page .site-footer { background: rgba(0,0,0,0.3); }

/* Episode title link on list + category pages */
.episode-card-title-link {
  text-decoration: none;
  color: inherit;
}
.episode-card-title-link:hover .episode-card-title { text-decoration: underline; }

/* Episode title link on home */
.ep-title-link { text-decoration: none; color: inherit; display: block; }
.ep-title-link:hover .content-title { text-decoration: underline; }

/* LISTEN link in podcast preview (light version of more-link) */
.more-link--light {
  color: #8ab4cc;
  margin-top: 14px;
  display: inline-block;
}
.more-link--light:hover { color: #c8daea; text-decoration: underline; }

/* ===== EPISODE DETAIL PAGE ===== */

.episode-detail-cover {
  display: block;
  width: calc(100% + 72px);
  margin: -28px -36px 24px;
  max-height: 300px;
  object-fit: cover;
}
.episode-detail-badge { display: block; margin-bottom: 6px; }
.episode-detail-title { color: var(--text-light); margin-bottom: 10px; }
.episode-detail-tags  { margin-bottom: 22px; }
.episode-detail-player { max-width: 520px; margin-bottom: 20px; }

/* ===== EPISODES LIST PAGE — simple clickable cards ===== */

.ep-list-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: rgba(255,255,255,0.07);
  border-radius: 4px;
  padding: 16px 18px;
  margin-bottom: 14px;
  text-decoration: none;
  color: var(--text-light);
  transition: background 0.15s;
}
.ep-list-card:hover { background: rgba(255,255,255,0.13); }

.ep-list-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
}

.ep-list-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.ep-list-title {
  font-weight: 900;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ep-list-card:hover .ep-list-title { text-decoration: underline; }

.ep-list-notes {
  font-size: 0.8rem;
  color: #8ab0c8;
  line-height: 1.5;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 600px) {
  .site-header { min-height: 0; }
  .site-nav { position: static; display: block; width: 100%; max-height: none; overflow-y: visible; }
  .article-body { grid-template-columns: 1fr; }
  .article-preview, .podcast-preview, .article-main, .article-header { padding-left: 18px; padding-right: 18px; }
  .admin-main { padding: 20px 14px 40px; }
}
