/* Havion huisstijl
   Kleuren:
     - oranje:     #F59919 (accent)
     - charcoal:   #2E2E2E (tekst, donkere vlakken)
     - licht grijs:#F5F5F5 (achtergrond)
   Lettertype: Helvetica
*/

:root {
    --havion-orange: #F59919;
    --havion-charcoal: #2E2E2E;
    --havion-light-grey: #F5F5F5;
    --havion-white: #FFFFFF;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
    color: var(--havion-charcoal);
    background-color: var(--havion-light-grey);
    line-height: 1.5;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.site-header {
    background-color: var(--havion-charcoal);
    color: var(--havion-white);
    padding: 20px 0;
    border-bottom: 4px solid var(--havion-orange);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-logo {
    height: 66px;
    width: auto;
    display: block;
}

/* ── Header contactinfo (briefpapier-stijl) ──────────────── */

.header-contact {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

.hc-col {
    display: flex;
    flex-direction: column;
    font-size: 8pt;
    line-height: 1.7;
    color: #AAAAAA;
}

.hc-naam {
    font-weight: bold;
    color: var(--havion-orange);
    font-size: 8.5pt;
}

@media (max-width: 640px) {
    .header-contact { display: none; }
}

/* ── Auth-knop in header ─────────────────────────────────── */

#header-auth {
    margin-left: auto;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-auth-btn {
    font-family: inherit;
    font-size: 11px;
    font-weight: normal;
    padding: 5px 11px;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}

.header-auth-btn--in {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.4);
}

.header-auth-btn--in:hover {
    border-color: rgba(255, 255, 255, 0.55);
    color: rgba(255, 255, 255, 0.75);
}

.header-auth-btn--offertes {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
    margin-right: 6px;
}

.header-auth-btn--offertes:hover {
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
}

.header-auth-btn--uit {
    background: transparent;
    border: 1px solid var(--havion-orange);
    color: var(--havion-orange);
}

.header-auth-btn--uit:hover {
    background: var(--havion-orange);
    color: var(--havion-white);
}

/* Main */
.main-content {
    padding: 40px 24px 60px;
    min-height: 60vh;
}

/* ── Dienst-navigatie tabs ───────────────────────────────── */
.dienst-nav {
    display: flex;
    gap: 6px;
    margin-bottom: 28px;
    border-bottom: 2px solid #E0E0E0;
    padding-bottom: 0;
}

.dienst-tab {
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: #888;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    border-radius: 3px 3px 0 0;
    transition: color 0.15s, border-color 0.15s;
}

.dienst-tab:hover {
    color: var(--havion-charcoal);
}

.dienst-tab--actief {
    color: var(--havion-charcoal);
    border-bottom-color: var(--havion-orange);
}

h1 {
    font-size: 32px;
    margin: 0 0 12px 0;
    color: var(--havion-charcoal);
}

.lead {
    font-size: 18px;
    color: var(--havion-charcoal);
    opacity: 0.75;
    margin: 0;
}

/* Buttons (voor later) */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-family: inherit;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--havion-orange);
    color: var(--havion-white);
}

.btn-primary:hover {
    filter: brightness(0.95);
}

.btn-secondary {
    background-color: var(--havion-charcoal);
    color: var(--havion-white);
}

/* Tool-layout */
.tool {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 32px;
}

@media (min-width: 760px) {
    .tool {
        grid-template-columns: 1.4fr 1fr;
        align-items: start;
    }
}

.tool-form {
    background: var(--havion-white);
    border-radius: 6px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    display: grid;
    gap: 16px;
}

.form-row {
    display: grid;
    gap: 6px;
}

.form-row[hidden] {
    display: none;
}

.form-row label,
.form-row .form-label {
    font-weight: bold;
    font-size: 14px;
}

.form-help {
    color: #666;
    font-size: 12px;
}

.form-row select,
.form-row input[type="number"] {
    font-family: inherit;
    font-size: 15px;
    padding: 10px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    background: var(--havion-white);
    color: var(--havion-charcoal);
}

.form-row select:focus,
.form-row input:focus {
    outline: 2px solid var(--havion-orange);
    outline-offset: 1px;
    border-color: var(--havion-orange);
}

.btn-group {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-group label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    cursor: pointer;
    font-weight: normal;
    background: var(--havion-white);
}

