/*
Theme Name: Radio Fuego de Dios
Description: Tema de radio cristiana en español con reproductor, galería de YouTube y aplicación web instalable.
Version: 1.0.3
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: radio-fuego
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
    color-scheme: dark;
    --bg: #06101e;
    --surface: #0d1c30;
    --line: #344760;
    --text: #f7f8fc;
    --muted: #b7c5d7;
    --amber: #ffbc22;
    --gold: #ffc43a;
    --button: linear-gradient(#ffc724, #f58a03);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); }
a { color: inherit; }
a:hover { color: var(--gold); }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
img { max-width: 100%; height: auto; }
svg { width: 24px; height: 24px; flex: none; vertical-align: middle; }
.wrap { width: min(1200px, calc(100% - 3rem)); margin-inline: auto; }
.skip { position: fixed; left: 1rem; top: .75rem; transform: translateY(-200%); background: var(--bg); color: white; padding: .75rem; z-index: 100; }
.skip:focus { transform: none; }
.site-header { background: #071321; border-bottom: 1px solid #25364a; }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.header-inner { min-height: 83px; position: relative; }
.brand { display: inline-flex; gap: .7rem; align-items: center; text-decoration: none; font-size: 1.15rem; text-transform: uppercase; font-weight: 800; line-height: 1.05; letter-spacing: -.03em; }
.brand img { width: 56px; aspect-ratio: 1; object-fit: contain; border-radius: 50%; }
.brand strong { color: var(--amber); display: block; font-size: 1.32em; }
#site-nav { display: flex; align-items: center; gap: clamp(1.5rem, 4vw, 3.5rem); }
#site-nav a { text-decoration: none; font-weight: 650; }
.home #site-nav a:first-child { color: var(--gold); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: .6rem; }
.hamburger { display: none; background: transparent; color: var(--text); border: 0; border-radius: .5rem; padding: .6rem; }

.hero {
    background: linear-gradient(90deg, #06101e 0%, #08111c9c 42%, #08111c12 85%), url("assets/cabina.webp") center 48% / cover;
    border-bottom: 1px solid #3a3028;
}
.hero-inner { min-height: clamp(370px, 40vw, 510px); display: grid; align-content: center; justify-items: start; padding-block: 3.25rem; }
.hero h1 { max-width: 10ch; font-size: clamp(3rem, 7vw, 6rem); line-height: .97; letter-spacing: -.065em; margin: 0; font-weight: 850; }
.hero h1 em { color: var(--amber); display: block; font-style: normal; }
.hero p { margin: .9rem 0 1.7rem; font-size: clamp(1.1rem, 2vw, 1.5rem); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; border-radius: 2rem; padding: .65rem 1.15rem; text-decoration: none; font-weight: 750; }
.primary, .play-control { background: var(--button); color: #170e05; border: 1px solid #ffc641; }
.primary:hover, .play-control:hover { filter: brightness(1.1); }
.secondary { background: #101f33; border: 1px solid var(--line); color: var(--text); }
.secondary:hover { border-color: var(--amber); color: var(--gold); }
.radio-panel { padding-block: 1.15rem 0; }
.player {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) minmax(75px, 180px) auto;
    align-items: center;
    gap: clamp(.75rem, 2vw, 1.7rem);
    padding: 1rem 1.2rem;
    background: linear-gradient(130deg,#112439,#081524 75%);
    border: 1px solid var(--line);
    border-radius: 1rem;
}
.player audio { display: none; }
.play-control { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; padding: 0; }
.play-control svg { width: 30px; height: 30px; }
.pause-icon, [data-playing="true"] .play-icon { display: none; }
[data-playing="true"] .pause-icon { display: inline; }
.live-badge { font-size: .78rem; text-transform: uppercase; letter-spacing: .045em; background: #941e24; border-radius: .4rem; padding: .36rem .55rem; font-weight: 800; white-space: nowrap; justify-self: start; }
.track { display: grid; gap: .2rem; min-width: 0; overflow-wrap: anywhere; }
.track-label { color: var(--gold); font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.track strong { font-size: 1.13rem; line-height: 1.25; }
.track [data-track-artist] { color: var(--muted); }
.wave { display: flex; gap: clamp(2px,.36vw,5px); align-items: center; justify-content: center; height: 52px; overflow: hidden; }
.wave i { height: var(--h); width: 3px; min-width: 1px; flex: 0 1 4px; border-radius: 6px; background: var(--button); opacity: .87; }
.playing .wave i { animation: levels .78s var(--delay) alternate infinite ease-in-out; }
@keyframes levels { from { transform: scaleY(.42); } to { transform: scaleY(1); } }
.volume { display: flex; align-items: center; gap: .5rem; }
.volume input { width: clamp(55px, 9vw, 110px); accent-color: var(--amber); }
.player-credit { grid-column: 1 / -1; justify-self: end; margin: 0; color: var(--muted); font-size: .875rem; }
.player-credit strong { color: var(--text); font-weight: 650; }
.player-message { grid-column: 1 / -1; margin: 0; color: #ffcaac; }
.section { padding-block: 2.25rem; border-bottom: 1px solid #233347; }
.section-heading { display: flex; gap: 1rem; justify-content: space-between; align-items: center; margin-bottom: 1.1rem; }
.section h2 { font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -.035em; margin: 0; }
.section-heading h2 { border-left: 5px solid var(--amber); padding-left: .7rem; }
.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1.1rem; }
.video-grid:empty { display: none; }
.video-card { border: 1px solid var(--line); border-radius: .75rem; overflow: hidden; background: var(--surface); }
.video-card > a { display: block; padding: .8rem; font-weight: 650; }
.video-thumbnail { display: block; width: 100%; position: relative; border: 0; padding: 0; background: #000; }
.video-card img, .video-card iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; object-fit: cover; }
.youtube-play { display: grid; place-items: center; width: 54px; height: 38px; border-radius: .66rem; background: #d91726; color: white; }
.video-thumbnail .youtube-play { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%,-50%); }
.playlist { width: min(100%, 700px); aspect-ratio: 16 / 9; display: block; border: 0; border-radius: .85rem; }
.youtube-feature { display: flex; align-items: center; gap: 1rem; border: 1px solid var(--line); padding: 1.25rem; border-radius: .85rem; background: var(--surface); text-decoration: none; }
.youtube-feature small { display: block; margin-top: .25rem; color: var(--muted); font-size: .93rem; }
.contact-links { display: flex; flex-wrap: wrap; gap: .7rem; }

.site-footer { background: #04101d; padding-block: 1.25rem; }
.footer-inner { flex-wrap: wrap; justify-content: center; column-gap: 1.8rem; }
.footer-inner span { font-weight: 750; }
.content-page { padding-block: 2rem; min-height: 60vh; }
.app-only, .bottom-nav, #mas { display: none; }

@media (max-width: 720px) {
    .wrap { width: calc(100% - 1.6rem); }
    .header-inner { min-height: 65px; }
    .brand { font-size: .9rem; }
    .brand img { width: 44px; }
    .hamburger { display: block; }
    #site-nav { display: none; position: absolute; z-index: 5; top: calc(100% - 2px); right: 0; width: min(260px, 100%); padding: .75rem; background: var(--surface); border: 1px solid var(--line); border-radius: .75rem; }
    #site-nav a { display: block; padding: .75rem; }
    .hamburger[aria-expanded="true"] + #site-nav { display: block; }
    .hero { background-position: 62% center; }
    .hero-inner { min-height: 330px; padding-block: 2.1rem; }
    .hero h1 { font-size: clamp(2.75rem, 11vw, 4.5rem); }
    .player { grid-template-columns: auto minmax(0,1fr) auto; gap: .6rem 1rem; padding: .85rem; }
    .play-control { grid-area: 1 / 1 / 3 / 2; width: 47px; height: 47px; }
    .live-badge { grid-area: 1 / 2 / 2 / -1; }
    .track { grid-area: 2 / 2 / 3 / -1; }
    .wave { grid-area: 3 / 1 / 4 / 3; height: 29px; }
    .wave i { max-height: 30px; }
    .volume { grid-area: 3 / 3 / 4 / 4; }
    .section-heading { align-items: flex-start; flex-direction: column; }
    .video-grid { grid-template-columns: 1fr; }
}

.installed-app .web-only { display: none; }
.installed-app .app-only, .installed-app #mas:not([hidden]) { display: block; }
.installed-app body.home { --nav-h: calc(75px + env(safe-area-inset-bottom, 0px)); }
.installed-app body.home main { min-height: 100dvh; padding-bottom: var(--nav-h); padding-top: env(safe-area-inset-top, 0px); }
.installed-app .radio-panel { padding: 0; }
.installed-app .radio-panel .wrap { width: 100%; }
.installed-app .player {
    border: 0;
    border-radius: 0;
    min-height: calc(100dvh - var(--nav-h) - env(safe-area-inset-top, 0px));
    background: radial-gradient(ellipse at 50% 27%, #79441755 0%, #0b1828 48%, var(--bg) 80%);
    padding: 1.25rem max(1rem, env(safe-area-inset-right)) 1.3rem max(1rem, env(safe-area-inset-left));
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(.6rem, 2dvh, 1.15rem);
    text-align: center;
}
.installed-app .app-title { order: 0; font-size: 1rem; letter-spacing: .03em; margin: 0; }
.installed-app .app-cover { order: 1; width: min(65vw, 34dvh, 345px); aspect-ratio: 1; object-fit: contain; border-radius: 50%; filter: drop-shadow(0 0 1.2rem #f2872660); }
.installed-app .track { order: 2; gap: .4rem; }
.installed-app .track-label { border: 1px solid var(--amber); border-radius: 2rem; padding: .3rem .8rem; justify-self: center; }
.installed-app .track strong { font-size: clamp(1.55rem, 6vw, 2.4rem); }
.installed-app .wave { order: 3; width: min(80vw, 290px); height: 52px; gap: 5px; }
.installed-app .wave i { max-height: none; }
.installed-app .play-control { order: 4; width: clamp(68px, 11dvh, 90px); height: clamp(68px, 11dvh, 90px); box-shadow: 0 5px 25px #ff95004a; }
.installed-app .play-control svg { width: 40px; height: 40px; }
.installed-app .live-badge { order: 5; }
.installed-app .player-message { order: 6; }
.installed-app .player-credit { order: 7; align-self: center; }
.installed-app .volume { display: none; }
.installed-app .bottom-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    position: fixed;
    z-index: 8;
    inset: auto 0 0;
    min-height: var(--nav-h);
    padding: .4rem max(.55rem, env(safe-area-inset-right)) env(safe-area-inset-bottom, 0px) max(.55rem, env(safe-area-inset-left));
    background: #0b192a;
    border-top: 1px solid #344965;
}
.bottom-nav a { position: relative; display: flex; gap: .28rem; flex-direction: column; justify-content: center; align-items: center; text-decoration: none; padding: .3rem .1rem .55rem; min-height: 54px; font-weight: 650; font-size: clamp(.75rem, 3.1vw, .94rem); }
.bottom-nav a[aria-current] { color: var(--gold); }
.bottom-nav a[aria-current]::after { content: ""; position: absolute; height: 3px; border-radius: 2px; background: currentColor; width: 36px; bottom: .2rem; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .playing .wave i { animation: none; }
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.install-cta { background: #10243a; color: var(--gold); border: 1px solid #cc9c40; }
.install-cta:hover { background: #1a344d; }
.install-guide {
    width: min(calc(100% - 1.25rem), 440px);
    max-height: calc(100dvh - 2rem);
    padding: clamp(1rem, 4vw, 1.4rem);
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 1.15rem;
    box-shadow: 0 18px 65px #0008;
    overscroll-behavior: contain;
}
.install-guide::backdrop { background: #020711d9; }
.install-guide h2 { margin: 0; font-size: 1.35rem; }
.install-guide .install-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.install-close {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: .7rem;
    color: var(--text);
    background: var(--surface);
}
.install-close:hover { border-color: var(--gold); }
.install-intro { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .85rem; margin-bottom: 1.25rem; }
.install-intro p { margin: .45rem 0 0; color: var(--muted); }
.install-card { border: 1px solid var(--line); border-radius: 1rem; padding: clamp(.9rem, 3vw, 1.45rem); background: var(--surface); }
.install-card-header { display: flex; align-items: center; gap: .8rem; padding-bottom: .85rem; border-bottom: 1px solid var(--line); }
.install-card-header h3 { margin: 0; font-size: 1.25rem; }
.install-card-header h3 span { display: block; color: var(--muted); font-size: .92rem; font-weight: 500; }
.install-symbol { display: inline-flex; justify-content: center; align-items: center; gap: .2rem; width: 49px; min-height: 42px; color: var(--gold); background: var(--bg); border: 1px solid var(--line); border-radius: .65rem; flex: none; }
.install-symbol svg { width: 22px; height: 22px; }
.install-symbol svg + svg { width: 18px; height: 18px; }
.install-steps { margin: 1.1rem 0; padding-inline-start: 1.4rem; }
.install-steps li { padding-inline-start: .2rem; }
.install-steps li + li { margin-top: .85rem; }
.install-steps li::marker { color: var(--gold); font-weight: 800; }
.install-step-content { display: flex; align-items: flex-start; gap: .65rem; }
.install-step-detail { display: block; color: var(--muted); font-size: .95rem; margin-top: .2rem; line-height: 1.45; }
.install-help { color: var(--muted); }
.install-help summary { cursor: pointer; width: fit-content; color: var(--gold); }
.install-help p { margin: .6rem 0 0; }
.install-finish { display: flex; align-items: center; gap: .75rem; margin-top: 1rem; }
.install-finish img { border-radius: .75rem; flex: none; }
.install-finish p { margin: 0; color: var(--muted); }
.install-finish strong { color: var(--text); }
