/* Stilmall för Basgrupp 3 'Ctr+Alt+Elite's första
gemensamma webbplats, golfklubben. Skapad hösten 2024. */

/* -------------------Globala stilar - stilar som gäller alla sidor. -------------------*/

*   {
    margin: 0;
    padding: 0;
    border: 0;
    box-sizing: border-box;
    column-gap: 10px;
    word-break: break-word;
}

body {
    font-size: 14px;
    line-height: 1.5em;
    color: black;
    justify-content: center;
    align-items: center;
    background-color: #fafffb;
    display: flex;
    flex-direction: column;
    height: 100%;
    font-family: "Poppins", sans-serif;
    font-weight: 300;
    font-style: normal;
}


header {
    color:#111;
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 5em;
    height: 100%;
    display: flex;
    flex-direction: row;
    width: 100%;
    align-items: center;
    background-color: white;
    
}

header .container {
    padding: 0 20px;
}

#menu-toggle, #burger {
    display: none;
}

header img {
    height: 50%;
    max-height: 20px;
    min-height: 10px;

}

.container {
    width:100%;
    max-width:1200px;
    margin:0 auto;
    display:flex;
    align-items:center;
    justify-content: space-between;
}

nav {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    align-items: center;
}

nav a {
    color:inherit;
    font-size: 0.9rem;
    text-decoration: none;
    padding: 1.2em 1em;
    position:relative;
}


nav a:hover {
    color: #13486b;
    
}
nav a:hover::before {
    width:100%;
}

nav a::before {
    transition:.3s;
    content:"";
    width:0;
    height:2px;
    background:#13486b;
    position:absolute;
    bottom:8px;
    left:50%;
    transform:translateX(-50%);
}

#wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 5px;
}

main {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    row-gap: 5px;
    max-width: 1200px;
    background-color: #f0f8f5;
    border-radius: 4px;
    padding: 5px;
}


p {
    font-size: 1rem;
}


h1 {
    font-size: 1.8em;
}


h2 {
    text-align: center;
    font-size: 1.5rem;
    padding-bottom: 10px;
    margin:15px 0 10px;
}

h3 {
    font-size: 1.3rem;
    padding-bottom: 0.2rem;
    text-align: center;
    color: #34775a;
}

h4 {
    font-size: 1.2rem;
    width: 200px;
    padding-bottom: 5px;
    border-bottom: 1px solid white;
}

/*---------------------------------- Slut på globala stilar ----------------------------------*/


/* --------------- Text- och rubrikstilar --------------- */

/* --- Rubriker startsida --- */

#start article h2 {
    color: #34775a;
    margin-bottom: 5px;
    padding-bottom: 5px;
}

#start article section h4 {
    font-size: 1.8rem;
    text-align: center;
    width: 100%;
}

.hero-content-start h1 {
    line-height: 1em;
}

#start .news-item h3 {
    font-size: 1em;
    padding-bottom: 0;
}

#start .memberships h3 {
    font-size: 2.5em;
    border: none;
}


#start .memberships .gold h3 {
    color: #b29900;
    
}


#start .memberships .silver h3 {
    color:  #C0C0C0;

}

#start .memberships .bronze h3 {
    color: #Cd7f32;

}


.hero-image-start h1 {
    font-size: 3rem; /* Stor rubrik */
    margin-bottom: 20px;
}

/* --------------- Stilar för hero-images --------------- */

/* --- Hero-image startsida --- */

.hero-image-start {
    background-image: url("../Images/Start/hero.jpg");
    width: 100%;
    height: 60vh;
    max-height: 600px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}

/* --- Hero-overlay startsida --- */

.hero-overlay-start {
    width:100%;
    height:100%;
    background-color:rgba(0,0,0,0.65);
    position:absolute;
    top:0;
    left:0;
}

/* --- Hero-innehåll startsida --- */

.hero-content-start {
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    width: 100%;
}

.hero-content-start p {
    max-width: 600px;
    margin: 0 auto;
    
}

/* --------------- Knappstilar --------------- */


.hero-image button,
.hero-content-start .button,
.news-item .button, 
.memberships .button,
#restaurant #submit-button,
#about .button {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 0.8rem;
    border: none;
    border-radius: 4px;
    display: inline-block;
    width: 150px;
    max-width: 33%;
    padding: 0.8em 1em;
    color: #fff;
    background-color: #34775a;
    text-align: center;
    cursor: pointer;
    transition: .3s;
    text-decoration: none;
}

.hero-content-start .button {
    margin: 5px;
}