.btn-group label:has(input:checked) {
    border-color: var(--havion-orange);
    background: #fff7ec;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: normal !important;
    cursor: pointer;
}

/* Resultaat-kolom */
.tool-result {
    position: sticky;
    top: 24px;
}

.result-card {
    background: var(--havion-charcoal);
    color: var(--havion-white);
    border-radius: 6px;
    padding: 28px 24px;
    border-top: 4px solid var(--havion-orange);
}

.result-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.75;
}

.result-total {
    font-size: 40px;
    font-weight: bold;
    margin: 6px 0 4px 0;
    color: var(--havion-orange);
}

.result-sub {
    font-size: 13px;
    opacity: 0.65;
    margin: 0 0 16px 0;
}

.btw-test-blok {
    margin-top: 12px;
    background: var(--havion-white);
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    text-align: center;
}

.btw-test-tekst {
    font-size: 13px;
    color: var(--havion-charcoal);
    opacity: 0.75;
    margin: 0 0 14px 0;
    line-height: 1.55;
}

.btw-test-btn {
    display: block;
    text-align: center;
    width: 100%;
    padding: 11px 16px;
    font-size: 14px;
    font-weight: bold;
    font-family: inherit;
    background: var(--havion-charcoal);
    color: var(--havion-white);
    border-radius: 4px;
    text-decoration: none;
    box-sizing: border-box;
}

.btw-test-btn:hover {
    filter: brightness(1.15);
}

.result-specs {
    margin: 0;
    padding: 16px 0 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: grid;
    gap: 8px;
}

.spec-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 12px;
    font-size: 14px;
}

.spec-row dt {
    opacity: 0.65;
    margin: 0;
}

.spec-row dd {
    margin: 0;
}

/* Foutmeldingen */
.error {
    background: #fff7ec;
    border: 1px solid var(--havion-orange);
    border-radius: 4px;
    padding: 16px;
    color: var(--havion-charcoal);
}

/* ── Formulier-secties ─────────────────────────────────────── */

.form-sectie {
    border: none;
    padding: 0;
    margin: 0;
}

.form-sectie legend {
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--havion-orange);
    padding: 0;
    margin-bottom: 10px;
}

.form-optioneel {
    font-style: normal;
    font-weight: normal;
    text-transform: none;
    letter-spacing: 0;
    color: #999;
    font-size: 10px;
    background: #f0f0f0;
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
}

.form-sectie.uitbreid-sectie {
    border-top: 1px solid #e8e8e8;
    padding-top: 16px;
    margin-top: 4px;
}

.form-sectie-titel {
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--havion-charcoal);
    opacity: 0.55;
    padding-top: 16px;
    border-top: 1px solid #e8e8e8;
}

.form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ── Offerte-sectie ────────────────────────────────────────── */

.offerte-sectie[hidden] { display: none; }

