/* INDEX PAGE STYLES */

/* Mobile-first approach - narrow devices get header image */
body {
    position: relative;
}

/* Header image for narrow devices - using actual img element */
.header-image {
    display: block;
    width: 100%;
    height: auto; /* Maintains aspect ratio - this is all we need! */
    object-fit: cover; /* Ensures full width coverage */
    object-position: center;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
}

.main-content {
    position: relative;
    padding-top: 4px;
    overflow-x: hidden;
}

.button-container {
    position: relative;
    z-index: 20;
    margin-top: -50px;
}

/* Tablet and larger screens - side-by-side layout */
@media (min-width: 768px) {
    html:not(.mosIsMobile) body {
        overflow: hidden;
    }

    /* Hide the header image on larger screens */
    .header-image {
        display: none;
    }

    .sidebar {
        z-index: 1;
        display: block;
        position: fixed;
        top: 0;
        right: 0;
        width: calc(100vh * (9 / 16));
        height: 100vh; /* Full viewport height */
        background-image: url("./images/fabriken-vertical.jpg");
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        box-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
    }

    .button-container {
        margin-top: 10px;
    }

    .main-content {
        width: calc(100vw - (100vh * (9 / 16))); /* Full width minus sidebar width */
    }

    html:not(.mosIsMobile) .main-content {
        height: 100vh;
        overflow-y: scroll;
    }
}

header {
    margin-top: 40px;
}

/* LANGUAGES */

.language-links {
    z-index: 10;
    position: absolute;
    top: 0;
    right: 0;
    text-align: right;
    margin-right: 8px;
}

.flag-icon {
    width: 40px;
    height: 40px;
}
.flag-nl {
    background-image: url("./images/flags/nl.png");
}

.flag-de {
    background-image: url("./images/flags/de.png");
}

.flag-en {
    background-image: url("./images/flags/en.png");
}

/* PICTURES SECTION */

#contactPicture {
    margin: 0 0 10px 12px;
    filter: drop-shadow(2px 3px 3px rgba(139, 125, 107, 0.6));
    transition: all 0.25s ease;
}

#slideShow,
#contactPicture {
    float: right;
    border-radius: 12px;
}

#slideShow {
    cursor: pointer;
    width: 260px;
    height: 173px;
    margin: -8px -50px 10px 10px; /* -50px: make sure that in iPhone portrait the text still flows to the left */
    box-shadow: 1px 4px 4px rgba(139, 125, 107, 0.7);
    background-size: cover;
    background-position: center;
    transition: opacity 0.3s ease-in-out;
    position: relative;
    transform: rotate(0.5deg);
}

#slideShow:hover {
    box-shadow: 1px 3px 6px rgba(165, 130, 80, 0.8); /* Dark Burlywood */
}

#slideShow:active {
    transform: translateY(1px);
}

/* Slideshow fade transition */
#slideShow.fading {
    opacity: 0.3;
}

#contactPicture {
    transform: rotate(1deg);
    width: 30%;
    margin-top: -10px;
    margin-right: -30px;
}

.bottom-link {
    width: 80px;
    height: 80px;
}

#youtubePicture {
    background-image: url("./images/youtube.png");
}

#instagramPicture {
    background-image: url("./images/instagram.png");
}

#hemnetPicture {
    background-image: url("./images/hemnet.png");
}

#touristPicture {
    background-image: url("./images/smaland-play.png");
}

.end-url {
    clear: both; /* Clear floats from images above */
    margin: 30px 10% 20px 10%; /* Match the margin pattern of other elements */
    text-align: center; /* Center the URL */
    font-family: "Bodoni 72 Oldstyle", "Bodoni 72", Didot, "Times New Roman", serif; /* Match h1/h2 styling */
    font-size: 2.2rem; /* Large, prominent size */
    font-variant: small-caps; /* Small caps styling */
    letter-spacing: 0.05em; /* Slight letter spacing for readability */
    color: #3d3530; /* Match your site's text color */
    font-weight: normal;
    line-height: 1.2;
    margin-top: 40px; /* Extra space above */
}

/* Mobile responsiveness */
@media (max-width: 900px) {
    .end-url {
        font-size: 1.8rem; /* Slightly smaller on mobile */
        margin: 25px 5% 15px 5%; /* Adjust margins for mobile */
        letter-spacing: 0.03em; /* Reduce letter spacing on smaller screens */
    }
}

/* PICTURES GALLERY */

/* Gallery Styles - Add to index.css */

/* Gallery overlay */
.gallery-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("./images/fabriken-gallery-background.jpg");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
}

/* Add overlay for better contrast */
.gallery-overlay::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: -1;
}

.gallery-overlay.active {
    display: flex;
}

/* Gallery container */
.gallery-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Gallery image */
.gallery-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Close button */
.gallery-close {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    transition: background-color 0.3s ease;
}

.gallery-close:hover {
    background-color: rgba(255, 255, 255, 1);
}

/* Navigation buttons */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition:
        background-color 0.3s ease,
        opacity 0.3s ease;
    z-index: 1001;
}

.gallery-nav:hover {
    background-color: rgba(255, 255, 255, 1);
}

.gallery-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.gallery-prev {
    left: 20px;
}

.gallery-next {
    right: 20px;
}

/* Image counter */
.gallery-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 1001;
}

/* Loading indicator */
.gallery-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
    z-index: 1001;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .gallery-container {
        max-width: 95%;
        max-height: 85%;
    }

    .gallery-close {
        top: 10px;
        left: 10px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }

    .gallery-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .gallery-prev {
        left: 10px;
    }

    .gallery-next {
        right: 10px;
    }

    .gallery-counter {
        bottom: 10px;
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* Smooth transitions */
.gallery-image {
    transition: opacity 0.3s ease;
}

.gallery-image.loading {
    opacity: 0.5;
}

/* END OF INDEX.CSS */
