/* cinematic.css - WellsTrack Global Design System Upgrade */

:root {
    --primary-glow: rgba(59, 130, 246, 0.5);
    --secondary-glow: rgba(16, 185, 129, 0.5);
    --premium-gold: #d4af37;
    --text-main: #111827; /* Default dark text for light BG */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
}

/* Cinematic Theme Variables */
body.cinematic-theme {
    --text-main: #f8fafc; /* Light text for dark BG */
    background-color: #020617;
}

/* Global Typography */
body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, .serif {
    font-family: 'Outfit', 'Playfair Display', serif;
    letter-spacing: -0.02em;
    color: inherit;
}

/* Global Background Animation - ONLY for cinematic-theme */
body.cinematic-theme::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, #0f172a 0%, #020617 100%);
    z-index: -2;
}

body.cinematic-theme::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/cinematic_tech_bg.png') no-repeat center center;
    background-size: cover;
    opacity: 0.15;
    z-index: -1;
    filter: blur(20px);
}

/* Cinematic Containers */
.glass-panel {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    color: #f8fafc !important; /* Force light text in glass panels */
}

/* Light Theme Glass (Optional) */
body:not(.cinematic-theme) .glass-panel {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: #111827 !important;
}

.glass-panel:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.1);
}

/* Premium Buttons */
.btn-premium {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white !important;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-premium:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
    color: white !important;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 10px;
}

/* News Cards Cinematic Upgrade */
.cinematic-card {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: #f8fafc;
}

.cinematic-card:hover img {
    transform: scale(1.05);
}

/* Theme Awareness Overrides for Common Classes */
body.cinematic-theme .text-gray-900,
body.cinematic-theme .text-slate-900,
body.cinematic-theme .text-black {
    color: #f8fafc !important;
}

body.cinematic-theme .text-gray-700,
body.cinematic-theme .text-slate-700 {
    color: #cbd5e1 !important; /* text-slate-300 */
}

body.cinematic-theme .text-gray-600,
body.cinematic-theme .text-slate-600,
body.cinematic-theme .text-gray-500 {
    color: #94a3b8 !important; /* text-slate-400 */
}

body.cinematic-theme .bg-white {
    background-color: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.cinematic-theme .bg-gray-50,
body.cinematic-theme .bg-slate-50 {
    background-color: rgba(30, 41, 59, 0.3) !important;
}

body.cinematic-theme .border-gray-100,
body.cinematic-theme .border-gray-200,
body.cinematic-theme .border-slate-100 {
    border-color: rgba(255, 255, 255, 0.05) !important;
}

.cinematic-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* User Provided Premium Styles */
.premium-card { 
    background: rgba(255, 255, 255, 0.8); 
    backdrop-filter: blur(10px); 
    border: 1px solid rgba(255, 255, 255, 0.3); 
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07); 
} 

body.cinematic-theme .premium-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}
.cinematic-glow:hover { 
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.2); 
    border-color: rgba(59, 130, 246, 0.3); 
} 
.glass-nav { 
    background: rgba(255, 255, 255, 0.7); 
    backdrop-filter: blur(12px); 
    border-bottom: 1px solid rgba(255, 255, 255, 0.2); 
    position: sticky; 
    top: 0; 
    z-index: 50; 
} 
body.cinematic-theme .glass-nav {
    background: rgba(2, 6, 23, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.image-zoom:hover img { 
    transform: scale(1.05); 
} 
@keyframes fadeInUp { 
    from { opacity: 0; transform: translateY(20px); } 
    to { opacity: 1; transform: translateY(0); } 
} 
.animate-fade-in-up { 
    animation: fadeInUp 0.6s ease-out forwards; 
}

/* Premium Header (Always Light/Glassy) */
.premium-header {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.95)) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(59, 130, 246, 0.1) !important;
}

