/* Max Saver USA - Money Saving Tips, Coupons & Personal Finance Blog */
/* Fresh, optimistic, value-focused design */

/* ===== CSS Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #22c55e;
    --primary-blue: #3b82f6;
    --white: #ffffff;
    --charcoal: #1f2937;
    --light-gray: #f3f4f6;
    --medium-gray: #9ca3af;
    --dark-gray: #374151;
    --accent-green: #16a34a;
    --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);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--charcoal);
    background-color: var(--white);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

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

ul, ol {
    list-style: none;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--charcoal);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

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

/* ===== Header & Navigation ===== */
header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
    padding: 0.75rem 0;
    text-align: center;
}

.header-top p {
    color: var(--white);
    font-size: 0.9rem;
    margin: 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-green);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--primary-blue);
}

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

.nav-links a {
    font-weight: 600;
    color: var(--charcoal);
    padding: 0.5rem 0;
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-green);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--charcoal);
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

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

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

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

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

.btn-primary:hover {
    background: var(--accent-green);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

.btn-outline {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

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

/* ===== Featured Section ===== */
.featured {
    padding: 4rem 0;
    background: var(--light-gray);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.25rem;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--medium-gray);
    font-size: 1.1rem;
}

/* ===== Article Cards ===== */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.article-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.article-card-content {
    padding: 1.5rem;
}

.article-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--medium-gray);
    margin-bottom: 0.75rem;
}

.article-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

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

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

.read-more {
    color: var(--primary-green);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.read-more:hover {
    color: var(--accent-green);
}

/* ===== Categories ===== */
.categories {
    padding: 4rem 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-card:hover {
    border-color: var(--primary-green);
    transform: translateY(-3px);
}

.category-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.category-card h4 {
    margin-bottom: 0.25rem;
}

.category-card p {
    color: var(--medium-gray);
    font-size: 0.85rem;
    margin: 0;
}

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

.newsletter h2 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.newsletter p {
    opacity: 0.9;
    margin-bottom: 2rem;
}

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

.newsletter-form input {
    flex: 1;
    min-width: 250px;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
}

/* ===== Author Box ===== */
.author-box {
    background: var(--light-gray);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    gap: 2rem;
    margin: 3rem 0;
}

.author-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-info h4 {
    margin-bottom: 0.25rem;
}

.author-info .author-title {
    color: var(--primary-green);
    font-weight: 600;
    margin-bottom: 1rem;
}

.author-info p {
    color: var(--dark-gray);
}

/* ===== Article Page ===== */
.article-header {
    padding: 3rem 0;
    background: var(--light-gray);
}

.article-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--medium-gray);
    flex-wrap: wrap;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-featured-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 12px;
    margin: 2rem 0;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.article-content h2 {
    color: var(--charcoal);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--light-gray);
}

.article-content h3 {
    color: var(--dark-gray);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.article-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--dark-gray);
}

.article-content ul, .article-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.75rem;
    list-style-type: disc;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--dark-gray);
}

.article-content ol li {
    list-style-type: decimal;
}

.article-content blockquote {
    background: var(--light-gray);
    border-left: 4px solid var(--primary-green);
    padding: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--dark-gray);
}

.article-content img {
    border-radius: 8px;
    margin: 2rem 0;
}

.article-content a {
    color: var(--primary-blue);
    text-decoration: underline;
}

.article-content a:hover {
    color: var(--primary-green);
}

/* ===== Related Articles ===== */
.related-articles {
    padding: 4rem 0;
    background: var(--light-gray);
}

/* ===== Footer ===== */
footer {
    background: var(--charcoal);
    color: var(--white);
    padding: 3rem 0 1.5rem;
}

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

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

.footer-col p, .footer-col a {
    color: var(--medium-gray);
    font-size: 0.95rem;
    line-height: 1.8;
}

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

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: var(--dark-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.footer-social a:hover {
    background: var(--primary-green);
}

.footer-bottom {
    border-top: 1px solid var(--dark-gray);
    padding-top: 1.5rem;
    text-align: center;
    color: var(--medium-gray);
    font-size: 0.9rem;
}

/* ===== Contact Form ===== */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--charcoal);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

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

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* ===== Sitemap ===== */
.sitemap-list {
    max-width: 800px;
    margin: 0 auto;
}

.sitemap-list li {
    margin-bottom: 1rem;
}

.sitemap-list a {
    color: var(--primary-blue);
    font-weight: 500;
}

.sitemap-list a:hover {
    color: var(--primary-green);
}

.sitemap-list ul {
    margin-left: 2rem;
    margin-top: 0.5rem;
}

.sitemap-list ul li {
    margin-bottom: 0.5rem;
}

/* ===== Privacy & Terms ===== */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.legal-content h2 {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--light-gray);
}

/* ===== Breadcrumbs ===== */
.breadcrumbs {
    padding: 1rem 0;
    font-size: 0.9rem;
    color: var(--medium-gray);
}

.breadcrumbs a {
    color: var(--primary-blue);
}

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

.breadcrumbs span {
    margin: 0 0.5rem;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination a {
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    color: var(--charcoal);
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination a:hover, .pagination a.active {
    background: var(--primary-green);
    color: var(--white);
    border-color: var(--primary-green);
}

/* ===== Search Box ===== */
.search-box {
    max-width: 600px;
    margin: 2rem auto;
}

.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-form input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid var(--light-gray);
    border-radius: 50px;
    font-size: 1rem;
}

.search-form button {
    padding: 1rem 2rem;
    background: var(--primary-green);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-form button:hover {
    background: var(--accent-green);
}

/* ===== Stats Section ===== */
.stats {
    padding: 3rem 0;
    background: var(--white);
}

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

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--primary-green);
    margin-bottom: 0.25rem;
}

.stat-item p {
    color: var(--medium-gray);
    font-size: 0.95rem;
}

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow);
        gap: 1rem;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .author-box {
        flex-direction: column;
        text-align: center;
    }
    
    .author-avatar {
        margin: 0 auto;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input {
        min-width: 100%;
    }
}

/* ===== Utilities ===== */
.text-center { text-align: center; }
.text-green { color: var(--primary-green); }
.text-blue { color: var(--primary-blue); }
.bg-light { background: var(--light-gray); }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
