@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ========================================
   1. GRUNDINSTÄLLNINGAR
   ======================================== */

/* Räknar in padding och kantlinjer i elementens storlek. */
* {
    box-sizing: border-box;
}

/* Grundutseende för hela sidan. */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;

    display: flex;
    flex-direction: column;

    background-color: #56665B;
    color: #35433A;

    font-family: 'Inter', sans-serif;
    font-size: 17px;
    line-height: 1.6;
}


/* ========================================
   2. SIDANS CONTAINER
   ======================================== */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;

    flex: 1;
    display: flex;
    flex-direction: column;
}


/* ========================================
   3. HEADER - SIDHUVUD
   ======================================== */

header {
    background-color: #d2ded7;
    padding: 0 26px;

    box-shadow: 0 3px 10px rgba(35, 65, 48, 0.06);
}

/* Webbplatsens huvudrubrik. */
header h1 {
    margin: 0;
    color: #315F49;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
}


/* ========================================
   4. NAVIGATION - HUVUDMENY
   ======================================== */

nav {
    background-color: #355E4B;
    margin-top: 16px;

    border-radius: 8px;
    overflow: hidden;
}

/* Placerar menyvalen bredvid varandra. */
nav ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Länkarna i huvudmenyn. */
nav a {
    display: block;
    padding: 13px 26px;
    
    font-family: 'Inter', sans-serif;
    color: #FFFFFF;
    text-decoration: none;
    font-size: 17px;
    font-weight: 600;

    transition: background-color 0.2s ease;
}

/* Hover-effekt. */
nav a:hover {
    background-color: #4D7961;
}

/* Fokusmarkering för tangentbordsanvändare. */
nav a:focus-visible {
    background-color: #4D7961;
    outline: 2px solid #FFFFFF;
    outline-offset: -4px;
}


/* ========================================
   5. MAIN - HUVUDINNEHÅLL
   ======================================== */

main {
    flex: 1;

    background-color: #d2ded7;
    padding: 26px;
    
    border-radius: 0 0 0 0;
    box-shadow: 0 4px 12px rgba(35, 65, 48, 0.06);
}

/* Placerar innehåll och sidomeny bredvid varandra. */
.main-layout {
    display: flex;
    align-items: flex-start;
    gap: 26px;
}


/* ========================================
   6. SECTIONS - INNEHÅLL TILL VÄNSTER
   ======================================== */

.sections {
    flex: 1;
    min-width: 0;
}

/* Varje sektion visas som ett eget kort. */
section {
    width: 100%;
    max-width: 700px;
    margin: 0 0 24px 0;
    padding: 26px;

    text-align: left;
    background-color: #FBFDFB;

    border: 1px solid #DCE6DC;
    border-radius: 12px;

    box-shadow: 0 3px 10px rgba(35, 65, 48, 0.06);
}

/* Rubriker i innehållet. */
section h2 {
    color: #315F49;
    font-size: 25px;
    line-height: 1.35;

    margin-top: 0;
    margin-bottom: 14px;
}

section h3 {
    color: #315F49;

    margin-top: 0;
    margin-bottom: 14px;
}

/* Brödtext i innehållet. */
section p {
    color: #35433A;
    font-size: 17px;
    line-height: 1.8;

    margin-top: 0;
    margin-bottom: 20px;
}

/* Listan */
section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Varje listelement */
section li {
    margin-bottom: 12px;
}

/* Själva länken */
section li a {
    display: block;
    padding: 15px 20px;
    background-color: #ffffff;
    color: #24645f;
    text-decoration: none;
    border: 1px solid #d5e5e2;
    border-radius: 8px;
    font-size: 17px;
    font-weight: bold;
    transition: background-color 0.2s ease,
                color 0.2s ease,
                border-color 0.2s ease;
}

/* När muspekaren ligger över länken */
section li a:hover {
    background-color: #24645f;
    color: #ffffff;
    border-color: #24645f;
}

/* När länken får tangentbordsfokus */
section li a:focus-visible {
    outline: 3px solid #e0a33a;
    outline-offset: 3px;
}

section p a {
    color: #24645f;
}


/* Tar bort extra avstånd efter sista stycket. */
section p:last-child {
    margin-bottom: 0;
}


/* ========================================
   7. ASIDE - SIDOMENY TILL HÖGER
   ======================================== */

aside {
    flex: 0 0 260px;
    min-width: 0;
    padding: 20px;

    background-color: #F0F4ED;
    border: 1px solid #CBD7CB;
    border-radius: 12px;

    box-shadow: 0 4px 12px rgba(35, 65, 48, 0.12);
}

/* Rubriken i sidomenyn. */
aside h2 {
    margin: 0 0 18px 0;
    
    font-family: 'Inter', sans-serif;
    text-align: center;
    color: #315F49;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;

    border: 1px solid #9BAD9B;
    border-radius: 4px;
    padding: 10px;
}

