/* --- BASE STYLES --- */
body {
    background-color: rgb(32, 33, 33);
    color:  #c3b23e;
    margin: 0;
    font-family: sans-serif;
    overflow-x: hidden;
    overflow-y: scroll; /* Fix for pixel shifting between pages */
}

/* --- HEADER & NAVIGATION --- */
.main-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    gap: 20px;
}

.main-logo {
    width: 180px;
    height: auto;
    transition: transform 0.3s ease;
}

.main-logo:hover { transform: scale(1.05); }

.social-links {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
}

.social-links img {
    width: 35px;
    height: 35px;
    transition: transform 0.3s ease;
}

.social-links img:hover { transform: scale(1.2); }

.main-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.menu-item img {
    width: 140px;
    height: auto;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.menu-item img:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

.image-gallery {
    display: flex;
    flex-wrap: wrap;       /* Lar bildene hoppe ned på neste linje */
    gap: 15px;
    justify-content: center;
    padding: 20px;
}

.gallery-item {
    flex: 1 1 auto;        /* Lar bildene vokse og krympe naturlig */
    height: 250px;         /* Vi setter en "base"-høyde, men bredden blir original */
    width: auto;           /* Beholder proporsjonene basert på høyden */
    object-fit: contain;   /* Viser hele bildet uten beskjæring */
    border-radius: 8px;  
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.05);
}

/* --- IMAGE MODAL --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
    justify-content: center;
    align-items: center;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    animation-name: zoom;
    animation-duration: 0.3s;
}

@keyframes zoom {
    from {transform:scale(0)}
    to {transform:scale(1)}
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #c3b23e;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1001;
}

.close-modal:hover {
    color: #b41e34;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    .main-header {
        padding: 20px 10px;
        gap: 15px;
    }

    .main-logo {
        width: 140px;
    }

    .social-links {
        gap: 15px;
    }

    .social-links img {
        width: 30px;
        height: 30px;
    }

    .main-nav {
        gap: 10px;
    }

    .menu-item img {
        width: 100px;
    }

    .gallery-item {
        height: 180px;
    }

    .gallery-item:hover {
        transform: none; /* Disable hover scale on touch devices */
    }
}

@media (max-width: 480px) {
    .main-logo {
        width: 120px;
    }

    .menu-item img {
        width: 85px;
    }
    
    .social-links img {
        width: 25px;
        height: 25px;
    }

    .gallery-item {
        height: 150px;
        flex: 1 1 40%; /* Force items to take up more space on small screens */
        object-fit: cover; /* Cover might look better when items are forced to grow */
    }
}
