/*
Theme Name: Rádio Ao Vivo
Description: Tema para rádios FM com player ao vivo fixo que continua tocando ao trocar de página, programa no ar em tempo real, grade de programação, Top da Semana e notícias. Visual escuro com destaques em dourado.
Author: Rádio
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: radio-ao-vivo
*/

:root {
	--bg: #06101f;
	--bg2: #0a1a31;
	--card: #0d2040;
	--card2: #102a52;
	--line: rgba(255, 255, 255, 0.1);
	--gold: #f6b817;
	--gold2: #ffcd45;
	--text: #ffffff;
	--muted: #a9b7d0;
	--live: #ff3b47;
	--font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.55;
	padding-bottom: 92px;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font-family: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.muted { color: var(--muted); }

.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 20px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: #1a1204; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.admin-note { background: var(--card); border: 1px dashed var(--gold); border-radius: 10px; padding: 14px 16px; color: var(--gold2); font-size: 0.9rem; }

/* Botões --------------------------------------------------------------- */
.btn-gold {
	display: inline-flex; align-items: center; gap: 10px;
	background: linear-gradient(180deg, var(--gold2), var(--gold));
	color: #1a1204; font-weight: 700; font-size: 0.95rem;
	border: 0; border-radius: 999px; padding: 13px 24px;
	text-decoration: none; cursor: pointer;
}
.btn-gold svg { width: 18px; height: 18px; fill: currentColor; }
.btn-gold:hover { filter: brightness(1.06); }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; }
.icon-btn svg { width: 20px; height: 20px; fill: currentColor; }
.icon-btn:hover { border-color: var(--gold); color: var(--gold); }

/* Play / pause: alternam pelo estado da página */
[data-raov-play] .i-pause, [data-raov-play] .l-pause { display: none; }
.raov-playing [data-raov-play] .i-play, .raov-playing [data-raov-play] .l-play { display: none; }
.raov-playing [data-raov-play] .i-pause { display: block; }
.raov-playing [data-raov-play] .l-pause { display: inline; }

