/* ==========================================================================
   R0W.net - tokens (theme: alb + albastru, ca logo-ul)
   ========================================================================== */
:root {
    --bg: #FFFFFF;
    --panel: #FFFFFF;
    --panel-alt: #EAF4FC;
    --blue: #00A2FF;
    --blue-deep: #0A63D2;
    --text: #101828;
    --muted: #5C6B84;
    --danger: #D6483B;
    --border: #D9E8F5;

    --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
    --font-sans: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.55;
}

a { color: var(--blue); }
a:hover { color: var(--blue-deep); text-decoration: none; }

:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

.wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}
.wrap--narrow { max-width: 620px; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
}
.site-header__inner,
.admin-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.wordmark {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: 0.02em;
}
.wordmark__icon { width: 32px; height: 32px; }
.wordmark__dot { color: var(--blue); }

.site-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 0.95rem;
}
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--text); }
.site-nav__cta {
    color: #fff !important;
    background: var(--blue);
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
}
.site-nav__cta:hover { background: var(--blue-deep); }

/* ==========================================================================
   Hero + dial - fundal gradient albastru, ca logo-ul, cu text alb deasupra
   ========================================================================== */
.hero {
    padding: 56px 0 64px;
    background: linear-gradient(160deg, var(--blue) 0%, var(--blue-deep) 100%);
    color: #fff;
}

.hero__freq {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    margin: 0 0 12px;
}
.hero__freq-icon { width: 22px; height: 22px; }

.hero__title {
    font-family: var(--font-mono);
    font-size: clamp(1.6rem, 3.6vw, 2.6rem);
    line-height: 1.2;
    max-width: 22ch;
    margin: 0 0 20px;
    color: #fff;
}

.hero__subtitle {
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.05rem;
    max-width: 64ch;
    margin: 0 0 40px;
}

.dial {
    position: relative;
    height: 64px;
    margin: 0 0 8px;
    max-width: 620px;
}
.dial__track {
    position: relative;
    height: 2px;
    background: rgba(255, 255, 255, 0.35);
    margin-top: 40px;
}
.dial__tick {
    position: absolute;
    top: -28px;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.75);
}
.dial__tick::after {
    content: '';
    position: absolute;
    top: 26px;
    left: 50%;
    width: 1px;
    height: 8px;
    background: rgba(255, 255, 255, 0.4);
}
.dial__needle {
    position: absolute;
    top: -6px;
    left: 0%;
    opacity: 0;
    width: 2px;
    height: 14px;
    background: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    transition: left 0.6s ease, opacity 0.6s ease;
}
@media (prefers-reduced-motion: reduce) {
    .dial__needle { transition: none; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 12px 22px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    background: transparent;
}
.button--primary { background: var(--blue); color: #fff; }
.button--primary:hover { background: var(--blue-deep); color: #fff; }
.button--ghost { border-color: var(--border); color: var(--text); }
.button--ghost:hover { border-color: var(--muted); color: var(--text); }
.button--danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.button--danger:hover { background: var(--danger); color: #fff; }
.button--small { padding: 6px 12px; font-size: 0.85rem; }

/* ==========================================================================
   Featured strip - posturi care se schimba automat (carusel), traieste in hero
   ========================================================================== */
.featured { margin-top: 32px; }
.featured__heading {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 16px;
}
.featured-carousel {
    position: relative;
    height: 100px;
    overflow: hidden;
    max-width: 620px;
}
.featured-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text); /* reseteaza albul mostenit din .hero - cardul e pe fundal alb/panel */
    opacity: 0;
    transform: translateX(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
}
.featured-slide.is-active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}
.featured-slide .preset__logo { width: 60px; height: 60px; }
.featured-slide .preset__name { font-size: 1.1rem; white-space: normal; }
.featured-dots {
    display: flex;
    gap: 6px;
    margin-top: 12px;
}
.featured-dots__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    border: none;
    padding: 0;
    cursor: pointer;
}
.featured-dots__dot.is-active { background: #fff; }

/* ==========================================================================
   Stations / presets
   ========================================================================== */
.stations { padding: 48px 0 80px; }
.stations__heading {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--muted);
    margin: 0 0 24px;
}

.filters { margin: 0 0 28px; display: flex; flex-direction: column; gap: 14px; }
.filters__row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filters__label { font-size: 0.85rem; color: var(--muted); }
.filters__search {
    background: var(--panel-alt);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 11px 14px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--text);
    max-width: 360px;
    width: 100%;
}
.filters__genres { display: flex; flex-wrap: wrap; gap: 8px; }
.genre-pill {
    background: var(--panel-alt);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.85rem;
    color: var(--muted);
    cursor: pointer;
    font-family: var(--font-sans);
    text-decoration: none;
    display: inline-block;
}
.genre-pill:hover { border-color: var(--blue); color: var(--text); }
.genre-pill.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }

