/* Main Application Styles */

/* Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #fafaf8;
    color: #1e1e1e;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Layout */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.header.hidden {
    transform: translateY(-100%);
}

.header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* Navigation */
.nav-link {
    position: relative;
    font-weight: 500;
    font-size: 0.9rem;
    color: #4a4a4a;
    padding: 0.5rem 0;
    transition: color 0.2s;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #c73b2b;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #1e1e1e;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: #1e1e1e;
}

/* Cards */
.card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.card-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover .card-image {
    transform: scale(1.02);
}

/* Buttons */
.btn-primary {
    display: inline-block;
    background: #c73b2b;
    color: white;
    font-weight: 600;
    padding: 0.6rem 1.8rem;
    border-radius: 60px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: #a82f21;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(199, 59, 43, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: #c73b2b;
    font-weight: 600;
    padding: 0.6rem 1.8rem;
    border-radius: 60px;
    border: 2px solid #c73b2b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #c73b2b;
    color: white;
}

/* Newsletter */
.newsletter-section {
    background: linear-gradient(135deg, #f5f3ef 0%, #eae8e4 100%);
    border-radius: 24px;
    padding: 4rem 2rem;
}

/* Trending Bar */
.trending-bar {
    background: #1e1e1e;
    color: #f0ede8;
    font-size: 0.85rem;
    padding: 0.4rem 0;
    overflow: hidden;
}

.trending-scroll {
    display: flex;
    gap: 2rem;
    animation: scroll-trending 20s linear infinite;
}

@keyframes scroll-trending {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Category Badge */
.category-badge {
    display: inline-block;
    background: #c73b2b;
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.9rem;
    border-radius: 30px;
    text-transform: uppercase;
}

/* Sidebar */
.sidebar-widget {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.sidebar-widget h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0eeea;
}

/* Most Read Numbered List */
.most-read-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0eeea;
}

.most-read-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: #d5d3cf;
    min-width: 2rem;
    text-align: center;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: white;
    padding: 1.5rem;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    overflow-y: auto;
}

.mobile-menu.open {
    right: 0;
}

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 99;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Search */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 60;
}

.search-overlay.open {
    opacity: 1;
    visibility: visible;
}

.search-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 600px;
    background: white;
    border-radius: 24px;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 61;
}

.search-panel.open {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}

.search-input {
    width: 100%;
    font-size: 1.5rem;
    padding: 0.75rem 0;
    border: none;
    border-bottom: 2px solid #e8e6e2;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: #c73b2b;
}

/* Ad Placeholder */
.ad-placeholder {
    background: #f3f1ed;
    border: 2px dashed #d5d3cf;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    color: #8a8884;
    font-size: 0.85rem;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Comments */
.comment {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f0eeea;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-meta {
    font-size: 0.85rem;
    color: #6b7280;
}

.comment-author {
    font-weight: 600;
    color: #1e1e1e;
}

.comment-body {
    margin-top: 0.25rem;
}

/* Loading States */
.skeleton {
    background: linear-gradient(90deg, #f0eeea 25%, #e5e3df 50%, #f0eeea 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .newsletter-section {
        padding: 2rem 1rem;
    }
    
    .card-image {
        aspect-ratio: 4/3;
    }
}

@media (max-width: 480px) {
    .card-image {
        aspect-ratio: 1/1;
    }
}

/* Utilities */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.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;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c73b2b;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a82f21;
}