/* ========================================
   TeenMoney.org - Styles
   ======================================== */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #10b981;
    --primary-dark: #059669;
    --primary-light: #d1fae5;
    --secondary-color: #3b82f6;
    --accent-color: #f59e0b;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --heading-color: #111827;
    --background: #ffffff;
    --background-light: #f9fafb;
    --border-color: #e5e7eb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background);
    overflow-x: hidden;
}

main {
    overflow-x: hidden;
}

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

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

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

p { margin-bottom: 1rem; }

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

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

/* ========================================
   Header and Navigation
   ======================================== */
header {
    background-color: var(--background);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

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

.logo a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo a:hover {
    text-decoration: none;
    opacity: 0.9;
}

.logo-img {
    height: 40px;
    width: auto;
}

.logo-icon {
    font-size: 2.25rem;
    line-height: 1;
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    text-decoration: none;
}

.nav-cta {
    background-color: var(--primary-color) !important;
    color: white !important;
    padding: 0.5rem 1.25rem !important;
    border-radius: 0.5rem;
    border-bottom: none !important;
    font-weight: 600 !important;
}

.nav-cta:hover {
    background-color: var(--primary-dark) !important;
    color: white !important;
    border-bottom: none !important;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: 0.3s;
}

/* ========================================
   Hero Section
   ======================================== */
.hero-v2 {
    position: relative;
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: url('images/hero-money.jpg') center center / cover no-repeat;
}

.hero-v2-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(5, 80, 60, 0.78) 0%, rgba(16, 120, 90, 0.72) 30%, rgba(20, 80, 160, 0.75) 100%);
    z-index: 1;
}

.hero-v2-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 3rem 1.5rem;
    max-width: 800px;
}

.hero-v2-content h1 {
    font-size: 3.25rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.15;
    text-shadow: 0 3px 16px rgba(0, 0, 0, 0.35);
}

.hero-v2-content .subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 2.5rem;
    font-weight: 400;
    line-height: 1.6;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

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

.hero-v2-content .btn-hero-primary {
    display: inline-block;
    padding: 1rem 2.25rem;
    background: white;
    color: var(--primary-dark);
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.hero-v2-content .btn-hero-primary:hover {
    background: #f0fdf4;
    transform: translateY(-2px);
    text-decoration: none;
}

.hero-v2-content .btn-hero-secondary {
    display: inline-block;
    padding: 1rem 2.25rem;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
    backdrop-filter: blur(4px);
}

.hero-v2-content .btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    text-decoration: none;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    text-decoration: none;
    color: white;
}

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

.btn-secondary:hover {
    background-color: var(--primary-light);
    text-decoration: none;
}

.btn-small {
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 0.5rem;
}

.btn-small:hover {
    background-color: var(--primary-dark);
    color: white;
    text-decoration: none;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* ========================================
   Features / What You'll Learn
   ======================================== */
.features {
    padding: 5rem 0;
    background-color: var(--background-light);
}

.features h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
}

.feature-card .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--heading-color);
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

.learn-more {
    display: inline-block;
    margin-top: 0.75rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
}

/* ========================================
   Popular Articles
   ======================================== */
.popular-articles {
    padding: 5rem 0;
    background: white;
}

.popular-articles h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.article-card {
    background: white;
    border-radius: 1rem;
    padding: 1.75rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
}

.article-card-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.article-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
    color: var(--heading-color);
    line-height: 1.4;
}

.article-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.view-all-link {
    text-align: center;
    margin-top: 2rem;
}

/* ========================================
   Steps Section
   ======================================== */
.steps-section {
    padding: 5rem 0;
    background: var(--background-light);
}

.steps-section h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.step-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 auto 1.25rem;
}

.step-card h4 {
    font-size: 1.05rem;
    color: var(--heading-color);
    margin-bottom: 0.75rem;
}

.step-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ========================================
   Products Preview
   ======================================== */
.products-preview {
    padding: 5rem 0;
    background: white;
}

.products-preview h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.product-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.product-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.product-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--heading-color);
}

