@font-face {
    font-family: space;
    src: url('./fonts/SpaceGrotesk-VariableFont_wght.ttf') format('truetype');
}

body {
    font-family: space;
    margin: 0px;
    scroll-behavior: smooth;
    transition: background-color 0.3s ease, color 0.3s ease;
}

header {
    position: fixed;
    top: 1rem;
    left: 1rem;
    right: 0;
    height: 5rem;
    z-index: 9;
}

.landingsPage {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    background-image: url('./img/logo_sander_noppe.png');
    background-size: cover;
    background-position: center;
    height: 100vh;
    /* Minimum hoogte zodat het er op mobiel ook goed uitziet */
    min-height: 300px;
}

[data-bs-theme="light"] .landingsPage {
    background-image: url('./img/light_mode.png');
}

[data-bs-theme="light"] .contact {
    color: black !important;
}

/* ── Dark Mode Toggle ─────────────────────────────────────────────────── */
#darkModeToggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    padding: 0.4rem 0.9rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

#darkModeToggle i {
    transition: transform 0.4s ease;
}

#darkModeToggle:hover i {
    transform: rotate(20deg);
}

/* Op heel kleine schermen: kleinere toggle knop */
@media (max-width: 400px) {
    #darkModeToggle {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
}

/* ── Loading animatie ─────────────────────────────────────────────────── */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0d0d0d;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.5s ease;
}

[data-bs-theme="light"] #loader {
    background-color: white;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

[data-bs-theme="light"] .spinner {
    border: 6px solid rgba(0, 0, 0, 0.1);
    border-top-color: black;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#loader.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ── About Me ─────────────────────────────────────────────────────────── */
#aboutMe {
    font-family: space;
}

/* Op desktop: foto naast tekst, groot */
#aboutMeAfbeelding {
    width: 100%;
    max-width: 400px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Gratesolle foto: responsive */
#gratesolle {
    width: 60%;
    height: auto;
    max-width: 300px;
    margin-top: 1rem;
    display: block;
    /* transform verwijderd: werkt slecht op mobiel */
}

/* ── Progress bars ────────────────────────────────────────────────────── */
.progress_bar_text {
    margin-top: .5rem;
    margin-bottom: .5rem;
    font-size: 0.75rem;
    white-space: nowrap;
}

/* ── Carousel ─────────────────────────────────────────────────────────── */
.carousel {
    width: 100%;
    max-width: 1920px;
}

.carousel img {
    /* Hoogte schaalt mee op mobiel */
    height: clamp(200px, 40vw, 500px);
    object-fit: cover;
}

/* Caption tekst altijd wit */
.carousel-caption h3 {
    color: white !important;
    text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}

/* ── Cards ────────────────────────────────────────────────────────────── */
.card {
    height: 100%;
    border: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    transition: transform .2s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-body {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
}

.card-body .btn {
    margin-top: auto;
}

.card-img-top {
    height: 120px;
    object-fit: contain;
    padding: 10px;
}

/* Op grotere schermen grotere afbeeldingen in cards */
@media (min-width: 768px) {
    .card-img-top {
        height: 180px;
        padding: 15px;
    }
}

/* Card titel wrapping op kleine schermen */
.card-title {
    font-size: 0.9rem;
    hyphens: auto;
}

@media (min-width: 768px) {
    .card-title {
        font-size: 1rem;
    }
}

/* ── Footer / Contact ─────────────────────────────────────────────────── */
footer {
    text-align: center;
    padding: 3px;
    color: white;
}

.contact-title {
    color: black !important;
}

[data-bs-theme="dark"] .contact-title {
    color: white !important;
}

/* Contact knoppen: wrappen op kleine schermen */
.contactBtn {
    background-color: black !important;
    color: white !important;
    border-color: black !important;
    word-break: break-all;
    white-space: normal;
    max-width: 100%;
}

[data-bs-theme="dark"] .contactBtn {
    background-color: white !important;
    color: black !important;
    border-color: white !important;
}

/* ── Nav knoppen ──────────────────────────────────────────────────────── */
.btn-nav {
    background-color: black !important;
    color: white !important;
    border-color: black !important;
    width: 100%;
    text-align: left;
}

[data-bs-theme="dark"] .btn-nav {
    background-color: white !important;
    color: black !important;
    border-color: white !important;
}

/* ── Modals scrollbaar op mobiel ──────────────────────────────────────── */
.modal-dialog {
    margin: 0.5rem auto;
}

@media (max-width: 576px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
}