* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
html {
    height: 100%;
    font-family: Arial, sans-serif;
    overflow:visible;
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
    background-color: #555;
}

header,
footer {
    position: fixed;
    width: 100%;
    z-index: 10;
    background-color: #000;
    color: #fff;
    text-align: center;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}


header {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 90px;
    background-color: #000;
    color: white;
    text-align: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.logo img {
    height: 80px;
    /* Pas dit aan naar de gewenste hoogte */
    margin-right: auto;
    /* Logo blijft helemaal links */

}

.header-text {
    flex: 1;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #4B97B0
}


footer {
    bottom: 0;
    height: 90px;
    /* Vaste hoogte voor de footer */
    display: flex;
    justify-content: center;
    align-items: center;
}

main {
    flex: 1;
    margin: 0;
    /* Ruimte vrijmaken voor vaste header en footer */
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 0;
    background: url("https://gedichten.ballpinnetje.nl/gedicht.png") no-repeat center center;
    background-size: cover;
    opacity: 0.9;
    min-height: calc (100vh -180px);
}

#carousel-container {
    height:auto;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    margin: auto;
    background-color: #222;
    gap: 10px;
    border-radius: 8px;
    overflow: auto;
}


/* Stijlen voor announcement */
header .announcement {
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px;
    text-align: center;
    font-size: 0.9em;
    border-radius: 5px;
    overflow: hidden;
    /* Zorgt ervoor dat tekst netjes binnen blijft */
    position: relative;
}

/* Bewegende tekst in de announcement */
header .announcement .moving-text {
    display: inline-block;
    white-space: nowrap;
    font-size: 18px;
    animation: scroll-text-right-left 25s linear infinite;
    /* Van links naar rechts */
    will-change: transform;
}

@keyframes scroll-text-right-left {
    from {
        transform: translateX(40%);
        /* Start buiten beeld, rechts */
    }

    to {
        transform: translateX(-100%);
        /* Eindigt buiten beeld, links */
    }
}

#carousel-content {
    width: 100%;
    
    height: 620px;
    background: url("https://gedichten.ballpinnetje.nl/gedicht.png") no-repeat center center;
    background-size: cover;
    border: 2px solid #5fa8d3;
    border-radius: 10px;
    opacity: 0.8;
    padding: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}

#poem-title {
    margin: 0;
    padding: 10px 0;
    font-size: 1.7em;
    color: #FFF;
    text-align: center;
    background: rgba(0, 0, 0, 0.63);
    border-bottom: 2px solid rgb(84, 127, 184);
    flex-shrink: 0;
}

#poem-text {
    margin-top: 10px;
    padding: 15px;
    width: 100%;
    height: calc(100% - 60px);
    /* Titelruimte aftrekken */
    overflow-y: auto;
    font-size: 1.4em;
    font-weight: bold;
    line-height: 1.6;
    text-align: center;
    color: #111;
}

#carousel-buttons {
    margin-top: 10px;
    justify-content: center;
    align-items: center;
    display: flex;
    gap: 10px;
    margin: auto;
    width: 100%;
}

#carousel-buttons button {
    padding: 10px 20px;
    background: #005A9C;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

#carousel-buttons button:hover {
    background: #009ac0;
}


/* Hover-effecten */
.content-section:hover {
    background-color: #ffffff;
}

img.clickable:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 4px solid rgba(102, 191, 226, 0.767);
}

/* Verwijder onderstreping van links */
a {
    text-decoration: none;
    /* Geen onderstreping */
    color: inherit;
    /* Neem de tekstkleur van de parent over */
}

/* Geen rode kleur bij hover */
a:hover {
    color: inherit;
    /* Houd de kleur gelijk aan de normale tekstkleur */
}

@media screen and (max-width: 768px) {

    header,
    footer {
        height: 60px;
    }

    main {
        margin-top: 60px;
        /* Ruimte voor de header */
        margin-bottom: 60px;
        /* Ruimte voor de footer */
        padding: 0;
        background-attachment: scroll;
    }

    .logo img {
        height: 60px;
    }

    #carousel-container {
        margin: 10px auto;
        width: auto;
        max-width: 98vw;
        padding: 10px;
        box-sizing: border-box;
    }

    #carousel-content {
        width: 100%;
        height: auto;
        min-height: 490px;
        padding: 10px;
        overflow-y: auto;
        /* Scrollen in de carrouselinhoud mogelijk */
    }

    #poem-title {
        font-size: 1.2em;
    }

    #poem-text {
        font-size: 1.1em;
        line-height: 1.3;
        white-space: normal;
        word-wrap: normal;
        width:100%;
        overflow-y: auto;
        /* Scrollbare tekst als het langer is dan het zichtbare gebied */
        max-height: 340px;
        /* Beperkt de hoogte zodat scrollen zichtbaar wordt indien nodig */
    }

    #carousel-buttons {
        display: flex;
        justify-content: space-between;
        margin-top: 10px;
    }

    #prev::before {
        content: "« ";
    }

    #next::after {
        content: " »";
    }
}
