/* =========================================================
   Startpagina (ontwerp J). Kleuren en lettertype uit styles.css.
   Alle klassen beginnen met "j-" zodat ze niet botsen met styles.css.
   ========================================================= */

.j-home {
    position: relative;
    z-index: 10;
    background: var(--slhd-primary);
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
}

.j-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding-left: 48px;
    padding-right: 48px;
    box-sizing: border-box;
}

.j-band {
    padding: 56px 0;
}

.j-band-white {
    background: #ffffff;
    color: var(--slhd-primary);
}

.j-band-grey {
    background: #ebebeb;
    color: var(--slhd-primary);
}

.j-section {
    padding-top: 64px;
    padding-bottom: 64px;
}

.j-h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.1rem;
    font-weight: 400;
    letter-spacing: -2px;
    margin: 0 0 22px;
}

.j-h2-geel {
    color: var(--slhd-yellow);
    margin-bottom: 6px;
}

.j-sub {
    color: #d5dcec;
    margin: 0 0 26px;
}

.j-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.j-more {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ---------- Hero ---------- */
.j-hero {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 48px;
    align-items: center;
    padding-top: 64px;
    padding-bottom: 72px;
}

.j-hero-title {
    font-family: 'Poppins', sans-serif;
    font-size: 5.25rem;
    font-weight: 600;
    letter-spacing: -4px;
    line-height: 0.95;
    margin: 0 0 28px;
    color: #ffffff;
}

.j-hero-title span {
    color: var(--slhd-yellow);
}

ul.j-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
}

ul.j-chips > li.j-chip {
    margin: 0;
    padding: 8px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--slhd-primary);
}

.j-c1 { background: var(--slhd-orange1); }
.j-c2 { background: var(--slhd-orange2); }
.j-c3 { background: var(--slhd-yellow); }
.j-c4 { background: var(--slhd-geel); }

.j-hero-lead {
    max-width: 520px;
    margin: 0;
    font-size: 1rem;
    line-height: 1.7;
    color: #d5dcec;
}

.j-hero-lead a {
    color: var(--slhd-yellow);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.j-collage {
    position: relative;
    /* LEO1 bepaalt zelf de hoogte; onderaan ruimte voor de twee kleinere blokken */
    padding-bottom: 150px;
}

.j-collage img {
    position: absolute;
    object-fit: cover;
    display: block;
}

.j-collage .j-collage-1 {
    /* volledige breedte, eigen verhoudingen: niets weggesneden */
    position: static;
    width: 100%;
    height: auto;
}

.j-collage-2 {
    bottom: 0;
    left: 0;
    width: 50%;
    height: 170px; /* overlapt LEO1 maar ~20px */
    border: 8px solid var(--slhd-yellow);
    box-sizing: border-box;
}

.j-collage-3 {
    position: absolute;
    bottom: 20px;
    right: 0;
    width: 36%;
    min-height: 120px;
    background: var(--slhd-orange1);
    color: var(--slhd-primary);
    padding: 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
}

/* ---------- Nu op Sint-Leo ---------- */
.j-info {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.j-info-item {
    display: flex;
    min-height: 220px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.j-info-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.j-info-wide {
    grid-column: span 2;
}

.j-info-img {
    flex: 0 0 42%;
    width: 42%;
    object-fit: cover;
    display: block;
}

/* Uitsneden uit het fotohulpje: <picture> met vierkant (computer) en liggend (gsm) */
picture.j-info-img { position: relative; overflow: hidden; }
picture.j-info-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.j-info-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    padding: 22px;
}

.j-info-wide .j-info-body {
    justify-content: center;
}

.j-info-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    line-height: 1.25;
    margin: 0;
}

.j-info-body p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.55;
}

.j-info-big {
    font-size: 4.5rem;
    font-weight: 700;
    letter-spacing: -4px;
    line-height: 0.9;
}

.j-info-geel .j-info-body p {
    font-size: 0.9rem;
    font-weight: 500;
}

