:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #14b8a6;
    --accent: #f59e0b;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --danger: #ef4444;
    --success: #10b981;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.main-header {
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.logo-img {
    height: 40px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 8px;
    list-style: none;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 100;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-menu li a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--gray);
}

.dropdown-menu li a:hover {
    background: var(--light);
    color: var(--primary);
}

.nav-actions {
    display: flex;
    gap: 1rem;
}

.btn-login,
.btn-signup {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-login {
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-login:hover {
    background: var(--primary);
    color: white;
}

.btn-signup {
    background: var(--primary);
    color: white;
}

.btn-signup:hover {
    background: var(--primary-dark);
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    background: var(--gradient);
    padding: 4rem 0;
    color: white;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Search Container */
.search-container {
    max-width: 600px;
    margin: 2rem auto;
    position: relative;
}

.search-wrapper {
    position: relative;
}

.search-wrapper input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    font-size: 1rem;
    border: none;
    border-radius: 50px;
    outline: none;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

.search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.5rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-btn:hover {
    background: var(--primary-dark);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-top: 0.5rem;
    display: none;
    z-index: 100;
}

.search-suggestions.active {
    display: block;
}

.popular-searches {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.popular-searches span {
    opacity: 0.8;
}

.popular-searches a {
    color: white;
    text-decoration: none;
    padding: 0.25rem 0.75rem;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    transition: background 0.3s;
}

.popular-searches a:hover {
    background: rgba(255,255,255,0.3);
}

/* Categories Section */
.categories-section,
.featured-articles,
.tools-integration,
.services-connection {
    padding: 4rem 0;
}

.categories-section h2,
.featured-articles h2,
.tools-integration h2,
.services-connection h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--dark);
}

.categories-grid,
.articles-grid,
.tools-grid,
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.category-card,
.article-card,
.tool-card,
.service-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.category-card:hover,
.article-card:hover,
.tool-card:hover,
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.15);
}

.category-icon,
.article-icon,
.tool-icon,
.service-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.category-card h3,
.article-card h3,
.tool-card h3,
.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.category-card p,
.article-card p,
.tool-card p,
.service-card p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Search Results Page */
.search-results-page {
    padding: 4rem 0;
}

.search-header {
    text-align: center;
    margin-bottom: 3rem;
}

.search-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.search-query {
    background: white;
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.search-form-small {
    max-width: 500px;
    margin: 0 auto;
}

.search-form-small form {
    display: flex;
    gap: 0.5rem;
}

.search-form-small input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.search-form-small button {
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.results-grid {
    max-width: 800px;
    margin: 0 auto;
}

.result-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.result-category {
    display: inline-block;
    background: var(--light);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.result-card h2 {
    margin-bottom: 1rem;
}

.result-card h2 a {
    color: var(--dark);
    text-decoration: none;
}

.result-card h2 a:hover {
    color: var(--primary);
}

.result-links {
    margin: 1.5rem 0;
    padding: 1rem 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.related-tools,
.related-services {
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.related-tools i,
.related-services i {
    margin-right: 0.5rem;
    color: var(--primary);
}

.tool-badge,
.service-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--light);
    color: var(--primary);
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.tool-badge:hover,
.service-badge:hover {
    background: var(--primary);
    color: white;
}

.read-more {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    margin-top: 1rem;
}

.read-more:hover {
    text-decoration: underline;
}

.no-results {
    text-align: center;
    padding: 4rem;
    background: white;
    border-radius: 12px;
}

.no-results i {
    font-size: 4rem;
    color: var(--gray);
    margin-bottom: 1rem;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.suggested-categories {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.suggested-categories a {
    padding: 0.5rem 1rem;
    background: var(--light);
    color: var(--primary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
}

.suggested-categories a:hover {
    background: var(--primary);
    color: white;
}

/* Footer */
.main-footer {
    background: var(--dark);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h3,
.footer-col h4 {
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col ul li a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    color: white;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #334155;
    color: #94a3b8;
}

.footer-bottom a {
    color: #94a3b8;
    text-decoration: none;
}

.footer-bottom a:hover {
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .categories-grid,
    .articles-grid,
    .tools-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .search-wrapper input {
        padding-right: 80px;
    }
    
    .search-btn {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
    
    .result-card {
        padding: 1.5rem;
    }
}

/* Article Page Styles */
.article-page {
    padding: 4rem 0;
}

.article-header {
    text-align: center;
    margin-bottom: 3rem;
}

.article-category {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.article-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.article-meta {
    color: var(--gray);
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.article-content h2 {
    margin: 1.5rem 0 1rem;
}

.article-content h3 {
    margin: 1rem 0 0.5rem;
}

.article-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.article-content ul,
.article-content ol {
    margin: 1rem 0 1rem 2rem;
}

.article-content code {
    background: var(--light);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
}

.article-content pre {
    background: var(--dark);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
}

.related-resources {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.related-resources h3 {
    margin-bottom: 1rem;
}

.related-resources ul {
    list-style: none;
    padding: 0;
}

.related-resources li {
    margin-bottom: 0.5rem;
}

.related-resources a {
    color: var(--primary);
    text-decoration: none;
}

.related-resources a:hover {
    text-decoration: underline;
}