/* Global Styles - Inspired by DigitalScoop */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&family=Roboto:wght@400;500&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0449c4;
    --accent-color: #af52ed;
    --accent-gradient: linear-gradient(45deg, #af52ed 0%, #8830df 100%);
    --secondary-gradient: linear-gradient(45deg, #af52ed 15%, #8830df 65%);
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #2b2d42;
    --text-light: #6c757d;
    --border-color: #e9ecef;
    --shadow-sm: 0 3px 10px rgba(4, 73, 196, 0.08);
    --shadow-md: 0 5px 20px rgba(4, 73, 196, 0.12);
    --shadow-lg: 0 10px 40px rgba(4, 73, 196, 0.15);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    font-weight: 400;
    color: var(--text-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0;
}

h1 { font-size: 3em; line-height: 1.2; }
h2 { font-size: 2.2em; line-height: 1.3; }
h3 { font-size: 1.3em; line-height: 1.3; }

p {
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 0;
}

a {
    color: #444;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* Header - Fixed at top */
.header-area {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(4, 73, 196, 0.1);
}

.navbar {
    padding: 0;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -0.5px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-brand:hover {
    color: var(--primary-color);
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-nav .nav-link {
    padding: 10px 18px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-color);
    border-radius: 8px;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background: var(--accent-gradient);
    color: #fff;
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 8px 18px;
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(4, 73, 196, 0.1);
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 160px;
    font-size: 14px;
    color: var(--text-color);
    font-family: 'Roboto', sans-serif;
}

.search-box button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--primary-color);
    transition: var(--transition);
}

.search-box button:hover {
    opacity: 0.8;
}

/* Main Content */
.main {
    padding: 100px 0 100px;
    background: var(--bg-color);
    min-height: calc(100vh - 60px);
}

/* Home Layout */
.home-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.sidebar-widget:hover {
    box-shadow: var(--shadow-md);
}

.sidebar-widget h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
    color: var(--primary-color);
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 6px;
}

.category-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-color);
    transition: var(--transition);
}

.category-list a:hover,
.category-list a.active {
    background: var(--accent-gradient);
    color: #fff;
    transform: translateX(5px);
}

.category-list .icon {
    margin-right: 10px;
}

.about-widget p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.7;
}

/* Articles Section */
.section-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 35px;
    display: flex;
    align-items: center;
    gap: 15px;
    letter-spacing: -0.5px;
    color: var(--primary-color);
}

.section-title::before {
    content: '';
    width: 5px;
    height: 32px;
    background: var(--accent-gradient);
    border-radius: 3px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

/* Article Card */
.article-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.article-card .card-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.article-card .card-content {
    padding: 22px;
}

.article-card .card-category {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: var(--accent-gradient);
    padding: 5px 12px;
    border-radius: 50px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-card h3 {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 12px;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card .card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-light);
    font-family: 'Roboto', sans-serif;
}

.read-more {
    color: var(--primary-color) !important;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.read-more::after {
    content: '\f054';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 11px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-5px);
    transition: var(--transition);
}

.article-card:hover .read-more::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(3px);
}

/* Loading & Empty States */
.loading,
.empty-state {
    text-align: center;
    padding: 80px 40px;
    color: var(--text-light);
}

.loading::before {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-color);
}

/* Footer - Fixed at bottom */
.footer-area {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--primary-color);
    color: #fff;
    padding: 15px 0;
    box-shadow: 0 -2px 20px rgba(4, 73, 196, 0.2);
}

.footer-content {
    text-align: center;
}

.footer-content h3 {
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 5px;
    letter-spacing: -0.5px;
}

.footer-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.article-card:nth-child(1) { animation-delay: 0.05s; }
.article-card:nth-child(2) { animation-delay: 0.1s; }
.article-card:nth-child(3) { animation-delay: 0.15s; }
.article-card:nth-child(4) { animation-delay: 0.2s; }
.article-card:nth-child(5) { animation-delay: 0.25s; }
.article-card:nth-child(6) { animation-delay: 0.3s; }

/* Responsive */
@media (max-width: 1024px) {
    .home-layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 0;
        gap: 12px;
    }
    .navbar-nav {
        order: 3;
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }
    .navbar-nav .nav-link {
        padding: 8px 14px;
        font-size: 13px;
    }
    .search-box {
        order: 2;
    }
    .search-box input {
        width: 120px;
    }
    .articles-grid {
        grid-template-columns: 1fr;
    }
    h1 { font-size: 2em; }
    h2 { font-size: 1.5em; }
}

@media (max-width: 480px) {
    .navbar-nav .nav-link {
        padding: 6px 10px;
        font-size: 12px;
    }
    .section-title {
        font-size: 20px;
    }
}
