/* ===== GLOBAL RESET & VARIABLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #F4F6F8;
    --card-bg: #ffffff;
    --text-main: #0A192F;
    --text-muted: #545454;
    --header-dark: #0A192F;
    --green: #00BFA6;
    --green-hover: #008f7a;
    --hero-gradient: linear-gradient(135deg, #0A192F 0%, #00BFA6 60%, #38EF7D 100%);
    --ad-bg: rgba(0, 0, 0, 0.03);
    --border: rgba(0, 0, 0, 0.1);
}

body.dark-mode {
    --bg: #050d1a;
    --card-bg: #112240;
    --text-main: #ffffff;
    --text-muted: #bdc1c6;
    --ad-bg: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg);
    color: var(--text-main);
    line-height: 1.6;
    transition: background 0.3s ease;
}

/* ===== HEADER & NAVIGATION (Shared) ===== */
header {
    background: var(--header-dark);
    padding: 15px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .logo { max-height: 45px; }

.header-nav {
    display: flex;
    gap: 10px;
    align-items: center;
}

.header-nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    padding: 8px 15px;
    transition: 0.3s;
}

.header-nav a:hover,
.header-nav a.active {
    color: var(--green);
}

.dark-mode-toggle {
    background: var(--green);
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    margin-left: 10px;
}

/* ===== HERO SECTION (Finance Specific) ===== */
.finance-hero {
    background: var(--hero-gradient);
    color: white;
    text-align: center;
    padding: 70px 20px;
}

.finance-hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 15px;
}

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

/* ===== MAIN CONTAINER ===== */
.finance-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 35px;
}

/* ===== TOOL & INFO CARDS ===== */
.tool-card, .info-card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
}

.tool-card h2, .info-card h2 {
    margin-bottom: 15px;
    font-size: 2rem;
    color: var(--green);
    font-weight: 800;
}

/* ===== INPUT STYLING ===== */
.input-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.input-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.input-group label {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: var(--text-main);
}

.savings-input {
    padding: 14px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: #fafafa;
    color: #333;
    font-weight: 600;
    font-size: 1rem;
    transition: 0.3s;
}

body.dark-mode .savings-input {
    background: #0d192e;
    color: #fff;
    border-color: #233554;
}

.savings-input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(0, 191, 166, 0.1);
}

/* ===== BUTTONS (Synced with Meta Tool) ===== */
.tool-btn-main {
    background: var(--green);
    color: white;
    border: none;
    padding: 18px 45px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    width: 100%;
    transition: 0.3s;
    text-transform: uppercase;
}

.tool-btn-main:hover {
    background: var(--green-hover);
    transform: translateY(-2px);
}

.tool-btn-secondary {
    background: transparent;
    color: var(--green);
    border: 2px solid var(--green);
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 20px;
    width: 100%;
    transition: 0.3s;
}

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

/* ===== RESULTS & SUMMARY ===== */
.results-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 3px solid var(--green);
    text-align: left;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.summary-card {
    background: rgba(0, 191, 166, 0.05);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid var(--border);
    text-align: center;
}

.summary-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.summary-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--green);
}

/* ===== PROJECTION TABLE ===== */
.projection-container {
    margin-top: 30px;
}

.projection-table {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card-bg);
}

.projection-row {
    display: grid;
    grid-template-columns: 1fr 2fr 2fr 2fr;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.projection-row.header {
    background: var(--green);
    color: white;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* ===== AD SLOTS ===== */
.sponsor-slot {
    width: 100%;
    background: var(--ad-bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--border);
}

/* ===== TRUST GRID (Shared) ===== */
.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.trust-card {
    background: rgba(0, 0, 0, 0.02);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid var(--border);
}

body.dark-mode .trust-card {
    background: rgba(255, 255, 255, 0.03);
}

/* ===== FOOTER ===== */
footer {
    background: var(--header-dark);
    color: white;
    text-align: center;
    padding: 60px 20px;
    margin-top: 80px;
}

footer a {
    color: var(--green) !important;
    text-decoration: none;
    margin: 0 10px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .menu-toggle { display: flex; flex-direction: column; gap: 5px; cursor: pointer; }
    .bar { width: 25px; height: 3px; background: white; transition: 0.3s; }
    
    .header-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%; left: 0; width: 100%;
        background: var(--header-dark);
        padding: 20px;
        gap: 15px;
    }
    .header-nav.active { display: flex; }

    .input-grid { grid-template-columns: 1fr; }
    .finance-hero h1 { font-size: 2.2rem; }
    .tool-card { padding: 25px; }
}

/* Hamburger Animation */
.menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
.menu-toggle.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