/* Cabeçalho ------------------------------------------------------------ */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(6, 16, 31, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.header-in { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; }
.brand .custom-logo { max-height: 52px; width: auto; }
.brand-name { line-height: 1.15; font-size: 1.05rem; }
.brand-freq { display: block; color: var(--gold); font-size: 0.8rem; font-weight: 600; }
.primary-nav { flex: 1; min-width: 0; }
.primary-nav ul { display: flex; flex-wrap: wrap; gap: 2px; }
.primary-nav a { display: block; padding: 10px 12px; text-decoration: none; color: #dbe4f5; font-size: 0.9rem; font-weight: 500; border-bottom: 2px solid transparent; }
.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a { color: var(--gold); border-bottom-color: var(--gold); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav-toggle { display: none; }
.header-search { display: none; border-top: 1px solid var(--line); background: var(--bg2); padding-block: 12px; }
.search-open .header-search { display: block; }

.search-form { display: flex; gap: 8px; max-width: 520px; }
.search-form label { flex: 1; }
.search-field { width: 100%; padding: 11px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-family: inherit; }
.search-submit { padding: 11px 18px; border-radius: 999px; border: 0; background: var(--gold); color: #1a1204; font-weight: 700; cursor: pointer; }

@media (max-width: 960px) {
	.nav-toggle { display: grid; }
	.primary-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg2); border-bottom: 1px solid var(--line); padding: 8px 20px 16px; }
	.nav-open .primary-nav { display: block; }
	.primary-nav ul { flex-direction: column; }
	.header-actions { margin-left: auto; }
}
@media (max-width: 520px) {
	.header-actions .btn-gold { display: none; }
}

/* Topo ----------------------------------------------------------------- */
.hero {
	position: relative;
	background:
		linear-gradient(90deg, rgba(6, 16, 31, 0.95) 0%, rgba(6, 16, 31, 0.7) 45%, rgba(6, 16, 31, 0.25) 100%),
		var(--hero-img, radial-gradient(ellipse at 80% 100%, rgba(246, 184, 23, 0.35), transparent 60%)) center / cover no-repeat,
		var(--bg2);
	border-bottom: 1px solid var(--line);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 32px; align-items: center; padding-block: clamp(32px, 6vw, 64px); }
.kicker { font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.02; font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; }
.hero h1 span { color: var(--gold); }
.lead { margin: 18px 0 26px; max-width: 460px; font-size: 1.1rem; color: #e4ebf8; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }

.live-card { background: rgba(10, 26, 51, 0.88); border: 1px solid var(--line); border-radius: 18px; padding: 18px; backdrop-filter: blur(8px); display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 6px 16px; }
.live-card .badge-live { grid-column: 1 / -1; }
.live-info { min-width: 0; }
.live-info h2 { font-size: 1.3rem; line-height: 1.2; font-weight: 700; }
.host { color: var(--muted); font-size: 0.9rem; margin-top: 2px; }
.time { color: var(--gold); font-size: 0.85rem; font-weight: 600; }
.desc { color: #cdd8ee; font-size: 0.85rem; margin-top: 6px; }
.live-controls { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.live-msg { grid-column: 1 / -1; min-height: 1.3em; font-size: 0.82rem; color: var(--gold2); }
@media (max-width: 420px) { .live-card { grid-template-columns: minmax(0, 1fr); } .live-card .cover { max-width: 160px; } }

.badge-live { display: inline-flex; align-items: center; gap: 8px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #ff6a73; }
.badge-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--live); display: block; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: 0.3; } }

.cover { aspect-ratio: 1 / 1; border-radius: 12px; background: linear-gradient(135deg, #1a3b73, #0a1a31) center / cover no-repeat; display: grid; place-items: center; font-weight: 800; color: var(--gold); text-align: center; overflow: hidden; border: 1px solid var(--line); }
.cover.has-img span { display: none; }
.cover-sm { width: 46px; border-radius: 8px; font-size: 0.55rem; flex: none; }

.play-lg { flex: none; width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(180deg, var(--gold2), var(--gold)); color: #1a1204; border: 0; display: grid; place-items: center; cursor: pointer; padding: 0; }
.play-lg svg { width: 24px; height: 24px; fill: currentColor; }
.play-lg:hover { filter: brightness(1.06); }
.vol { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.vol svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.vol input { width: 130px; accent-color: var(--gold); }

/* Seções --------------------------------------------------------------- */
.section { padding-block: 22px 8px; }
.sec-title { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; font-weight: 700; margin-bottom: 14px; }
.sec-title::before { content: ""; width: 4px; height: 20px; background: var(--gold); border-radius: 2px; }
.sec-more { margin-left: auto; font-size: 0.8rem; font-weight: 500; color: #7fb0ff; text-decoration: none; }
.sec-more:hover { text-decoration: underline; }

.top-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.top-item { display: grid; grid-template-columns: auto 52px minmax(0, 1fr) auto; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.top-num { font-size: 1.5rem; font-weight: 700; min-width: 1ch; }
.top-cover { width: 52px; height: 52px; border-radius: 8px; background: linear-gradient(135deg, #1a3b73, #0a1a31) center / cover no-repeat; }
.top-text { min-width: 0; }
.top-text strong, .top-text small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-text strong { font-size: 0.8rem; }
.top-text small { font-size: 0.72rem; color: var(--muted); }
.top-play { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--text); }
.top-play svg { width: 14px; height: 14px; fill: currentColor; }
.top-play:hover { color: var(--gold); border-color: var(--gold); }
@media (max-width: 1180px) { .top-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .top-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .top-list { grid-template-columns: minmax(0, 1fr); } }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tile { display: flex; align-items: center; gap: 14px; min-height: 96px; padding: 18px; border-radius: 14px; text-decoration: none; border: 1px solid var(--line); position: relative; overflow: hidden; }
.tile:hover { transform: translateY(-2px); border-color: var(--gold); }
.tile-icon { flex: none; width: 44px; height: 44px; display: grid; place-items: center; }
.tile-icon svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 0; }
.tile-icon svg path { fill: currentColor; }
.tile-text { min-width: 0; flex: 1; }
.tile-text strong { display: block; font-size: 1rem; }
.tile-text small { display: block; font-size: 0.78rem; color: rgba(255, 255, 255, 0.78); line-height: 1.35; }
.tile-arrow { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.7); display: grid; place-items: center; }
.tile-arrow svg { width: 14px; height: 14px; fill: currentColor; }
.t1 { background: linear-gradient(135deg, #7a5410, #2a1d08); color: #ffd466; }
.t2 { background: linear-gradient(135deg, #5a2f9e, #1d1040); color: #c9a8ff; }
.t3 { background: linear-gradient(135deg, #1f5aa8, #0b1f40); color: #8ec0ff; }
.t4 { background: linear-gradient(135deg, #12787a, #082d2f); color: #6ff0e6; }
.tile .tile-text strong { color: #fff; }
@media (max-width: 1000px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .tiles { grid-template-columns: minmax(0, 1fr); } }

.duo { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; padding-bottom: 28px; }
@media (max-width: 900px) { .duo { grid-template-columns: minmax(0, 1fr); } }

.feature { position: relative; min-height: 240px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--card); display: flex; align-items: flex-end; }
.feature-bg { position: absolute; inset: 0; aspect-ratio: auto; border: 0; border-radius: 0; }
.feature::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6, 16, 31, 0.92) 0%, rgba(6, 16, 31, 0.55) 55%, rgba(6, 16, 31, 0.15) 100%); }
.feature-body { position: relative; z-index: 1; padding: 22px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; max-width: 520px; }
.feature-body h3 { font-size: 1.5rem; font-weight: 700; line-height: 1.15; }
.feature-body .btn-gold { margin-top: 12px; }

.news-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.news-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; text-decoration: none; display: flex; flex-direction: column; }
.news-card:hover { border-color: var(--gold); }
.news-img { aspect-ratio: 16 / 9; background: linear-gradient(135deg, #1a3b73, #0a1a31); display: block; overflow: hidden; }
.news-img img { width: 100%; height: 100%; object-fit: cover; }
.news-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.news-body strong { font-size: 0.92rem; line-height: 1.3; }
.cat { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.ago { font-size: 0.75rem; color: var(--muted); }
@media (max-width: 480px) { .news-list { grid-template-columns: minmax(0, 1fr); } }

/* Páginas internas ----------------------------------------------------- */
.page-wrap { padding-block: clamp(28px, 5vw, 56px); }
.page-wrap.narrow { max-width: 860px; }
.page-head { margin-bottom: 26px; display: flex; flex-direction: column; gap: 6px; }
.page-title { font-size: clamp(1.8rem, 4.5vw, 2.8rem); line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; }
.page-title span { color: var(--gold); }
.entry-thumb { margin-bottom: 24px; border-radius: 14px; overflow: hidden; }
.entry-content { font-size: 1.05rem; line-height: 1.75; color: #e4ebf8; }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content a { color: var(--gold2); }
.entry-content h2, .entry-content h3 { color: #fff; line-height: 1.25; margin-top: 1.6em; }
.entry-content img { border-radius: 10px; }
.entry-content input, .entry-content textarea, .entry-content select { max-width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); font-family: inherit; }

.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.post-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.post-card-img { aspect-ratio: 16 / 9; background: linear-gradient(135deg, #1a3b73, #0a1a31); display: block; overflow: hidden; }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.post-card-body h2 { font-size: 1.1rem; line-height: 1.3; }
.post-card-body h2 a { text-decoration: none; }
.post-card-body h2 a:hover { color: var(--gold); }
.post-card-body p { color: var(--muted); font-size: 0.9rem; }
@media (max-width: 960px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .post-grid { grid-template-columns: minmax(0, 1fr); } }

.navigation.pagination { margin-top: 28px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.nav-links .page-numbers { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; }
.nav-links .current { background: var(--gold); color: #1a1204; border-color: var(--gold); font-weight: 700; }

/* Programação ---------------------------------------------------------- */
.day-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.day-nav a { padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: 0.88rem; font-weight: 500; }
.day-nav a:hover, .day-nav a.is-today { border-color: var(--gold); color: var(--gold); }
.day-block { margin-bottom: 30px; scroll-margin-top: 96px; }
.sched { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.sched-row { display: grid; grid-template-columns: minmax(110px, 160px) minmax(0, 1fr) auto; gap: 6px 18px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); }
.sched-row:first-child { border-top: 0; }
.sched-row time { color: var(--gold); font-weight: 600; font-size: 0.9rem; }
.sched-row strong { display: block; font-size: 1.05rem; }
.sched-row small { display: block; color: var(--muted); }
.sched-row p { color: var(--muted); font-size: 0.88rem; margin-top: 2px; }
.sched-row.is-now { background: var(--card2); }
@media (max-width: 560px) { .sched-row { grid-template-columns: minmax(0, 1fr) auto; } .sched-row time { grid-column: 1 / -1; } }

/* Rodapé --------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 28px; color: var(--muted); font-size: 0.9rem; }
.footer-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
.footer-in a { color: var(--gold2); }

/* Player fixo ---------------------------------------------------------- */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: rgba(6, 16, 31, 0.97); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px)); }
.dock-in { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; }
.dock-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dock-text { min-width: 0; }
.dock-text strong, .dock-text small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-text strong { font-size: 0.85rem; }
.dock-text small { color: var(--muted); font-size: 0.75rem; }
.dock-center { display: flex; align-items: center; gap: 14px; }
.dock .play-lg { width: 46px; height: 46px; }
.dock .play-lg svg { width: 20px; height: 20px; }
.dock-right { display: flex; align-items: center; justify-content: flex-end; gap: 18px; min-width: 0; }
.live-status { display: inline-flex; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.live-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--live); display: block; }
.live-status .s-on { display: none; }
.raov-playing .live-status .s-on { display: inline; }
.raov-playing .live-status .s-off { display: none; }
.dock-msg { display: none; text-align: center; font-size: 0.8rem; color: var(--gold2); padding: 6px 20px 0; }
.dock.has-msg .dock-msg { display: block; }
.eq { display: flex; align-items: flex-end; gap: 3px; height: 22px; }
.eq i { width: 4px; height: 5px; background: var(--gold); display: block; border-radius: 1px; }
.raov-playing .eq i { animation: eq 0.9s ease-in-out infinite; }
.raov-playing .eq i:nth-child(2) { animation-delay: 0.2s; }
.raov-playing .eq i:nth-child(3) { animation-delay: 0.4s; }
.raov-playing .eq i:nth-child(4) { animation-delay: 0.1s; }
.raov-playing .eq i:nth-child(5) { animation-delay: 0.3s; }
@keyframes eq { 0%, 100% { height: 5px; } 50% { height: 22px; } }
@media (max-width: 860px) {
	.dock-in { grid-template-columns: minmax(0, 1fr) auto; }
	.dock-right { display: none; }
	.dock-center .eq { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.badge-live i, .raov-playing .eq i { animation: none; }
	.tile:hover { transform: none; }
}
