/* CSS Variables & Design System */
:root {
    /* Specified Palette */
    --bg-color: #DFE3E3;
    /* Soft Slate */
    --brand-primary: #0052FF;
    /* Electric Cobalt */
    --brand-secondary: #FF8C00;
    /* Circuit Orange */
    --text-primary: #2D3436;
    /* Deep Graphite */
    --ui-structural: #636E72;
    /* Galvanized Steel */

    /* Derived Colors for UI */
    --panel-bg: rgba(255, 255, 255, 0.85);
    /* For glassmorphism over Soft Slate */
    --panel-border: rgba(99, 110, 114, 0.2);
    --text-muted: #636E72;
    --input-bg: #FFFFFF;
    --input-border: #CBD5E1;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Layout */
    --max-width: 1000px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navigation */
.navbar {
    background-color: #FFFFFF;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    color: var(--brand-primary);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.code-year-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ui-structural);
}

.main-nav {
    display: flex;
    gap: 1.5rem;
}

.nav-item {
    color: var(--ui-structural);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-item:hover,
.nav-item.active {
    color: var(--brand-primary);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--brand-primary);
    color: white;
    box-shadow: 0 4px 6px rgba(0, 82, 255, 0.2);
}

.btn-primary:hover {
    background-color: #0043D6;
    /* slightly darker cobalt */
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0, 82, 255, 0.3);
}

.btn-secondary {
    background-color: var(--brand-secondary);
    color: white;
    box-shadow: 0 4px 6px rgba(255, 140, 0, 0.2);
}

.btn-secondary:hover {
    background-color: #E67E00;
    /* slightly darker orange */
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(255, 140, 0, 0.3);
}

.btn-large {
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.w-full {
    width: 100%;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    background-color: var(--input-bg);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.15);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.radio-group {
    display: flex;
    gap: 1.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    accent-color: var(--brand-primary);
    width: 1.1rem;
    height: 1.1rem;
}

/* Glass Panels / Layout */
.main-content {
    flex: 1;
    padding: 3rem 0;
    animation: fadeIn 0.4s ease-out;
}

.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(99, 110, 114, 0.1);
    margin-bottom: 2rem;
}

.glass-panel h2 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.form-section {
    background: #FFFFFF;
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-section h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--brand-primary);
    border-bottom: 1px solid var(--input-border);
    padding-bottom: 0.5rem;
}

.results-panel {
    background: #FFFFFF;
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--brand-primary);
}

.results-panel h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.results-panel p {
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--input-border);
    font-size: 1.25rem;
    font-weight: 700;
}

.tag-badge {
    background: var(--ui-structural);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: monospace;
    margin-left: 0.5rem;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-secondary {
    color: var(--ui-structural);
}

.text-muted {
    color: var(--text-muted);
}

.text-sm {
    font-size: 0.85rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.hidden {
    display: none !important;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 3rem 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem; /* Ensure space between hero and content */
}

.hero-headline {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.hero-subheading {
    font-size: 1.15rem;
    color: var(--ui-structural);
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.trust-bullets {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 1rem;
    color: var(--text-primary);
}

.trust-bullets li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bullet-icon {
    color: var(--brand-primary);
    font-weight: 700;
}

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


/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 1rem;
}

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

.highlight {
    color: var(--brand-primary);
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Step-based Form */
.progress-indicator {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ui-structural);
    background: #e2e8f0;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
}

.form-step {
    animation: fadeIn 0.5s ease-out;
}

.step-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--panel-border);
    padding-top: 1.5rem;
}

/* Footer */
.footer {
    padding: 2rem 0;
    color: var(--ui-structural);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive constraints */
@media (max-width: 768px) {

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .nav-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-controls {
        width: 100%;
        justify-content: space-between;
    }

    .main-nav {
        display: none;
        /* Hide by default on mobile, can be controlled via JS */
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

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

    .menu-toggle {
        display: block !important;
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0.5rem;
    }
}