/* Colors

COLORS
70%: white
30%: #6C9A8B  
10%: #F0FFEF

*/


/* Allmänna stilar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: transparent;
}

p, button, h2, h3, h4, a {
    font-family: "Jost", sans-serif;
}

.text-center {
    text-align: center;
}

.button {
    display: block;
    padding: 0.6em 3em;
    background-color: #6C9A8B;
    text-align: center;
    color: white;
    border: 2px solid #6C9A8B;
    border-radius: 10px 0 10px 0;
    font-family: "Jost", sans-serif;
    cursor: pointer;
}

.main_btn {
    width: 100%;
    margin: 2em auto 0 auto;
    font-size: clamp(1rem, 1vw, 2rem);
    cursor: pointer;
}

.main_btn:hover {
    background-color: white;
    color: #6C9A8B;
}
/* Allmänna stilar END */

/* Meny header */
.main_header {
    background-color: #6C9A8B;
    width: 100%;
    height: 75px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 7em 0;
    position: sticky; /* Elementet följer med vid skroll */
    top: 0; /* Stannar vid toppen av skärmen */
    z-index: 1000; /* Gör så att headern hamnar ovanför alla element när den följer med i skroll */
}

.logo_circle {
    width: 250px;
    height: 250px;
    /* Halvcirkel */
    border-radius: 0 0 1000px 1000px;
    background-color: #6C9A8B;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.logo {
    margin-bottom: 2.5em;
}

.menu {
    padding: 0 1.5em;
    width: 25%;
}

.dots_menu {
    padding: 0 1.5em;
    width: 25%;
    text-align: end;
}

.hamburger_btn, .dots_btn, .close_menu_btn {
    background-color: transparent;
    border: none;
}

.hamburger_icon, .dots_icon, .close_menu_icon {
    font-size: 3em;
    color: white;
}

/* Hamburgarmenyns innehåll */
#menu_content {
    display: none;
    width: 100vw;
    background-color: #6C9A8B;
    z-index: 1000; /* Gör så hamburgarmenyns innehåll läggs ovanför alla element */
    position: absolute;
    padding: 0;
    margin: 0;
    left: 0;
    top: 0;
}

