/*
Theme Name: TraficFM
Theme URI: https://traficfm.ro
Author: TraficFM
Author URI: https://traficfm.ro
Description: Tema oficială TraficFM.ro — Radio + Știri Trafic
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: traficfm
*/

:root {
  --red: #E22D2D;
  --dark: #111111;
  --dark2: #1a1a1a;
  --dark3: #222222;
  --gray: #f5f5f5;
  --border: #e0e0e0;
  --text: #111111;
  --text2: #555555;
  --text3: #999999;
}

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

body {
  font-family: 'Roboto', Arial, sans-serif;
  background: #f5f5f5;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }
img { max-width: 100%; height: auto; }

/* ── TOPBAR ── */
#topbar {
  background: var(--red);
  color: rgba(255,255,255,0.92);
  font-size: 11px;
  padding: 5px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
#topbar a { color: rgba(255,255,255,0.92); }
#topbar a:hover { color: #fff; }
.topbar-right { display: flex; gap: 16px; }

/* ── HEADER ── */
#site-header {
  background: #fff;
  border-bottom: 3px solid var(--red);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.site-logo img { height: 54px; width: auto; display: block; }
.site-logo-text {
  font-size: 26px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: 0.08em;
}
.site-logo-text span { color: var(--red); }

/* ── NAV ── */
#site-nav { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
#site-nav a {
  color: #555;
  font-size: 13px;
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
#site-nav a:hover,
#site-nav a.current-menu-item { color: var(--red); border-bottom-color: var(--red); }

/* ── PLAYER BAR ── */
#player-bar {
  background: var(--dark);
  padding: 11px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.live-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
  animation: blink 1.5s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

.player-station { flex: 1; min-width: 120px; }
.player-station-name { font-size: 14px; font-weight: 600; color: #fff; }
.player-station-sub { font-size: 11px; color: #666; margin-top: 1px; }

.player-controls { display: flex; align-items: center; gap: 12px; }
#play-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--red);
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}
#play-btn:hover { background: #c01e1e; }
#play-btn svg { width: 18px; height: 18px; fill: #fff; }

.vol-wrap { display: flex; align-items: center; gap: 7px; }
.vol-icon { color: #666; font-size: 14px; }
#vol-slider { width: 80px; accent-color: var(--red); cursor: pointer; }

#stream-status { font-size: 11px; color: var(--red); font-weight: 500; white-space: nowrap; }

/* ── TICKER ── */
#news-ticker {
  background: var(--red);
  padding: 7px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}
.ticker-label {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.1em;
  background: rgba(0,0,0,0.2);
  padding: 2px 8px;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ticker-track { overflow: hidden; flex: 1; }
.ticker-inner {
  display: flex;
  gap: 40px;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
}
.ticker-inner span { font-size: 12px; color: rgba(255,255,255,0.95); }
@keyframes ticker { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }

/* ── AD ZONE ── */
.ad-zone {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
  text-align: center;
}
.ad-zone-label {
  font-size: 10px;
  color: #ccc;
  margin-bottom: 4px;
  letter-spacing: 0.08em;
}

/* ── LAYOUT ── */
.site-container { max-width: 1200px; margin: 0 auto; padding: 16px; }
.content-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 16px;
}
@media (max-width: 768px) {
  .content-grid { grid-template-columns: 1fr; }
  #site-nav { display: none; }
  .topbar-right { display: none; }
}

/* ── SECTION TITLE ── */
.sec-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
  padding-bottom: 7px;
  border-bottom: 2px solid var(--red);
}

/* ── FEATURED POST ── */
.post-featured {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
  border: 0.5px solid var(--border);
}
.post-featured-thumb {
  background: var(--dark2);
  height: 200px;
  overflow: hidden;
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.post-featured-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-featured-thumb .no-img-icon { font-size: 48px; color: #333; }
.post-badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--red); color: #fff;
  font-size: 9px; font-weight: 700;
  padding: 2px 8px; border-radius: 2px;
  letter-spacing: 0.08em;
}
.post-featured-body { padding: 14px; }
.post-featured-title {
  font-size: 18px; font-weight: 700;
  color: var(--dark); line-height: 1.4;
  margin-bottom: 8px;
}
.post-featured-title a:hover { color: var(--red); }
.post-featured-excerpt { font-size: 13px; color: var(--text2); line-height: 1.6; }
.post-meta { display: flex; gap: 8px; margin-top: 10px; align-items: center; flex-wrap: wrap; }
.post-time { font-size: 11px; color: var(--text3); }
.post-tag {
  font-size: 10px; background: #f0f0f0;
  color: #555; padding: 2px 7px; border-radius: 2px;
}
.post-tag.red { background: #fff0f0; color: var(--red); }

/* ── POST LIST ── */
.post-list { display: flex; flex-direction: column; gap: 8px; }
.post-item {
  background: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  border: 0.5px solid var(--border);
  display: flex; gap: 10px; align-items: flex-start;
  transition: border-color 0.2s;
}
.post-item:hover { border-color: var(--red); }
.post-item-icon {
  width: 32px; height: 32px;
  border-radius: 6px;
  background: #fff0f0;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 16px; color: var(--red);
}
.post-item-title { font-size: 13px; font-weight: 600; color: var(--dark); line-height: 1.4; margin-bottom: 3px; }
.post-item-title a:hover { color: var(--red); }
.post-item-time { font-size: 11px; color: var(--text3); }

/* ── PAGINATION ── */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 6px 12px; border-radius: 4px;
  border: 0.5px solid var(--border);
  font-size: 13px; background: #fff;
}
.pagination a:hover { background: var(--red); color: #fff; border-color: var(--red); }
.pagination .current { background: var(--red); color: #fff; border-color: var(--red); }

/* ── SIDEBAR ── */
.sidebar { display: flex; flex-direction: column; gap: 16px; }
.sidebar-widget {
  background: #fff;
  border-radius: 8px;
  padding: 14px;
  border: 0.5px solid var(--border);
}

.alert-list { display: flex; flex-direction: column; gap: 7px; }
.alert-item {
  background: #fafafa;
  border-radius: 6px;
  padding: 9px 10px;
  border-left: 3px solid var(--red);
  border-top: 0.5px solid var(--border);
  border-right: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
}
.alert-item.warn { border-left-color: #EF9F27; }
.alert-road { font-size: 12px; font-weight: 700; color: var(--dark); margin-bottom: 2px; }
.alert-desc { font-size: 11px; color: #666; line-height: 1.4; }
.alert-time { font-size: 10px; color: #bbb; margin-top: 3px; }

.radio-list { display: flex; flex-direction: column; gap: 5px; }
.radio-item {
  background: #fafafa;
  border-radius: 6px;
  padding: 7px 10px;
  display: flex; align-items: center; gap: 8px;
  border: 0.5px solid var(--border);
}
.radio-dot { width: 6px; height: 6px; border-radius: 50%; background: #ddd; flex-shrink: 0; }
.radio-dot.on { background: var(--red); animation: blink 1.5s infinite; }
.radio-name { font-size: 12px; color: #333; flex: 1; }
.radio-freq { font-size: 11px; color: #aaa; }

/* ── SINGLE POST ── */
.post-single { background: #fff; border-radius: 8px; padding: 24px; border: 0.5px solid var(--border); }
.post-single-title { font-size: 24px; font-weight: 700; color: var(--dark); line-height: 1.3; margin-bottom: 12px; }
.post-single-meta { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.post-single-content { font-size: 15px; color: var(--text); line-height: 1.8; }
.post-single-content p { margin-bottom: 14px; }
.post-single-source { font-size: 12px; color: var(--text3); margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }

/* ── FOOTER ── */
#site-footer {
  background: var(--dark);
  color: #aaa;
  padding: 30px 20px 16px;
  margin-top: 30px;
}
.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 20px;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-col h4 { color: #fff; font-size: 13px; margin-bottom: 10px; font-weight: 600; }
.footer-col p, .footer-col li { font-size: 12px; color: #888; line-height: 1.8; }
.footer-col ul { list-style: none; }
.footer-col a { color: #888; }
.footer-col a:hover { color: var(--red); }
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid #222;
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #555;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-links { display: flex; gap: 14px; }
.footer-links a { color: #555; }
.footer-links a:hover { color: var(--red); }