#start .memberships .button,
#start .buttonbox .button {
    max-width: 100%;
    width: 65%;
}



/* --- Hovringsstilar för knappar */

button:hover, 
.news-item .button:hover, 
.memberships .button:hover,
.hero-content-start .button:hover, 
#restaurant #submit-button:hover,
#about .button:hover {
    background-color: #34614d;
}

/* --------------- Artikel-, containers-, formulär-, och sektionsstilar --------------- */


/* --- Gemensamma artikelstilar --- */

article {
    background-color: #ffffff;
    padding: 0 5px 5px;
    height: 100%;
    width: 100%;
    border-radius: 5px;
    border: 1px solid #d3dad7;
    border-radius: 4px;
}

/* --- Artikel pch sektionsstilar för om oss-sdian --- */

#about article {
    display: flex;
    flex-direction: row;
    padding: 10px;
    background-color: #e6ffe8;
}

#about article section {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    width: 100%;
    padding: 10px;
}


/* --- Stilar för bilder och iframes i sektioner på om oss-sida --- */

#about .omul {
    list-style-position: inside;
}

#about section img, 
#about section iframe {
    width: 100%;
}


#about iframe {
    aspect-ratio: 16 / 9;
    max-width: 100%;
}

/* --- Artikel-, sektions-, och containerstilar för startsidan --- */

#start article {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: transparent;
    border: none;
}


#start .news-item,
#start .memberships section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
    border-radius: 4px;
    text-align: left;
}

#start .memberships section {
    padding: 2em 0.8em;
    background-color: #fff;
    border: 0.1em solid #b6e0cea6;
    gap: 1em;
    width: 300px;
}


#start .news-item {
    background-color: #fff;
    border: 0.1em solid #b6e0cea6;
    min-width: 250px;
    min-height: 400px;
}

#start .buttonbox {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.3em;
    width: 100%;
    margin-bottom: 0.5em;
}

#start time {
    font-style: italic;
    font-size: 0.9em;
    display: block;
    text-align: center;
    color: #34614d;
}

#start .heading {
    padding-top: 0.5rem;
    background-color: #b6e0cea6;
    width: 100%;
}

#start .news-content {
    height: 75%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem;
    width: 100%;
}

#start .memberships {
    flex-direction: row;
    justify-content: space-between;
    border-radius: 4px;
    padding: 0.2rem;
    min-height: 400px;
}

#start .price {
    font-size: 1.8em;
    font-weight: 700;
}


#start .memberships .infobox {
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 0.4em;
    height: 100%;
}


/* --- Bildstilar sektion startsida --- */

#start .news-content img {
    max-height: 120px;
    border: 2px solid white;
    border-radius: 4px;
}

#start .news-content iframe {
    aspect-ratio: 16 / 9;
    border: 2px solid white;
    border-radius: 4px;
    max-height: 120px;
}



/* --- Stilar för nyhetsflöde på startsidan --- */

#start .memberships, #start .newsfeed {
    gap: 0.3em;
    display: flex;
    flex-direction: row;
}

#start .newsfeed {
    overflow-x: scroll;
}


#start .newsfeed::-webkit-scrollbar {
    height: 8px;
}

#start .newsfeed::-webkit-scrollbar-thumb {
    background: #34775a;
    border-radius: 2px;
}

#start .newsfeed::-webkit-scrollbar-track {
    background: #f3f3f3;
    box-shadow: inset 0 0 5px #aaaaaa;
    border-radius: 2px;
}

#start .newsfeed::-webkit-scrollbar-thumb:hover {
    cursor: grab;
}




/* ---------- Stilar för sidfot ---------- */


footer {
    flex: 4;
    background-color: #244034;
    width: 100%;
    left: 0;
    bottom: 0;
    position:static;
    justify-content: center;
    color: #fff;
    text-shadow: 1px 1px 3px black;
}

