* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --white: #FFF;
    --dark: #322E40;
    --gray: #D7D4E6;
    --green: #A0B17D;
    --seethrough: #ffffff88;
}

.new-blogpost-button:hover {
    background-color: var(--green);
    color: var(--dark);
    font-weight: 700;
    padding: 0.6rem 2.6rem;
}

.amatic-sc-regular {
    font-family: "Amatic SC", sans-serif;
    font-weight: 400;
    font-style: normal;
  }
  
.amatic-sc-bold {
    font-family: "Amatic SC", sans-serif;
    font-weight: 700;
    font-style: normal;
}
  

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}

a {
    text-decoration: none;
}

.white-link {
    color: var(--white);
}

h1 {
    font-family: "Amatic SC", sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 6rem;
}

h2, h3, h4 {
    font-family: "Amatic SC", sans-serif;
    font-weight: 700;
    font-style: normal;
}

.bold {
    font-weight: 700;
} 

.logo {
    font-family: "Amatic SC", sans-serif;
    font-weight: 700;
    font-style: normal;
    color: var(--white);
    font-size: 2rem;
}

.logo a {
    color: var(--white);
}

.title-index {
    color: var(--white);
    filter: drop-shadow(0 0 0.25rem #322E40);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding-top: 2rem;
    text-align: center;
}

.title-index p i {
    font-size: 2rem;
    padding-top: 1rem;
}
  

header {
    display: flex;
    flex-direction: column;
    width: 100vw;
}

.bg-image {
    background-image: url(https://github.com/elanetto/FED1-PE1-elanetto/blob/main/assets/images/200kb-images/main_image_2_optimized_200.png?raw=true);
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100vh;
    background-size: cover;
}

.bg-image h1 {
    display: flex;
    align-items: center;
    justify-content: center;
}

nav {
    display: flex;
    justify-content: space-between;
    width: 100vw;
    padding: 2rem 4rem;
}

.navigation ul {
    display: flex;
    flex-direction: row;
    gap: 3rem;
}

.navigation ul a {
    color: var(--white);
    filter: drop-shadow(0 0 0.25rem #322E40);
}

.navigation ul a:hover {
    text-decoration: underline;
}

li {
    list-style-type: none;
}

a {
    text-decoration: none;
}

.about-us {
    display: flex;
    align-items: center;
    justify-content: end;
    width: 100vw;
    background-color: var(--green);
    padding: 5rem;
}

.about-us-image {
    width: 600px;
}

.about-text {
    padding-left: 5rem;
    padding-right: 5rem;
    padding-bottom: 4rem;
}

.about-us h2 {
    font-family: "Amatic SC", sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 6rem;
}

/* REGISTER AND LOGIN FORM */

#login-btn {
    margin-top: 2rem;
}

.bg-image-register {
    height: 100px;
}

.register-form-inputs {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.register-form-inputs ul {
    width: 100%;
    padding: 0;
    margin: 0;
}

.register-form-inputs ul li {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem;
    box-sizing: border-box;
    gap: 1rem;
}

.register-form-inputs ul li input {
    width: 200px;
    height: 30px;
    text-align: center;
}

#register-btn {
    align-self: center;
}


.btn-admin, .button {
    background-color: var(--dark);
    color: var(--white);
    padding: 0.6rem 3rem;
    font-size: 1rem;
    border-radius: 6px;
    border-style: none;
    cursor: pointer;
}

.btn-admin {
    margin-bottom: 4rem;
}

.btn-admin:hover {
    background-color: var(--green);
    color: var(--dark);
}

.btn-admin:active {
    background-color: var(--green);
    color: var(--dark);
    font-style: italic;
}

.already-user-text {
    text-align: center;
    font-size: 0.8rem;
}

.register-box {
    background-color: #ffffffab;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    height: 100vh;
}

.register-box h1 {
    text-align: center;
    font-size: 4rem;
}

.welcome-box h1 {
    font-size: 2rem;
}

#register-error, #login-error {
    color: red;
    font-style: italic;
    background-color: #ffffff88;
    padding: 1rem;
    border-radius: 6px;
    display: none;
}

.fa-solid {
    cursor: pointer;
}

.hide {
    display: none;
}

.center-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.center-content-form {
    background-image: url(https://github.com/elanetto/FED1-PE1-elanetto/blob/main/assets/images/200kb-images/main_image_2_optimized_200.png?raw=true);
    background-size: cover;
}

.input-texfield {
    width: 250px;
    height: 2.5rem;
}

/* FOOTER */

footer {
    background-color: var(--dark);
    color: var(--gray);
    width: 100vw;
    display: flex;
    flex-direction: column;
    align-self: flex-end;
    padding: 2rem;
    margin-top: auto;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--gray);
}

.footer-links a:hover {
    text-decoration: underline;
}

#register-error {
    display: none; 
    color: red;
}

