/* ============================================
   GOOD NEWS 24 - STUNNING REDESIGN 2026
   Modern, Beautiful, Warm & Hopeful
   ============================================ */

/* Import Beautiful Modern Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@600;700;800;900&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ===== CSS VARIABLES - WARM, HOPEFUL PALETTE ===== */
:root {
    /* Warm sunrise palette */
    --sunrise-orange: #FF8C42;
    --sunrise-yellow: #FFB347;
    --sunset-pink: #FF6B9D;
    --sky-blue: #4FC3F7;
    --ocean-teal: #26C6DA;
    --warm-gold: #FFD54F;
    --soft-lavender: #B39DDB;
    --fresh-mint: #81C784;
    
    /* Gradients */
    --gradient-sunrise: linear-gradient(135deg, #FFB347 0%, #FF8C42 50%, #FF6B9D 100%);
    --gradient-ocean: linear-gradient(135deg, #4FC3F7 0%, #26C6DA 100%);
    --gradient-warm: linear-gradient(135deg, #FFD54F 0%, #FFB347 70%, #FF8C42 100%);
    --gradient-sunset: linear-gradient(135deg, #FF6B9D 0%, #FFB347 50%, #FFD54F 100%);
    --gradient-hero: linear-gradient(135deg, #FFB347 0%, #FF8C42 30%, #FF6B9D 70%, #B39DDB 100%);
    
    /* Neutrals */
    --text-primary: #2D3748;
    --text-secondary: #4A5568;
    --text-tertiary: #718096;
    --bg-white: #FFFFFF;
    --bg-cream: #FFFBF5;
    --bg-light: #FFF9F0;
    --bg-soft: #FEF5E7;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);
    --shadow-warm: 0 8px 24px rgba(255, 140, 66, 0.25);
    
    /* Border radius */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 999px;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Dark mode adjustments */
[data-theme="dark"] {
    --text-primary: #F7FAFC;
    --text-secondary: #E2E8F0;
    --text-tertiary: #CBD5E0;
    --bg-white: #1A202C;
    --bg-cream: #2D3748;
    --bg-light: #2D3748;
    --bg-soft: #374151;
    --glass-bg: rgba(45, 55, 72, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-cream);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Beautiful background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 179, 71, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(79, 195, 247, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 107, 157, 0.08) 0%, transparent 50%);
    animation: floatBackground 20s ease-in-out infinite;
}

@keyframes floatBackground {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

/* ===== HEADER - GLASSMORPHISM ===== */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
    animation: slideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Logo with gradient animation */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.6rem;
    font-weight: 900;
    text-decoration: none;
    transition: transform var(--transition-base);
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    font-size: 2.2rem;
    animation: tvGlow 3s ease-in-out infinite;
}

@keyframes tvGlow {
    0%, 100% { filter: drop-shadow(0 0 4px rgba(255, 140, 66, 0.5)); }
    50% { filter: drop-shadow(0 0 12px rgba(255, 140, 66, 0.8)); }
}

.logo-text {
    background: var(--gradient-sunrise);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.5px;
}

.logo-24 {
    background: linear-gradient(135deg, #FF3D00 0%, #FF6B00 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.85em;
    font-weight: 900;
    box-shadow: 0 4px 12px rgba(255, 61, 0, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Navigation - Modern Pills */
.nav-links {
    display: flex;
    list-style: none;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
}

.nav-links a {
    padding: 10px 18px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.nav-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-warm);
    transition: left var(--transition-base);
    z-index: -1;
    border-radius: var(--radius-full);
}

.nav-links a:hover::before,
.nav-links a.active::before {
    left: 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-warm);
}

.nav-links a.support-link {
    background: var(--gradient-sunset);
    color: white !important;
    font-weight: 700;
    box-shadow: var(--shadow-warm);
}

.nav-links a.support-link:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 28px rgba(255, 107, 157, 0.35);
}

/* ===== HERO - STUNNING GRADIENT WITH ANIMATION ===== */
.hero {
    background: var(--gradient-hero);
    padding: 120px 24px 160px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Mobile: Compact hero (30-40% viewport height max) */
@media (max-width: 768px) {
    .hero {
        padding: 40px 20px 80px;
        min-height: 35vh;
        max-height: 40vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Animated orbs */
.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: floatOrb 15s ease-in-out infinite;
}

.hero::before {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, transparent 70%);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.hero::after {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 213, 79, 0.4) 0%, transparent 70%);
    bottom: -150px;
    right: -150px;
    animation-delay: 7s;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.9); }
    75% { transform: translate(20px, 30px) scale(1.05); }
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.85rem;
    color: #E53935;
    box-shadow: var(--shadow-lg);
    margin-bottom: 24px;
    animation: breathe 2s ease-in-out infinite;
}

/* Mobile: Smaller live badge */
@media (max-width: 768px) {
    .live-badge {
        padding: 6px 14px;
        font-size: 0.75rem;
        margin-bottom: 12px;
    }
}

@keyframes breathe {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 24px rgba(229, 57, 53, 0.2); }
    50% { transform: scale(1.05); box-shadow: 0 12px 32px rgba(229, 57, 53, 0.35); }
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 800;
    color: white;
    margin-bottom: 20px;
    line-height: 1.1;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    letter-spacing: -1px;
}

/* Mobile: Smaller hero title */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.6rem;
        margin-bottom: 8px;
        line-height: 1.2;
    }
}

