:root {
    --primary: #EB662E;
    --primary-dark: #CE3D05;
    --secondary: #2A2C2D;
    --bg: #F9FAFB;
    --text-dark: #2A2C2D;
    --text-muted: #686868;
    --white: #FFFFFF;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text-dark);
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
}

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

header {
    background: var(--white);
    padding: 20px 0;
    border-bottom: 1px solid #E5E7EB;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 40px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    margin-left: 20px;
    transition: color 0.2s;
}

.nav-links a.active {
    color: var(--primary);
    font-weight: 700;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 80px 0;
    text-align: center;
    color: var(--white);
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-container input {
    width: 100%;
    padding: 18px 25px 18px 55px;
    border-radius: 16px;
    border: none;
    font-size: 1.1rem;
    box-shadow: var(--shadow);
    outline: none;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    color: var(--text-muted);
}

/* Categories */
.categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: -40px;
    padding-bottom: 60px;
}

.category-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.category-card .icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.category-card h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.category-card p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.article-count {
    display: inline-block;
    background: #FFF7ED;
    color: var(--primary);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Articles Section */
.hidden {
    display: none !important;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    padding-top: 40px;
}

#back-btn, #back-to-list-btn {
    background: none;
    border: 1px solid #E5E7EB;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

#back-btn:hover, #back-to-list-btn:hover {
    background: #F3F4F6;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.article-item {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.article-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.article-item h4 {
    color: var(--primary);
    margin-bottom: 8px;
}

/* Article Viewer */
#article-content {
    background: var(--white);
    padding: 60px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 80px;
}

#article-content h1 { font-size: 2.2rem; margin-bottom: 30px; border-bottom: 2px solid #F3F4F6; padding-bottom: 15px; }
#article-content h2 { font-size: 1.6rem; margin: 40px 0 20px; }
#article-content p { margin-bottom: 20px; color: #374151; font-size: 1.1rem; }
#article-content ol, #article-content ul { margin: 0 0 25px 25px; }
#article-content li { margin-bottom: 10px; }
#article-content img { max-width: 100%; border-radius: 12px; margin: 20px 0; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }

/* Footer */
footer {
    background: #111827;
    color: #9CA3AF;
    padding: 40px 0;
    text-align: center;
    margin-top: 100px;
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    #article-content { padding: 30px; }
}