.hamburger_menu_header {
    /* Samma höjd som header */
    height: 75px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close_menu_btn {
    /* Samma padding som hamburgarmeny knappen */
    padding: 0 1.5em;
}

.menu_title {
    color: white;
    font-size: clamp(2rem, 7vw, 3rem);
    font-family: "Ubuntu Condensed", sans-serif;
    margin: 0 1em;
}

.menu_items {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
}
.menu_item {
    width: 100%;
    background-color: #6C9A8B;
    border-top: 2px solid white;
    text-decoration: none;
    font-family: "Jost", sans-serif;
    font-weight: bold;
    display: flex;
    align-items: center;
    font-size: clamp(1rem, 1vw, 2rem);
    justify-content: center;
}

.menu_item a {
    text-decoration: none;
    color: white;
    padding: 1em;
    cursor: pointer;
    width: 100%;
}

/* Sätter en border bottom på det sista menylänk elementet */
.menu_item:nth-last-child(1) {
    border-bottom: 2px solid white;
}

.menu_item.active, .menu_item.active a {
    background-color: #F0FFEF;
    color: #6C9A8B; 
}

/* Sökbar i menyn */
.search_bar_menu {
    text-align: center;
    flex-grow: 1;
    margin: 3em 0;
}

.search_bar_input_menu {
    width: 90%;
    padding: 0.8rem 3.5em;
    color: white;
    background: transparent url("../bilder/magnifying-glass-solid-white.svg"); /* Sök ikonen placeras inuti sök input */
    background-repeat: no-repeat;
    background-position: 1em 50%; 
    border: 2px solid white;
    border-radius: 0.5em;
    outline: none;
    transition: border 0.5s;
    font-size: clamp(0.8rem, 1.5vw, 2rem);;
}

/* Placeholder text i sökrutan */
.search_bar_input_menu::placeholder {
    color: white;
    opacity: 0.7;
    /* Samma storlek för att centrera texten vertikalt */
    font-size: clamp(0.8rem, 1.5vw, 2rem);
    line-height: clamp(0.8rem, 1.5vw, 2rem);;
}

.search_bar_input_menu:focus {
    border: 2px solid black;
}
/* Sökbar i menyn END */
/* Hamburgarmenyns innehåll  END */

/* Sökbar under header */
.search_bar {
    text-align: center;
    margin: 2em 0 3em 0;
}

.search_bar_input {
    width: 80%;
    padding: 0.8rem 3em;
    background: transparent url("../bilder/magnifying-glass-solid.svg"); /* Sök ikonen placeras inuti sök input */
    background-position: 1em 50%; 
    background-repeat: no-repeat;
    border: 2px solid #6C9A8B;
    border-radius: 0.5em;
    outline: none;
    transition: border 0.5s;
    font-size: clamp(1rem, 1vw, 1.5rem);
}

/* Placeholder text i sökrutan */
.search_bar_input::placeholder {
    color: black;
    opacity: 0.5;
    /* Samma storlek för att centrera texten vertikalt */
    font-size: clamp(1rem, 1vw, 1.5rem);
    line-height: clamp(1rem, 1vw, 1.5rem);
}

.search_bar_input:focus {
    border: 2px solid black;
}
/* Sökbar under header END */

/* Huvudinnehållets allmäna stiler */
.main_section {
    width: 80%;
    margin: 0 auto;
}

.subheader {
    margin: 2.5em 0 1em 0;
    font-family: "Jost", sans-serif;
    font-size: clamp(1.5rem, 2vw, 2rem);
    color: #6C9A8B;
}
/* Huvudinnehållets allmäna stiler END */

.content_list {
    padding: 1em 0;
}

/* Footer */
.footer {
    min-height: 300px;
    width: 100%;
    background-color: #6C9A8B;
    margin: 10em 0 0 0;
    padding: 2em 1em;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Footermenyns innehåll */
.footer_menu {
    margin: 1em 0;
}

.footer_menu_items {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
}

.footer_menu_item {
    margin: 0.5em 0;
}

.footer_menu_link {
    font-family: "Jost", sans-serif;
    font-size: clamp(1rem, 1vw, 1.5rem);
    font-weight: bold;
    color: white;
    text-decoration: none;
    width: auto;
}

.footer_menu_link:hover {
    color: #F0FFEF;
    text-decoration: underline;
    text-underline-offset: 0.5em;
}

.footer_menu_link_active {
    text-decoration: underline;
    text-underline-offset: 0.5em;
}
/* Footermenyns innehåll */

.footer_logo {
    display: flex;
    flex-direction: column;
    margin: 1em 0;
    align-items: center;
}

.footer_title {
    color: white;
    font-size: clamp(2rem, 7vw, 3rem);
    font-family: "Ubuntu Condensed", sans-serif;
}

.qr_img {
    margin: 1em 0;
}
/* Footer END */

/* Startsida */
.title {
    color: #6C9A8B;
    text-align: center;
    font-family: "Ubuntu Condensed", sans-serif;
    font-size: clamp(1rem, 10vw, 4rem);
    margin: 0 0 1rem 0;
}

.slogan {
    margin: 1em auto 2em auto;
    width: 100%;
    font-family: "Jost", sans-serif;
    font-size: clamp(1.2rem, 1.5vw, 2rem);
    text-align: center;
}

.subheader_btn_container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 4em 0 1em 0;
}

.subheader_btn_container .subheader {
    margin: 0;
}

.subheader_btn {
    background-color: #6C9A8B;
    color: white;
    padding: 0.2em 1em;
    border: 2px solid #6C9A8B;
    border-radius: 5px 0 5px 0;
    text-decoration: none;
    cursor: pointer;
}

.subheader_btn:hover {
    background-color: white;
    color: #6C9A8B;
}

.sh_first {
    margin: 2.5em 0 0.5em 0;
}

.content_links_main {
    display: flex;
    flex-direction: column;
}

.content_link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: black;
    background-color: #F0FFEF;
    margin: 1em 0 0 0;
    text-decoration: none;
    box-shadow: -1px 1px 5px #6C9A8B;
}

/* Hover effekt på artikellänkarna */
.content_link:hover .content_link_arrow, .content_link_aside:hover .content_link_arrow, .lifehack_main:hover .lifehack_main_icon, .sidebar_lifehack:hover .sidebar_lifehack_icon {
    color: black;
    background-color: #F0FFEF;
}

.content_link_arrow {
    background-color: #6C9A8B;
    /* Denna padding styr storleken på artikellänkarna */
    padding: 1.5em;
    color: #F0FFEF;
    transition: background-color 0.3s, color 0.3s;
}

.content_link_header {
    font-size: clamp(0.9rem, 1.1vw, 1.3rem);
    color: rgb(52, 52, 52);
    font-family: "Jost", sans-serif;
    font-weight: 500;
    margin-left: 1em;
}

.show_more_btn_container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2em 0 0 0;
}