/* Force dark text inside Premium Header regardless of body theme */
body.cinematic-theme .premium-header .text-gray-900,
body.cinematic-theme .premium-header .text-slate-900 { color: #111827 !important; }
body.cinematic-theme .premium-header .text-gray-700,
body.cinematic-theme .premium-header .text-slate-700 { color: #334155 !important; }
body.cinematic-theme .premium-header .text-gray-600,
body.cinematic-theme .premium-header .text-slate-600 { color: #475569 !important; }
body.cinematic-theme .premium-header .text-gray-500,
body.cinematic-theme .premium-header .text-slate-500 { color: #64748b !important; }
body.cinematic-theme .premium-header .text-gray-400,
body.cinematic-theme .premium-header .text-slate-400 { color: #94a3b8 !important; }

/* Force light backgrounds & borders inside Premium Header regardless of body theme */
body.cinematic-theme .premium-header .bg-gray-50,
body.cinematic-theme .premium-header .bg-slate-50 { background-color: #f9fafb !important; }
body.cinematic-theme .premium-header .bg-emerald-50 { background-color: #ecfdf5 !important; }

body.cinematic-theme .premium-header .border-gray-100,
body.cinematic-theme .premium-header .border-gray-200,
body.cinematic-theme .premium-header .border-slate-100 { border-color: #f3f4f6 !important; }
body.cinematic-theme .premium-header .border-emerald-100 { border-color: #d1fae5 !important; }

/* Premium Ticker (High-Contrast Dark matching index.php) */
.premium-ticker {
    background: #020617 !important; /* Slate-950 */
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-bottom: 1px solid #000 !important;
}

.premium-ticker #ticker-left {
    background: rgba(30, 41, 59, 0.9) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #f8fafc !important;
}

.premium-ticker #ticker-last-refresh {
    color: #94a3b8 !important;
}

.premium-ticker #indicesTicker {
    color: white !important;
}

/* Expanded Theme Awareness */
body.cinematic-theme .text-slate-800,
body.cinematic-theme .text-gray-800 {
    color: #f1f5f9 !important; /* text-slate-100 */
}

body.cinematic-theme .text-slate-600,
body.cinematic-theme .text-gray-600 {
    color: #94a3b8 !important; /* Slate-400 */
}

body.cinematic-theme .text-slate-700,
body.cinematic-theme .text-gray-700 {
    color: #cbd5e1 !important; /* Slate-300 */
}

body.cinematic-theme .text-slate-900,
body.cinematic-theme .text-gray-900 {
    color: #ffffff !important;
}

body.cinematic-theme .bg-slate-50,
body.cinematic-theme .bg-gray-50 {
    background-color: rgba(30, 41, 59, 0.5) !important;
}

body.cinematic-theme .border-gray-200,
body.cinematic-theme .border-slate-200 {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Header Flare remains as a premium accent */
@keyframes headerFlare {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.header-flare {
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), rgba(6, 182, 212, 0.2), rgba(59, 130, 246, 0.1), transparent);
    background-size: 200% 100%;
    animation: headerFlare 8s linear infinite;
}

/* Social Caption Box */
.social-caption-box {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 3rem;
}

.social-caption-text {
    font-size: 1.25rem;
    line-height: 1.6;
    color: #e2e8f0;
    font-weight: 500;
}

.social-tag {
    color: #3b82f6;
    font-weight: 700;
    margin-right: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0);
}

.social-tag:hover {
    color: #60a5fa;
    text-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
    text-decoration: underline;
}

/* Engagement UI Upgrade */
.engagement-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.engagement-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.engagement-pill.active-like {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

@keyframes heartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.heart-pop {
    animation: heartPop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Magazine Image Effect */
.magazine-image-frame {
    position: relative;
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: 0 40px 80px -15px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.magazine-image-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

/* Social Story Flow */
.social-story-flow {
    line-height: 1.8;
    letter-spacing: 0.01em;
    white-space: pre-wrap; /* Respect user breaks */
}

.social-tag {
    color: #3b82f6 !important;
    font-weight: 800 !important;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-tag:hover {
    color: #fff !important;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
    background: rgba(59, 130, 246, 0.1);
    border-radius: 4px;
    padding: 0 4px;
}

.active-like i {
    color: #ef4444 !important;
    filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.5));
}

.heart-pop {
    animation: heartPop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes heartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

