/* ============================================================
   RADIO ONLINE — CRITICAL CSS (loaded on all pages)
   ============================================================ */

/* ── Custom Properties ── */
:root {
    --accent:         #e30613;
    --accent-dark:    #b80510;
    --accent-light:   #ff1a28;
    --bg:             #111111;
    --bg-card:        #1a1a1a;
    --bg-card-hover:  #222222;
    --bg-header:      #0d0d0d;
    --bg-player:      #0a0a0a;
    --bg-ticker:      #e30613;
    --text:           #f0f0f0;
    --text-secondary: #b0b0b0;
    --muted:          #666666;
    --border:         #2a2a2a;
    --border-light:   #333333;

    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-condensed: 'Barlow Condensed', 'Impact', sans-serif;

    --radius-sm:  4px;
    --radius:     8px;
    --radius-lg:  12px;
    --radius-xl:  16px;
    --radius-full: 9999px;

    --shadow-sm:  0 1px 3px rgba(0,0,0,.4);
    --shadow:     0 4px 16px rgba(0,0,0,.5);
    --shadow-lg:  0 12px 40px rgba(0,0,0,.7);

    --ticker-h:  36px;
    --header-h:  68px;
    --player-h:  72px;

    --ease-out: cubic-bezier(.16,1,.3,1);
    --ease-in-out: cubic-bezier(.4,0,.2,1);

    --z-ticker:  100;
    --z-header:  200;
    --z-search:  300;
    --z-player:  400;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-bottom: var(--player-h);
    overflow-x: hidden;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
ul, ol { list-style: none; }
input, textarea, select { font: inherit; }
svg { flex-shrink: 0; }

.screen-reader-text {
    clip: rect(1px,1px,1px,1px);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* ── Container ── */
.container {
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: 24px;
}

/* ══════════════════════════════════════
   TICKER
══════════════════════════════════════ */
.ticker {
    position: sticky;
    top: 0;
    z-index: var(--z-ticker);
    display: flex;
    align-items: center;
    height: var(--ticker-h);
    background: var(--bg-ticker);
    overflow: hidden;
    user-select: none;
}

.ticker__label {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 16px;
    background: rgba(0,0,0,.25);
    font-family: var(--font-condensed);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #fff;
    white-space: nowrap;
}

.ticker__track-wrap {
    flex: 1;
    overflow: hidden;
    height: 100%;
    display: flex;
    align-items: center;
}

.ticker__track {
    display: flex;
    align-items: center;
    gap: 32px;
    animation: ticker-scroll 60s linear infinite;
    white-space: nowrap;
}

.ticker__track a {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,.95);
    transition: color .2s;
    white-space: nowrap;
}

.ticker__track a:hover { color: #fff; text-decoration: underline; }

.ticker__sep {
    color: rgba(255,255,255,.4);
    font-size: 10px;
    flex-shrink: 0;
}

@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ══════════════════════════════════════
   SITE HEADER
══════════════════════════════════════ */
.site-header {
    position: sticky;
    top: var(--ticker-h);
    z-index: var(--z-header);
    background: var(--bg-header);
    border-bottom: 1px solid var(--border);
    height: var(--header-h);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 32px;
    height: 100%;
}

.site-header__brand { flex-shrink: 0; }

.site-header__brand a,
.site-header__brand img {
    display: block;
    max-height: 44px;
    width: auto;
}

.site-header__site-name {
    font-family: var(--font-condensed);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--text);
}

.site-nav { flex: 1; }

.site-nav__list {
    display: flex;
    align-items: center;
    gap: 4px;
}

.site-nav__list li a {
    display: block;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: color .2s, background .2s;
}

.site-nav__list li a:hover,
.site-nav__list li.current-menu-item a {
    color: var(--text);
    background: rgba(255,255,255,.06);
}

.site-nav__list li.current-menu-item a { color: var(--accent-light); }

.site-nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.site-nav__toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform .3s, opacity .3s;
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    flex-shrink: 0;
}

.btn-live {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    background: var(--accent);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
    transition: background .2s, transform .15s;
}

.btn-live:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-live:active { transform: translateY(0); }

.btn-live__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    animation: pulse-dot 1.6s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .5; transform: scale(.75); }
}

.btn-search {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: color .2s, background .2s;
}

.btn-search:hover { color: var(--text); background: rgba(255,255,255,.06); }

.search-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-search);
    background: rgba(0,0,0,.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: flex-start;
    padding-top: 100px;
    animation: fade-in .2s var(--ease-out);
}

.search-overlay[hidden] { display: none; }
.search-overlay__inner { width: 100%; }

.search-overlay__form {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 12px;
}

.search-overlay__input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-size: clamp(24px, 4vw, 40px);
    font-weight: 700;
    color: var(--text);
}

