/* LifeHacks Hub - Main Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700&family=Inter:wght@400;500&display=swap');

:root {
    --primary: #6366F1;
    --primary-dark: #4F46E5;
    --secondary: #EC4899;
    --accent: #10B981;
    --dark: #1E293B;
    --light: #F8FAFC;
    --text: #334155;
    --text-light: #64748B;
    --white: #FFFFFF;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
    --transition: all 0.3s ease;
}

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

html { scroll-behavior: smooth; }

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

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

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

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

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

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

.navbar .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);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo svg { width: 32px; height: 32px; }

.nav-links { display: flex; gap: 2rem; list-style: none; align-items: center; }
.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;
    cursor: pointer;
    gap: 5px;
}

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

/* Mobile Menu */
@media (max-width: 768px) {
    .hamburger { display: flex; }
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        box-shadow: var(--shadow);
        display: none;
    }
    .nav-links.active { display: flex; }
}

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

.hero h1 {
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

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

.btn-primary:hover { background: var(--light); transform: translateY(-2px); }

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

.btn-secondary:hover { background: #DB2777; }

/* Sections */
.section { padding: 4rem 0; }
.section-light { background: var(--white); }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: 2.25rem; margin-bottom: 0.5rem; }
.section-header p { color: var(--text-light); font-size: 1.1rem; }

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

.tool-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

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

.tool-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.tool-icon svg { width: 24px; height: 24px; stroke: white; }

.tool-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.tool-card p { color: var(--text-light); font-size: 0.9rem; }

.tool-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--light);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.75rem;
}

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

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

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

.article-content { padding: 1.5rem; }
.article-content h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.article-content p { color: var(--text-light); font-size: 0.95rem; margin-bottom: 1rem; }

.article-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

@media (max-width: 768px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

.stat-item h3 { font-size: 3rem; color: var(--primary); }
.stat-item p { color: var(--text-light); }

/* Newsletter */
.newsletter {
    background: linear-gradient(135deg, var(--dark) 0%, #334155 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.newsletter h2 { color: var(--white); margin-bottom: 1rem; }
.newsletter p { opacity: 0.8; margin-bottom: 2rem; }

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

.newsletter-form input {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
}

@media (max-width: 480px) { .newsletter-form { flex-direction: column; } }

/* Filters */
.filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.5rem 1.25rem;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

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

/* Tool Page */
.tool-page {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.tool-page h1 { margin-bottom: 0.5rem; }
.tool-description { color: var(--text-light); margin-bottom: 2rem; }

.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; }

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #E2E8F0;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.result-box {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    text-align: center;
    margin-top: 1.5rem;
}

.result-box h3 { color: var(--white); font-size: 1rem; opacity: 0.9; }
.result-box .result-value { font-size: 2.5rem; font-weight: 700; }

/* Sidebar */
.tool-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

@media (max-width: 900px) { .tool-layout { grid-template-columns: 1fr; } }

.related-tools { background: var(--light); padding: 1.5rem; border-radius: var(--radius); }
.related-tools h3 { margin-bottom: 1rem; }
.related-tools ul { list-style: none; }
.related-tools li { margin-bottom: 0.75rem; }
.related-tools a { color: var(--text); }
.related-tools a:hover { color: var(--primary); }

/* Article Page */
.article-page {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 3rem;
}

@media (max-width: 900px) { .article-page { grid-template-columns: 1fr; } }

.article-hero { margin-bottom: 2rem; }
.article-hero img { border-radius: var(--radius); width: 100%; height: auto; }

.article-body { background: var(--white); padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.article-body h2 { margin: 1.5rem 0 1rem; font-size: 1.5rem; }
.article-body p { margin-bottom: 1rem; line-height: 1.8; }
.article-body ul, .article-body ol { margin: 1rem 0 1.5rem 1.5rem; }
.article-body li { margin-bottom: 0.5rem; }

.article-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.toc {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.toc h3 { margin-bottom: 1rem; font-size: 1rem; }
.toc ul { list-style: none; }
.toc li { margin-bottom: 0.5rem; }
.toc a { color: var(--text); font-size: 0.9rem; }
.toc a:hover { color: var(--primary); }

.author-box {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    object-fit: cover;
}

.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; justify-content: center; }
.tag {
    padding: 0.25rem 0.75rem;
    background: var(--light);
    border-radius: 15px;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .hero h1 { font-size: 2rem; }
}

.footer-brand .logo { color: var(--white); margin-bottom: 1rem; }
.footer-brand p { opacity: 0.7; font-size: 0.9rem; }

.footer h4 { margin-bottom: 1.25rem; font-size: 1rem; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 0.75rem; }
.footer a { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.footer a:hover { color: var(--white); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    text-align: center;
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Contact Form */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-form {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #E2E8F0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    margin-bottom: 1rem;
}

.contact-form textarea { height: 150px; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--primary); }

.faq-item {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

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

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

.legal-content h2 { margin: 2rem 0 1rem; font-size: 1.5rem; }
.legal-content p { margin-bottom: 1rem; }
.legal-content ul { margin: 1rem 0 1.5rem 1.5rem; }
.legal-content li { margin-bottom: 0.5rem; }

/* 404 Page */
.error-page {
    text-align: center;
    padding: 5rem 0;
}

.error-page h1 { font-size: 8rem; color: var(--primary); }
.error-page h2 { margin-bottom: 1rem; }
.error-page p { color: var(--text-light); margin-bottom: 2rem; }

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 { color: var(--white); margin-bottom: 0.5rem; }
.page-header p { opacity: 0.9; }

/* Calculator Specific */
.calc-row { display: flex; gap: 1rem; align-items: flex-end; }
.calc-row .form-group { flex: 1; }

/* About Page */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 768px) { .about-grid { grid-template-columns: 1fr; } }

.value-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.value-card h3 { margin-bottom: 0.5rem; color: var(--primary); }
.value-card p { color: var(--text-light); font-size: 0.95rem; }

/* Utilities */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-2 { margin-top: 2rem; }
