/* Generelle bildeinnstillinger */
.img-responsive {
    width: 100%;
    height: auto;
}

/* Stil for bildetekster */
.carousel-caption2 {
    position: absolute;
    bottom: 13%;
    left: 3.4%;
    z-index: 10;
    padding: 10px 20px;
    color: black;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 5px;
    text-align: end;
    max-width: 225px;
}

/* Grid-oppsett for å forhindre overlapping */
.section--sand {
    position: relative;
    clear: both;
    overflow: hidden; /* Hindrer overlapping */
    padding: 40px 0;
    background-color: #f5f5f5;
}

/* Stil for galleribilder */
.mySlides img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

/* Thumbnail-rad */
.thumbnail-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 10px;
}

.thumbnail-container img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    cursor: pointer;
    margin: 5px;
    border: 2px solid transparent;
}

.thumbnail-container img.active {
    border: 2px solid #000;
}

/* Stil for bilder i bodyText */
.imgBodyText {
    max-width: 100%;
    height: auto;
    border: 2px solid #ccc;
}

/* Stil for neste/forrige knapper */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
}

.prev {
    left: 0;
    border-radius: 3px 0 0 3px;
}

.next {
    right: 0;
    border-radius: 0 3px 3px 0;
}

.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Forstørrelseseffekt */
.modal {
    display: none;
    position: fixed;
    z-index: 1050; /* Høyere z-index for å sikre at modal er over headeren */
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
}

.modal-content, #caption {
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {transform: scale(0)}
    to {transform: scale(1)}
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    z-index: 1051; /* Høyere z-index for å sikre at knappen er over andre elementer */
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Mobilvennlige justeringer */
@media (max-width: 768px) {
    .carousel-caption2 {
        bottom: 5%;
        left: 5%;
        padding: 5px 10px;
        max-width: 150px;
        font-size: 14px;
    }

    .mySlides img {
        height: auto;
    }

    .thumbnail-container img {
        width: 60px;
        height: 60px;
    }

    .section--sand {
        padding: 20px 0;
    }

    .product-teaser, .product-advantages {
        font-size: 14px;
    }
}