.search-overlay__input::placeholder { color: var(--muted); }

.search-overlay__submit,
.search-overlay__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: color .2s;
}

.search-overlay__submit:hover,
.search-overlay__close:hover { color: var(--text); }

@keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ══════════════════════════════════════
   BADGES
══════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
    transition: background .2s;
    width: fit-content;
}

.badge:hover { background: var(--accent-dark); }
.badge--xs { font-size: 10px; padding: 2px 8px; }
.badge--sm { font-size: 11px; }
.badge--lg { font-size: 13px; padding: 5px 14px; }

/* ══════════════════════════════════════
   META LINE
══════════════════════════════════════ */
.meta__date,
.meta__read { font-size: 13px; color: var(--muted); }
.meta__sep  { color: var(--border-light); }

/* ══════════════════════════════════════
   SECTION HEADERS
══════════════════════════════════════ */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.section-title {
    font-family: var(--font-condensed);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--text);
    position: relative;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: var(--accent);
    border-radius: 2px;
    margin-right: 10px;
    vertical-align: middle;
}

.section-more {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    transition: color .2s;
}

.section-more:hover { color: var(--accent-light); }

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.site-footer {
    background: var(--bg-header);
    border-top: 1px solid var(--border);
    margin-top: 48px;
}

.site-footer__inner {
    display: grid;
    grid-template-columns: 240px 1fr auto;
    gap: 40px;
    padding-block: 48px;
    align-items: start;
}

.site-footer__brand {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.site-footer__name {
    font-family: var(--font-condensed);
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
}

.site-footer__tagline {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
}

.site-footer__widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.site-footer__col { }
.site-footer__social nav { }

.social-nav { display: flex; gap: 12px; }

.social-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0;
    transition: background .2s, color .2s;
}

.social-nav a:hover { background: var(--accent); color: #fff; }

.site-footer__bottom {
    border-top: 1px solid var(--border);
    padding-block: 16px;
}

.site-footer__bottom .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-footer__copy { font-size: 13px; color: var(--muted); }

.footer-nav { display: flex; gap: 20px; }

.footer-nav a {
    font-size: 13px;
    color: var(--muted);
    transition: color .2s;
}

.footer-nav a:hover { color: var(--text-secondary); }

/* ══════════════════════════════════════
   AUDIO PLAYER
══════════════════════════════════════ */
.player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--z-player);
    height: var(--player-h);
    background: var(--bg-player);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    box-shadow: 0 -4px 24px rgba(0,0,0,.5);
}

.player__inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 100%;
}

.player__station {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 220px;
    flex-shrink: 0;
}

.player__live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.player__live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse-dot 1.6s ease-in-out infinite;
}

.player__live-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent);
}

.player__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.player__name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player__meta {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player__controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 auto;
}

.player__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--text-secondary);
    transition: color .2s, background .2s;
}

.player__btn:hover { color: var(--text); background: rgba(255,255,255,.06); }
.player__btn:disabled { opacity: .35; pointer-events: none; }

.player__btn--play {
    width: 52px;
    height: 52px;
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 16px rgba(227,6,19,.4);
    transition: background .2s, transform .15s, box-shadow .2s;
}

.player__btn--play:hover {
    background: var(--accent-dark);
    color: #fff;
    transform: scale(1.06);
    box-shadow: 0 6px 20px rgba(227,6,19,.5);
}

.player__btn--play.is-loading .icon-play,
.player__btn--play.is-loading .icon-pause { display: none !important; }
.player__btn--play.is-loading .icon-loading { display: block !important; animation: spin .8s linear infinite; }

.player__btn--play.is-playing .icon-play { display: none !important; }
.player__btn--play.is-playing .icon-pause { display: block !important; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

.player__volume {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
    flex-shrink: 0;
}

.player__volume-slider-wrap { flex: 1; }

.player__volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 3px;
    border-radius: 3px;
    background: var(--border-light);
    outline: none;
    cursor: pointer;
}

.player__volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 0 0 3px rgba(227,6,19,.25);
    transition: transform .15s;
}

.player__volume-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
.player__volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
}

.player__progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    opacity: .5;
}

/* ══════════════════════════════════════
   PAGINATION
══════════════════════════════════════ */
.pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.pagination__list { display: flex; align-items: center; gap: 6px; }

.pagination__item a,
.pagination__item span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: background .2s, color .2s, border-color .2s;
}