/* Visa mer knapp */
.show_more_btn {
    background-color: transparent;
    text-decoration: underline;
    text-underline-offset: 0.5em;
    border: none;
    cursor: pointer;
    font-size: clamp(1rem, 1vw, 2rem);
    font-family: "Jost", sans-serif;
    color: black;
}

/* Visa mer ikon */
.show_more_icon {
    margin-left: 0.5em;
}

/* Lifehack i sidebar */
.sidebar_lifehack {
    display: block;
    width: 100%;
    cursor: pointer;
    background-color:  #F0FFEF;
    text-decoration: none;
}

.sidebar_lifehack_content {
    padding: 2em 1em;
}

.sidebar_lifehack_icon {
    width: 100%;
    background-color: #6C9A8B;
    text-align: end;
    color: white;
    padding: 1em 1em;
    transition: background-color 0.3s, color 0.3s;
}

/* Lifehack på startsidan */
.lifehack {
    background-color: #F0FFEF;
    padding: 2em 1em;
    width: 100%;
    display: block;
    position: relative;
    box-shadow: -1px 1px 5px #6C9A8B;
    text-decoration: none;
}

.lifehack_main {
    display: block;
    justify-content: space-between;
    align-items: center;
    background-color: #F0FFEF;
    width: 100%;
    position: relative;
    box-shadow: -1px 1px 5px #6C9A8B;
    cursor: pointer;
    text-decoration: none;
}

.lifehack_main_content {
    padding: 2em 1em;
}

.lifehack_main_icon {
    background-color: #6C9A8B;
    padding: 1em 1em;
    color: white;
    transition: background-color 0.3s, color 0.3s;

    text-align: end;
    width: 100%;
}

.lifehack_header {
    margin: 0 0 0.5em 0;
    font-family: "Jost", sans-serif;
    font-size: clamp(1.2rem, 1.5vw, 1.5rem);
    color: #6C9A8B;
}

.lifehack_text {
    font-family: "Barlow", sans-serif;
    color: black;
}

/* Livshändelser */
.life_events {
    display: grid;
    grid-template-columns: 100%;
    width: 100%;
    justify-content: center;
    gap: 1em;
}

.life_event {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    width: 100%;
    text-decoration: none;
    color: black;
}

.life_event:hover .life_event_icon {
    background-color: #6C9A8B;
    color: white;
}

.life_event:hover .life_event_img {
    opacity: 0.8;
}

.life_event_img {
    max-width: 100%;
    height: 150px;
    object-fit: cover;
    transition: opacity 0.3s;
}

/* Samma som bildens höjd för ta bort mellanrummet mellan texten nedanför */
.life_event_picture {
    height: 150px;
}

.life_event_title_container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #6C9A8B;
}

.life_event_title {
    margin-left: 1em;
    color: white;
    font-size: clamp(1rem, 1.2vw, 1.5rem);
    font-family: "Jost", sans-serif;
    font-weight: 500;
}

.life_event_icon {
    background-color: #F0FFEF;
    /* Padding här styr storleken på knappen */
    padding: 1rem;
    font-size: 1em;
    transition: background-color 0.3s, color 0.3s;
}
/* Livshändelser END */

/* Lifehackssida */
.lifehack_collection {
    display: grid;
    grid-template-columns: 100%;
    gap: 1em;
    margin: 2em 0 1em 0;
}

.lifehack_daily {
    margin: 4em 0;
}

.lifehack_daily_header {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #6C9A8B;
    font-family: "Jost", sans-serif;
    font-size: clamp(0.7rem, 1.2vw, 1.2rem);
    width: auto;
    padding: 0.5em 1em;
    color: white;
}
/* Lifehackssida END */

.sidebar {
    display: none;
}
/* Startsida END */

/* Kategorisidor */
.category_header {
    background-color: #6C9A8B;
    color: white;
    padding: 0.7em 0;
    text-align: center;
    font-family: "Jost", sans-serif;
    font-size: clamp(1.3rem, 1.8vw, 2rem);
    width: 100%;
    margin: 2.5em 0 1em 0;
}

.sort_btns {
    display: flex;
}

.sort_btn {
    background-color: transparent;
    border: none;
    padding: 1em 0 1em 0;
    margin: 0 2em 0 0;
    font-family: "Jost", sans-serif;
    font-size: clamp(1rem, 1vw, 1.5rem);
    color: black;
}

.sort_btn.active {
    text-decoration: underline;
    text-underline-offset: 0.5em;
}

.sort_btn:nth-last-child(1) {
    margin: 0 0 0 auto;
}