.tagline {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 36px;
    font-weight: 500;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

/* Mobile: Smaller tagline */
@media (max-width: 768px) {
    .tagline {
        font-size: 0.9rem;
        margin-bottom: 0;
    }
}

.cta-button {
    display: none; /* Hidden by default - stories are immediately visible */
}

/* Show CTA button only on large desktop screens */
@media (min-width: 1200px) {
    .cta-button {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 18px 40px;
        background: white;
        color: var(--text-primary);
        font-weight: 700;
        font-size: 1.1rem;
        border-radius: var(--radius-full);
        text-decoration: none;
        box-shadow: var(--shadow-xl);
        transition: all var(--transition-bounce);
        position: relative;
        overflow: hidden;
    }
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--gradient-warm);
    transition: width 0.6s ease, height 0.6s ease;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.cta-button:hover::before {
    width: 300px;
    height: 300px;
}

.cta-button:hover {
    color: white;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.25);
}

/* Hero wave */
.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.hero-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

/* Mobile: Smaller wave */
@media (max-width: 768px) {
    .hero-wave svg {
        height: 40px;
    }
}

.hero-wave path {
    fill: var(--bg-cream);
    animation: waveMove 8s ease-in-out infinite;
}

@keyframes waveMove {
    0%, 100% { d: path("M0,64L48,69.3C96,75,192,85,288,80C384,75,480,53,576,48C672,43,768,53,864,64C960,75,1056,85,1152,80C1248,75,1344,53,1392,42.7L1440,32L1440,120L0,120Z"); }
    50% { d: path("M0,48L48,53.3C96,59,192,69,288,64C384,59,480,37,576,32C672,27,768,37,864,48C960,59,1056,69,1152,64C1248,59,1344,37,1392,26.7L1440,16L1440,120L0,120Z"); }
}

/* ===== SECTIONS ===== */
.featured-story,
.stories-section {
    padding: 80px 24px;
    animation: fadeIn 0.8s ease;
}

/* Mobile: Reduce top padding on featured story to bring it closer to hero */
@media (max-width: 768px) {
    .featured-story {
        padding: 20px 16px 60px;
    }
    
    .stories-section {
        padding: 60px 16px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Section headers with gradient */
.section-header {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Mobile: Compact section headers */
@media (max-width: 768px) {
    .section-header {
        margin-bottom: 32px;
    }
    
    .stories-section .section-header {
        margin-bottom: 40px;
    }
}

.section-emoji {
    font-size: 3rem;
    display: block;
    margin-bottom: 16px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    background: var(--gradient-sunrise);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===== STORY CARDS - GLASSMORPHISM ===== */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 32px;
}

.story-card,
.featured-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-slow);
    opacity: 0;
    transform: translateY(40px) scale(0.95);
}

/* Fade-in animation on scroll */
.story-card.visible,
.featured-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.story-card:hover,
.featured-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

/* Image zoom effect */
.story-image,
.featured-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, #FFB347 0%, #FF8C42 100%);
}

.story-image img,
.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.story-card:hover .story-image img,
.featured-card:hover .featured-image img {
    transform: scale(1.1) rotate(1deg);
}

