/* ======== GLOBAL STYLING ======== */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    background: linear-gradient(to bottom,#e3f2fd,#ffffff);
    color: #222;
}

header {
    background-color: #010b1b;
    margin: auto;
    padding: 25px;
    text-align: center;

}
header img {
    height: 150px;
    width: auto;
}

header h1 {
    margin: 0;
    font-size: 2em;
}
footer{
	background:#010b1b;
	color:#eee;
	text-align:
	center;padding:15px;
	font-size:0.9em;
} 
main {
    max-width: 900px;
    margin: 30px auto;
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

/* ======= MENY ======= */
nav{
	background:#002b5b;
	display:flex;
	justify-content:center;
	gap:20px;padding:10px;
} 
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}
nav li {
    position: relative;
}

nav > ul > li {
    display: inline-block;
}
nav a{
	color:white;
	text-decoration:none;
	font-weight:bold;
} 
nav a:hover{
	text-decoration:underline;
} 
nav > li > ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 160px;
    background: #004aad;
    border-radius: 5px;
    z-index: 1000;
	list-style: none;
}
nav li:hover > ul {
    display: block;
}

nav li ul li a {
    background: #f2f7ff;
    color: #002b5b;
    margin: 0;
}

nav li ul li a:hover,
nav li ul li.active > a {
    background: #c8102e;
    color: white;
}

nav li a {
    display: block;
    padding: 8px 12px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background 0.3s;
}

nav li a:hover,
nav li.active > a {
    text-decoration: underline;
}

/* Dropdown desktop */
nav li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 160px;
    background: #004aad;
    border-radius: 5px;
    z-index: 1000;
}

nav li:hover > ul {
    display: block;
}

nav li ul li a {
    background: #004aad;
    color: white;
    border-radius: 0;
}

nav li ul li a:hover {
    background: #c8102e;
}

/* Hamburger mobil */
.nav-toggle {
    display: none;
    font-size: 28px;
    color: white;
    cursor: pointer;
    position: absolute;
    left: 20px;
    top: 10px;
    z-index: 1001;
    background: none;
    border: none;
}

/* ======== GALLERI ======== */
.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.gallery .image {
    background: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    width: 200px;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.gallery .image:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.gallery .image img {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid #ddd;
}

.gallery .desc {
    padding: 10px;
    font-size: 0.9em;
    color: #222;
}

/* RESPONSIVT */
@media (max-width: 768px) {
    .gallery .image { width: 45%; }
}

@media (max-width: 480px) {
    .gallery .image { width: 90%; }
}


/* ======= MOBILMENY MED OVERLAY ======= */
@media (max-width: 768px) {
	main {
    	margin: 0px auto;
    	padding: 25px;

	}
    /* Gör nav till overlay på mobil */
    nav > ul {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 150px;
        left: 0;
        height: 65vh;
        width: 75%;
        max-width: 300px;
        background: #002b5b; /* behåll tema */
        padding: 2rem 1rem;
        z-index: 1001;
        overflow-y: auto;
    }

    /* Visa menyn när togglad */
    nav > ul.show {
        display: flex;
    }

    /* Overlay över resten av sidan */
    body.menu-open::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.4);
        z-index: 1000;
    }

    /* Visa hamburgermenyknappen */
    .nav-toggle {
        top: 0px; /* placera hamburgare 70px ner */
        left: 10px; /* behåll samma vänsterposition */
        z-index: 1002;
        display: block;
        font-size: 28px;
        color: white;
        background: none;
        border: none;
        cursor: pointer;
        position: absolute; /* placeras relativt nav */
    }

    /* Anpassa nav-fältets höjd så hamburgaren ryms */
    nav {
		top:20px;
        height: 25px; /* minst 100px höjd så hamburgaren får plats */
        position: relative; /* så att absolut-positionerad hamburgare ligger inom nav */
        align-items: flex-start; /* om du vill att innehållet hamnar högst upp */
    }

    /* Gör huvudmeny-länkar block och vänsterställda */
    nav > ul > li {
        display: block;
        text-align: left;
        margin-bottom: 1rem;
    }

    /* Undermenyer */
    nav li ul {
		top:0px;
        position: relative;
        display: block !important;
        background: transparent;
        padding-left: 15px;
        border-radius: 0;
    }

    nav li ul li a {
        background: transparent;
        color: white;
        padding-left: 15px;
        border-radius: 0;
    }

    nav li ul li a:hover {
        background: rgba(200,16,46,0.5);
        color: white;
    }
}