.preset-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
@media (max-width: 900px) {
    .preset-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .preset-grid { grid-template-columns: 1fr; }
}

.preset {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-left: 3px solid var(--border);
    border-radius: 6px;
    padding: 14px;
    transition: border-left-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.preset.is-playing { border-left-color: var(--blue); box-shadow: 0 2px 8px rgba(0, 162, 255, 0.15); }

.preset__logo {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: var(--panel-alt);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.preset__logo img { width: 100%; height: 100%; object-fit: cover; }

.preset__body { flex: 1; min-width: 0; }
.preset__name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    padding-left: 0;
}
.preset.is-playing .preset__name { padding-left: 14px; }
.preset.is-playing .preset__name::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 0 6px rgba(0, 162, 255, 0.6);
    animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}
@media (prefers-reduced-motion: reduce) {
    .preset.is-playing .preset__name::before { animation: none; }
}

.preset__play {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 6px 12px;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    cursor: pointer;
}
.preset__play:hover { border-color: var(--blue); }
.preset__play-icon {
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 8px solid var(--text);
}
.preset.is-playing .preset__play-icon {
    width: 8px;
    height: 10px;
    border: none;
    background:
        linear-gradient(to right, var(--blue) 3px, transparent 3px, transparent 5px, var(--blue) 5px);
}

.preset__fallback {
    display: none;
    font-size: 0.78rem;
    color: var(--danger);
    text-decoration: underline;
    line-height: 1.4;
}
.preset__fallback.is-visible { display: inline-block; }
.preset__fallback:hover { color: var(--text); }
.preset__play.is-hidden { display: none; }

.empty-state {
    color: var(--muted);
    padding: 32px 0;
}

/* ==========================================================================
   Forms
   ========================================================================== */
.form-section { padding: 56px 0 96px; }
.form-section h1 { font-family: var(--font-mono); font-size: 1.8rem; }

.form { display: flex; flex-direction: column; gap: 20px; margin-top: 24px; }
.form--card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 32px;
    max-width: 380px;
    margin: 80px auto;
    box-shadow: 0 4px 16px rgba(16, 24, 40, 0.06);
}

.field { display: flex; flex-direction: column; gap: 8px; font-size: 0.95rem; }
.field span { color: var(--muted); }
.field input[type="text"],
.field input[type="url"],
.field input[type="email"],
.field input[type="password"],
.field input[type="file"],
.field select,
.field textarea {
    background: var(--panel-alt);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 11px 14px;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 0.95rem;
}
.field textarea { resize: vertical; line-height: 1.5; }
.field__hint { font-size: 0.8rem; color: var(--muted); }
.field__hint--low { color: var(--danger); }
.field__hint--ok { color: var(--blue); }
.field--radio { border: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.field--radio legend { color: var(--muted); padding: 0 0 4px; }
.field--radio label { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 400; }

/* Camp-capcana anti-spam - invizibil pentru oameni, dar bot-ii care completeaza orbeste toate campurile il vor completa */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.alert {
    list-style: none;
    margin: 0 0 8px;
    padding: 14px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
}
.alert--error { background: rgba(214, 72, 59, 0.08); color: var(--danger); border: 1px solid var(--danger); }
.alert--success { background: rgba(0, 162, 255, 0.08); color: var(--blue-deep); border: 1px solid var(--blue); list-style: none; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 40px 0 64px;
    font-size: 0.9rem;
}
.site-footer__brand-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 20px;
}
.site-footer__brandmark { width: 56px; height: 56px; flex-shrink: 0; }
.site-footer__tagline { max-width: 56ch; margin: 0 0 8px; }
.site-footer p { margin: 0 0 6px; }
.site-footer .button { margin-top: 16px; }

