/* ============================================
   MODERN DESKTOP-FIRST UI STYLES
   Premium Design System
   ============================================ */

/* CSS Variables */
:root {
    /* Brand Colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --secondary: #ec4899;
    --accent: #06b6d4;
    
    /* Neutral Colors */
    --bg-white: #ffffff;
    --bg-gray-50: #f9fafb;
    --bg-gray-100: #f3f4f6;
    --bg-gray-200: #e5e7eb;
    --bg-gray-800: #1f2937;
    --bg-gray-900: #111827;
    
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --text-white: #ffffff;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --gradient-card: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0,0,0,0.25);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-white: #111827;
    --bg-gray-50: #1f2937;
    --bg-gray-100: #374151;
    --bg-gray-200: #4b5563;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
}

/* ============================================
   BASE STYLES
   ============================================ */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-gray-50);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   MODERN NAVIGATION
   ============================================ */
.navbar-modern {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--bg-gray-200);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
    transition: var(--transition);
}

[data-theme="dark"] .navbar-modern {
    background: rgba(17, 24, 39, 0.9);
}

.navbar-modern.scrolled {
    box-shadow: var(--shadow-lg);
}

.navbar-brand-modern {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    padding: 12px 0;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.brand-tagline {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.nav-link-modern {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    transition: var(--transition);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.nav-link-modern:hover {
    color: var(--primary);
    background: var(--bg-gray-100);
}

.nav-link-modern.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    font-weight: 600;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-gray-100);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
}

.user-menu-btn:hover {
    background: var(--bg-gray-200);
}

.user-avatar-sm {
    width: 32px;
    height: 32px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
}

.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-gray-100);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
}

.theme-toggle-btn:hover {
    background: var(--bg-gray-200);
    color: var(--primary);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-modern {
    padding: 60px 0 40px;
}

.hero-featured-card {
    position: relative;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    height: 500px;
}

.hero-featured-image {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
}

.hero-featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    color: white;
}

.hero-category-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.hero-category-badge.small {
    padding: 4px 12px;
    font-size: 0.65rem;
}

.hero-featured-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.3;
}

.hero-featured-title a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.hero-featured-title a:hover {
    opacity: 0.9;
}

.hero-featured-excerpt {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 20px;
    line-height: 1.6;
}

.hero-featured-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.85rem;
    opacity: 0.8;
}

.hero-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-author-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
}

/* Side Cards */
.hero-side-card {
    display: flex;
    gap: 16px;
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.hero-side-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.hero-side-image {
    width: 140px;
    min-width: 140px;
    height: 100px;
}

.hero-side-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-side-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-side-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 8px 0;
    line-height: 1.4;
}

.hero-side-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.hero-side-title a:hover {
    color: var(--primary);
}

.hero-side-meta {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header-modern {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--bg-gray-200);
}

.section-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.section-subtitle {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.95rem;
}

.view-toggle .btn {
    border-radius: var(--radius-md);
    padding: 8px 12px;
}

/* ============================================
   ARTICLE CARDS
   ============================================ */
.article-modern-card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
}

.article-modern-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

.article-modern-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.article-modern-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-modern-card:hover .article-modern-image img {
    transform: scale(1.1);
}

.article-modern-category {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 4px 12px;
    background: rgba(255,255,255,0.95);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    backdrop-filter: blur(10px);
}

.article-featured-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
}

.article-modern-body {
    padding: 24px;
}

.article-modern-meta-top {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.article-modern-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
}

.article-modern-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.article-modern-title a:hover {
    color: var(--primary);
}

.article-modern-excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.article-modern-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--bg-gray-100);
}

.read-more-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
}

.read-more-link:hover {
    color: var(--primary-dark);
}

.read-more-link i {
    transition: transform 0.3s ease;
}

.read-more-link:hover i {
    transform: translateX(4px);
}

.article-stats {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================
   LIST VIEW
   ============================================ */
.article-list-item {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: 20px;
    transition: var(--transition);
}

.article-list-item:hover {
    box-shadow: var(--shadow-lg);
}

.article-list-image {
    height: 100%;
    min-height: 200px;
}

.article-list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-list-title {
    font-size: 1.3rem;
    font-weight: 700;
}

.article-list-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.article-list-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
}

.article-list-meta {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
    align-items: center;
    flex-wrap: wrap;
}

/* ============================================
   SIDEBAR WIDGETS
   ============================================ */
.sidebar-modern {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--bg-gray-200);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.widget-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--bg-gray-200);
}

