/* Asbestverwijdering.be — opmaak voor /certificering/ en de losse
   verklaringspagina /dipi_popup_maker/kwaliteits/.
   Aanvulling op /site/site.css en /site/paginas.css. Alle maten zijn gemeten
   op het live origineel op 390 / 768 / 1000 / 1366 / 1920 px.                */

/* =========================================================================
   1. Badgebalk — deze pagina heeft eigen marges en een kleinere tussenruimte
      dan /diensten/ (gemeten: badge 54 / 94 / 76 / 113 / 168 px)
   ========================================================================= */

.pagina-certificering .badgebalk { margin: 10px 0 20px; padding-bottom: 0; }

@media (max-width: 980px) {
    .pagina-certificering .badgebalk { margin: 0 0 -45px; }
}
/* Alleen op tablet de badgemaat van het origineel; op telefoon geldt de
   sitebrede 3+2-wikkel (dezelfde als home en over-ons). */
@media (min-width: 768px) and (max-width: 980px) {
    .pagina-certificering .badge-rij { width: 66%; gap: 9.5px; }
}
@media (max-width: 767px) {
    .pagina-certificering .badgebalk { margin: 125px 0 -5px; }
}

/* De fotobanner van deze pagina heeft in het origineel 2px extra onderrand. */
.pagina-certificering .paginakop { padding-bottom: 2px; }

/* =========================================================================
   2. Rij-varianten zonder opvulling boven/onder (Divi-rijen 3 en 4)
   ========================================================================= */

.rij.zonder-boven { padding-top: 0; }
.rij.zonder-onder { padding-bottom: 0; }
/* op telefoon staat er in het origineel 20px extra onder de inhoudssectie */
@media (max-width: 767px) { .pagina-certificering .sectie.inhoud { margin-bottom: 20px; } }

/* =========================================================================
   3. Tekst van deze pagina
   ========================================================================= */

/* losse modulekop boven de eerste tekst (32px, iets groter dan een kop in
   de tekst zelf) */
.moduletitel {
    margin: 0 0 -1px;
    padding-bottom: 10px;
    font-size: 32px;
    line-height: 32px;
    font-weight: 700;
}

/* koppen in de tekstmodules van deze pagina */
.pagina-certificering .tekstblok h2 { font-size: 30px; line-height: 30px; }
.pagina-certificering .tekstblok h3 { font-size: 25px; line-height: 25px; }
.pagina-certificering .tekstblok h3.groot { font-size: 32px; line-height: 27px; }
.pagina-certificering .tekstblok h4 {
    font-size: 18px; line-height: 18px; font-weight: 700;
    padding-bottom: 10px;
}

/* het origineel (Divi) breekt lange woorden af als de regel te smal is —
   nodig naast de zwevende foto op 390px */
.pagina-certificering .tekstblok { overflow-wrap: break-word; }

/* het origineel toont hier wél opsommingstekens */
.pagina-certificering .tekstblok ul { list-style: disc; list-style-position: inside; }

/* Het origineel gebruikt lege alinea's als witregel. Wij laten die markup
   weg en zetten dezelfde ruimte als marge (19px = één regel, 35px = regel +
   alinea-onderrand). */
.tekstblok .pauze { margin-top: 19px; }
.tekstblok .pauze-ruim { margin-top: 35px; }
.tekstblok .pauze-klein { margin-top: 16px; }
.tekstblok.witregel-onder { padding-bottom: 19px; }
.tekstblok.witregel-ruim-onder { padding-bottom: 35px; }
.tekstblok p.dicht { padding-bottom: 0; }

/* afbeelding die in de tekst meezweeft (Protegés) */
.tekstblok .zwevend-rechts { float: right; margin-left: 15px; width: 211px; }
/* Op telefoon laat de float maar een sliert tekst over (woorden breken per
   letter) — daar staat de foto als gecentreerd blok tussen de alinea's. */
@media (max-width: 767px) {
    .tekstblok .zwevend-rechts { float: none; display: block; width: auto; max-width: 260px; margin: 10px auto 20px; }
}

