/* ========================================
   FINANCE CALCULATOR PRO - STYLESHEET
   Professional, trustworthy design for finance
   ======================================== */

:root {
    /* Colors - Professional finance palette */
    --primary-navy: #1a2332;
    --primary-blue: #2563eb;
    --accent-green: #059669;
    --accent-gold: #d97706;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --text-dark: #1e293b;
    --text-medium: #475569;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
}

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

body {
    font-family: 'Work Sans', -apple-system, sans-serif;
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

/* ========================================
   HEADER
   ======================================== */

.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

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

.logo h1 {
    font-family: 'DM Serif Display', serif;
    font-size: 24px;
    color: var(--primary-navy);
    margin-bottom: 2px;
}

.tagline {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 300;
    letter-spacing: 0.5px;
}

.main-nav {
    display: flex;
    gap: 32px;
}

.main-nav a {
    color: var(--text-medium);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: var(--primary-blue);
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
    background: linear-gradient(135deg, var(--primary-navy) 0%, #2c3e5f 100%);
    color: var(--white);
    padding: 80px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero-decoration {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: var(--white);
    clip-path: polygon(0 50%, 100% 0, 100% 100%, 0 100%);
}

.hero-content {
    max-width: 700px;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-family: 'DM Serif Display', serif;
    font-size: 52px;
    line-height: 1.1;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 32px;
    font-weight: 300;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.cta-button {
    display: inline-block;
    background: var(--accent-green);
    color: var(--white);
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.cta-button:hover {
    background: #047857;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   AD CONTAINERS
   ======================================== */

.ad-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 24px;
}

.ad-placeholder {
    background: var(--light-bg);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 60px 20px;
    text-align: center;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-label {
    color: var(--text-light);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================
   CALCULATOR GRID
   ======================================== */

.calculators-section {
    padding: 80px 0;
    background: var(--light-bg);
}

.section-title {
    font-family: 'DM Serif Display', serif;
    font-size: 42px;
    text-align: center;
    margin-bottom: 60px;
    color: var(--primary-navy);
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.calculator-card {
    background: var(--white);
    padding: 40px 32px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
    position: relative;
    border: 2px solid transparent;
}

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

.calculator-card.featured {
    border: 2px solid var(--accent-gold);
    background: linear-gradient(135deg, #fffbeb 0%, var(--white) 100%);
}

.featured-badge {
    position: absolute;
    top: -12px;
    right: 24px;
    background: var(--accent-gold);
    color: var(--white);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.card-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.calculator-card h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--primary-navy);
}

.calculator-card p {
    color: var(--text-medium);
    margin-bottom: 24px;
    line-height: 1.7;
}

.card-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s;
    display: inline-block;
}

.card-link:hover {
    color: var(--accent-green);
    transform: translateX(4px);
}

/* ========================================
   AFFILIATE SECTION
   ======================================== */

.affiliate-section {
    padding: 80px 0;
    background: var(--white);
}

.section-subtitle {
    text-align: center;
    color: var(--text-medium);
    font-size: 18px;
    margin-bottom: 48px;
}

.affiliate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.affiliate-card {
    background: var(--light-bg);
    padding: 32px 28px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: all 0.3s;
}

.affiliate-card:hover {
    border-color: var(--accent-green);
    transform: translateY(-2px);
}

.affiliate-card h4 {
    font-family: 'DM Serif Display', serif;
    font-size: 22px;
    color: var(--primary-navy);
    margin-bottom: 12px;
}

.affiliate-card p {
    color: var(--text-medium);
    margin-bottom: 20px;
    font-size: 15px;
}

.affiliate-link {
    color: var(--accent-green);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s;
}

.affiliate-link:hover {
    color: #047857;
}

/* ========================================
   ABOUT SECTION
   ======================================== */

.about-section {
    padding: 80px 0;
    background: var(--light-bg);
}

.about-content h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 38px;
    text-align: center;
    margin-bottom: 60px;
    color: var(--primary-navy);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.feature {
    text-align: center;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-green);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 20px;
}

.feature h4 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--primary-navy);
}

.feature p {
    color: var(--text-medium);
    line-height: 1.7;
}

/* ========================================
   NEWSLETTER SECTION
   ======================================== */

.newsletter-section {
    padding: 60px 0;
    background: var(--white);
}

.newsletter-box {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-blue) 0%, #1e40af 100%);
    padding: 48px 40px;
    border-radius: 16px;
    color: var(--white);
    box-shadow: var(--shadow-lg);
}

.newsletter-box h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 32px;
    margin-bottom: 12px;
}

.newsletter-box p {
    font-size: 16px;
    margin-bottom: 28px;
    opacity: 0.95;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Work Sans', sans-serif;
}

.newsletter-form button {
    padding: 14px 28px;
    background: var(--accent-green);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Work Sans', sans-serif;
}

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

/* ========================================
   FOOTER
   ======================================== */

.site-footer {
    background: var(--primary-navy);
    color: rgba(255, 255, 255, 0.8);
    padding: 60px 0 30px;
}

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

.footer-section h4 {
    color: var(--white);
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-section p {
    line-height: 1.8;
    font-size: 14px;
}

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

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-section ul li a:hover {
    color: var(--white);
}

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

.footer-bottom p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

/* ========================================
   CALCULATOR PAGE STYLES
   ======================================== */

.calculator-page {
    min-height: 100vh;
    background: var(--light-bg);
}

.calculator-header {
    background: var(--white);
    padding: 32px 0;
    border-bottom: 1px solid var(--border-color);
}

.calculator-header h1 {
    font-family: 'DM Serif Display', serif;
    font-size: 36px;
    color: var(--primary-navy);
    margin-bottom: 8px;
}

.calculator-header p {
    color: var(--text-medium);
    font-size: 16px;
}

.calculator-container {
    padding: 60px 0;
}

.calculator-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.input-panel,
.results-panel {
    background: var(--white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.input-panel h2,
.results-panel h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 28px;
    margin-bottom: 32px;
    color: var(--primary-navy);
}

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

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Work Sans', sans-serif;
    transition: border-color 0.2s;
}

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

.calculate-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Work Sans', sans-serif;
}

.calculate-btn:hover {
    background: #1e40af;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.result-card {
    background: var(--light-bg);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid var(--accent-green);
}

.result-label {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-navy);
    font-family: 'DM Serif Display', serif;
}

.result-subtext {
    font-size: 14px;
    color: var(--text-medium);
    margin-top: 8px;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 16px;
    }

    .main-nav {
        gap: 20px;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

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

    .calculator-layout {
        grid-template-columns: 1fr;
    }

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

    .section-title {
        font-size: 32px;
    }
}
