/* Global Post - Serious News Styles */

:root {
    --color-world: #1f2937;
    --color-politics: #4b5563;
    --color-business: #374151;
    --color-conflict: #dc2626;
    --color-investigations: #7c3aed;
    --color-tech: #2563eb;
    --color-science: #059669;
    --color-culture: #db2777;
}

/* Base */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* News Ticker Animation */
@keyframes ticker {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.animate-ticker {
    animation: ticker 30s linear infinite;
}

.ticker-wrapper:hover .animate-ticker {
    animation-play-state: paused;
}

/* Typography */
.font-serif {
    font-family: 'Merriweather', Georgia, serif;
}

/* Article Cards - Serious Style */
.news-card {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 2rem;
    transition: all 0.2s ease;
}

.news-card:last-child {
    border-bottom: none;
}

.news-card:hover h3 {
    color: #4b5563;
}

/* Category Labels - Serious */
.category-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.category-world { color: #1f2937; }
.category-politics { color: #4b5563; }
.category-business { color: #374151; }
.category-conflict { color: #dc2626; }
.category-investigations { color: #7c3aed; }
.category-tech { color: #2563eb; }
.category-science { color: #059669; }
.category-culture { color: #db2777; }

/* List View */
.list-view .news-card {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.list-view .news-image-wrapper {
    width: 300px;
    height: 200px;
    flex-shrink: 0;
}

.list-view .news-content {
    flex: 1;
}

@media (max-width: 768px) {
    .list-view .news-card {
        flex-direction: column;
    }
    
    .list-view .news-image-wrapper {
        width: 100%;
        height: 220px;
    }
}

/* Grid View (Newspaper Style) */
.grid-view {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

@media (max-width: 768px) {
    .grid-view {
        grid-template-columns: 1fr;
    }
}

/* Image Treatments */
.news-image {
    filter: grayscale(30%);
    transition: filter 0.3s ease;
}

.news-card:hover .news-image {
    filter: grayscale(0%);
}

/* Loading States */
.skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 2px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

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

::-webkit-scrollbar-track {
    background: #f9fafb;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Navigation Dropdown */
.nav-dropdown:hover .dropdown-menu {
    display: block;
}

/* Breaking News Flash */
.breaking-flash {
    animation: flash 2s infinite;
}

@keyframes flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: #dc2626;
    z-index: 100;
    transition: width 0.1s;
}

/* Print Styles */
@media print {
    nav, aside, footer, .ticker-wrapper, .reading-progress {
        display: none;
    }
    
    main {
        max-width: 100%;
        margin: 0;
    }
    
    .news-image {
        filter: grayscale(100%);
    }
}

/* Mobile Optimizations */
@media (max-width: 640px) {
    .ticker-content {
        animation-duration: 20s;
    }
}

/* Hover States */
a {
    transition: color 0.15s ease;
}

button {
    transition: all 0.15s ease;
}

/* Focus States for Accessibility */
input:focus,
button:focus {
    outline: 2px solid #1f2937;
    outline-offset: 2px;
}

/* Line Clamp Utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}