:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #10b981;
    --bg-light: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
}

.hero-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: white;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-block;
}

.btn-outline {
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
}
.btn-outline:hover {
    background: rgba(255,255,255,0.1);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}
.btn-primary:hover {
    background-color: var(--primary-dark);
}
.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    margin-left: 24px;
    font-weight: 500;
    transition: color 0.3s ease;
}
.nav-links a:hover {
    color: var(--primary);
}

.info-section {
    padding: 80px 24px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.contact-card {
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 32px auto 0;
    text-align: left;
    border: 1px solid #e2e8f0;
}
.contact-card p {
    margin-bottom: 12px;
    color: var(--text-dark);
}
.contact-card a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .header-right {
        display: none !important;
    }
    .nav-links {
        display: none;
    }
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

.hero-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.highlight {
    color: #60a5fa;
}

.subtitle {
    font-size: 1.25rem;
    color: #94a3b8;
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.tools-section {
    padding: 5rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.125rem;
}

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

.tool-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    text-decoration: none;
    color: var(--text-main);
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

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

.placeholder-card {
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    pointer-events: none;
}

.tool-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.icon-blue { background: #eff6ff; color: #3b82f6; }
.icon-purple { background: #faf5ff; color: #a855f7; }
.icon-green { background: #f0fdf4; color: #22c55e; }
.icon-gray { background: #e2e8f0; color: #64748b; }

.tool-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.tool-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.tool-link {
    font-weight: 600;
    color: var(--primary);
}

footer {
    text-align: center;
    padding: 3rem;
    background: white;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

/* Tools Controls (Search & Categories) */
.tools-controls {
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.search-box {
    position: relative;
    width: 100%;
    max-width: 600px;
}

.search-box svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    font-size: 1.125rem;
    border: 2px solid var(--border);
    border-radius: 9999px; /* Pill shape */
    outline: none;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.1);
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.category-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    background: white;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.category-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.category-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}


/* GLOBAL DARK MODE STYLES */
body.dark-mode { 
    --bg-light: #0f172a; 
    --text-main: #f8fafc; 
    --text-muted: #cbd5e1;
    --border: #334155;
    background-color: var(--bg-light) !important;
    color: var(--text-main) !important;
}

body.dark-mode .navbar { 
    background-color: rgba(15, 23, 42, 0.9) !important; 
    border-bottom: 1px solid var(--border) !important; 
}
body.dark-mode .nav-links a { color: #f8fafc !important; }
body.dark-mode .nav-links a:hover { color: #60a5fa !important; }
body.dark-mode .logo { color: #f8fafc !important; }
body.dark-mode .logo svg { color: #f8fafc !important; }

/* Blog Specific Overrides */
body.dark-mode .article-container { background: #1e293b !important; border-color: var(--border) !important; }
body.dark-mode .article-header h1 { color: #f8fafc !important; }
body.dark-mode .article-content { color: #cbd5e1 !important; }
body.dark-mode .article-content p { color: #cbd5e1 !important; }
body.dark-mode .article-content h1, 
body.dark-mode .article-content h2, 
body.dark-mode .article-content h3 { color: #f8fafc !important; }
body.dark-mode .article-content ul, 
body.dark-mode .article-content li { color: #cbd5e1 !important; }

body.dark-mode .cta-box { background: #1e3a8a !important; border-color: #1e40af !important; }
body.dark-mode .cta-box h3 { color: #93c5fd !important; }

body.dark-mode .article-card { background: #1e293b !important; border-color: var(--border) !important; color: #f8fafc !important; }
body.dark-mode .article-title { color: #f8fafc !important; }
body.dark-mode .article-excerpt { color: #cbd5e1 !important; }
body.dark-mode .read-more { color: #60a5fa !important; }

/* Global components */
body.dark-mode .tool-card { background: #1e293b !important; border-color: var(--border) !important; }
body.dark-mode .tool-card:hover { border-color: #60a5fa !important; }
body.dark-mode .tool-title { color: #f8fafc !important; }
body.dark-mode .tool-desc { color: #cbd5e1 !important; }

body.dark-mode .search-box input { background: #1e293b !important; border-color: var(--border) !important; color: #f8fafc !important; }
body.dark-mode .search-box input::placeholder { color: #64748b !important; }

body.dark-mode .category-btn { background: #1e293b !important; color: #cbd5e1 !important; border-color: var(--border) !important; }
body.dark-mode .category-btn:hover { background: #334155 !important; }
body.dark-mode .category-btn.active { background: #2563eb !important; color: white !important; }

/* Global layout */
body.dark-mode footer { background: #1e293b !important; border-color: var(--border) !important; color: #94a3b8 !important; }
body.dark-mode .contact-card { background: #1e293b !important; border-color: var(--border) !important; }
body.dark-mode .contact-card p, body.dark-mode .contact-card strong { color: #f8fafc !important; }
body.dark-mode .contact-card a { color: #60a5fa !important; }

/* News section */
body.dark-mode .news-card { background: #1e293b !important; border-color: var(--border) !important; }
body.dark-mode .news-title { color: #f8fafc !important; }
body.dark-mode .news-excerpt { color: #cbd5e1 !important; }
body.dark-mode .news-meta { color: #94a3b8 !important; }

/* Transitions */
body, .navbar, .tool-card, .article-card, .article-container, .news-card, .category-btn {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}


/* Toggle Button Styles */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    margin-left: 1rem;
}
.sun-icon { display: block; }
.moon-icon { display: none; }
body.dark-mode .sun-icon { display: none; }
body.dark-mode .moon-icon { display: block; color: #f8fafc; }
body.dark-mode .theme-toggle { border-color: #334155; }

/* News specific fixes for dark text on dark cards */
body.dark-mode .news-content h2 { color: #f8fafc !important; }
body.dark-mode .news-content p { color: #cbd5e1 !important; }
body.dark-mode .news-source { color: #93c5fd !important; }
body.dark-mode .news-tab { background: #1e293b !important; color: #cbd5e1 !important; border-color: #334155 !important; }
body.dark-mode .news-tab:hover { background: #334155 !important; }
body.dark-mode .news-tab.active { background: #2563eb !important; color: white !important; }

/* Make sure blog cards also behave properly */
body.dark-mode .articles-grid .article-title { color: #f8fafc !important; }
body.dark-mode .articles-grid .article-excerpt { color: #cbd5e1 !important; }
body.dark-mode .blog-hero { background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important; }

/* Feedback Widget */
.feedback-widget {
    margin: 40px auto 20px auto;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.feedback-widget p {
    font-size: 15px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 15px;
}
.feedback-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}
.feedback-buttons button {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #475569;
}
.feedback-buttons button:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    transform: translateY(-2px);
}
.feedback-buttons .btn-like:hover {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}
.feedback-buttons .btn-dislike:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}

/* Dark Mode for Feedback Widget */
body.dark-mode .feedback-widget {
    background: #1e293b;
    border-color: #334155;
}
body.dark-mode .feedback-widget p {
    color: #e2e8f0;
}
body.dark-mode .feedback-buttons button {
    background: #0f172a;
    border-color: #334155;
    color: #cbd5e1;
}
body.dark-mode .feedback-buttons button:hover {
    background: #1e293b;
}
body.dark-mode .feedback-buttons .btn-like:hover {
    background: #064e3b;
    border-color: #059669;
    color: #a7f3d0;
}
body.dark-mode .feedback-buttons .btn-dislike:hover {
    background: #7f1d1d;
    border-color: #dc2626;
    color: #fecaca;
}
