/*
Theme Name: Radiant Aurora Premium (FSE Edition)
Theme URI: https://yourwebsite.com
Author: Elite Theme Studio
Description: A massive upgrade unlocking Full Site Editing. Features soundwave mouse tracking, mobile-safe glass boundaries, fixed high-contrast typography, and perfect Gutenberg synergy.
Version: 5.0.1
Requires at least: 6.2
Tested up to: 6.5
License: GNU General Public License v2 or later
Text Domain: radiant-aurora
*/

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* Highly contrasted text to fix wash-out */
    --text-primary: #020617; /* Near Black */
    --text-secondary: #334155; /* Slate */
    
    --bg-base: #f8fafc;
    --bg-surface: rgba(255, 255, 255, 0.7); 
    --bg-surface-solid: rgba(255, 255, 255, 0.95);
    
    --aurora-1: #818cf8;
    --aurora-2: #f472b6;
    --aurora-3: #2dd4bf;

    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 15px 35px rgba(2, 6, 23, 0.05);
    
    --radius-md: 20px;
    --radius-lg: 32px;
    --radius-pill: 100px;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.8;
    margin: 0;
    overflow-x: hidden;
    padding-top: 50px;
}

/* -------------------------------------
   THE AURORA AMBIENCE
   ------------------------------------- */
body::before, body::after, .aurora-orb {
    content: ''; position: fixed; border-radius: 50%;
    filter: blur(120px); z-index: -1; opacity: 0.4;
    animation: float 25s infinite alternate ease-in-out;
}
body::before { width: 60vw; height: 60vw; background: var(--aurora-1); top: -10vh; left: -10vw; }
body::after { width: 50vw; height: 50vw; background: var(--aurora-2); bottom: -10vh; right: -10vw; animation-delay: -5s; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 10%) scale(1.1); }
}

/* -------------------------------------
   LOCALIZED MOUSE SOUND WAVES
   ------------------------------------- */
.mouse-sound-wave {
    position: fixed;
    width: 4px;
    border-radius: 4px;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    background: var(--wave-pastel, rgba(255,255,255,0.25));
    box-shadow: 0 0 12px var(--wave-pastel, rgba(255,255,255,0.25));
    animation: soundWaveAnim 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes soundWaveAnim {
    0% { height: 4px; opacity: 0.3; transform: translate(-50%, -50%); }
    30% { height: var(--wave-height); opacity: 0.25; transform: translate(-50%, -50%); }
    100% { height: 4px; opacity: 0; transform: translate(-50%, calc(-50% - 15px)); }
}

/* -------------------------------------
   FSE GUTENBERG BLOCK STYLING
   ------------------------------------- */
h1, h2, h3, h4, h5, h6 { color: var(--text-primary); font-weight: 800; letter-spacing: -0.02em; }
a { color: var(--aurora-1); text-decoration: none; transition: 0.3s ease; }
a:hover { color: var(--aurora-2); }

/* The Header — Compact, high-specificity to override Gutenberg */
header.wp-block-group.site-header {
    position: fixed !important;
    top: 6px !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 auto !important;
    width: calc(100% - 60px) !important;
    max-width: 1100px !important;
    z-index: 1000 !important;
    padding: 2px 16px !important; /* Extremely tight padding */
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-pill) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
    
    /* Safari Flickering Fix: Force Hardware Acceleration */
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    perspective: 1000px;
    -webkit-perspective: 1000px;
    
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease !important;
    will-change: transform, opacity;
}

/* Ensure inner groups don't add their own padding */
header.wp-block-group.site-header .wp-block-group {
    padding: 0 !important;
    margin: 0 !important;
    gap: 12px !important; /* Tighter gap between logo and title */
}

/* Hide State - Using transform for smoothness */
header.wp-block-group.site-header.header--hidden {
    transform: translate3d(0, -120%, 0);
    -webkit-transform: translate3d(0, -120%, 0);
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Desktop Navigation Link Glow Effect */
.site-header .wp-block-navigation-item__content {
    position: relative !important;
    padding: 4px 12px !important; /* Smaller padding */
    border-radius: var(--radius-pill) !important;
    font-weight: 600 !important;
    font-size: 0.88rem !important; /* Slightly smaller text */
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
}

.site-header .wp-block-navigation-item__content:hover {
    color: var(--aurora-1) !important;
    text-shadow: 0 0 10px rgba(129, 140, 248, 0.5);
    background: rgba(129, 140, 248, 0.05) !important;
}

/* The Glow Bloom */
.site-header .wp-block-navigation-item__content::after {
    content: '' !important;
    position: absolute !important;
    inset: -2px !important;
    border-radius: inherit !important;
    opacity: 0 !important;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.2), transparent 70%) !important;
    transition: opacity 0.3s ease !important;
    pointer-events: none !important;
    z-index: -1 !important;
}

