/* =====================================================
   Radio Los Andes FM — Custom Styles
   ===================================================== */

/* Smooth scroll */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #f97316, #ea580c); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #fb923c, #f97316); }
::selection { background: #f97316; color: #fff; }

/* =====================================================
   TYPOGRAPHY & UTILITIES
   ===================================================== */
.font-display { font-feature-settings: "kern" 1, "liga" 1; }

.gradient-text {
    background: linear-gradient(135deg, #f97316 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =====================================================
   HEADER / NAVIGATION
   ===================================================== */
#site-header {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(15,29,58,0.04);
    border-bottom: 1px solid rgba(15,29,58,0.06);
}
#site-header.scrolled {
    background: rgba(255,255,255,0.95);
    box-shadow: 0 4px 20px rgba(15,29,58,0.08);
    border-bottom-color: rgba(15,29,58,0.08);
}

.nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    color: #1a3050;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 0.5rem;
    transition: all 0.25s ease;
}
.nav-link:hover { color: #0f1d3a; background: rgba(15,29,58,0.04); }
.nav-link::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #f97316, #f59e0b);
    transform: translateX(-50%);
    transition: width 0.3s ease;
    border-radius: 2px;
}
.nav-link:hover::after, .nav-link.active::after { width: 60%; }

.mobile-link {
    display: block;
    padding: 0.875rem 1rem;
    color: #1a3050;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s;
}
.mobile-link:hover { background: rgba(15,29,58,0.04); color: #ea580c; }

.social-icon {
    display: inline-grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    background: #eef3f8;
    color: #1a3050;
    transition: all 0.25s ease;
    font-size: 0.875rem;
}
.social-icon:hover {
    background: #f97316;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(249,115,22,0.4);
}

/* =====================================================
   HERO DECORATIONS
   ===================================================== */
.hero-pattern {
    background-image:
        radial-gradient(circle at 25% 30%, rgba(245,158,11,0.10) 0%, transparent 40%),
        radial-gradient(circle at 75% 70%, rgba(249,115,22,0.08) 0%, transparent 40%),
        repeating-linear-gradient(45deg, rgba(15,29,58,0.02) 0, rgba(15,29,58,0.02) 1px, transparent 1px, transparent 14px);
    background-size: 100% 100%, 100% 100%, 28px 28px;
}

/* Floating particles */
.particle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245,158,11,0.6), transparent 70%);
    filter: blur(1px);
    opacity: 0.5;
    animation: floatParticle 12s linear infinite;
}
.particle-1 { width: 6px; height: 6px; top: 20%; left: 10%; animation-delay: 0s; }
.particle-2 { width: 4px; height: 4px; top: 60%; left: 85%; animation-delay: -3s; }
.particle-3 { width: 8px; height: 8px; top: 80%; left: 25%; animation-delay: -6s; }
.particle-4 { width: 5px; height: 5px; top: 30%; left: 70%; animation-delay: -9s; }

@keyframes floatParticle {
    0%   { transform: translate(0, 0) scale(1); opacity: 0; }
    20%  { opacity: 0.7; }
    50%  { transform: translate(30px, -50px) scale(1.5); opacity: 0.9; }
    80%  { opacity: 0.5; }
    100% { transform: translate(-20px, -120px) scale(0.5); opacity: 0; }
}

/* Stat cards in hero */
.stat-card {
    padding: 1rem 0.75rem;
    border-radius: 1rem;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(15,29,58,0.06);
    box-shadow: 0 4px 12px rgba(15,29,58,0.04);
    transition: all 0.3s;
}
.stat-card:hover { background: #fff; transform: translateY(-4px); box-shadow: 0 12px 25px rgba(15,29,58,0.08); }
.stat-num   { font-family: 'Playfair Display', serif; font-size: 1.75rem; font-weight: 800; color: #ea580c; line-height: 1; }
.stat-label { font-size: 0.7rem; color: #475569; text-transform: uppercase; letter-spacing: 0.2em; margin-top: 0.35rem; font-weight: 600; }

/* =====================================================
   PLAYER BAR
   ===================================================== */
.player-bar {
    transition: transform 0.4s ease;
}
.player-bar:hover { transform: translateY(-2px); }

/* Focus highlight — when user clicks "Escuchar en vivo" */
#player-section.is-focusing .player-bar {
    animation: focusPulse 1.4s ease-out 0s 2;
}
@keyframes focusPulse {
    0%   { box-shadow: 0 25px 50px -12px rgba(15,29,58,0.2), 0 0 0 0 rgba(249,115,22,0.55); }
    50%  { box-shadow: 0 25px 50px -12px rgba(15,29,58,0.2), 0 0 0 14px rgba(249,115,22,0); }
    100% { box-shadow: 0 25px 50px -12px rgba(15,29,58,0.2), 0 0 0 0 rgba(249,115,22,0); }
}

/* Alternative listeners row */
.alt-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.95rem 1.1rem;
    background: #fff;
    color: #0f1d3a;
    border-radius: 0.85rem;
    font-weight: 600;
    font-size: 0.92rem;
    box-shadow: 0 6px 18px rgba(15,29,58,0.06);
    transition: all 0.25s ease;
    text-decoration: none;
    border: 1px solid rgba(15,29,58,0.08);
}
.alt-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(249,115,22,0.18);
    background: #fff;
    border-color: rgba(249,115,22,0.4);
    color: #ea580c;
}
.alt-link span { flex: 1; }

