/* ================================================================
   Personeelsadvies.be — Main Stylesheet
   Professional & fresh HR calculator design
   ================================================================ */

/* ── CSS Custom Properties ──────────────────────────────────── */

:root {
    /* Brand colours */
    --color-primary:       #0f766e;
    --color-primary-dark:  #115e59;
    --color-primary-light: #ccfbf1;
    --color-accent:        #14b8a6;

    /* Surfaces */
    --color-bg:            #f8fafc;
    --color-surface:       #ffffff;

    /* Text */
    --color-text:          #0f172a;
    --color-text-light:    #64748b;
    --color-text-inverse:  #ffffff;

    /* Borders */
    --color-border:        #e2e8f0;
    --color-border-focus:  #14b8a6;

    /* Feedback */
    --color-error:         #dc2626;
    --color-error-bg:      #fef2f2;
    --color-success:       #16a34a;
    --color-warning-bg:    #fffbeb;
    --color-warning-border:#f59e0b;
    --color-warning-text:  #92400e;

    /* Shadows */
    --shadow-sm:  0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md:  0 4px 6px -1px rgba(0, 0, 0, 0.07),
                  0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg:  0 10px 15px -3px rgba(0, 0, 0, 0.08),
                  0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl:  0 20px 25px -5px rgba(0, 0, 0, 0.08),
                  0 8px 10px -6px rgba(0, 0, 0, 0.04);

    /* Radii */
    --radius-sm:  6px;
    --radius-md:  10px;
    --radius-lg:  16px;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont,
                 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;

    /* Layout */
    --container-max:    1200px;
    --container-narrow:  800px;
}


/* ── Reset & Base ───────────────────────────────────────────── */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main { flex: 1; }

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover { color: var(--color-primary-dark); }

h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    font-weight: 700;
    color: var(--color-text);
}
h1 { font-size: 2.25rem; margin-bottom: 1rem;   }
h2 { font-size: 1.75rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem;  }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

ul { list-style: none; }


/* ── Container ──────────────────────────────────────────────── */

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}
.container-narrow {
    max-width: var(--container-narrow);
}


/* ── Site Header ────────────────────────────────────────────── */

.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--color-text);
}
.logo:hover { color: var(--color-text); }

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--color-primary);
    color: var(--color-text-inverse);
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text);
}
.logo-tld {
    color: var(--color-primary);
}

/* Navigation */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-light);
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 4px 0;
    position: relative;
}
.nav-link:hover {
    color: var(--color-primary);
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.2s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Mobile toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 110;
}
.nav-toggle-bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
/* Animate bars to X when open */
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* ── Disclaimer Banner ──────────────────────────────────────── */

.disclaimer-banner {
    background: var(--color-warning-bg);
    border-bottom: 1px solid var(--color-warning-border);
    padding: 10px 0;
}
.disclaimer-banner p {
    font-size: 0.85rem;
    color: var(--color-warning-text);
    line-height: 1.5;
    margin: 0;
    text-align: center;
}
.disclaimer-icon {
    margin-right: 6px;
}


/* ── Hero Section ───────────────────────────────────────────── */

.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: var(--color-text-inverse);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
/* Subtle decorative pattern */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    pointer-events: none;
}

.hero h1 {
    color: var(--color-text-inverse);
    font-size: 2.5rem;
    margin-bottom: 16px;
    font-weight: 700;
    position: relative;
}
.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}


/* ── Calculators Section / Tile Grid ────────────────────────── */

.calculators-section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 8px;
}
.section-subtitle {
    text-align: center;
    color: var(--color-text-light);
    font-size: 1.05rem;
    margin-bottom: 48px;
}

.tiles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Individual tile */
.tile {
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease,
                box-shadow 0.25s ease,
                border-color 0.25s ease;
}
.tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-accent);
    color: inherit;
}

.tile__icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    line-height: 1;
}
.tile__title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 8px;
}
.tile__description {
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}
.tile__cta {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.cta-arrow {
    transition: transform 0.2s ease;
    display: inline-block;
}
.tile:hover .cta-arrow {
    transform: translateX(4px);
}


/* ── Breadcrumb ─────────────────────────────────────────────── */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 24px;
    padding-top: 32px;
    flex-wrap: wrap;
}
.breadcrumb a {
    color: var(--color-text-light);
    text-decoration: none;
}
.breadcrumb a:hover {
    color: var(--color-primary);
}
.breadcrumb-sep {
    color: var(--color-border);
}
.breadcrumb-current {
    color: var(--color-text);
    font-weight: 500;
}


/* ── Calculator Page ────────────────────────────────────────── */

.calculator-page {
    padding-bottom: 80px;
}
.calculator-page h1 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.calculator-intro {
    color: var(--color-text-light);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 800px;
}

.calculator-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}


/* ── Form Styles ────────────────────────────────────────────── */

.calculator-form-wrapper {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.form-group {
    margin-bottom: 24px;
}
.form-group label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
}
.required {
    color: var(--color-error);
    margin-left: 2px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: var(--font-sans);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input {
    -webkit-appearance: none;
    appearance: none;
}

.form-group select {
    cursor: pointer;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-border-focus);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

.form-group input::placeholder {
    color: var(--color-text-light);
    opacity: 0.6;
}

/* Help text */
.field-help {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-top: 6px;
    line-height: 1.5;
}

/* Error states */
.field-error {
    display: block;
    font-size: 0.85rem;
    color: var(--color-error);
    margin-top: 6px;
    min-height: 0;
}
.field-error:empty {
    display: none;
}

.form-group.has-error input,
.form-group.has-error select {
    border-color: var(--color-error);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}


/* ── Buttons ────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-sans);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    width: 100%;
}
.btn-primary:hover {
    background: var(--color-primary-dark);
    color: var(--color-text-inverse);
}
.btn-primary:active {
    transform: scale(0.98);
}
.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}


/* ── Results Area ───────────────────────────────────────────── */

.calculator-results {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 96px; /* header (64px) + disclaimer (~32px) */
}

/* Initial placeholder */
.results-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-light);
}
.results-placeholder-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}
.results-placeholder p {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Loading state */
.results-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 0.95rem;
}