.site-header .wp-block-navigation-item__content:hover::after {
    opacity: 1 !important;
}

/* ============================================
   MOBILE NAVIGATION — FULL ESCAPE FROM HEADER
   ============================================ */

/* When menu is open, fullscreen frosted overlay */
.wp-block-navigation__responsive-container.is-menu-open {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    z-index: 100000 !important;
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(30px) !important;
    -webkit-backdrop-filter: blur(30px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 40px !important;
    overflow-y: auto !important;
    cursor: pointer !important;
}

/* The inner nav content — reset cursor so links feel normal */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 20px !important;
    width: 100% !important;
    max-width: 400px !important;
    cursor: default !important;
}

/* Style individual menu items */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: var(--text-primary) !important;
    padding: 12px 24px !important;
    display: block !important;
    text-align: center !important;
    border-radius: var(--radius-md) !important;
    transition: background 0.3s ease !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:hover {
    background: rgba(129, 140, 248, 0.15) !important;
    color: var(--aurora-1) !important;
}

/* The native WP close button — force visible */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 100001 !important;
    display: flex !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    border: 1px solid var(--glass-border) !important;
    background: #fff !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    color: var(--text-primary) !important;
    cursor: pointer !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close svg {
    width: 22px !important;
    height: 22px !important;
    fill: currentColor !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close:hover {
    transform: scale(1.1) rotate(90deg) !important;
}

/* Post/Page Glass Wrappers for Readability */
.wp-block-post-content {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin: 40px auto;
    box-shadow: var(--glass-shadow);
}

.wp-block-post-content p, 
.wp-block-post-content h1, 
.wp-block-post-content h2, 
.wp-block-post-content h3, 
.wp-block-post-content h4, 
.wp-block-post-content h5, 
.wp-block-post-content h6, 
.wp-block-post-content li {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.9), 0 0 20px rgba(255, 255, 255, 0.7);
    position: relative;
    z-index: 1;
}

/* Typography Overrides for High Contrast */
.wp-block-post-title a { color: var(--text-primary) !important; text-decoration: none; }
.wp-block-post-title a:hover { color: var(--aurora-1) !important; }
.wp-block-post-excerpt { color: var(--text-secondary); font-size: 1.05rem; }

/* The Post Grid & Cards */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    padding: 40px 0;
}

.post-card {
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: blur(20px);
    box-shadow: var(--glass-shadow);
    transition: 0.4s ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-8px);
    background: var(--bg-surface-solid);
    border-color: #fff;
    box-shadow: 0 25px 50px rgba(2, 6, 23, 0.1);
}

.post-card .wp-block-post-featured-image img {
    border-radius: 16px;
    aspect-ratio: 16/10;
    object-fit: cover;
    margin-bottom: 20px;
    width: 100%;
}

/* Beautiful FSE Buttons */
.wp-block-button__link {
    background: linear-gradient(135deg, var(--aurora-1), var(--aurora-2)) !important;
    color: #fff !important;
    border-radius: var(--radius-pill) !important;
    padding: 14px 36px !important;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(129, 140, 248, 0.3);
    border: none;
}
.wp-block-button__link:hover { transform: translateY(-3px) scale(1.02); }

