/* Soepel naar een sectie scrollen als je op een menulink klikt */
html {
    scroll-behavior: smooth;
}

/* Een beetje ruimte boven een sectie als je ernaartoe springt */
section {
    scroll-margin-top: 1.5rem;
}

body {
    margin: 0;
    font-family: Inter, "Segoe UI", system-ui, sans-serif;
    color: #17324d;
    background: #f3faf8; /* lichtgroen, zodat de witte boxes opvallen */
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 2.75rem;
    background: #fff;
    border-bottom: 1px solid #e6eef3;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.4rem 1.15rem 0.4rem 0.4rem;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid #d5ebe7;
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(20, 80, 74, 0.08);
}

.brand-mark {
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 14px;
}

.brand-name {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
}

/* Menu rechts in de header */
.site-header nav ul {
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-header nav a {
    color: #17324d;
    font-weight: 500;
    text-decoration: none;
}

.site-header nav a:hover {
    color: #1f8a7a;
}

/* Inhoud niet over de hele schermbreedte */
main {
    max-width: 760px;
    margin: 0 auto;
    padding: 2rem 1rem;
    line-height: 1.6;
}

/* Intro bovenaan de pagina */
#intro {
    padding: 2rem 0 2.5rem;
    text-align: center;
}

#intro h1 {
    margin: 0 0 1rem;
    font-size: 2.5rem;
    line-height: 1.2;
}

#intro p {
    font-size: 1.15rem;
    color: #4a6075;
}

.woning-voorbeeld {
    margin: 1.75rem auto 0;
    max-width: 520px;
}

.woning-voorbeeld img {
    display: block;
    width: 100%;
    height: auto;
}

/* Knop */
.button {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.8rem 1.6rem;
    background: #1f8a7a;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.button:hover {
    background: #176b5f;
}

/* Adresbalk in de intro: postcode en huisnummer invoeren */
.adresbalk {
    display: flex;
    width: 100%;
    max-width: 560px;
    margin: 1.5rem auto 0;
    padding: 0.4rem;
    background: #fff;
    border: 1px solid #d5ebe7;
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(20, 80, 74, 0.08);
}

.adresbalk input {
    flex: 1;
    min-width: 0;
    padding: 0.9rem 1.2rem;
    border: 0;
    background: transparent;
    font: inherit;
    color: inherit;
}

.adresbalk button {
    padding: 0.9rem 1.5rem;
    border: 0;
    border-radius: 999px;
    background: #1f8a7a;
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.adresbalk button:hover {
    background: #176b5f;
}

.adresbalk:focus-within {
    border-color: #1f8a7a;
    box-shadow: 0 0 0 4px rgba(31, 138, 122, 0.25);
}

.adresbalk input:focus {
    outline: none;
}

/* Adressuggesties onder de adresbalk */
.adres-suggesties {
    max-width: 560px;
    margin: 0.5rem auto 0;
    padding: 0.4rem;
    list-style: none;
    background: #fff;
    border: 1px solid #d5ebe7;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(20, 80, 74, 0.08);
    text-align: left;
}

.adres-suggesties button {
    display: block;
    width: 100%;
    min-height: 44px; /* groot genoeg om op mobiel aan te tikken */
    padding: 0.6rem 1rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.adres-suggesties button:hover,
.adres-suggesties button:focus-visible {
    background: #e8f5f2;
    outline: none;
}

.adres-melding {
    max-width: 560px;
    margin: 0.75rem auto 0;
    text-align: center;
}

/* Elke sectie (behalve de intro) in een witte box */
main section:not(#intro) {
    margin-bottom: 1.5rem;
    padding: 1.5rem 1.75rem;
    background: #fff;
    border: 1px solid #d5ebe7;
    border-top: 4px solid #1f8a7a;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(20, 80, 74, 0.06);
}

main section h2 {
    margin-top: 0;
    color: #1f8a7a;
}

/* Korte uitleg boven de stappen */
#hoe-het-werkt .stappen-intro {
    margin: 0 0 1.5rem;
    color: #4a6075;
}

/* Stappen in "Hoe het werkt" met een groen nummer ervoor */
#hoe-het-werkt ol {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: stap;
}

/* Elke stap is een lichte kaart */
#hoe-het-werkt li {
    position: relative;
    padding: 1.1rem 1.25rem 1.1rem 4.5rem;
    margin-bottom: 1.25rem;
    background: #f7fcfb;
    border: 1px solid #d5ebe7;
    border-radius: 14px;
    counter-increment: stap;
}

#hoe-het-werkt li:last-child {
    margin-bottom: 0;
}

