body {
    position: relative;
    font-family: Arial, sans-serif;
    text-align: center;
    margin: 0;
    padding: 0;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('images/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0.5; /* Juster opasiteten her */
    z-index: -1; /* Sørger for at det ligger bak alt annet */
}


/* ======== Header ======== */
header {
    background: #333;
    color: white;
    padding: 20px;
}

/* ======== Navigasjonsmeny ======== */
nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    background: #444;
    padding: 10px;
    border-radius: 10px;
}

nav li {
    display: inline;
}

nav a {
    text-decoration: none;
    color: white;
    font-size: 18px;
    padding: 10px;
    border-radius: 5px;
    transition: 0.3s;
}

nav a:hover {
    background: #555;
}

/* ======== Velkomstseksjon på forsiden ======== */
#welcome {
    padding: 40px;
}

.gallery-link {
    display: inline-block;
    padding: 10px 20px;
    background: #333;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.gallery-link:hover {
    background: #555;
}

/* ======== Galleri ======== */
#gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px;
    max-width: 900px;
    margin: auto;
}

#gallery img {
    width: 100%;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s;
}

#gallery img:hover {
    transform: scale(1.05);
}

/* ======== Lightbox (Full-screen visning) ======== */
#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#lightbox img {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 10px;
}

#lightbox .close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 30px;
    color: white;
    cursor: pointer;
}

#lightbox.visible {
    visibility: visible;
    opacity: 1;
}

/* ======== Kontakt-side ======== */
form {
    width: 90%;
    max-width: 500px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

label {
    font-weight: bold;
    font-size: 14px;
    color: #555;
}

input, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    transition: border 0.3s ease-in-out;
}

input:focus, textarea:focus {
    border-color: #333;
    outline: none;
}

/* ======== Send-knapp ======== */
button {
    width: 100%;
    padding: 12px;
    background: #333;
    color: white;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
}

button:hover {
    background: #555;
}

/* ======== Bekreftelsesmelding ======== */
#confirmation {
    display: none;
    color: green;
    font-size: 18px;
    text-align: center;
    margin-top: 20px;
}

/* ======== Footer ======== */
footer {
    margin-top: 20px;
    padding: 10px;
    background: #333;
    color: white;
}

/* ======== Responsiv design ======== */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        text-align: center;
    }

    #gallery {
        grid-template-columns: 1fr;
    }

    #gallery img {
        width: 90%;
    }
}

#portfolio {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.portfolio-item {
    text-align: center;
    margin: 20px;
}

.portfolio-item img {
    width: 300px;
    border-radius: 10px;
    transition: transform 0.3s;
    cursor: pointer;
}

.portfolio-item img:hover {
    transform: scale(1.05);
}

.portfolio-item h3 {
    margin-top: 10px;
    font-size: 20px;
    color: #333;
}

#project-details {
    padding: 20px;
    max-width: 900px;
    margin: auto;
}

.project-image {
    text-align: center;
}

.project-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.project-description {
    margin-top: 20px;
    font-size: 18px;
    color: #333;
}

.project-description h2 {
    font-size: 24px;
    color: #333;
}

.project-gallery {
    margin-top: 30px;
}

.project-gallery h3 {
    font-size: 20px;
    color: #333;
}

.image-gallery {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 15px;
}

.image-gallery img {
    width: 200px;
    height: auto;
    border-radius: 10px;
    transition: transform 0.3s;
}

.image-gallery img:hover {
    transform: scale(1.05);
}
#project-details {
    padding: 20px;
    max-width: 900px;
    margin: auto;
}

.project-image {
    text-align: center;
}

.project-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.project-description {
    margin-top: 20px;
    font-size: 18px;
    color: #333;
}

.project-description h2 {
    font-size: 24px;
    color: #333;
}

.project-gallery {
    margin-top: 30px;
}

.project-gallery h3 {
    font-size: 20px;
    color: #333;
}

.image-gallery {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 15px;
}

.image-gallery img {
    width: 200px;
    height: auto;
    border-radius: 10px;
    transition: transform 0.3s;
}

.image-gallery img:hover {
    transform: scale(1.05);
}

/* ======== Forside Prosjekt Preview ======== */
#project-preview {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    margin-top: 30px;
}

.preview-item {
    text-align: center;
    max-width: 250px;
}

.preview-item img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    transition: transform 0.3s;
}

.preview-item img:hover {
    transform: scale(1.05);
}

.preview-item h4 {
    margin-top: 10px;
    font-size: 18px;
    color: #333;
}

/* ======== Prosjekt Galleri ======== */
.project-gallery {
    margin-top: 30px;
}

.project-gallery h3 {
    font-size: 20px;
    color: #333;
}

.image-gallery {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 15px;
}

.image-gallery img {
    width: 200px;
    height: auto;
    border-radius: 10px;
    transition: transform 0.3s;
}

.image-gallery img:hover {
    transform: scale(1.05);
}

/* ======== Personlige Bilder Preview ======== */
#personal-preview {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    margin-top: 30px;
}

.preview-item {
    text-align: center;
    max-width: 250px;
}

.preview-item img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    transition: transform 0.3s;
}

.preview-item img:hover {
    transform: scale(1.05);
}

.preview-item h4 {
    margin-top: 10px;
    font-size: 18px;
    color: #333;
}