.j-info-highlight {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.j-info-wit   { background: #ebebeb; color: var(--slhd-primary); }
.j-info-wit .j-label { color: var(--slhd-blauw); }
.j-info-wit p { color: #444444; }
.j-info-geel  { background: var(--slhd-yellow); color: var(--slhd-primary); }
.j-info-blauw { background: var(--slhd-primary); color: #ffffff; }
.j-info-blauw .j-label { color: var(--slhd-yellow); }
a.j-info-item, a.j-info-item:hover { color: inherit; }
a.j-info-blauw, a.j-info-blauw:hover { color: #ffffff; }

/* Kalenderstrook */
.j-agenda {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 14px;
}

.j-agenda-item {
    flex: 1 1 260px;
    display: flex;
    gap: 14px;
    align-items: center;
    border: 2px solid #ebebeb;
    padding: 12px 16px;
    color: var(--slhd-primary);
    text-decoration: none;
}

.j-agenda-item:hover {
    border-color: var(--slhd-yellow);
    color: var(--slhd-primary);
    text-decoration: none;
}

.j-date {
    flex: none;
    width: 52px;
    padding: 6px 0;
    text-align: center;
    background: var(--slhd-primary);
    color: #ffffff;
    line-height: 1.1;
}

.j-date-d {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
}

.j-date-m {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--slhd-yellow);
}

.j-agenda-text {
    display: flex;
    flex-direction: column;
    font-size: 0.8rem;
    color: #555555;
}

.j-agenda-text strong {
    font-size: 0.95rem;
    color: var(--slhd-primary);
}

.j-agenda-links {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 12px 16px;
    font-size: 0.85rem;
    font-weight: 600;
}

.j-agenda-links a {
    color: var(--slhd-primary);
}

/* ---------- Jouw weg ---------- */
.j-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.1fr);
    gap: 14px;
}

.j-step {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 24px;
    background: #ffffff;
    color: var(--slhd-primary);
    text-decoration: none;
    border-top: 6px solid;
    transition: transform 0.2s ease;
}

.j-step:hover {
    transform: translateY(-3px);
    color: var(--slhd-primary);
    text-decoration: none;
}

.j-step-1 { border-top-color: var(--slhd-orange1); }
.j-step-2 { border-top-color: var(--slhd-orange2); }
.j-step-3 { border-top-color: var(--slhd-yellow); }

.j-step-nr {
    font-size: 2.75rem;
    font-weight: 700;
    letter-spacing: -2px;
    line-height: 1;
}

.j-step-1 .j-step-nr { color: var(--slhd-orange1); }
.j-step-2 .j-step-nr { color: var(--slhd-orange2); }
.j-step-3 .j-step-nr { color: var(--slhd-yellow); }

.j-step-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.j-step-text {
    font-size: 0.85rem;
    line-height: 1.55;
    color: #444444;
}

.j-step-extra {
    background: var(--slhd-yellow);
    border-top-color: var(--slhd-yellow);
    justify-content: space-between;
}

.j-step-extra .j-step-text {
    color: var(--slhd-primary);
}

/* ---------- Leven op Sint-Leo ---------- */
.j-life {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 170px;
    gap: 14px;
}

.j-life-item {
    position: relative;
    display: block;
    overflow: hidden;
    background: #dfe4ee;
}

.j-life-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.j-life-item:hover img {
    transform: scale(1.05);
}

.j-life-tall { grid-row: span 2; }
.j-life-wide { grid-column: span 2; }

.j-life-cap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--slhd-primary);
    color: #ffffff;
    padding: 10px 16px;
    font-size: 0.95rem;
    font-weight: 600;
}

.j-life-cap-geel {
    right: auto;
    background: var(--slhd-yellow);
    color: var(--slhd-primary);
}

.j-life-more {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 20px 24px;
    background: #ffffff;
    border-left: 6px solid var(--slhd-orange1);
    color: #444444;
    font-size: 0.85rem;
    line-height: 1.6;
    text-decoration: none;
}

.j-life-more:hover {
    color: #444444;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.j-life-more-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--slhd-primary);
}

/* ---------- Ambassadeurs + video ---------- */
.j-duo {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.j-amb {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--slhd-yellow);
    color: var(--slhd-primary);
    padding: 36px;
}