#hoe-het-werkt li::before {
    content: counter(stap);
    position: absolute;
    left: 1.1rem;
    top: 1.1rem;
    z-index: 1;
    width: 2.4rem;
    height: 2.4rem;
    line-height: 2.4rem;
    text-align: center;
    border-radius: 50%;
    background: #1f8a7a;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 0 0 4px #f7fcfb;
}

/* Lijn die het nummer verbindt met het nummer van de volgende stap */
#hoe-het-werkt li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: calc(1.1rem + 1.2rem - 1px);
    top: 3.5rem;
    bottom: -2.35rem;
    border-left: 2px dashed #a9d8cf;
}

/* Klein label "Stap 1" boven het kopje */
#hoe-het-werkt h3::before {
    content: "Stap " counter(stap);
    display: block;
    margin-bottom: 0.1rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1f8a7a;
}

#hoe-het-werkt h3 {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    line-height: 1.3;
}

/* Klein icoontje voor het kopje van een stap */
.stap-icoon {
    width: 1.15em;
    height: 1.15em;
    margin-right: 0.35rem;
    vertical-align: -0.2em;
    fill: none;
    stroke: #1f8a7a;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#hoe-het-werkt li p {
    margin: 0;
}

/* Korte regel onder een stap: wat heb je nodig of een tip */
#hoe-het-werkt .stap-tip {
    margin-top: 0.6rem;
    font-size: 0.92rem;
    color: #4a6075;
}

#hoe-het-werkt .stap-tip strong {
    color: #17324d;
}

/* Voorbeeld van een groene en een oranje uitkomst */
.uitkomsten {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 0.9rem;
}

#hoe-het-werkt .uitkomst {
    padding: 0.75rem 0.9rem;
    font-size: 0.92rem;
    border-radius: 10px;
    border-left: 4px solid;
}

.uitkomst strong {
    display: block;
    margin-bottom: 0.15rem;
}

.uitkomst-groen {
    background: #e3f4f0;
    border-color: #1f8a7a;
}

.uitkomst-groen strong {
    color: #176b5f;
}

.uitkomst-oranje {
    background: #fff3e6;
    border-color: #e07b1a;
}

.uitkomst-oranje strong {
    color: #a8540a;
}

/* Knop onder de stappen die naar "Start de check" springt */
#hoe-het-werkt .stappen-actie {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 1.5rem 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid #e6eef3;
    font-weight: 600;
}

#hoe-het-werkt .stappen-actie .button {
    margin-top: 0;
}

/* Formulier in "Start de check" */
#check label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

#check input,
#check select {
    width: 100%;
    box-sizing: border-box;
    padding: 0.7rem 0.9rem;
    border: 1px solid #d5ebe7;
    border-radius: 10px;
    font: inherit;
    color: inherit;
    background: #fff;
}

#check input:focus,
#check select:focus {
    outline: none;
    border-color: #1f8a7a;
    box-shadow: 0 0 0 4px rgba(31, 138, 122, 0.25);
}

#check input[aria-invalid="true"] {
    border-color: #9b2c2c;
    box-shadow: none;
}

.veld-fout {
    display: block;
    margin-top: 0.35rem;
    color: #9b2c2c;
    font-size: 0.9rem;
    font-weight: 600;
}

.veld-fout[hidden] {
    display: none !important;
}

/* "Let op"-melding in een lichtgroene box */
main aside {
    padding: 1rem 1.5rem;
    background: #e3f4f0;
    border-left: 4px solid #1f8a7a;
    border-radius: 12px;
}

main aside a {
    color: #176b5f;
    font-weight: 600;
}

/* Groene footer onderaan */
footer {
    padding: 1.5rem 1rem;
    background: #1f8a7a;
    color: #fff;
    text-align: center;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

@media (max-width: 760px) {
    .site-header {
        flex-direction: column;
        gap: 1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 480px) {
    .adresbalk {
        flex-direction: column;
        gap: 0.4rem;
        border-radius: 20px;
    }

    .adresbalk input {
        text-align: center;
    }

    .uitkomsten {
        grid-template-columns: 1fr;
    }

    /* Stappen: kleiner nummer en minder ruimte links, zodat de tekst meer plek heeft */
    main section:not(#intro) {
        padding: 1.25rem 1rem;
    }

    #hoe-het-werkt li {
        padding: 1rem 1rem 1rem 3.4rem;
    }

    #hoe-het-werkt li::before {
        left: 0.8rem;
        top: 1rem;
        width: 2rem;
        height: 2rem;
        line-height: 2rem;
        font-size: 0.9rem;
    }

    #hoe-het-werkt li:not(:last-child)::after {
        left: calc(0.8rem + 1rem - 1px);
        top: 3rem;
        bottom: -2.25rem;
    }

    #hoe-het-werkt .stappen-actie {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}
