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

:root {
    --primary: #059669;
    --secondary: #0891B2;
    --accent: #D97706;
    --dark: #1E293B;
    --light-bg: #F0FDF4;
    --text: #334155;
    --white: #ffffff;
    --gray-light: #f1f5f9;
    --gray: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--dark);
    line-height: 1.3;
}

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

a:hover {
    color: var(--secondary);
}

img {
    max-width: 100%;
    height: auto;
}

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

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

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

.btn-primary:hover {
    background: #047857;
    color: var(--white);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--white);
}

.btn-secondary:hover {
    background: #0e7490;
    color: var(--white);
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    background: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
    padding: 15px 0;
}

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

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    color: var(--text);
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--dark);
    border-radius: 2px;
    transition: var(--transition);
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--light-bg) 0%, #d1fae5 100%);
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text);
    max-width: 600px;
    margin: 0 auto 30px;
}

/* Sections */
section {
    padding: 60px 0;
}

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 40px;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.tool-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    transition: var(--transition);
}

.tool-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--primary);
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.tool-card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.tool-card p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Articles */
.article-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.article-card:hover {
    box-shadow: var(--shadow-lg);
}

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

.article-content {
    padding: 20px;
}

.article-category {
    display: inline-block;
    background: var(--light-bg);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 12px;
}

.article-card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.article-card h3 a {
    color: var(--dark);
}

.article-card h3 a:hover {
    color: var(--primary);
}

.article-card p {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.article-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--gray);
}

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

/* Stats */
.stats {
    background: var(--dark);
    color: var(--white);
    padding: 60px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    color: var(--primary);
}

.stat-label {
    font-size: 1rem;
    color: var(--gray);
}

/* Newsletter */
.newsletter {
    background: var(--light-bg);
    text-align: center;
}

.newsletter h2 {
    margin-bottom: 10px;
}

.newsletter p {
    margin-bottom: 30px;
    color: var(--gray);
}

.newsletter-form {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}

.newsletter-form input {
    flex: 1;
    min-width: 250px;
    padding: 12px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a {
    color: var(--gray);
}

.footer-col a:hover {
    color: var(--white);
}

.footer-col p {
    color: var(--gray);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--gray);
}

/* Page Header */
.page-header {
    background: var(--light-bg);
    padding: 40px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.2rem;
}

.page-header p {
    color: var(--gray);
    margin-top: 10px;
}

/* Filter */
.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 30px;
}

.filter-btn {
    padding: 8px 20px;
    border: 1px solid var(--border);
    background: var(--white);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

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

/* Text Center */
.text-center {
    text-align: center;
    margin-top: 40px;
}

/* Tool Page */
.tool-page {
    padding: 40px 0;
}

.tool-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

.tool-main {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow);
}

.tool-main h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.tool-description {
    color: var(--gray);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--dark);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.result-box {
    background: var(--light-bg);
    border-radius: var(--radius);
    padding: 20px;
    margin-top: 20px;
    text-align: center;
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Poppins', sans-serif;
}

.result-label {
    color: var(--gray);
    margin-top: 5px;
}

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

.related-tools {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
}

.related-tools h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.related-tools ul {
    list-style: none;
}

.related-tools li {
    margin-bottom: 10px;
}

.related-tools a {
    color: var(--text);
    font-size: 0.95rem;
}

.related-tools a:hover {
    color: var(--primary);
}

/* Article Page */
.article-page {
    padding: 40px 0;
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
}

.article-main {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.article-hero {
    position: relative;
}

.article-hero img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.article-header {
    padding: 30px;
}

.article-header h1 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.article-content {
    padding: 0 30px 30px;
}

.article-content h2 {
    font-size: 1.5rem;
    margin: 30px 0 15px;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content ul,
.article-content ol {
    margin: 20px 0;
    padding-left: 25px;
}

.article-content li {
    margin-bottom: 10px;
}

.article-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.toc {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.toc h3 {
    font-size: 1rem;
    margin-bottom: 15px;
}

.toc ul {
    list-style: none;
}

.toc li {
    margin-bottom: 8px;
}

.toc a {
    color: var(--text);
    font-size: 0.9rem;
}

.toc a:hover {
    color: var(--primary);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 30px;
}

.tag {
    background: var(--gray-light);
    color: var(--text);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.article-author {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-top: 20px;
}

.author-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.author-date {
    color: var(--gray);
    font-size: 0.9rem;
}

/* About Page */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-content h2 {
    font-size: 1.8rem;
    margin: 40px 0 20px;
}

.about-content p {
    margin-bottom: 20px;
    font-size: 1.05rem;
}

/* Contact Page */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-form {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow);
}

.contact-form h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

.faq-section {
    margin-top: 60px;
}

.faq-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
}

.faq-item h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

/* Legal Pages */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.legal-content h1 {
    font-size: 2rem;
    margin-bottom: 30px;
}

.legal-content h2 {
    font-size: 1.4rem;
    margin: 30px 0 15px;
}

.legal-content p {
    margin-bottom: 15px;
}

/* 404 Page */
.error-page {
    text-align: center;
    padding: 100px 20px;
}

.error-page h1 {
    font-size: 6rem;
    color: var(--primary);
}

.error-page h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.error-page p {
    color: var(--gray);
    margin-bottom: 30px;
}

/* Responsive */
@media (max-width: 992px) {
    .tool-container,
    .article-layout {
        grid-template-columns: 1fr;
    }
    
    .tool-sidebar,
    .article-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        box-shadow: var(--shadow);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input {
        width: 100%;
    }
}