/* Citaten liggen op elkaar (de hoogste bepaalt de hoogte) en wisselen via een CSS-animatie.
   De keyframes en de duur staan in index.njk, berekend uit het aantal citaten. */
.j-amb-quotes {
    display: grid;
}

.j-amb-quote {
    grid-area: 1 / 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0;
}

.j-amb-rotate .j-amb-quote {
    opacity: 0;
    visibility: hidden;
    animation-name: j-amb-show;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

.j-amb-quote blockquote {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: -0.5px;
}

.j-amb-quote figcaption {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.9rem;
}

.j-amb-quote figcaption img,
.j-amb-nophoto {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 3px solid var(--slhd-primary);
    object-fit: cover;
    flex: none;
}

.j-amb-nophoto {
    background: rgba(29, 56, 122, 0.15);
}

.j-amb-dots {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 22px;
}

.j-amb-dot {
    display: flex;
    align-items: center;
    width: 22px;
    height: 12px;
}

.j-amb-dot::before {
    content: "";
    display: block;
    width: 10px;
    height: 5px;
    background: rgba(29, 56, 122, 0.35);
    animation-name: j-amb-dot;
    animation-timing-function: step-end;
    animation-iteration-count: infinite;
    animation-delay: var(--d);
}

/* Pauzeren zolang iemand het citaat aanwijst of er met het toetsenbord in zit */
.j-amb-rotate:hover .j-amb-quote,
.j-amb-rotate:hover .j-amb-dot::before,
.j-amb-rotate:focus-within .j-amb-quote,
.j-amb-rotate:focus-within .j-amb-dot::before {
    animation-play-state: paused;
}

/* Wie minder beweging wil: alle citaten gewoon onder elkaar */
@media (prefers-reduced-motion: reduce) {
    .j-amb-rotate .j-amb-quote {
        grid-area: auto;
        opacity: 1;
        visibility: visible;
        animation: none;
    }
    .j-amb-quotes {
        gap: 28px;
    }
    .j-amb-dots {
        display: none;
    }
}

.j-video {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    overflow: hidden;
    background: #000000;
}

.j-video img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.j-video:hover img {
    opacity: 1;
}

.j-video-play {
    position: relative;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: var(--slhd-yellow);
    color: var(--slhd-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.j-video-cap {
    position: absolute;
    left: 0;
    bottom: 0;
    background: var(--slhd-primary);
    color: #ffffff;
    padding: 10px 16px;
    font-size: 0.95rem;
    font-weight: 600;
}

.j-video-cap small {
    font-weight: 400;
    opacity: 0.8;
}

/* Instagram: horizontale rij, 4 posts in beeld, scrollen voor meer (zoals de vroegere widget) */
.j-insta {
    margin-top: 28px;
}

.j-insta-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 16px;
    margin-bottom: 14px;
}

.j-insta-title {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem;
    font-weight: 400;
    letter-spacing: -1px;
    color: var(--slhd-yellow);
}

.j-insta-handle {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
}

.j-insta-handle:hover {
    color: var(--slhd-yellow);
}

ul.j-insta-row {
    list-style: none;
    margin: 0;
    padding: 0 0 14px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 3 * 14px) / 4);
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--slhd-yellow) rgba(255, 255, 255, 0.15);
}

ul.j-insta-row::-webkit-scrollbar {
    height: 8px;
}

ul.j-insta-row::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.15);
}

ul.j-insta-row::-webkit-scrollbar-thumb {
    background: var(--slhd-yellow);
}

ul.j-insta-row > li.j-insta-post {
    margin: 0;
    padding: 0;
    scroll-snap-align: start;
}

.j-insta-post a {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #ffffff;
    color: #333333;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.j-insta-post a:hover,
.j-insta-post a:focus {
    transform: translateY(-3px);
    color: #333333;
    text-decoration: none;
}

.j-insta-img {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--slhd-blauw);
}