/* Tar bort standardlistans punkter och indrag. */
aside ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Tar bort standardavstånd mellan listobjekten. */
aside li {
    margin: 0;
    padding: 0;
}

/* Länkarna i sidomenyn. */
aside a {
    display: block;
    padding: 10px 12px;
    
    color: #315F49;
    text-decoration: none;
    text-align: left;
    font-family: 'Inter', sans-serif;
    font-size: 17px;
    font-weight: 600;

    border-left: 4px solid transparent;
    border-radius: 5px;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease;
}

/* Hover-effekt utan att texten flyttar sig. */
aside a:hover {
    background-color: #E3EBE1;
    border-left-color: #315F49;
}

/* Fokusmarkering för tangentbordsanvändare. */
aside a:focus-visible {
    background-color: #E3EBE1;
    outline: 2px solid #315F49;
    outline-offset: -3px;
}

/* Markering av aktuell sida. */
aside a.active {
    background-color: #E3EBE1;
    border-left-color: #315F49;
    color: #273B30;
}


/* ========================================
   8. FOOTER - SIDFOT
   ======================================== */

footer {
    margin-top: auto;

    background-color: #355E4B;
    color: #FFFFFF;

    padding: 15px 0;
    text-align: center;

    /*border-radius: 12px;*/
    box-shadow: 0 3px 10px rgba(35, 65, 48, 0.08);
}

/* Tar bort standardmarginalen runt texten. */
footer p {
    margin: 0;
}


/* ========================================
   9. BILDER OCH LOGOTYPER
   ======================================== */

/* Bilder i innehållsavsnitt. */
.artikelbild {
    display: block;
    width: 100%;
    max-width: 400px;
    height: auto;

    margin: 20px auto;
    border-radius: 8px;
}

/* Logotyp i sidhuvudet. */
.site-logo {
    display: block;
    width: 100%;
    max-width: 450px;
    height: auto;
}

/* Logotyp eller bild i sidomenyn. */
.aside-logo {
    display: block;
    width: 100%;
    max-width: 140px;
    height: auto;

    margin: 24px auto 0;
}

.punk {
    display: block;
    width: 100%;
    height: auto;
    max-width: 200px;
    margin: 0 auto;
}

.aside-psykedelisk {
    display: block;
    width: 100%;
    height: auto;
    margin-top: 24px;
    /*max-width: 200px;*/
}

.bild-vanster {
    float: left;
    width: 200px;
    height: auto;
    margin: 10px 15px 0px 15px;
}

.dogs {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 0 26px 0;
}


/* ========================================
   10. MOBILANPASSNING
   ======================================== */

@media (max-width: 700px) {

    /* Tar bort det yttre indraget på små skärmar. */
    .container {
        padding: 0;
    }

    /* Gör sidhuvudet kompakt. */
    header {
        padding: 20px;
    }

    /* Anpassar huvudrubriken. */
    header h1 {
        font-size: 27px;
    }

    /* Minskar avståndet ovanför menyn. */
    nav {
        margin-top: 12px;
        border-radius: 0;
    }

    /* Anpassar länkarna i huvudmenyn. */
    nav a {
        padding: 12px 15px;
    }

    /* Minskar utrymmet runt huvudinnehållet. */
    main {
        padding: 18px;
    }

    /* Staplar innehåll och sidomeny. */
    .main-layout {
        flex-direction: column;
        gap: 20px;
    }

    /* Innehållet fyller tillgänglig bredd. */
    .sections {
        width: 100%;
    }

    /* Innehållskorten fyller bredden. */
    section {
        width: 100%;
        max-width: 100%;
        padding: 20px;
        margin-bottom: 20px;
    }

    /* Anpassar rubrikerna i innehållet. */
    section h2 {
        font-size: 22px;
    }

    /* Sidomenyn fyller bredden på mobilen. */
    aside {
        width: 100%;
        flex: 0 0 auto;
        padding: 18px;
    }

    /* Anpassar sidomenyns rubrik. */
    aside h2 {
        font-size: 21px;
    }

    /* Gör länkarna lättare att trycka på. */
    aside a {
        padding: 12px;
    }

    /* Anpassar sidfoten. */
    footer {
        padding: 18px;
        border-radius: 0;
    }

    /* Begränsar logotypen på små skärmar. */
    .site-logo {
        max-width: 100%;
    }

    /* Anpassar bilden i sidomenyn. */
    .aside-logo {
        width: 45%;
        max-width: 140px;
    }
    
    .punk {
        max-width: 100%;
    }
    
    .bild-vanster {
        width: 40%;
        max-width: 160px;
    }
    
    .dogs {
        max-width: 100%;
    }    
}