.offerte-sectie {
    margin-top: 48px;
    background: var(--havion-white);
    border-radius: 6px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.offerte-sectie-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.offerte-sectie-header h2 {
    font-size: 20px;
    margin: 0;
}

.offerte-acties {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ── Offerte document preview ──────────────────────────────── */

.offerte-preview {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 32px;
    background: #fff;
    overflow-x: auto;
}

.odoc {
    font-size: 10pt;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.5;
}

.odoc-van-aan {
    display: flex;
    gap: 60px;
    margin-bottom: 20px;
}

.odoc-addr { min-width: 180px; }

.odoc-addrtype {
    font-weight: bold;
    margin-bottom: 3px;
}

.odoc-datum-rij { margin: 16px 0 28px 0; }

.odoc-datum-label {
    display: inline-block;
    width: 56px;
    font-weight: bold;
}

.odoc-titel {
    font-size: 15px;
    font-weight: bold;
    margin: 0 0 18px 0;
}

.odoc-intro {
    font-size: 9.5pt;
    line-height: 1.65;
    color: #444;
    margin-bottom: 24px;
}

.odoc-tabel {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 8px;
    font-size: 9pt;
}

.odoc-tabel th {
    padding: 7px 8px;
    font-size: 9pt;
    font-weight: bold;
    text-align: left;
    background: var(--havion-light-grey);
    border-bottom: 2px solid var(--havion-charcoal);
}

.odoc-tabel th.num { text-align: right; }

.odoc-tabel td {
    padding: 10px 8px;
    vertical-align: top;
    border-bottom: 1px solid #eee;
    line-height: 1.5;
}

.odoc-tabel td.num {
    text-align: right;
    white-space: nowrap;
}

.odoc-td-beschr { min-width: 180px; }

.odoc-totalen {
    display: flex;
    justify-content: flex-end;
    margin: 16px 0 32px 0;
}

.odoc-totalen-inner { width: 310px; }

.odoc-totaal-rij {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 9.5pt;
    border-bottom: 1px solid #eee;
}

.odoc-totaal-rij--groot {
    font-weight: bold;
    font-size: 10.5pt;
    padding-top: 8px;
}

.odoc-totaal-rij--vet {
    font-weight: bold;
    font-size: 11pt;
    border-top: 2px solid var(--havion-charcoal);
    border-bottom: none;
    padding-top: 8px;
}

.odoc-akkoord {
    margin: 28px 0 16px 0;
    font-size: 9.5pt;
}

.odoc-ondertekening {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    font-size: 9.5pt;
}

/* ── Calculatie-breakdown (in resultaat-kaart) ───────────── */

.intern-breakdown-blok {
    margin-top: 4px;
    background: var(--havion-charcoal);
    border-radius: 6px;
    padding: 0 24px 16px;
}

.intern-breakdown-blok[hidden] { display: none; }

.result-breakdown-toggle {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.45);
    font-family: inherit;
    font-size: 12px;
    padding: 14px 0 10px 0;
    cursor: pointer;
    letter-spacing: 0.3px;
}

.result-breakdown-toggle:hover {
    color: rgba(255, 255, 255, 0.85);
}

.result-breakdown {
    padding-top: 4px;
    font-size: 12px;
}

.bd-groep-titel {
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--havion-orange);
    margin: 12px 0 2px 0;
    opacity: 0.9;
}

.bd-rij {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 0;
    color: rgba(255, 255, 255, 0.7);
}