.j-insta-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.j-insta-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    color: #ffffff;
    font-size: 0.95rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.j-insta-caption {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    overflow: hidden;
    max-height: calc(6em + 12px); /* 4 regels × 1.5 + bovenpadding: harde grens, ook waar line-clamp niet werkt */
    padding: 12px 14px 0;
    margin-bottom: 14px; /* witruimte onderaan buiten het afgesneden vak, anders schemert een 5de regel door */
    font-size: 0.85rem;
    line-height: 1.5;
    white-space: pre-line;
}

/* Duplicaten (voor de naadloze lus) enkel tonen als de rij automatisch verschuift */
.j-insta-dup {
    display: none;
}

/* ---- Automatisch stapsgewijs verschuiven (keyframes in index.njk) ----
   --v = aantal posts in beeld; --step = breedte van één post + tussenruimte.
   cqw = procent van de breedte van .j-insta-viewport. */
@media (prefers-reduced-motion: no-preference) {
    .j-insta-auto {
        --v: 4;
        --gap: 14px;
        container-type: inline-size;
        overflow: hidden;
    }

    .j-insta-auto ul.j-insta-row {
        --step: calc((100cqw + var(--gap)) / var(--v));
        display: flex;
        gap: var(--gap);
        overflow: visible;
        padding-bottom: 0;
        scroll-snap-type: none;
        animation-name: j-insta-step;
        animation-timing-function: ease-in-out;
        animation-iteration-count: infinite;
    }

    .j-insta-auto ul.j-insta-row > li.j-insta-post {
        flex: 0 0 calc((100cqw - (var(--v) - 1) * var(--gap)) / var(--v));
    }

    .j-insta-auto .j-insta-dup {
        display: block;
    }

    /* Stilzetten om te lezen of te klikken (muis, aanraken of toetsenbord) */
    .j-insta-auto:hover ul.j-insta-row,
    .j-insta-auto:focus-within ul.j-insta-row {
        animation-play-state: paused;
    }
}

@media (prefers-reduced-motion: no-preference) and (max-width: 991px) {
    .j-insta-auto {
        --v: 2;
    }
}

@media (prefers-reduced-motion: no-preference) and (max-width: 576px) {
    .j-insta-auto {
        --v: 1;
    }
}

@media (max-width: 991px) {
    ul.j-insta-row {
        grid-auto-columns: calc((100% - 14px) / 2.3);
    }
}

@media (max-width: 576px) {
    ul.j-insta-row {
        grid-auto-columns: 75%;
    }
}

.j-social {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    margin-top: 14px;
    padding: 20px 24px;
    background: var(--slhd-blauw);
}

.j-social-text {
    flex: 1 1 220px;
    font-size: 1.1rem;
    font-weight: 500;
}

.j-social-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 20px;
    background: var(--slhd-yellow);
    color: var(--slhd-primary);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.j-social-btn:hover {
    background: #ffffff;
    color: var(--slhd-primary);
    text-decoration: none;
}

/* ---------- Tablet ---------- */
@media (max-width: 991px) {
    .j-wrap {
        padding-left: 40px;
        padding-right: 40px;
    }

    .j-hero,
    .j-duo {
        grid-template-columns: minmax(0, 1fr);
    }

    .j-hero-title {
        font-size: 3.5rem;
        letter-spacing: -2px;
    }

    .j-collage {
        max-width: 620px;
    }

    .j-info,
    .j-life,
    .j-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---------- Gsm ---------- */
@media (max-width: 576px) {
    .j-hero-title {
        font-size: 2.75rem;
    }

    .j-collage {
        padding-bottom: 115px;
    }

    .j-collage-2 {
        left: 0;
        height: 130px;
    }

    .j-collage-3 {
        right: 0;
        width: 46%;
        min-height: 100px;
    }

    .j-info,
    .j-life,
    .j-steps {
        grid-template-columns: minmax(0, 1fr);
    }

    .j-info-wide,
    .j-life-wide {
        grid-column: auto;
    }

    .j-life-tall {
        grid-row: auto;
    }

    .j-info-item {
        flex-direction: column;
    }

    .j-info-img {
        width: 100%;
        height: 180px;
        flex-basis: auto;
    }

    picture.j-info-img {
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .j-amb {
        padding: 26px;
    }

    .j-amb-quote blockquote {
        font-size: 1.15rem;
    }
}