/* =========================================================================
   4. Fotokolom naast de tekst
   ========================================================================= */

.fotokolom img { display: block; width: 100%; height: auto; }
.fotokolom button {
    display: block; width: 100%; padding: 0; border: 0;
    background: none; cursor: zoom-in;
}
/* Divi-modulemarge in een 2/5-kolom = 7,4986% van de kolombreedte
   (22px op 1000, 30px op 1366 en 1920 — de baan is daar 1080px breed).
   De marge hoort op de knop: elke foto zit in een eigen knop. */
.fotokolom button + button { margin-top: 7.4986%; }
/* dezelfde modulemarge onder de laatste foto van de kolom */
.fotokolom.ruimte-onder button:last-child { margin-bottom: 7.4986%; }
@media (max-width: 980px) {
    /* kolommen staan onder elkaar; Divi zet daar overal 30px */
    .fotokolom button + button { margin-top: 30px; }
    .fotokolom.ruimte-onder button:last-child { margin-bottom: 22px; }
}

/* =========================================================================
   5. Certificatenlade — links vast op de desktop, onderaan op tablet/telefoon
   ========================================================================= */

.certlade {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 10;
    min-height: 250px;
    padding-bottom: 25px;
    border-radius: 50px 50px 0 0;
    overflow: hidden;
    transform: translateY(20%);
    /* Verbetering: het origineel gebruikt hier rgba(255,255,255,.8), waardoor
       de paginatekst dwars door de lade heen leest. Wij maken het wit dekkend
       en houden dezelfde geel-verloop onderaan. */
    background: linear-gradient(1deg, #f7e61c 0%, rgba(255, 255, 255, 0) 32% 100%), var(--wit);
}
.certlade-baan { width: 80%; max-width: 1080px; margin: 0 auto; }
.certlade-kop { padding: 10px 0; }
.certlade-titel {
    margin: 10px 0 -5px;
    padding-bottom: 10px;
    font-size: 18px; line-height: 18px; font-weight: 700;
}
.certlade-badges { display: flex; gap: 10px; }
.certlade-badges button {
    flex: 0 0 20%;
    display: block; padding: 0; border: 0;
    background: none; cursor: pointer;
    transition: transform 300ms ease;
}
.certlade-badges button:hover { transform: scale(1.15); }
.certlade-badges img { display: block; width: 100%; height: auto; }

@media (max-width: 767px) { .certlade { bottom: 25px; } }

@media (min-width: 981px) {
    .certlade {
        left: 0; right: auto; bottom: auto; top: 30vh;
        width: 7%;
        min-height: 0; padding: 0;
        border-radius: 0; overflow: visible;
        transform: none;
        z-index: 500;
        background: linear-gradient(90deg, #f7f0a3 0%, rgba(255, 255, 255, 0) 47% 100%);
    }
    /* Divi-rijopvulling binnen de smalle strook: 2% van de strookbreedte,
       vanaf 1350px vast 27px */
    .certlade-kop, .certlade-badges { padding: 2% 0; }
    .certlade-titel {
        width: 150px; margin: 0;
        text-shadow: 0 0 .3em var(--grijs);
    }
    .certlade-badges { display: flex; flex-direction: column; gap: 0; }
    .certlade-badges button { flex: none; width: 100%; }
    .certlade-badges button + button { margin-top: 2.75%; }
    /* De Divi-volgordetruc van het origineel (badge 2 en 3 omgedraaid in
       de verticale strook) is losgelaten: sinds de certificaten uit het
       beheer komen, is de beheervolgorde overal de weergavevolgorde. */
}
@media (min-width: 1350px) {
    .certlade-kop, .certlade-badges { padding: 27px 0; }
}

@media (prefers-reduced-motion: reduce) {
    .certlade-badges button { transition: none; }
    .certlade-badges button:hover { transform: none; }
    .certpopup-sluit, .knop-download { transition: none; }
    .certpopup, .certpopup::backdrop, .certpopup-vel img { transition: none; }
    .certpopup { transform: none; }
    .certpopup-vel.laadt::before { animation: none; }
}

/* =========================================================================
   6. Popup met een certificaat (dialoog)
   ========================================================================= */

/* Modal-kaart in de kaarttaal van de site (opknapronde, zie het
   ontwerpcanvas): zwarte kop met gele titel + sluitknop, het document
   als 'vel' op lichtgrijs, gele downloadknop. */
.certpopup {
    width: min(620px, calc(100% - 32px)); max-width: none;
    max-height: calc(100vh - 40px);
    margin: auto;
    padding: 0; border: 0; border-radius: 12px;
    background: var(--wit);
    color: var(--inkt);
    overflow: auto;
    overscroll-behavior: contain;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .45);
}
.certpopup-breed { width: min(960px, calc(100% - 32px)); }
.certpopup::backdrop { background: rgba(0, 0, 0, .69); backdrop-filter: blur(4px); }

/* Openen en sluiten met een fade: een dialoog springt anders in beeld, wat
   als bruusk overkwam. @starting-style geeft de begintoestand bij het openen;
   transition-behavior houdt het venster tijdens het sluiten zichtbaar totdat
   de fade klaar is (display en overlay verspringen anders meteen). */
.certpopup {
    opacity: 0;
    transform: translateY(12px) scale(.98);
    transition: opacity .22s ease, transform .22s ease, display .22s allow-discrete, overlay .22s allow-discrete;
}
.certpopup[open] { opacity: 1; transform: none; }
@starting-style {
    .certpopup[open] { opacity: 0; transform: translateY(12px) scale(.98); }
}
.certpopup::backdrop { opacity: 0; transition: opacity .22s ease, display .22s allow-discrete, overlay .22s allow-discrete; }
.certpopup[open]::backdrop { opacity: 1; }
@starting-style {
    .certpopup[open]::backdrop { opacity: 0; }
}

/* De afbeelding komt op zijn eigen tempo binnen: zolang hij laadt staat er een
   rustig pulserend vlak op de plek waar hij komt, daarna vadet hij in. */
.certpopup-vel { position: relative; display: inline-block; max-width: 100%; }
.certpopup-vel.laadt::before {
    content: ""; position: absolute; inset: 0; border-radius: 3px;
    background: linear-gradient(100deg, #e9e9e9 30%, #f6f6f6 50%, #e9e9e9 70%);
    background-size: 240% 100%;
    animation: certpopup-glans 1.2s ease-in-out infinite;
}
.certpopup-vel.laadt { min-height: 220px; min-width: min(280px, 60vw); }
.certpopup-vel.laadt img { opacity: 0; }
.certpopup-vel img { transition: opacity .3s ease; }
@keyframes certpopup-glans {
    from { background-position: 160% 0; }
    to { background-position: -60% 0; }
}

.certpopup-kop {
    position: sticky; top: 0; z-index: 1;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    background: var(--inkt);
    padding: 14px 16px 14px 24px;
}
.certpopup-titel {
    margin: 0;
    font-size: 18px; line-height: 1.25; font-weight: 700;
    color: var(--geel);
}
.certpopup-sluit {
    width: 36px; height: 36px; flex: none;
    display: flex; align-items: center; justify-content: center;
    padding: 0; border: 0; border-radius: 8px;
    background: transparent; color: var(--geel);
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}
.certpopup-sluit svg { width: 20px; height: 20px; }
.certpopup-sluit:hover { background: var(--geel); color: var(--inkt); }

.certpopup-baan { padding: 28px; background: #f2f2f2; }
.certpopup img {
    display: block;
    max-width: 100%; width: auto;
    /* afbeelding + kop + knop moeten samen in beeld passen, anders valt
       de downloadknop onder de vouw van het (scrollende) venster */
    max-height: min(70vh, calc(100vh - 300px));
    height: auto;
    margin: 0 auto;
    background: var(--wit);
    border: 1px solid #ddd; border-radius: 3px;
    box-shadow: 0 6px 18px rgba(3, 3, 3, .16);
}
.certpopup-knoprij { margin: 18px 0 0; text-align: center; }
/* twee documenten naast elkaar (bv. het bedrijfscertificaat) */
.certpopup-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 980px) {
    .certpopup-breed { width: min(620px, calc(100% - 32px)); }
    .certpopup-duo { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 767px) {
    .certpopup { width: calc(100% - 24px); min-width: 300px; }
    .certpopup-kop { padding: 10px 10px 10px 16px; }
    .certpopup-titel { font-size: 16px; }
    .certpopup-baan { padding: 18px; }
    .certpopup-knoprij .knop-download { display: block; }
}

/* de lichtbak voor de sfeerfoto's: geen kop, zwevende ronde sluitknop */
.certpopup.lichtbak { background: var(--grijs); }
.certpopup.lichtbak .certpopup-baan { background: var(--grijs); }
.certpopup.lichtbak .certpopup-sluit {
    position: fixed; top: 15px; right: 15px;
    width: 50px; height: 50px;
    border-radius: 50%;
    background: var(--geel); color: var(--inkt);
    font-family: inherit; font-size: 40px; line-height: 1;
}
.certpopup.lichtbak .certpopup-sluit:hover { background: #353535; color: var(--geel); }
.certpopup.lichtbak img {
    max-height: min(90vh, calc(100vh - 60px));
    margin: 0 auto;
    background: transparent; border: 0; border-radius: 0; box-shadow: none;
}

/* =========================================================================
   7. Downloadknop (Divi-knop met downloadpictogram, doorzichtige achtergrond)
   ========================================================================= */

.knop-download {
    position: relative;
    display: inline-block;
    background: var(--geel); color: var(--inkt);
    border: 0; border-radius: 8px;
    font-family: inherit; font-size: 17px; line-height: 1.4; font-weight: 500;
    padding: 10px 48px 10px 22px;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}
.knop-download::after {
    content: "";
    /* het pictogram staat in de rechteropvulling en telt niet mee in de
       knopbreedte — precies zoals de Divi-knop van het origineel */
    position: absolute; right: 18px; top: calc(50% - 9px);
    width: 18px; height: 18px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 3h2v8h3.5L12 16.5 7.5 11H11V3Z'/%3E%3Cpath d='M4 17h16v1.5H4V17Zm0 2.5h16V21H4v-1.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 3h2v8h3.5L12 16.5 7.5 11H11V3Z'/%3E%3Cpath d='M4 17h16v1.5H4V17Zm0 2.5h16V21H4v-1.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.knop-download:hover { background: var(--inkt); color: var(--geel); }

/* =========================================================================
   8. Losse pagina /dipi_popup_maker/kwaliteits/ (witte pagina, geen kop)
   ========================================================================= */

.pagina-verklaring { background: var(--wit); }
.pagina-verklaring .verklaring-beeld {
    display: block;
    max-width: 100%; width: auto; height: auto;
    max-height: 80vh;
    margin-bottom: 2.75%;
}
.pagina-verklaring .knoprij { text-align: center; }
@media (max-width: 980px) {
    .pagina-verklaring .verklaring-beeld { margin-bottom: 30px; }
}

/* =========================================================================
   9. Toetsenbordfocus
   ========================================================================= */

.certlade-badges button:focus-visible,
.fotokolom button:focus-visible,
.certpopup-sluit:focus-visible,
.knop-download:focus-visible,
.pagina-certificering a:focus-visible,
.pagina-verklaring a:focus-visible {
    outline: 3px solid var(--inkt);
    outline-offset: 2px;
}
/* de sluitknop staat op de zwarte kopbalk: daar is geel wél zichtbaar */
.certpopup-kop .certpopup-sluit:focus-visible { outline-color: var(--geel); }

/* =========================================================================
   10. Alleen voor schermlezers (het origineel heeft op de losse
       verklaringspagina helemaal geen kop)
   ========================================================================= */

.verborgen-kop {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
