/**
 * HaberPortal - Modern Enhancements
 * Dark Mode, Glassmorphism, Micro-interactions, Modern UI
 */

/* ============================================
   MODERN FONT - Outfit (daha modern, unique)
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Animation timing */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-blur: blur(20px);
    --glass-border: 1px solid rgba(255, 255, 255, 0.3);
    
    /* Transitions */
    --transition-fast: 0.15s var(--ease-out-expo);
    --transition-normal: 0.3s var(--ease-out-expo);
    --transition-slow: 0.5s var(--ease-out-expo);
    
    /* New shadows */
    --shadow-glow: 0 0 40px rgba(211, 47, 47, 0.15);
    --shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
    --shadow-elevated: 0 20px 60px -20px rgba(0, 0, 0, 0.2);
}

body {
    font-family: var(--font-primary) !important;
}

/* ============================================
   DARK MODE
   ============================================ */
[data-theme="dark"] {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-dark: #000;
    --text-primary: #f5f5f5;
    --text-secondary: #a0a0a0;
    --text-muted: #666;
    --border-color: #2a2a2a;
    --border-light: #222;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);
    --glass-bg: rgba(30, 30, 30, 0.8);
}

[data-theme="dark"] body {
    background: linear-gradient(180deg, #0a0a0a 0%, #111 50%, #0a0a0a 100%);
}

[data-theme="dark"] .main-header,
[data-theme="dark"] .top-bar {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: var(--glass-blur);
}

[data-theme="dark"] .news-card,
[data-theme="dark"] .sidebar-widget {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .logo-text {
    color: #fff;
}

[data-theme="dark"] h1, [data-theme="dark"] h2, 
[data-theme="dark"] h3, [data-theme="dark"] h4 {
    color: #fff;
}

[data-theme="dark"] .footer {
    background: #000;
}

/* Dark Mode Toggle Button */
.theme-toggle {
    position: relative;
    width: 50px;
    height: 26px;
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    border-radius: 50px;
    border: none;
    cursor: pointer;
    padding: 3px;
    transition: var(--transition-normal);
    overflow: hidden;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: var(--transition-normal);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.theme-toggle.dark::before {
    transform: translateX(24px);
}

.theme-toggle.dark {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.theme-toggle .sun-icon,
.theme-toggle .moon-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    transition: var(--transition-normal);
}

.theme-toggle .sun-icon {
    left: 8px;
    color: #ffd93d;
    opacity: 1;
}

.theme-toggle .moon-icon {
    right: 8px;
    color: #a0a0a0;
    opacity: 0.5;
}

.theme-toggle.dark .sun-icon {
    opacity: 0.5;
}

.theme-toggle.dark .moon-icon {
    opacity: 1;
    color: #ffd93d;
}

/* ============================================
   GLASSMORPHISM EFFECTS
   ============================================ */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: 20px;
}

.main-header {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

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

/* Button Hover Effects */
.btn {
    position: relative;
    overflow: hidden;
    transition: var(--transition-normal);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn:active {
    transform: translateY(0) scale(0.98);
}

/* News Card Animations */
.news-card {
    transition: var(--transition-normal);
}

.news-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: var(--shadow-elevated);
}

.news-card:hover .news-card-image img {
    transform: scale(1.1);
}

.news-card-image img {
    transition: transform 0.7s var(--ease-out-expo);
}

/* Link Hover Effects */
.news-card-title a,
.nav-link,
.footer-links a {
    position: relative;
    display: inline-block;
}

.news-card-title a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition-normal);
}

.news-card-title a:hover::after {
    width: 100%;
}

/* Icon Animations */
.nav-link i,
.btn i {
    transition: var(--transition-fast);
}

.nav-link:hover i {
    transform: scale(1.2);
}

.btn:hover i {
    transform: translateX(3px);
}

/* Pulse Animation for Live Elements */
@keyframes pulse-live {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.5);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(211, 47, 47, 0);
    }
}

.breaking-badge {
    animation: pulse-live 2s infinite;
}

/* ============================================
   SCROLL ANIMATIONS (Fade In)
   ============================================ */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animations */
.news-grid .news-card:nth-child(1) { transition-delay: 0s; }
.news-grid .news-card:nth-child(2) { transition-delay: 0.1s; }
.news-grid .news-card:nth-child(3) { transition-delay: 0.2s; }
.news-grid .news-card:nth-child(4) { transition-delay: 0.3s; }

/* ============================================
   MODERN CATEGORY BADGES
   ============================================ */