.play-main-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    font-size: 1.25rem;
    box-shadow: 0 10px 30px rgba(249,115,22,0.45), inset 0 1px 0 rgba(255,255,255,0.2);
    transition: all 0.3s;
    flex-shrink: 0;
}
.play-main-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 14px 40px rgba(249,115,22,0.6), inset 0 1px 0 rgba(255,255,255,0.2);
}
.play-main-btn:active { transform: scale(0.97); }
.play-main-btn.playing {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 10px 30px rgba(245,158,11,0.45), inset 0 1px 0 rgba(255,255,255,0.2);
}
.play-main-btn.playing::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 9999px;
    border: 2px solid #f59e0b;
    animation: ringPulse 1.8s ease-out infinite;
}
@keyframes ringPulse {
    0%   { transform: scale(1);   opacity: 0.8; }
    100% { transform: scale(1.3); opacity: 0; }
}

/* Volume slider */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
    height: 4px;
    background: rgba(15,29,58,0.12);
    border-radius: 9999px;
}
input[type="range"]::-moz-range-track {
    height: 4px;
    background: rgba(15,29,58,0.12);
    border-radius: 9999px;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 14px; width: 14px;
    border-radius: 50%;
    background: #fb923c;
    margin-top: -5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    border: 2px solid #ea580c;
}
input[type="range"]::-moz-range-thumb {
    height: 14px; width: 14px;
    border-radius: 50%;
    background: #fb923c;
    border: 2px solid #ea580c;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Equalizer */
#equalizer.is-playing { opacity: 1; }
.eq-bar {
    display: inline-block;
    width: 4px;
    background: linear-gradient(180deg, #f97316, #f59e0b);
    border-radius: 2px;
    height: 30%;
    transform-origin: bottom;
}
.eq-bar:nth-child(1)  { animation: eq 0.9s  ease-in-out infinite;            }
.eq-bar:nth-child(2)  { animation: eq 1.2s  ease-in-out infinite -0.1s;     }
.eq-bar:nth-child(3)  { animation: eq 0.8s  ease-in-out infinite -0.2s;     }
.eq-bar:nth-child(4)  { animation: eq 1.1s  ease-in-out infinite -0.3s;     }
.eq-bar:nth-child(5)  { animation: eq 1.0s  ease-in-out infinite -0.15s;    }
.eq-bar:nth-child(6)  { animation: eq 1.3s  ease-in-out infinite -0.25s;    }
.eq-bar:nth-child(7)  { animation: eq 0.85s ease-in-out infinite -0.05s;    }
.eq-bar:nth-child(8)  { animation: eq 1.15s ease-in-out infinite -0.35s;    }
.eq-bar:nth-child(9)  { animation: eq 0.95s ease-in-out infinite -0.18s;    }
.eq-bar:nth-child(10) { animation: eq 1.25s ease-in-out infinite -0.28s;    }
.eq-bar:nth-child(11) { animation: eq 0.95s ease-in-out infinite -0.08s;    }
.eq-bar:nth-child(12) { animation: eq 1.05s ease-in-out infinite -0.32s;    }
@keyframes eq {
    0%, 100% { transform: scaleY(0.35); }
    50%      { transform: scaleY(1);    }
}

#live-pulse.is-live { opacity: 0.75; animation: livePing 1.6s cubic-bezier(0,0,0.2,1) infinite; }
@keyframes livePing {
    75%, 100% { transform: scale(2); opacity: 0; }
}

/* =====================================================
   PROGRAMMING CARDS
   ===================================================== */
.program-card {
    position: relative;
    background: #fff;
    border-radius: 1.5rem;
    padding: 2rem 1.75rem;
    box-shadow: 0 10px 40px -10px rgba(15,29,58,0.08);
    border: 1px solid #eef3f8;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}
.program-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 4px;
    background: linear-gradient(90deg, #f97316, #f59e0b);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s;
}
.program-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 60px -15px rgba(249,115,22,0.18);
    border-color: rgba(249,115,22,0.2);
}
.program-card:hover::before { transform: scaleX(1); }

.program-icon-wrap {
    width: 64px; height: 64px;
    border-radius: 1.25rem;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    margin-bottom: 1.25rem;
    box-shadow: 0 10px 25px rgba(249,115,22,0.35);
    transition: transform 0.4s;
}
.program-card:hover .program-icon-wrap { transform: rotate(-6deg) scale(1.05); }
.program-icon { font-size: 1.75rem; }
.program-title { font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 700; color: #0f1d3a; margin-bottom: 0.75rem; }
.program-desc  { color: #475569; line-height: 1.7; margin-bottom: 1rem; }
.program-list  { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.program-list li { display: flex; align-items: center; gap: 0.6rem; color: #475569; font-size: 0.92rem; }
.program-list i  { color: #ea580c; font-size: 0.75rem; }

/* =====================================================
   BIOGRAPHY HIGHLIGHTS
   ===================================================== */
.highlight-card {
    background: #fff;
    border: 1px solid #eef3f8;
    border-radius: 1rem;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(15,29,58,0.05);
}
.highlight-card:hover { background: #fff; transform: translateY(-4px); box-shadow: 0 12px 25px rgba(15,29,58,0.08); border-color: rgba(249,115,22,0.2); }
.highlight-icon { font-size: 1.5rem; color: #ea580c; margin-bottom: 0.5rem; }
.highlight-num   { font-family: 'Playfair Display', serif; font-size: 2rem; font-weight: 800; color: #0f1d3a; line-height: 1; }
.highlight-label { font-size: 0.75rem; color: #64748b; text-transform: uppercase; letter-spacing: 0.15em; margin-top: 0.5rem; font-weight: 600; }

.prose-bio p { margin-bottom: 1rem; }
.prose-bio strong { font-weight: 700; }

/* =====================================================
   GALLERY
   ===================================================== */
.gallery-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: 9999px;
    background: #fff;
    color: #475569;
    border: 1px solid #e2e8f0;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s;
}
.gallery-tab:hover { background: #fff7ed; color: #ea580c; border-color: rgba(249,115,22,0.3); }
.gallery-tab.active {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(249,115,22,0.3);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    cursor: pointer;
    display: block;
    background: #eef3f8;
    box-shadow: 0 4px 20px rgba(15,29,58,0.08);
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(15,29,58,0.8) 100%);
    display: grid;
    place-items: center;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s;
}
.gallery-overlay i { font-size: 1.5rem; transform: scale(0.5); transition: transform 0.3s; }
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-item:hover .gallery-overlay i { transform: scale(1); }

.gallery-item.hidden { display: none; }

/* =====================================================
   CONTACT CARDS
   ===================================================== */
.contact-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: #fff;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px -8px rgba(15,29,58,0.06);
    transition: all 0.3s;
    text-decoration: none;
}
.contact-card:hover {
    transform: translateY(-3px);
    border-color: rgba(249,115,22,0.3);
    box-shadow: 0 14px 35px -10px rgba(249,115,22,0.15);
}
.contact-icon {
    width: 52px; height: 52px;
    flex-shrink: 0;
    border-radius: 1rem;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1.25rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}
.contact-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.2em; color: #94a3b8; font-weight: 700; }
.contact-value { font-size: 1.05rem; font-weight: 600; color: #0f1d3a; margin-top: 0.15rem; }
.contact-sub   { font-size: 0.8rem; color: #64748b; margin-top: 0.15rem; }

.social-card {
    width: 48px; height: 48px;
    display: inline-grid;
    place-items: center;
    border-radius: 0.75rem;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}
.social-card:hover { box-shadow: 0 12px 25px rgba(0,0,0,0.25); }

/* =====================================================
   FOOTER
   ===================================================== */
.footer-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: #fcd34d;
    font-weight: 700;
    margin-bottom: 1rem;
}
.footer-link {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}
.footer-link:hover { color: #fbbf24; transform: translateX(3px); }
.footer-social {
    display: inline-grid;
    place-items: center;
    width: 2.25rem; height: 2.25rem;
    border-radius: 0.5rem;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.85);
    transition: all 0.25s;
    text-decoration: none;
}
.footer-social:hover { background: #f97316; color: #fff; transform: translateY(-2px); }

/* =====================================================
   LIGHTBOX
   ===================================================== */
#lightbox {
    opacity: 0;
    transition: opacity 0.3s;
}
#lightbox.flex { opacity: 1; }
#lightbox-img { animation: lightboxIn 0.4s ease; }
@keyframes lightboxIn {
    from { transform: scale(0.9); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

/* =====================================================
   REVEAL ANIMATIONS (on scroll)
   ===================================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* =====================================================
   FOCUS STYLES (a11y)
   ===================================================== */
button:focus-visible, a:focus-visible, input:focus-visible {
    outline: 2px solid #f97316;
    outline-offset: 2px;
}

/* =====================================================
   UTILITIES
   ===================================================== */
.no-scroll { overflow: hidden; }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 640px) {
    .play-main-btn { width: 56px; height: 56px; }
    .stat-num { font-size: 1.5rem; }
    .stat-label { font-size: 0.65rem; letter-spacing: 0.15em; }
    .program-card { padding: 1.5rem 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
