/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --primary: #2563eb;
    --secondary: #1e40af;
    --bg: #f8fafc;
    --text: #1e293b;
    --white: #ffffff;
    --border: #e2e8f0;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Global Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

/* =========================================
   2. HEADER & NAVIGATION
   ========================================= */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    position: sticky;
    top: 0;
    z-index: 1000;
    margin-bottom: 30px;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo-icon { font-size: 1.8rem; }
.ca { color: #ef4444; }

/* Desktop Nav */
.main-nav { display: block; }
.nav-list { display: flex; list-style: none; gap: 25px; margin: 0; padding: 0; }
.nav-list a { text-decoration: none; color: #475569; font-weight: 600; font-size: 0.95rem; padding: 8px 12px; border-radius: 6px; transition: all 0.2s; }
.nav-list a:hover { background: #f1f5f9; color: var(--primary); }
.nav-list a.active { background: #eff6ff; color: var(--primary); }

/* Mobile Nav */
.mobile-toggle { display: none; background: none; border: none; font-size: 1.8rem; cursor: pointer; color: var(--text); }
.mobile-nav { display: none; background: var(--white); border-top: 1px solid var(--border); padding: 10px 0; }
.mobile-nav a { display: block; padding: 15px 20px; text-decoration: none; color: var(--text); font-weight: 600; border-bottom: 1px solid #f1f5f9; }

@media (max-width: 768px) {
    .main-nav { display: none; }
    .mobile-toggle { display: block; }
}

/* =========================================
   3. MAIN CONTENT & CALCULATORS
   ========================================= */
/* Ensure main expands to push footer down */
main.container {
    flex: 1;
}

.calculator-box {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.input-group { margin-bottom: 20px; }
label { display: block; margin-bottom: 8px; font-weight: 600; }
input[type="number"], input[type="text"], input[type="date"], select {
    width: 100%; padding: 12px; border: 2px solid var(--border); border-radius: 6px; font-size: 16px; background: #fff;
}
input:focus, select:focus { border-color: var(--primary); outline: none; }

.calc-btn {
    background: var(--primary); color: white; padding: 12px 24px; border: none; border-radius: 6px; font-size: 1rem; cursor: pointer; width: 100%; font-weight: bold; transition: background 0.2s;
}
.calc-btn:hover { background: var(--secondary); }

.result-box { margin-top: 20px; padding: 20px; background: #eff6ff; border-left: 5px solid var(--primary); border-radius: 4px; }

.content-area h2 { margin-top: 30px; margin-bottom: 15px; font-size: 1.4rem; color: #1e293b;}
.content-area p { margin-bottom: 15px; color: #475569; }

/* =========================================
   4. FOOTER STYLES
   ========================================= */
.site-footer {
    background: #1e293b;
    color: #cbd5e1;
    padding: 60px 0 40px;
    margin-top: auto; /* Pushes footer to bottom */
    font-size: 0.95rem;
    border-top: 5px solid #2563eb;
    width: 100%;
}

.site-footer .container { max-width: 1000px; }

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

.footer-col h3 { color: #ffffff; margin-bottom: 20px; font-size: 1.2rem; font-weight: 700; }
.footer-col p { color: #94a3b8; line-height: 1.6; margin-bottom: 20px; }

.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: #cbd5e1; text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: #ffffff; text-decoration: underline; }

.copyright { color: #64748b; font-size: 0.85rem; margin-top: 20px; padding-top: 20px; border-top: 1px solid #334155; }