.content_links_navigation {
    display: flex;
    justify-content: center;
    margin: 2.5em 0 1em 0;
    width: 100%;
}

.content_links_navigation_btn {
    font-family: "Jost", sans-serif;
    font-size: clamp(0.9rem, 1vw, 1.3rem);
    padding: 0.4em 1.5em;
    background-color: transparent;
    border: none;
    color: black;
}

.content_links_navigation_btn.active {
    background-color: #6C9A8B;
    color: white;
}

.content_links_navigation_btn.next {
    margin-left: auto;
}

.content_links_navigation_btn.previous {
    margin-right: auto;
}

.content_links_navigation_btn.next, .content_links_navigation_btn.previous {
    background-color: transparent;
    color: #6C9A8B;
    border: 2px solid #6C9A8B;
    border-radius: 5px 0 5px 0;
}
/* Kategorisidor END */

/* Artikelsida */
.article_title {
    margin: 2em 0 0.5em 0;
    font-family: "Jost", sans-serif;
    font-size: clamp(1.9rem, 2.5vw, 3rem);
    color: #6C9A8B;
}

.article_body {
    margin: 1em 0;
}

.article_header {
    font-family: "Jost", sans-serif;
    color: #6C9A8B;
    margin: 1.5em 0 0.5em 0;
}

.article_paragraph {
    font-family: "Barlow", sans-serif;
}

.article_list {
    margin-left: 1em;
}

.article_list_item {
    font-family: "Barlow", sans-serif;
    margin: 0.5em 0;
}

.article_img {
    max-width: 100%;
    padding: 1em 0;
}

.line_divider {
    background-color: #6C9A8B;
    height: 0.2em;
    width: 100%;
    margin: 4em 0 2em 0;
}
/* Artikelsida END */

/* Display none element */
/* Klasser som används för att visa och inte visa innehåll beroende på skärmstorlek */
.none_small {
    display: none;
}

.none_medium {
    display: flex;
}
/* Display none element END */

/* MEDIA QUERIES */

/* Ändringar som börjar när storleken är större än mobilen */
/* Justerar för det mesta designen av dagens lifehack */
@media (min-width: 500px) {
    .main_btn {
        width: 80%;
    }

    /* Justering av dagens lifehack */
    .lifehack_main {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background-color: #F0FFEF;
        width: 100%;
        position: relative;
        box-shadow: -1px 1px 5px #6C9A8B;
        cursor: pointer;
        text-decoration: none;
    }
    
    .lifehack_main_content {
        padding: 0 1.5em;
    }
    
    .lifehack_main_icon {
        width: auto;
        background-color: #6C9A8B;
        padding: 5em 1em;
        color: white;
        transition: background-color 0.3s, color 0.3s;
    }

    .life_events {
        grid-template-columns: repeat(2, 1fr);
    }

    .life_event_icon {
        background-color: #F0FFEF;
        padding: 1em;
        font-size: 1em;
    }
    /* Justering av dagens lifehack END */

}