/* ==========================================================================
   Admin
   ========================================================================== */
.admin-body { background: var(--bg); color: var(--text); font-family: var(--font-sans); margin: 0; }
.admin-header { border-bottom: 1px solid var(--border); padding: 20px 0; margin-bottom: 32px; }
.admin-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.admin-header__actions { display: flex; gap: 8px; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.admin-table th {
    text-align: left;
    color: var(--muted);
    font-weight: 500;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}
.admin-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.admin-table__name { display: flex; align-items: center; gap: 10px; }
.admin-table__logo { width: 32px; height: 32px; border-radius: 4px; object-fit: cover; background: var(--panel-alt); }
.admin-table__actions { display: flex; gap: 8px; white-space: nowrap; }
.admin-table__comment { max-width: 320px; }
.row--hidden { opacity: 0.5; }

.tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    background: var(--panel-alt);
    border: 1px solid var(--border);
}
.tag--button { cursor: pointer; font-family: inherit; }
.tag--active { border-color: var(--blue); color: var(--blue); }
.tag--muted { color: var(--muted); }

/* ==========================================================================
   Ad slots - populate din includes/ad-slot.php. Daca Google AdSense nu
   umple slotul (sau adsbygoogle.js e blocat), assets/js/ad-fallback.js
   arata bannerul propriu (728x90, catre ForceSP) in locul lui.
   ========================================================================== */
.ad-slot { margin: 8px 0; text-align: center; }
.ad-slot:empty {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--border);
    border-radius: 6px;
    color: var(--muted);
    font-size: 0.78rem;
    background: var(--panel-alt);
}
.ad-slot:empty::after { content: 'Spatiu reclama'; }
.ad-slot--banner:empty { min-height: 90px; margin: 32px 0; }
.ad-slot--banner { margin: 32px 0; }
.ad-slot--inline { grid-column: 1 / -1; }
.ad-slot--inline:empty { min-height: 90px; }
.ad-slot--footer:empty { min-height: 90px; margin: 16px 0 0; }
.ad-slot--incontent:empty { min-height: 250px; margin: 32px 0; }

.ad-slot__fallback { display: none; }
.ad-slot__fallback.is-visible { display: inline-block; }
.ad-slot__fallback img { max-width: 100%; height: auto; border-radius: 6px; }

/* Numele radioului devine link catre pagina proprie (/radio/<slug>) */
.preset__name a { color: inherit; text-decoration: none; }
.preset__name a:hover { color: var(--blue); text-decoration: underline; }

/* ==========================================================================
   Footer: insigna Google Play + cod QR
   ========================================================================== */
.site-footer__qr { width: 56px; height: 56px; }
.site-footer__badge { height: 40px; width: auto; }

/* ==========================================================================
   Pagina proprie a unui radio (/radio/<slug>)
   ========================================================================== */