.content {
    display: flex;
    flex-direction: row;
    flex-flow: row wrap;
    justify-content: space-evenly;
    margin: 1.5rem;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.shortcuts, .newsform, .details, .social-media {
    max-width: 200px;
    width: 100%;
}

footer p, address {
    margin: 0, 0.3rem;
    
}

footer a {
    text-decoration: none;
    color: #fff;
}

.shortcuts a:hover {
    border-bottom: 1px solid #e6ffe8;
}

footer h4 {
    margin-bottom: 8px;
}

.social-media {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    width: 200px;
    max-width: 200px;
    height: 44px;
}

/* Skugga när man hovrar */
.social-media img:hover {
    height: 40px;
    transition: 0.4s;
    
}

.newsform input[type=email] {
    width: 90%;
    margin: 5px 0;
    padding: 10px 10px;
    border-radius: 5px;
    box-shadow: inset 0 0 5px #5e5e5e;
}

.newsform input[type=submit] {
    display: inline-block;
    font-family: 'Poppins', Times, serif;
    background-color: #34775a;
    border-radius: 5px;
    font-size: 0.9rem;
    color: #fff;
    margin: 0.3em 0;
    padding: 0.6em 2em;
    text-align: center;
    cursor: pointer;
    transition: .3s;
}

.newsform input[type=submit]:hover {
    background-color: #34614d;
}


@media only screen and (max-width: 980px) {

    body {
        font-size: 14px;
    }

    footer {
        padding-bottom: 1em;
    }

    .container, .content {
        max-width: 980px;
        width: 100%;

    }

    nav a {
        line-height: 1.4em;
    }

    .shortcuts, .newsform, .details, .social-media {
        width: 50%;
        margin-bottom: 1em;
    }



}


@media only screen and (max-width: 768px) {

    nav {
        flex-wrap: nowrap;
        overflow-y: scroll;
    }

    .container, .content {
        max-width: 768px;
        padding: 0 0.5em;
    }
    
    .container nav {
        display: none;
    }

    #burger {
        position: absolute;
        cursor: pointer;
        width: 2rem;
        height: 2rem;
        right: 1rem;
        top: 1rem;
        display: flex;
        justify-content: space-between;
        flex-direction: column;
    }

    #burger > span {
        height: 3px;
        background-color: #000;
        transition: 0.5s;
        z-index: 999;
    }
    
    #menu-toggle:checked ~ #burger > span:nth-child(1) {
        transform: translateY(15px) rotate(45deg);
    }

    #menu-toggle:checked ~ #burger > span:nth-child(2) {
        opacity: 0;
    }
    #menu-toggle:checked ~ #burger > span:nth-child(3) {
        transform: translateY(-14px) rotate(-45deg);
    }
    
    #menu-toggle:checked ~ .container nav {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        padding-top: 5em;
        align-items: center;
        background: #ecfff7;
        width: 100%;
        height: 100vh;
        position: fixed;
        right: 0;
        transition-timing-function: cubic-bezier(10,2,3,1);
        top: 0;
        z-index: 0;
        transition: 0.5s;
    }


    .container nav a {
        font-weight: 400;
        position: relative;
        text-decoration: none;
        color: #000;
        font-size: 1.5rem;
        margin-bottom: 1em;
        padding: 1.2em 1em;
    }


    /* ----------------- Egna stilar för startsida ----------------- */

    #start .news-item,
    #start .memberships section {
        min-width: 250px;
    }

    #start .memberships {
        overflow-x: scroll;
    }

    #start .memberships::-webkit-scrollbar {
        height: 8px;
    }
    
    #start .memberships::-webkit-scrollbar-thumb {
        background: #34775a;
        border-radius: 2px;
    }
    
    #start .memberships::-webkit-scrollbar-track {
        background: #f3f3f3;
        box-shadow: inset 0 0 5px #aaaaaa;
        border-radius: 2px;
    }
    

    /* ----------------- Egna stilar för om oss-sida ----------------- */

    #about article {
        flex-direction: column;
    }


}

@media only screen and (max-width: 480px) {

    .container {
        max-width: 480px;
    }



    main {
        max-width: 480px;
        width: 100%;
    }

    footer .container {
        padding-left: 1em;
        padding-right: 1em;
    }

    .shortcuts {
        max-width: 480px;
        width: 100%;
        display: flex;
        flex-flow: row wrap;
        justify-content: space-evenly;
    }

    .shortcuts a {
        font-size: 1.4em;
        min-width: 30%;
        text-align: left;
        line-height: 1.8em;
    }

    .newsform input[type=submit], .newsform input[type=email]{
        float: left;
    }
    
    .newsform, .details, .social-media {
        max-width: 480px;
        width: 100%;
        text-align: center;
        align-items: center;
        justify-content: center;
    }


    footer h4 {
        text-align: center;
        width: 100%;
        margin: 0.5em auto;
        border-bottom: 1px solid #ffffff5a;
    }



    /* ----------------- Egna stilar för startsida ----------------- */

    .hero-content-start h1 {
        font-size: 2em;
    }
    
    .hero-content-start h2 {
        font-size: 1.3em;
    }

    .hero-content-start p {
        font-size: 1rem;
        max-width: 90%;
    }



}