/* Ändringar för lite större skärmar, tablets */
@media (min-width: 700px) {
    .main_btn {
        width: 30%;
    }

    .content_links_main {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .content_link {
        width: 48%;
    }

    .content_link:nth-child(odd) {
        margin: 1em 2% 0 0;
    }

    .content_link:nth-child(even) {
        margin: 1em 0 0 2%;
    }

    /* Justerar layout för grid element, livshändelser */
    .life_events {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Kategorisidor */
    .content_links_navigation_btn.next {
        margin-left: 4em; 
    }
    .content_links_navigation_btn.previous {
        margin-right: 4em;
    }
    /* Kategorisidor END */

    /* Lifehacks sida */
    .lifehack_collection {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1em;
        margin: 2em 0 1em 0;
    }
    /* Lifehacks sida END */

    .footer {
        padding: 2em 3em;
        flex-direction: row;
        justify-content: space-between;
    }

    /* Ändrar ordningen på elementen i footer menyn, QR koden läggs i mitten */
    .footer_menu {
        order: 1;
        width: 25%;
    }

    .footer_logo {
        order: 3;
        width: 25%;
    }

    .qr_img {
        order: 2;
    }

    /* Visar element som döljs på mindre skärmar */
    .none_small {
        display: flex;
    }

    /* Döljer element som visas på mindre skärmar men inte större */
    .none_medium {
        display: none;
    }
}

/* Justerar layout av livshändelser som ligger i en grid */
@media (min-width: 900px) {
    .life_events {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Ändringar för stora skärmar, laptops */
@media (min-width: 1100px) {

    /* Meny förändringar vid större skärmar, flyttar och visar menyn i headern */
    .main_header {
        justify-content: start;
        margin: 0 0 5em 0;
        position: initial;
    }

    /* Ändrar halvcirkeln position och utseende */
    .logo_circle {
        order: 1;
        margin: 0;
        width: 200px;
        height: 200px;
        /* Kvarts cirkel */
        border-radius: 0 0 1000px 0;
        justify-content: start;
        align-self: flex-start;
        align-items: center;
    }

    .logo {
        margin-left: 0.5em;
    }

    /* Döljer hamburgarmeny ikonen och annat innehåll */
    .hamburger_btn, .hamburger_menu_header, .search_bar_menu {
        display: none;
    }

    .menu {
        order: 2;
        height: 100%;
        width: auto;
    }

    #menu_content {
        display: block!important; /* Sätter important för att overwrita javascript funktionen som sätter display: none */
        width: auto;
        background-color: transparent;
        z-index: initial;
        position: initial;
        padding: 0;
        margin: 0;
        height: 100%;
    }

    .menu_items {
        display: flex;
        flex-direction: row;
        align-items: center;
        text-align: center;
        width: auto;
    }

    .menu_item {
        width: auto;
        background-color: transparent;
        border-top: none;
        height: 100%;
    }

    .menu_item a {
        display: flex;
        align-items: center;
        height: 100%;
        padding: 1em 1.2em;
    }

    .menu_item:nth-last-child(1) {
        border-bottom: none;
    }

    .menu_item:hover a {
        color: #6C9A8B; 
        background-color: #F0FFEF
    }
    
    .menu_item.active, .menu_item.active a {
        background-color: #F0FFEF;
        color: #6C9A8B; 
    }

    .dots_menu {
        order: 4;
        width: auto;
        /* Flyttar elementet längst till höger */
        margin-left: auto;
    }

    .dots_icon {
        font-size: 2em;
    }
    /* Meny förändringar vid större skärmar END */

    /* Main 1100px */
    .main_section {
        display: flex;

    }

    .main_content {
        width: 70%;
    }

    /* Justerar layout på grid elementen */
    .life_events {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Visar sidebar på större skärmar */
    .sidebar {
        display: flex;
        flex-direction: column;
        justify-content: start;
        width: 30%;
        /* 4em padding är för att elementet ska ligga i linje medhuvudinnehåll, plussat på marginaler som elementen bredvid har */
        margin: 4em 0 0 5em;
    }

    .sidebar_item {
        margin: 4em 0;
    }

    .sidebar_content:nth-child(1) .sidebar_item, .sidebar_item:nth-child(1) .subheader  {
        margin: 0 0 1em 0;
    }

    .sidebar_item .subheader {
        font-size: clamp(1.3rem, 1.8vw, 1.8rem);
    }

    .sidebar_lifehack {
        display: block;
        width: 100%;
        cursor: pointer;
        background-color:  #F0FFEF;
        text-decoration: none;
    }
    
    .sidebar_lifehack_content {
        padding: 2em 1em;
    }
    
    .sidebar_lifehack_icon {
        width: 100%;
        background-color: #6C9A8B;
        text-align: end;
        color: white;
        padding: 1em 1em;
        transition: background-color 0.3s, color 0.3s;
    }

    .none {
        display: none;
    }

    .sidebar_btn {
        margin: 1em 0;
        width: 50%;
    }

    .content_links_aside {
        display: flex;
        flex-direction: column;
    }

    .content_link_aside {
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        color: black;
        background-color: #F0FFEF;
        margin: 0.5em 0;
        text-decoration: none;
    }

    .search_bar_input {
        width: 50%;
    }

    .footer {
        padding: 2em 8em;
    }
}

/* Ökar padding i menylänkarna vid stora skärmar, innan var dom anpassade för att få plats tills att menyn går till hamburgaremeny */
@media (min-width: 1300px) {
    .menu_item a {
        padding: 1em 1.5em;
    }
}

/* MEDIA QUERIES END */




/* Stilar för att visa knappar/länkar som ej går att trycka på */
.nonclickable {
    transition: background-color 0.3s, color 0.3s;
}

.nonclickable:hover, .content_link:hover .nonclickable, .life_event:hover .nonclickable, .content_link_aside:hover .nonclickable {
    background-color: rgb(197, 197, 197);
    cursor: default;
    color: white;
    opacity: 1;
}

.button:hover, .subheader_btn_nonclickable:hover {
    border-color: rgb(197, 197, 197);
    background-color: rgb(197, 197, 197);
    cursor: default;
    color: white;
}