/* Category tags - floating */
.category-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: var(--shadow-md);
    z-index: 10;
    transition: all var(--transition-base);
}

.category-tag:hover {
    transform: scale(1.1) rotate(-2deg);
}

.category-tag.science {
    background: linear-gradient(135deg, #4FC3F7 0%, #26C6DA 100%);
    color: white;
}

.category-tag.environment {
    background: linear-gradient(135deg, #81C784 0%, #66BB6A 100%);
    color: white;
}

.category-tag.health {
    background: linear-gradient(135deg, #FF6B9D 0%, #FF8AB7 100%);
    color: white;
}

.category-tag.heroes {
    background: linear-gradient(135deg, #FFD54F 0%, #FFB347 100%);
    color: var(--text-primary);
}

/* Fresh/Breaking badges */
.fresh-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #FF3D00 0%, #FF6B00 100%);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 800;
    box-shadow: 0 4px 16px rgba(255, 61, 0, 0.4);
    animation: wiggle 3s ease-in-out infinite;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}

/* Story content */
.story-content,
.featured-content {
    padding: 28px;
}

.story-content h3,
.featured-content h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.3;
    transition: color var(--transition-base);
}

.story-card:hover h3,
.featured-card:hover h3 {
    background: var(--gradient-sunrise);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.story-content p,
.featured-content p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.7;
}

.story-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-bottom: 16px;
    font-weight: 600;
}

/* Read more button with arrow animation */
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--gradient-warm);
    color: white;
    font-weight: 700;
    border-radius: var(--radius-full);
    text-decoration: none;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.read-more::after {
    content: '→';
    transition: transform var(--transition-base);
}

.read-more:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-lg);
}

.read-more:hover::after {
    transform: translateX(4px);
}

/* ===== LOADING ANIMATION ===== */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading-shimmer {
    background: linear-gradient(
        90deg,
        var(--bg-cream) 0%,
        var(--bg-light) 50%,
        var(--bg-cream) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ===== FOOTER ===== */
.main-footer {
    background: linear-gradient(135deg, #2D3748 0%, #1A202C 100%);
    color: white;
    padding: 60px 24px 24px;
    margin-top: 100px;
}

/* ===== FEATURED STORY ENHANCEMENTS ===== */
/* Make the featured story large and prominent */
.featured-story .featured-card {
    max-width: 100%;
    margin: 0 auto;
}

/* Mobile: Featured story takes full width and is very prominent */
@media (max-width: 768px) {
    .featured-story .section-header {
        margin-bottom: 24px;
    }
    
    .featured-story .section-header h2 {
        font-size: 1.8rem;
    }
    
    .featured-story .section-emoji {
        font-size: 2rem;
        margin-bottom: 8px;
    }
    
    .featured-story .featured-card {
        border-radius: var(--radius-md);
    }
    
    .featured-story .featured-image {
        aspect-ratio: 16/9;
    }
    
    .featured-story .featured-content h3 {
        font-size: 1.3rem;
        line-height: 1.3;
    }
    
    /* Make featured content more readable on mobile */
    .featured-story .featured-content p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .featured-story .featured-content {
        padding: 20px;
    }
}

/* Desktop: Featured story is even larger */
@media (min-width: 769px) {
    .featured-story .featured-card {
        max-width: 1200px;
    }
    
    .featured-story .featured-content h3 {
        font-size: 2rem;
    }
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero {
        padding: 80px 20px 120px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .stories-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .nav-links {
        display: none;
    }
    
    .nav-links.mobile-active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        padding: 20px;
        border-bottom: 1px solid var(--glass-border);
        box-shadow: var(--shadow-lg);
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
}

@media (max-width: 480px) {
    .section-header h2 {
        font-size: 2rem;
    }
    
    .story-content,
    .featured-content {
        padding: 20px;
    }
}

/* ===== MICRO-INTERACTIONS ===== */

/* Smooth scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-warm);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-sunrise);
}

/* Selection color */
::selection {
    background: rgba(255, 179, 71, 0.3);
    color: var(--text-primary);
}

/* Focus states */
a:focus,
button:focus {
    outline: 3px solid rgba(255, 179, 71, 0.5);
    outline-offset: 2px;
}

/* Loading state for images */
img {
    background: var(--loading-shimmer);
}

/* Smooth page transitions */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}