.pagination__item a:hover { background: var(--accent); color: #fff; border-color: transparent; }
.pagination__item .current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ══════════════════════════════════════
   SIDEBAR
══════════════════════════════════════ */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.widget { }

.widget__title {
    font-family: var(--font-condensed);
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-recent-posts { display: flex; flex-direction: column; gap: 14px; }

.widget-recent-posts__item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.widget-recent-posts__thumb {
    flex-shrink: 0;
    width: 72px;
    height: 48px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: block;
}

.widget-recent-posts__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.widget-recent-posts__item:hover .widget-recent-posts__thumb img { transform: scale(1.05); }

.widget-recent-posts__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.widget-recent-posts__title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .2s;
}

.widget-recent-posts__title:hover { color: var(--text); }
.widget-recent-posts__date { font-size: 11px; color: var(--muted); }

/* ══════════════════════════════════════
   NO RESULTS
══════════════════════════════════════ */
.no-results {
    padding: 48px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.no-results__title { font-size: 24px; font-weight: 700; }
.no-results__text { font-size: 15px; color: var(--text-secondary); }

/* ══════════════════════════════════════
   SEARCH FORM
══════════════════════════════════════ */
.search-form { display: flex; gap: 8px; }

.search-form .search-field {
    flex: 1;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 15px;
    outline: none;
}

.search-form .search-field:focus { border-color: var(--accent); }

.search-form .search-submit {
    padding: 10px 20px;
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}

.search-form .search-submit:hover { background: var(--accent-dark); }

/* Admin bar offset */
.admin-bar .ticker { top: 32px; }
.admin-bar .site-header { top: calc(var(--ticker-h) + 32px); }

@media screen and (max-width: 782px) {
    .admin-bar .ticker { top: 46px; }
    .admin-bar .site-header { top: calc(var(--ticker-h) + 46px); }
}

/* ══════════════════════════════════════
   RESPONSIVE — CRITICAL
══════════════════════════════════════ */
@media (max-width: 1100px) {
    .site-footer__inner { grid-template-columns: 200px 1fr; }
    .site-footer__social { display: none; }
}

@media (max-width: 900px) {
    :root { --header-h: 60px; }
    .archive-layout { grid-template-columns: 1fr; }
    .single-layout { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .site-footer__inner { grid-template-columns: 1fr; }
    .site-footer__widgets { grid-template-columns: repeat(2, 1fr); }
    .player__station { min-width: 160px; }
    .player__volume { min-width: 140px; }
    .player__btn--prev,
    .player__btn--next { display: none; }
}

@media (min-width: 641px) and (max-width: 768px) {
    .player__volume { display: none; }
    .player__inner {
        gap: 0;
        padding-inline: 16px;
        justify-content: space-between;
    }
    .player__station {
        min-width: 0;
        flex: 1;
        overflow: hidden;
        gap: 10px;
    }
    .player__controls { margin: 0; gap: 4px; flex-shrink: 0; align-items: center; }
    .player__btn--play { width: 44px; height: 44px; box-shadow: 0 2px 10px rgba(227,6,19,.4); }
}

@media (max-width: 640px) {
    :root {
        --ticker-h: 32px;
        --player-h: 72px;
    }

    .container { padding-inline: 16px; }
    .site-nav__toggle { display: flex; }

    .site-nav__list {
        display: none;
        position: fixed;
        top: calc(var(--ticker-h) + var(--header-h));
        left: 0;
        right: 0;
        z-index: var(--z-header);
        background: var(--bg-header);
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border-bottom: 1px solid var(--border);
        gap: 2px;
        max-height: calc(100dvh - var(--ticker-h) - var(--header-h));
        overflow-y: auto;
    }

    .site-nav__list.is-open { display: flex; }

    .site-nav__list li a {
        padding: 12px 16px;
        font-size: 15px;
    }

    .site-footer__widgets { grid-template-columns: 1fr; }
    .site-footer__bottom .container { flex-direction: column; text-align: center; }
    .footer-nav { flex-wrap: wrap; justify-content: center; gap: 12px; }

    .player {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: var(--player-h);
        z-index: var(--z-player);
        box-sizing: border-box;
    }

    .player__inner {
        gap: 0;
        padding-inline: 12px;
        justify-content: space-between;
        width: 100%;
        max-width: 100%;
    }
    .player__volume { display: none; }
    .player__btn--prev,
    .player__btn--next { display: none; }
    .player__station {
        min-width: 0;
        flex: 1;
        overflow: hidden;
        gap: 8px;
    }
    .player__live-badge { flex-shrink: 0; }
    .player__info { min-width: 0; flex: 1; }
    .player__name { font-size: 13px; }
    .player__meta {
        font-size: 11px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .player__controls {
        gap: 4px;
        flex-shrink: 0;
        margin: 0;
        align-items: center;
    }
    .player__btn { width: 36px; height: 36px; }
    .player__btn--play {
        width: 44px;
        height: 44px;
        box-shadow: 0 2px 10px rgba(227,6,19,.4);
    }

    .btn-live span:last-child { display: none; }
}