.news-card-category {
    background: linear-gradient(135deg, var(--primary) 0%, #ff6b6b 100%) !important;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.6875rem;
    padding: 6px 14px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(211, 47, 47, 0.3);
}

/* ============================================
   LOADING SKELETON
   ============================================ */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

[data-theme="dark"] .skeleton {
    background: linear-gradient(90deg, #222 25%, #333 50%, #222 75%);
    background-size: 200% 100%;
}

/* ============================================
   FONT SIZE CONTROL
   ============================================ */
[data-font-size="small"] {
    font-size: 14px;
}

[data-font-size="normal"] {
    font-size: 16px;
}

[data-font-size="large"] {
    font-size: 18px;
}

[data-font-size="xlarge"] {
    font-size: 20px;
}

.font-size-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.font-size-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.font-size-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.font-size-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ============================================
   IMPROVED SIDEBAR WIDGETS
   ============================================ */
.sidebar-widget {
    transition: var(--transition-normal);
    border: 1px solid transparent;
}

.sidebar-widget:hover {
    border-color: rgba(211, 47, 47, 0.1);
    box-shadow: var(--shadow-soft);
}

.widget-title {
    position: relative;
    padding-left: 15px;
    border-bottom: none !important;
}

.widget-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, var(--primary) 0%, #ff6b6b 100%);
    border-radius: 2px;
}

/* Popular News Numbers - Gradient */
.popular-news-number {
    background: linear-gradient(135deg, var(--primary) 0%, #ff6b6b 100%) !important;
    color: #fff !important;
    font-weight: 800;
}

.popular-news-item:nth-child(2) .popular-news-number {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%) !important;
}

.popular-news-item:nth-child(3) .popular-news-number {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
}

/* ============================================
   MODERN FOOTER
   ============================================ */
.footer {
    background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%) !important;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.footer-social a {
    transition: var(--transition-normal);
}

.footer-social a:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 20px rgba(211, 47, 47, 0.3);
}

    background: #f5f5f5 !important;
    transform: translateY(-2px);
}

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, #ff6b6b 100%);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition-normal);
    z-index: 999;
    box-shadow: 0 5px 20px rgba(211, 47, 47, 0.3);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(211, 47, 47, 0.4);
}

/* ============================================
   READING PROGRESS BAR
   ============================================ */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #ff6b6b);
    z-index: 9999;
    transition: width 0.1s linear;
}

/* ============================================
   IMAGE LAZY LOADING
   ============================================ */
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[data-src].loaded {
    opacity: 1;
}

/* ============================================
   IMPROVED SEARCH
   ============================================ */
.search-form {
    position: relative;
    background: rgba(0, 0, 0, 0.05) !important;
    border: 2px solid transparent;
    transition: var(--transition-normal);
}

.search-form:focus-within {
    background: #fff !important;
    border-color: var(--primary);
    box-shadow: 0 5px 20px rgba(211, 47, 47, 0.1);
}

[data-theme="dark"] .search-form {
    background: rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] .search-form:focus-within {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* ============================================
   MODERN HERO SLIDER ENHANCEMENTS
   ============================================ */
.hero-slider {
    border-radius: 0 !important;
    overflow: hidden;
}

.hero-slide-overlay {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.7) 40%,
        transparent 100%
    ) !important;
}

.hero-slide-title {
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.slider-nav-item {
    transition: var(--transition-normal);
}

.slider-nav-item:hover {
    transform: translateX(-8px) scale(1.02);
}

.slider-nav-item.active {
    background: linear-gradient(135deg, var(--primary) 0%, #ff6b6b 100%) !important;
}

/* ============================================
   SOCIAL SHARE BUTTONS ENHANCED
   ============================================ */
.share-btn {
    transition: var(--transition-normal);
}

.share-btn:hover {
    transform: translateY(-3px) scale(1.1);
}

.share-btn.facebook:hover { box-shadow: 0 10px 20px rgba(24, 119, 242, 0.4); }
.share-btn.twitter:hover { box-shadow: 0 10px 20px rgba(29, 161, 242, 0.4); }
.share-btn.whatsapp:hover { box-shadow: 0 10px 20px rgba(37, 211, 102, 0.4); }
.share-btn.telegram:hover { box-shadow: 0 10px 20px rgba(0, 136, 204, 0.4); }

/* ============================================
   RESPONSIVE IMPROVEMENTS
   ============================================ */
@media (max-width: 768px) {
    .theme-toggle {
        width: 44px;
        height: 24px;
    }
    
    .theme-toggle::before {
        width: 18px;
        height: 18px;
    }
    
    .theme-toggle.dark::before {
        transform: translateX(20px);
    }
    
    .scroll-to-top {
        width: 44px;
        height: 44px;
        bottom: 20px;
        right: 20px;
        font-size: 16px;
    }
    
    .font-size-controls {
        display: none;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .main-header,
    .top-bar,
    .footer,
    .sidebar,
    .breaking-news,
    .scroll-to-top,
    .share-btn {
        display: none !important;
    }
    
    .main-content {
        width: 100% !important;
    }
    
    body {
        background: #fff !important;
        color: #000 !important;
    }
}