.widget-title span {
    white-space: nowrap;
}

/* Search Widget */
.search-input-modern {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-modern i {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
}

.search-input-modern input {
    padding: 12px 100px 12px 45px;
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-gray-200);
    transition: var(--transition);
}

.search-input-modern input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.search-submit {
    position: absolute;
    right: 4px;
    top: 4px;
    bottom: 4px;
    background: var(--gradient-primary);
    border: none;
    color: white;
    padding: 0 20px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
}

/* Categories Widget */
.category-modern-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: var(--transition);
    margin-bottom: 4px;
}

.category-modern-item:hover {
    background: var(--bg-gray-100);
}

.category-modern-icon {
    width: 40px;
    height: 40px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.category-modern-info {
    flex: 1;
}

.category-modern-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.category-modern-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Popular Posts */
.popular-post-item {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--bg-gray-100);
    text-decoration: none;
    transition: var(--transition);
}

.popular-post-item:last-child {
    border-bottom: none;
}

.popular-post-item:hover {
    padding-left: 8px;
}

.popular-post-rank {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-light);
    min-width: 40px;
}

.popular-post-title {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.popular-post-meta {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Newsletter Widget */
.newsletter-widget {
    background: var(--gradient-primary);
    color: white;
    border: none;
}

.newsletter-modern {
    text-align: center;
}

.newsletter-icon {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 16px;
}

.newsletter-modern h5 {
    font-weight: 700;
}

.newsletter-modern .input-group {
    margin-top: 16px;
}

/* Tags Cloud */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    padding: 6px 14px;
    background: var(--bg-gray-100);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    transition: var(--transition);
}

.tag-item:hover {
    background: var(--primary);
    color: white;
}

/* ============================================
   FOOTER
   ============================================ */
.footer-modern {
    background: var(--bg-gray-900);
    color: white;
    margin-top: 80px;
}

.footer-top {
    padding: 80px 0 60px;
}

.brand-icon-lg {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.footer-description {
    color: #9ca3af;
    line-height: 1.6;
    margin: 16px 0;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 4px;
}

.footer-bottom {
    padding: 24px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.copyright {
    color: #6b7280;
    margin: 0;
}

.footer-bottom-link {
    color: #6b7280;
    text-decoration: none;
    margin-left: 20px;
    font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Large Desktop (1200px+) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
    
    .hero-featured-card {
        height: 550px;
    }
    
    .hero-featured-title {
        font-size: 2.5rem;
    }
}

/* Desktop (992px - 1199px) */
@media (max-width: 1199px) {
    .hero-featured-card {
        height: 450px;
    }
    
    .hero-featured-title {
        font-size: 1.8rem;
    }
    
    .hero-side-image {
        width: 120px;
        min-width: 120px;
        height: 90px;
    }
}

/* Tablet (768px - 991px) */
@media (max-width: 991px) {
    .hero-modern {
        padding: 40px 0 20px;
    }
    
    .hero-featured-card {
        height: 400px;
    }
    
    .hero-featured-title {
        font-size: 1.6rem;
    }
    
    .hero-featured-content {
        padding: 24px;
    }
    
    .article-modern-image {
        height: 200px;
    }
    
    .sidebar-modern {
        position: static;
        margin-top: 40px;
    }
    
    .footer-top {
        padding: 60px 0 40px;
    }
}

/* Mobile Landscape (576px - 767px) */
@media (max-width: 767px) {
    .navbar-brand-modern .brand-tagline {
        display: none;
    }
    
    .hero-featured-card {
        height: 350px;
    }
    
    .hero-featured-title {
        font-size: 1.4rem;
    }
    
    .hero-featured-excerpt {
        display: none;
    }
    
    .hero-side-card {
        flex-direction: column;
    }
    
    .hero-side-image {
        width: 100%;
        height: 160px;
    }
    
    .article-modern-image {
        height: 180px;
    }
    
    .article-list-image {
        min-height: 180px;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
    
    .footer-top {
        padding: 40px 0 30px;
    }
}

/* Mobile Portrait (575px and below) */
@media (max-width: 575px) {
    .hero-featured-card {
        height: 300px;
    }
    
    .hero-featured-title {
        font-size: 1.2rem;
    }
    
    .hero-featured-meta {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .article-modern-body {
        padding: 16px;
    }
    
    .article-modern-title {
        font-size: 1.1rem;
    }
    
    .article-stats {
        display: none;
    }
    
    .article-list-meta {
        gap: 8px;
    }
}