.product-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.product-price {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* ========================================
   Newsletter CTA
   ======================================== */
.newsletter-cta {
    padding: 5rem 0;
    background: linear-gradient(135deg, #059669 0%, #10b981 50%, #3b82f6 100%);
}

.newsletter-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-content h2 {
    color: white;
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
}

.newsletter-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.newsletter-form {
    display: flex;
    gap: 0.75rem;
    max-width: 480px;
    margin: 0 auto;
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 0.85rem 1.25rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    outline: none;
}

.newsletter-form input[type="email"]:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.newsletter-form .btn {
    white-space: nowrap;
    background: white;
    color: var(--primary-dark);
    font-weight: 700;
}

.newsletter-form .btn:hover {
    background: #f0fdf4;
    transform: translateY(-2px);
}

/* ========================================
   Final CTA
   ======================================== */
.final-cta {
    padding: 4rem 0;
    background: var(--background-light);
    text-align: center;
}

.final-cta h2 {
    margin-bottom: 0.75rem;
}

.final-cta p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.btn-final {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: white;
    color: var(--primary-color);
    font-weight: 600;
    border: 2px solid var(--primary-color);
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-final:hover {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

/* ========================================
   Footer
   ======================================== */
footer {
    background-color: var(--text-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 0;
}

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

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    color: #d1d5db;
    font-size: 0.95rem;
}

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

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d1d5db;
}

.footer-section a:hover {
    color: white;
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #4b5563;
    color: #9ca3af;
}

/* ========================================
   Content Pages (Blog, Sections)
   ======================================== */
.page-hero {
    background: url('images/hero-money.jpg') center center / cover no-repeat;
    color: white;
    padding: 3rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(5, 80, 60, 0.78) 0%, rgba(16, 120, 90, 0.72) 30%, rgba(20, 80, 160, 0.75) 100%);
    pointer-events: none;
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero h1 {
    margin-bottom: 0.5rem;
    color: white;
}

.page-hero .subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
}

.content-section {
    padding: 3rem 0;
}

.content-section article {
    max-width: 900px;
    margin: 0 auto;
}

/* Table of Contents */
.table-of-contents {
    background-color: var(--background-light);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.table-of-contents h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.table-of-contents ul {
    list-style: none;
}

.table-of-contents li {
    margin-bottom: 0.5rem;
}

.table-of-contents a {
    color: var(--text-color);
}

.table-of-contents a:hover {
    color: var(--primary-color);
}

/* Info Boxes */
.info-box,
.tips-box,
.warning-box {
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin: 2rem 0;
    border-left: 4px solid;
}

.info-box {
    background-color: #eff6ff;
    border-left-color: var(--info);
}

.tips-box {
    background-color: #f0fdf4;
    border-left-color: var(--success);
}

.warning-box {
    background-color: #fffbeb;
    border-left-color: var(--warning);
}

.info-box h4,
.tips-box h4,
.warning-box h4 {
    margin-bottom: 1rem;
}

/* Section Cards Grid (for section landing pages) */
.section-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.section-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.section-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
}

.section-card h3 {
    color: var(--heading-color);
    margin-bottom: 0.5rem;
}

.section-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Blog listing */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* Article page */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: 1rem 0 1.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.article-meta-item {
    font-size: 0.9rem;
    color: var(--text-light);
}

.article-body p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.article-body h2 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.article-body h3 {
    margin-top: 2rem;
}

.article-body ul,
.article-body ol {
    margin: 1rem 0 1rem 2rem;
}

.article-body li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

/* Next steps / related articles */
.next-steps {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.next-steps h3 {
    text-align: center;
    margin-bottom: 2rem;
}

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

.next-link {
    display: block;
    background-color: var(--background-light);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    text-decoration: none;
}

.next-link:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.next-title {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.next-desc {
    display: block;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Shop page */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        gap: 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-cta {
        text-align: center;
        display: block !important;
        margin-top: 0.5rem;
    }

    .hero-v2-content h1 {
        font-size: 2.25rem;
    }

    .hero-v2-content .subtitle {
        font-size: 1.05rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .feature-grid,
    .articles-grid {
        grid-template-columns: 1fr;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: 1fr 1fr;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form input[type="email"] {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .hero-v2 {
        min-height: 400px;
    }

    .hero-v2-content {
        padding: 2rem 1rem;
    }

    .hero-v2-content h1 {
        font-size: 1.85rem;
    }

    h1 { font-size: 1.6rem; }

    .btn {
        width: 100%;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .features,
    .popular-articles,
    .steps-section,
    .products-preview,
    .newsletter-cta {
        padding: 3rem 0;
    }
}