.bd-rij span:last-child {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.bd-mat-bedragen {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.bd-inkoop {
    color: rgba(255, 255, 255, 0.3);
}

.bd-pijl {
    color: rgba(255, 255, 255, 0.2);
    font-size: 10px;
}

.bd-rij--dim {
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
    padding-left: 8px;
}

.bd-rij--bold {
    color: rgba(255, 255, 255, 0.9);
    font-weight: bold;
}

.bd-sep {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin: 8px 0;
}

.bd-rij--excl {
    color: rgba(255, 255, 255, 0.95);
    font-weight: bold;
}

.bd-rij--btw {
    color: rgba(255, 255, 255, 0.45);
    font-size: 11px;
}

.bd-rij--incl {
    color: var(--havion-orange);
    font-weight: bold;
    font-size: 14px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 2px;
}

/* Optie-rijen in offerte-tabel (qty 0, niet in totaal) */
.odoc-tr-optie td {
    color: #999;
    font-style: italic;
    background: #fafafa;
}

/* ── Klant-mail CTA (vervangt offerte in klantweergave) ──── */

.klant-mail-sectie[hidden] { display: none; }

.klant-mail-sectie {
    margin-top: 48px;
    text-align: center;
    padding: 40px 24px;
    background: var(--havion-white);
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.klant-mail-btn {
    display: inline-block;
    padding: 16px 40px;
    background: var(--havion-orange);
    color: var(--havion-white);
    font-family: inherit;
    font-size: 17px;
    font-weight: bold;
    border-radius: 4px;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.klant-mail-btn:hover {
    filter: brightness(0.93);
}

.klant-mail-sub {
    margin: 14px 0 0 0;
    font-size: 13px;
    color: #888;
}

/* ── Projecten-blok ─────────────────────────────────────── */

.projecten-blok[hidden] { display: none; }

.projecten-blok {
    margin-top: 32px;
}

.projecten-blok-titel {
    margin: 0 0 14px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
}

.projecten-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.project-kaart {
    display: block;
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    background: #eee;
}

.project-kaart-foto {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.project-kaart:hover .project-kaart-foto {
    transform: scale(1.04);
}

.project-kaart-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.68) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 12px;
}

.project-kaart-label {
    margin: 0 0 2px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--havion-orange);
}

.project-kaart-tekst {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    line-height: 1.35;
}

.btn-datasheet {
    display: block;
    margin-top: 12px;
    font-size: 13px;
    color: var(--havion-orange);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    width: fit-content;
}
.btn-datasheet:hover { opacity: 0.75; }

/* ── Contact CTA (onder resultaat-kaart) ─────────────────── */

.contact-cta {
    margin-top: 12px;
}

.contact-cta-btn {
    display: block;
    text-align: center;
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: bold;
    font-family: inherit;
    background: var(--havion-orange);
    color: var(--havion-white);
    border-radius: 4px;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.contact-cta-btn:hover {
    filter: brightness(0.93);
}

/* ── Mail-modal ─────────────────────────────────────────── */

.mail-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}

.mail-modal-overlay[hidden] { display: none; }

.mail-modal {
    background: var(--havion-white);
    border-radius: 6px;
    padding: 32px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    position: relative;
}

.mail-modal-sluiten {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: #aaa;
    cursor: pointer;
    padding: 0;
}

.mail-modal-sluiten:hover { color: var(--havion-charcoal); }

.mail-modal-titel {
    font-size: 18px;
    margin: 0 0 8px 0;
    color: var(--havion-charcoal);
}

.mail-modal-tekst {
    font-size: 14px;
    color: #666;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.mail-modal-input {
    display: block;
    width: 100%;
    font-family: inherit;
    font-size: 15px;
    padding: 10px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    margin-bottom: 16px;
    color: var(--havion-charcoal);
}

.mail-modal-input:focus {
    outline: 2px solid var(--havion-orange);
    outline-offset: 1px;
    border-color: var(--havion-orange);
}

.mail-modal-acties {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.mail-modal-status {
    margin: 14px 0 0 0;
    font-size: 13px;
    text-align: center;
    padding: 8px 12px;
    border-radius: 4px;
}

.mail-modal-status[hidden] { display: none; }

.mail-modal-status--ok   { background: #edfaf3; color: #1a7a45; }
.mail-modal-status--fout { background: #fff7ec; color: #c05000; }

.mail-modal--breed { max-width: 620px; }

.mail-modal-textarea {
    font-family: monospace;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
    min-height: 240px;
    color: var(--havion-charcoal);
}

.mail-modal-tekst--opmerking {
    background: #fffbf0;
    border: 1px solid #f5c97a;
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 16px;
    color: #7a5500;
}

.contact-modal-veld {
    display: grid;
    gap: 5px;
    margin-bottom: 14px;
}

.contact-modal-label {
    font-size: 13px;
    font-weight: bold;
    color: var(--havion-charcoal);
}

.contact-modal-voorkeur {
    margin-top: 2px;
}

/* ── Extra regelposten (intern-modus) ───────────────────── */

.extra-post-rij {
    display: grid;
    grid-template-columns: 1fr 52px 96px auto auto;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.extra-post-rij input[type="text"],
.extra-post-rij input[type="number"] {
    font-family: inherit;
    font-size: 14px;
    padding: 7px 10px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    background: var(--havion-white);
    color: var(--havion-charcoal);
}

.extra-post-rij input[type="text"]:focus,
.extra-post-rij input[type="number"]:focus {
    outline: 2px solid var(--havion-orange);
    outline-offset: 1px;
    border-color: var(--havion-orange);
}

.extra-post-btw {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
}

.btn-remove-post {
    background: none;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    font-size: 16px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-remove-post:hover {
    background: #fff0f0;
    border-color: #e88;
    color: #c44;
}

.btn-extra-add {
    display: inline-block;
    margin-top: 4px;
    background: none;
    border: 1px dashed #d0d0d0;
    border-radius: 4px;
    padding: 7px 14px;
    font-family: inherit;
    font-size: 13px;
    color: #888;
    cursor: pointer;
}

.btn-extra-add:hover {
    border-color: var(--havion-orange);
    color: var(--havion-orange);
    background: #fff7ec;
}

/* Placeholder-tekst (lege klantgegevens) */
.ph { font-style: italic; color: #aaa; }

/* Footer */
.site-footer {
    background-color: var(--havion-charcoal);
    color: var(--havion-white);
    padding: 20px 0;
    margin-top: 40px;
}

.site-footer small {
    opacity: 0.7;
}