#register-success {
    display: none; 
    color: green; 
    background-color: #ffffff88; 
    padding: 1rem; 
    border-radius: 6px;
}

.secret-links a {
    color: white;
    font-style: italic;
    display: flex;
}

.secret-links a:hover {
    text-decoration: underline;
}

.blog-feed {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    background-color: var(--gray);
}

#blog-posts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.blogpost-preview a {
    color: var(--dark);
}

.blogpost-preview:hover {
    text-decoration: underline;
}

.h2-new-size {
    font-size: 3rem;
}

/* karusell */

.background-for-carousel {
    background-color: var(--dark);
}

/* Carousel container */
#carousel-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: auto;
    overflow: hidden;
}

/* Carousel */
#carousel {
    display: flex;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
    background-color: var(--dark);
}

/* Carousel item */
.carousel-item {
    flex: 1 0 100%;
    position: relative;
    overflow: hidden;
    height: 500px;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Carousel title */
.carousel-title {
    color: white;
    filter: drop-shadow(0 0 0.3rem #322E40);
    font-size: 5rem;
    
}

.carousel-post-title {
    display: flex;
    text-align: center;
    justify-content: center;
    align-items: center;
    height: 100%;
}

/* Carousel buttons */
.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
}

#prev-button {
    left: 10px;
}

#next-button {
    right: 10px;
}

/* Dots container */
#dots-container {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
    filter: drop-shadow(0 0 0.25rem #322E40);
}

/* Dots */
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: transparent;
    border: 2px solid white;
    cursor: pointer;
}

.dot.active {
    background-color: white;
}

.carousel-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    height: 400px;
    width: 1000px;
    background-color: #A0B17D;
}

.carousel-image {
    height: 100%;
    width: 100%;
    background-repeat: no-repeat;
    background-size: cover;
}

#carousel-container {
    background-color: var(--dark);
}

#tag-filter {
    padding: .5rem;
    border-radius: 6px;
    border-style: none;
}

#search-input {
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    border-style: none;
}


/* DROPDOWN MENU */

.dropdown-menu {
    display: none;
}

.dropdown-content {
    display: none;
}

/* Small (sm) */
@media (max-width: 750px) {
    .dropdown-menu {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        color: var(--white);
        font-size: 2rem;
        position: relative;
    }
    
    #dropdown-bars {
        align-self: flex-end; /* Align bars to the right */
        cursor: pointer; /* Make it clear that this is clickable */
    }

    .navigation {
        display: none;
    }

    .dropdown-content {
        display: none; 
        align-items: center;
        text-align: center;
        z-index: 1000;
        top: 100%;
        right: -2rem;
        width: 160px;
        background-color: #ffffffe2; 
        padding: 2rem 1rem;
        font-size: 1rem;
        line-height: 3;
        border-radius: 6px;
        box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    }

    .dropdown-content ul {
        padding: 0;
        margin: 0;
    }

    .dropdown-list-item a {
        color: var(--dark);
    }

    .dropdown-list-item a:hover {
        text-decoration: underline;
    }

    /* CAROUSEL */

    .carousel-content {
        height: 300px;
        width: 100vw;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .carousel-title {
        font-size: 3rem;
        text-align: center;
    }

    /* REGISTER SITE */

    .register-box {
        padding: 0rem;
        justify-content: start;
        height: 550px;
    }

    .register-form-inputs ul li {
        padding: 0.5rem;
        flex-direction: column;
    }

    .register-form-inputs ul li input {
        width: 240px;
        height: 35px;
    }

    #password-login, #email-login, #username, #email-register, #password-register {
        text-align: center;
    }

    #register-btn {
        margin-top: 2rem;
    }

    /* POST / BLOGPOST */

    .blogpost-image {
        max-width: 100%;
        height: 200px;
        object-fit: cover;
    }

    .blogpost-content {
        max-width: 100vw;
    }

    .blogpost-tittel-og-forfatter {
        padding: 1rem;
    }

    #admin-buttons-container {
        display: flex;
        flex-direction: column;
        padding: 0 1rem;
    }

    #admin-buttons-container button {
        margin: 0.5rem;
    }

    .top-of-blog-info {
        display: flex;
        padding: 0 1rem;
    }

    #blog-content {
        padding: 1rem;
    }

    .share-btn-div {
        display: block;
    }

    #copy-link-btn {
        margin: 0.5rem;
        text-align: center;
        display: flex;
        align-self: center;
    }

    /* PS: The .share-btn-div has its own @Media in blogpost.css */
   
}


/* Medium (m) */
@media (max-width: 1200px) {

        /* ABOUT US */

        .about-us {
            flex-direction: column-reverse;
            padding-bottom: 0;
            margin-bottom: 0;
            padding: 2rem 0rem;
        }
    
        .about-us-image {
            margin-bottom: 4rem;
            width: 100vw;
        }

}