/* The Footer */
.site-footer {
    background: rgba(255, 255, 255, 0.6);
    border-top: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    padding: 60px 40px 30px;
    margin-top: 60px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* -------------------------------------
   MOBILE FIXES (Safe Padding & Borders)
   ------------------------------------- */
@media (max-width: 768px) {
    .site-header {
        top: 8px;
        width: calc(100% - 24px);
        padding: 5px 15px;
    }
    .site-title { font-size: 1.1rem; }
    
    .wp-block-group.container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    
    .post-card {
        border-radius: var(--radius-md); /* Softer on mobile */
    }

    /* Keep pages safe from screen edge on mobile */
    .wp-block-post-content {
        padding: 20px;
        background: var(--bg-surface);
        border-radius: var(--radius-md);
        border: 1px solid var(--glass-border);
        margin: 0 12px;
    }
}

/* -------------------------------------
   RADIO STATION FRONT PAGE STYLES
   ------------------------------------- */

.radio-hero-section {
    min-height: 60vh;
    padding: 40px 0;
}

.radio-title {
    font-size: clamp(3rem, 6vw, 5rem);
    background: linear-gradient(135deg, var(--aurora-1), var(--aurora-2), var(--aurora-3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    margin-bottom: 20px;
}

.radio-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 90%;
}

/* Glass & Interactive Cards */
.interactive-glow-card {
    position: relative;
}

.glass-card {
    position: relative;
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    /* Removed overflow:hidden preventing dropdown clipping */
}

.glass-card > * {
    position: relative;
    z-index: 1;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: var(--mouse-y);
    left: var(--mouse-x);
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--aurora-1) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 1);
    box-shadow: 0 25px 50px rgba(129, 140, 248, 0.15);
}

.info-cards-section .glass-card {
    margin: 10px; /* spacing for flex layouts */
}


/* Radio Player UI */
.radio-player-card {
    position: relative;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 40px;
    padding: 50px 40px;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    overflow: hidden;
    z-index: 10;
}

.player-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.15) 0%, transparent 60%);
    animation: rotateGlow 15s linear infinite;
    z-index: -1;
}

@keyframes rotateGlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.live-status {
    position: absolute;
    top: 25px;
    left: 30px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: #ef4444; /* red */
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ef4444;
    box-shadow: 0 0 10px #ef4444;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

.music-note-glass {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1), inset 0 0 20px rgba(255,255,255,0.4);
    color: var(--aurora-1);
    animation: floatNote 5s ease-in-out infinite;
}

.floating-note {
    filter: drop-shadow(0 0 12px var(--aurora-1));
    animation: pulseNote 3s ease-in-out infinite alternate;
}

@keyframes floatNote {
    0% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0); }
}

@keyframes pulseNote {
    0% { transform: scale(0.95); opacity: 0.8; }
    100% { transform: scale(1.05); opacity: 1; }
}

.radio-visualizer {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    height: 40px;
    margin-bottom: 25px;
}

.radio-visualizer .bar {
    width: 6px;
    background: var(--aurora-1);
    border-radius: 3px;
    animation: eq 1s ease-in-out infinite alternate;
}

.radio-visualizer .bar:nth-child(1) { height: 20%; animation-delay: 0.1s; }
.radio-visualizer .bar:nth-child(2) { height: 60%; animation-delay: 0.2s; }
.radio-visualizer .bar:nth-child(3) { height: 100%; animation-delay: 0.0s; }
.radio-visualizer .bar:nth-child(4) { height: 40%; animation-delay: 0.3s; }
.radio-visualizer .bar:nth-child(5) { height: 80%; animation-delay: 0.15s; }
.radio-visualizer .bar:nth-child(6) { height: 50%; animation-delay: 0.4s; }
.radio-visualizer .bar:nth-child(7) { height: 30%; animation-delay: 0.25s; }

@keyframes eq {
    0% { transform: scaleY(0.3); }
    100% { transform: scaleY(1); }
}

.current-track-title {
    font-size: 1.5rem;
    margin: 0 0 5px;
    font-weight: 800;
}

.current-track-artist {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0 0 30px;
}

.radio-controls {
    display: flex;
    justify-content: center;
    align-items: center;
}

.radio-play-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--aurora-1), var(--aurora-2));
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(129, 140, 248, 0.4);
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.radio-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 35px rgba(129, 140, 248, 0.6);
}

.radio-play-btn svg {
    margin-left: 5px; /* Offset naturally for play triangle */
}

@media (max-width: 900px) {
    .site-header { padding: 5px 15px; }
    .site-title { font-size: 1.2rem; }
    
    .radio-hero-section {
        flex-direction: column;
        text-align: center;
        padding-top: 10px;
    }
    .radio-title {
        font-size: clamp(2.2rem, 8vw, 3.5rem);
    }
    .radio-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-text-col, .wp-block-column {
        width: 100% !important;
        flex-basis: 100% !important;
    }
    .wp-block-buttons {
        justify-content: center;
        margin-bottom: 50px;
    }
    .radio-player-card {
        padding: 40px 20px;
    }
}