/* Reset and basic styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    line-height: 1;
    background: #c489b2;
    color: #fff;
    font-family: Akkurat, Arial, sans-serif;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Header styles */
.nav-links {
    display: flex;
    justify-content: space-between;  /* Align items at both ends */
    align-items: center;
    width: 100%;
}

.nav-links .link {
    font-size: 1rem;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
    flex: 0 1 auto; /* Ensures that links don't stretch unnecessarily */
}

.nav-links .logo {
    flex: 0 1 auto; /* Keeps the logo centered */
    text-align: center;
}

.nav-links .logo img {
    max-width: 500px;
    width: 100%;
}

header {
    z-index: 100;
    top: 0;
    left: 0;
    width: 100%;
    background: #c489b2;
    padding: 16px 0;
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    max-width: 1200px;
    margin: 0 auto;
}

header nav a {
    font-family: Akkurat;
    font-size: 0.875rem;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
}

.logo img {
    max-width: 55vw;
    width: 100%;
}

img {
    max-width: 100%;
    height: auto; /* Maintain aspect ratio */
}

/* Grid layout */
.grid__layout {
    max-width: 100%; /* Adjust as needed */
    margin: 0 auto;
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 columns */
    gap: 1rem;
    margin-top: 3rem;
}

.grid__layout img {
    width: 100%;
    height: 100%; /* Ensure the image fills the container */
    object-fit: cover; /* Maintain aspect ratio while covering the area */
    display: block; /* Remove extra space below images */
}

.grid__layout > div {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.grid__layout > div[style*="display: none"] {
    opacity: 0;
    transform: scale(0.9);
}

/* Specific image placements */
.img-small {
    grid-row: span 1;
    grid-column: span 1;
}

.img-medium {
    grid-row: span 2;
    grid-column: span 1;
}

.img-wide {
    grid-row: span 1;
    grid-column: span 2;
}

.img-wide-large {
    grid-row: span 1;
    grid-column: span 3;
}

.img-large {
    grid-row: span 2;
    grid-column: span 2;
}

.img-xl {
    grid-row: span 5;
    grid-column: span 5;
}

/* Image container and alt text */
.image-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.alt-text {
    position: absolute;
    top: 10px; /* Adjust vertical position */
    left: 10px; /* Adjust horizontal position */
    color: #fff; /* Text color */
    padding: 4px 8px; /* Padding for better readability */
    font-size: 0.875rem; /* Font size */
    border-radius: 4px; /* Rounded corners */
    z-index: 2; /* Ensure text is above the image */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-container:hover .alt-text {
    opacity: 1;
}

/* Position classes for alt text */
.alt-text.top-left { top: 10px; left: 10px; }
.alt-text.top-right { top: 10px; right: 10px; }
.alt-text.bottom-left { bottom: 10px; left: 10px; }
.alt-text.bottom-right { bottom: 10px; right: 10px; }

/* Mobile styles */
@media (max-width: 768px) {
    body {
        font-size: 14px; /* Adjust font size for smaller screens */
    }

    .grid__layout {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for mobile */
        margin-top: 0rem;
    }

    .img-medium, .img-large, .img-wide, .img-wide-large, .img-xl {
        grid-row: span 1; /* Reset row spans for mobile */
        grid-column: span 2; /* Make larger images span 2 columns */
    }

    .small-mobile {
        grid-row: span 1; /* Reset row spans for mobile */
        grid-column: span 1 !important;
    }

    .logo img {
        max-width: 80vw; /* Adjust logo size for mobile */
    }

    header nav a {
        font-size: 1rem; /* Larger font size for mobile */
    }

    .alt-text {
        font-size: 0.75rem; /* Adjust alt text size for mobile */
    }

    .nav-links.active {
        display: flex; /* Show links when menu is toggled */
    }
    
        .nav-links .link {
            font-size: 1.2rem; /* Larger font for mobile */
        }
    
        .nav-links .logo img {
            max-width: 150px; /* Adjust logo size for mobile */
        }
}

/* Responsive styles */
@media (max-width: 768px) {
    .grid__layout {
        grid-template-columns: repeat(2, 1fr);
        margin-top: 0;
    }

    .img-medium, .img-large, .img-wide, .img-wide-large, .img-xl {
        grid-column: span 2;
    }

    .logo img {
        max-width: 80vw;
    }

    header nav a {
        font-size: 1rem;
    }
}