/* 1. Globala stilar */
a {
    color: #f6f4f0;
    text-decoration: none;
}
body {
    background: #eeeae1;
    margin: 20px;
}

/* 2. Layout-behållare */
.bodyContainer {
    display: grid;
    grid-template-rows: 200px 40px 1fr 30px;
    max-width: 1000px;
    margin: auto;
    background: #f6f4f0;
    border-radius: 8px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);
}

header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(rgba(34, 30, 21, 0.5), rgba(34, 30, 21, 0.5)), url(../images/scenBildStene.jpg) no-repeat 0% 58%/cover;
    color: #f6f4f0;
    border-radius: 8px 8px 0px 0px;
}

.headerDiv {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 300px;
}

h1 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 24px;
    font-weight: bold;
    margin-top: 0;
}

h3 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #221e15;
}

nav {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #221e15;
    color: #f6f4f0;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 10px;
    gap: 20px;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    font-size: 16px;
}

/* 3. Main & Sektioner */
main {
    display: grid;
    grid-template-columns: 1fr 320px;
    background: #f6f4f0;
    padding: 10px 0;
}

section {
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    font-size: 17px;
    padding-left: 60px;
    padding-right: 60px;
    margin-bottom: 20px;
}

footer {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    background: #221e15;
    color: #f6f4f0;
    padding: 10px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    border-radius: 0px 0px 8px 8px;
}

.footerDiv {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

.mainImage {
    display: block;
    margin: auto;
    margin-bottom: 40px;
    margin-top: 25px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
    max-width: 500px;
    width: 100%;
    height: 280px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);
    object-fit: cover;
    object-position: center center;
    transform: rotate(-1deg);
}

/* 4. Sidokolumn (Aside) */
hr {
    clear: both;
    border: none;
    height: 2px;
    background-color: #f6f4f0;
    margin: 20px 0;
    width: 100%;
}

aside {
    background-color: #eeeae1;
    display: flex;
    flex-direction: column;
    padding-left: 20px;
    padding-right: 20px;
    width: 320px;
    box-sizing: border-box;
}

.kolumn {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    color: #221e15;
    line-height: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Sociala Medier-Ikoner */
.social-icons {
    width: 270px;
    display: flex;
    justify-content: space-evenly;
    margin: 10px auto 20px auto;
}

.social-icons a {
    transition: transform 0.2s ease;
}

.social-icons a:hover {
    transform: scale(1.15);
}

.social-icons svg {
    width: 32px;
    height: 32px;
}

.textFoto{
    float: left;
    width: 100px;
    margin-right: 15px;
    margin-bottom: 30px;

    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);
    transform: rotate(-1deg);
}

.textContent{
    clear: both;
    margin-bottom: 20px;
}


.eventDiv{
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin: 10px 10px 30px 10px;
}

.eventImage{
    width: 150px;
    height: auto;
    display: block;
}

.eventP{
    margin: 0;
}

.eventURL{
    color: darkblue;
    font-weight: bold;
    text-decoration: underline;
    margin-right: 15px;
}




/* ==========================================================================
   5. Mobilanpassning (Brytpunkt för skärmar under 768px)
   ========================================================================== */
@media (max-width: 768px) {
    
    /* Ta bort fasta marginaler runt hela sidan */
    body {
        margin: 10px;
    }

    /* Lås inte höjderna i gränssnittet, låt innehållet styra höjden naturligt */
    .bodyContainer {
        grid-template-rows: auto;
    }

    /* Gör om de två kolumnerna (Main + Aside) till en enda vertikal rad */
    main {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    /* Minska de stora marginalerna på texten så den får plats */
    section {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Gör sidokolumnen (Aside) fullbredd istället för låst till 320px */
    aside {
        width: 100%;
        padding-top: 20px;
        padding-bottom: 20px;
    }

    /* Tillåt menyn att radbrytas om länkarna inte får plats på en rad */
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    /* Justera fasta bildhöjder så de inte blir utsträckta eller förvrängda */
    .mainImage {
        height: auto;
        max-height: 250px;
        margin-top: 15px;
        margin-bottom: 20px;
    }

    /* Stapla event-bilder och event-text vertikalt på mycket små skärmar */
    .eventDiv {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .eventImage {
        width: 100%;
        max-width: 200px;
    }
}
