/* 
  Theme: République / Institutional / Clean
  Font: 'Inter' (Body) + 'Merriweather' (Headers) for authority.
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Merriweather:wght@300;400;700&display=swap');

:root {
    /* Foundation */
    --bg-page: #f8f9fa;
    --bg-card: #ffffff;

    /* Institutional Blue Palette */
    --color-brand: #000091;
    /* Official Marianne Blue inspired */
    --color-brand-light: #ececfb;
    --color-accent: #e1000f;
    /* Secondary touch, sparing use */

    /* Text */
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-header: #0f172a;

    /* Structure */
    --border-subtle: #e2e8f0;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-card: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: 'Merriweather', serif;
    color: var(--text-header);
    font-weight: 700;
}

/* Nav */
.navbar {
    background: white;
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.25rem 0;
}

.navbar-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-header);
    text-decoration: none;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo::before {
    content: '';
    display: block;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #000091 50%, #e1000f 50%);
    border-radius: 50%;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-brand);
}

/* Layout */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem 6rem 1.5rem;
}

.page-header {
    margin: 4rem 0 3rem;
    text-align: center;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 2rem;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-header);
}

.page-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto;
    font-weight: 300;
}

/* Card / Surface */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    box-shadow: var(--shadow-card);
}

/* Grid Menu */
.grid-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.menu-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 2rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.menu-card:hover {
    border-color: var(--color-brand);
    box-shadow: var(--shadow-soft);
    transform: translateY(-2px);
}

.menu-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--color-brand);
}

.menu-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Inputs & Form */
.input-group {
    margin-bottom: 1.5rem;
}

.label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-header);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input,
.select {
    width: 100%;
    background: #fff;
    border: 1px solid var(--border-subtle);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-header);
    transition: border 0.2s;
}

.input:focus {
    outline: none;
    border-color: var(--color-brand);
    box-shadow: 0 0 0 3px var(--color-brand-light);
}

/* Visualization Helpers */
.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px dashed var(--border-subtle);
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bar-label {
    width: 160px;
    font-size: 0.9rem;
    color: var(--text-header);
    text-align: right;
    font-weight: 500;
}

.bar-track {
    flex: 1;
    background: #f1f5f9;
    height: 16px;
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--color-brand);
    border-radius: 4px;
    transition: width 0.6s ease;
}

.bar-value {
    width: 100px;
    font-weight: 600;
    color: var(--text-header);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.big-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-brand);
    font-family: 'Merriweather', serif;
    margin: 1rem 0;
}

.switch-group {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 2rem;
    background: #f1f5f9;
    padding: 4px;
    border-radius: var(--radius-md);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.mode-btn {
    padding: 0.5rem 1.5rem;
    border: none;
    background: transparent;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.mode-btn.active {
    background: white;
    color: var(--text-header);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Range Input Refined */
input[type=range] {
    -webkit-appearance: none;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: var(--color-brand);
    border: 3px solid white;
    cursor: pointer;
    margin-top: -10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.1s;
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
}

/* Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: var(--color-brand);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.95rem;
}

.btn:hover {
    background: #000070;
}

/* Utilities */
.separator-right {
    padding-right: 2rem;
    border-right: 1px solid var(--border-subtle);
}

@media (max-width: 768px) {
    .separator-right {
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
        padding-bottom: 2rem;
        margin-bottom: 2rem;
    }
}

/* Cost Row Styles (Moved from entrepreneur.html) */
.cost-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
}

.cost-row.main {
    font-weight: 700;
    font-size: 1.1rem;
    border-bottom: 2px solid var(--color-brand);
    margin-bottom: 1rem;
}

.arrow-down {
    text-align: center;
    font-size: 1.5rem;
    color: var(--text-muted);
    margin: 0.5rem 0;
}

/* Responsive & Grid Utilities */
.grid-2-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.hamburger-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-header);
    padding: 0.5rem;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .navbar-inner {
        padding: 0 1rem;
        position: relative;
    }

    .hamburger-btn {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-subtle);
        box-shadow: var(--shadow-soft);
        z-index: 50;
    }

    .nav-links.mobile-open {
        display: flex;
    }

    .nav-links a {
        margin: 0;
        padding: 1rem 2rem;
        display: block;
        border-bottom: 1px solid #f1f5f9;
        margin-left: 0;
        /* Reset margin */
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .grid-2-cols {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    .container {
        padding: 0 1rem 6rem 1rem;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .big-number {
        font-size: 2.5rem;
    }

    .bar-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .bar-label {
        width: 100%;
        text-align: left;
    }

    .bar-track {
        width: 100%;
    }
}