/* Result card */
.results-card h3 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-primary-light);
    color: var(--color-primary-dark);
}
.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}
.result-row:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.1rem;
    padding-top: 16px;
    border-top: 2px solid var(--color-primary);
    margin-top: 4px;
}
.result-label {
    color: var(--color-text-light);
    font-size: 0.95rem;
}
.result-value {
    font-weight: 600;
    color: var(--color-text);
}

/* Result notice boxes (warning / info) */
.result-notice {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    line-height: 1.6;
}
.result-notice strong {
    display: inline;
}
.result-notice--warning {
    background: var(--color-warning-bg);
    border: 1px solid var(--color-warning-border);
    color: var(--color-warning-text);
}
.result-notice--info {
    background: #eff6ff;
    border: 1px solid #93c5fd;
    color: #1e40af;
}

/* Placeholder message (when calculator is not yet implemented) */
.results-placeholder-message {
    text-align: center;
    padding: 40px 20px;
    background: var(--color-primary-light);
    border-radius: var(--radius-md);
}
.results-placeholder-message p {
    color: var(--color-primary-dark);
    font-weight: 500;
    line-height: 1.6;
}

/* Error message */
.results-error {
    text-align: center;
    padding: 20px;
    background: var(--color-error-bg);
    border-radius: var(--radius-md);
    color: var(--color-error);
    font-weight: 500;
}

/* Factors-not-included notice */
.calculator-notice {
    margin-top: 48px;
    padding: 20px 24px;
    background: var(--color-warning-bg);
    border: 1px solid var(--color-warning-border);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--color-warning-text);
}
.calculator-notice p {
    margin: 0;
}

/* Sources / links section */
.calculator-sources {
    margin-top: 64px;
    padding-top: 40px;
    border-top: 1px solid var(--color-border);
}
.calculator-sources h2 {
    font-size: 1.15rem;
    margin-bottom: 16px;
    color: var(--color-primary-dark);
}
.calculator-sources ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
}
.calculator-sources li a {
    display: inline-block;
    font-size: 0.9rem;
    color: var(--color-primary);
    text-decoration: none;
    padding: 6px 0;
    transition: color 0.15s;
}
.calculator-sources li a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}


/* ── Spinner ────────────────────────────────────────────────── */

.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    flex-shrink: 0;
}
.results-loading .spinner {
    border-color: rgba(15, 118, 110, 0.2);
    border-top-color: var(--color-primary);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* ── Footer ─────────────────────────────────────────────────── */

.site-footer {
    background: var(--color-primary-dark);
    color: rgba(255, 255, 255, 0.85);
    padding: 60px 0 0;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-grid h4 {
    color: var(--color-text-inverse);
    font-size: 1.05rem;
    margin-bottom: 16px;
}
.footer-grid p {
    font-size: 0.9rem;
    line-height: 1.7;
    opacity: 0.8;
}
.footer-grid ul li {
    margin-bottom: 8px;
}
.footer-grid ul li a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-grid ul li a:hover {
    color: var(--color-text-inverse);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px 0;
    text-align: center;
}
.footer-bottom p {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-bottom: 8px;
}
.footer-disclaimer {
    font-size: 0.8rem !important;
    opacity: 0.5 !important;
    max-width: 700px;
    margin: 0 auto !important;
}


/* ── Content Pages (Privacy, Terms) ─────────────────────────── */

.content-page {
    padding: 0 0 80px;
}
.content-page h1 {
    margin-bottom: 32px;
}

.content-placeholder {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}
.content-placeholder h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--color-text);
}
.content-placeholder p {
    color: var(--color-text-light);
    max-width: 500px;
    margin: 0 auto 12px;
    line-height: 1.7;
}


/* ── 404 Error Page ─────────────────────────────────────────── */

.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    text-align: center;
}
.error-content {
    padding: 60px 40px;
}
.error-code {
    font-size: 6rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.error-page h1 {
    margin-bottom: 12px;
}
.error-page p {
    color: var(--color-text-light);
    margin-bottom: 32px;
}
.error-page .btn {
    width: auto;
}


/* ── Responsive ─────────────────────────────────────────────── */

/* Tablet */
@media (max-width: 1024px) {
    .tiles-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .calculator-layout {
        grid-template-columns: 1fr;
    }

    .calculator-results {
        position: static;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Mobile */
@media (max-width: 768px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem;  }

    .hero {
        padding: 60px 0;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1.05rem;
    }

    .calculators-section {
        padding: 60px 0;
    }

    /* Mobile nav */
    .nav-toggle {
        display: flex;
    }
    .nav-menu {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--color-surface);
        border-bottom: 1px solid var(--color-border);
        flex-direction: column;
        padding: 16px 24px;
        gap: 4px;
        box-shadow: var(--shadow-md);
    }
    .nav-menu.active {
        display: flex;
    }
    .nav-link {
        padding: 8px 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* Small mobile */
@media (max-width: 600px) {
    .tiles-grid {
        grid-template-columns: 1fr;
    }
    .tile {
        padding: 24px;
    }

    .calculator-form-wrapper,
    .calculator-results {
        padding: 24px;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .content-placeholder {
        padding: 40px 24px;
    }
}