.radio-page { padding: 48px 0 80px; }
.back-link { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.back-link:hover { color: var(--blue); }
.radio-page__player { margin: 20px 0 8px; }
.radio-page__player .preset__logo { width: 88px; height: 88px; }
.radio-page__player .preset__name { font-size: 1.4rem; white-space: normal; margin-bottom: 12px; }
.radio-page__genre { display: inline-block; margin-bottom: 10px; }
.radio-page__note { color: var(--muted); font-size: 0.9rem; margin-top: 24px; }

.details-table {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
    padding: 14px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.details-table > div { margin: 0; }
.details-table dt { font-size: 0.75rem; color: var(--muted); margin: 0 0 2px; }
.details-table dd { font-size: 0.92rem; color: var(--text); margin: 0; font-weight: 500; }

.radio-page__description { margin: 28px 0; }
.radio-page__description h2 { font-size: 1.1rem; margin: 0 0 12px; }
.radio-page__description p { color: var(--text); line-height: 1.7; margin: 0 0 14px; }

.embed-code { margin: 24px 0; }
.embed-code__panel { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; max-width: 420px; }
.embed-code__textarea {
    width: 100%;
    background: var(--panel-alt);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 10px 12px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text);
    resize: vertical;
}

.comments { margin: 36px 0; padding-top: 24px; border-top: 1px solid var(--border); }
.comments h2 { font-size: 1.1rem; margin: 0 0 16px; }
.comments__list { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.comments__item { border-bottom: 1px solid var(--border); padding-bottom: 16px; }
.comments__author { font-weight: 600; font-size: 0.9rem; margin: 0 0 6px; display: flex; gap: 8px; align-items: baseline; }
.comments__text { margin: 0; color: var(--text); line-height: 1.6; font-size: 0.92rem; }
.comments__form { max-width: 480px; }

/* ==========================================================================
   Admin: campul de slug cu prefix /radio/
   ========================================================================== */
.field-prefix { display: flex; align-items: stretch; }
.field-prefix__label {
    display: flex;
    align-items: center;
    padding: 0 10px;
    background: var(--border);
    color: var(--muted);
    font-size: 0.85rem;
    border-radius: 4px 0 0 4px;
    white-space: nowrap;
}
.field-prefix input {
    border-radius: 0 4px 4px 0 !important;
    flex: 1;
    min-width: 0;
}

/* ==========================================================================
   Blog
   ========================================================================== */
.blog-hero { padding: 48px 0 24px; border-bottom: 1px solid var(--border); }
.blog-hero h1 { font-family: var(--font-mono); font-size: 1.8rem; margin: 0 0 10px; }

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
@media (max-width: 900px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .blog-grid { grid-template-columns: 1fr; } }

.blog-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--panel);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.blog-card__image-link { display: block; aspect-ratio: 16 / 9; background: var(--panel-alt); }
.blog-card__image { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card__body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.blog-card__title { font-size: 1.05rem; margin: 0; line-height: 1.35; }
.blog-card__title a { color: var(--text); text-decoration: none; }
.blog-card__title a:hover { color: var(--blue); }
.blog-card__excerpt { color: var(--muted); font-size: 0.9rem; line-height: 1.5; margin: 0; flex: 1; }
.blog-card__link { font-size: 0.88rem; font-weight: 500; color: var(--blue); text-decoration: none; }
.blog-card__link:hover { color: var(--blue-deep); }

.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 40px 0 0; }

.blog-post { padding: 48px 0 80px; }
.blog-post h1 { font-family: var(--font-mono); font-size: 1.7rem; margin: 16px 0 4px; line-height: 1.3; }
.blog-post__date { margin: 0 0 20px; }
.blog-post__image { width: 100%; max-height: 380px; object-fit: cover; border-radius: 8px; margin: 0 0 28px; }
.blog-post__content { color: var(--text); line-height: 1.75; font-size: 1rem; }
.blog-post__content p { margin: 0 0 18px; }
.blog-post__content h2 { font-size: 1.3rem; margin: 32px 0 14px; }
.blog-post__content h3 { font-size: 1.1rem; margin: 26px 0 12px; }
.blog-post__content a { color: var(--blue); }
.blog-post__content img { max-width: 100%; height: auto; border-radius: 6px; margin: 20px 0; }
.blog-post__content ul, .blog-post__content ol { padding-left: 22px; margin: 0 0 18px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 640px) {
    .dial__tick:nth-child(even) { display: none; }
    .admin-table { display: block; overflow-x: auto; }
    .form--card { margin: 40px 20px; padding: 24px; }
    .site-footer__brand-row { flex-wrap: wrap; }
}
