/* ------------------ Global css rules -------------------- */

/* This resets margin and padding for all html elements. */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* This sets css rules for the html document. /*
/* Can be overwritten by more specific css rules. */
:root {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 10px;
}

h1, h2 {
    font-weight: 500;
}

/* ---------------------------------------------------------*/


/* ----------- Header with main navigation ------------- */ 

.navigation-container {
    padding: 16px 0;
}

.link:hover {
    text-decoration: underline;
    text-decoration-color: #ac2d27;
    -moz-text-decoration-color: #ac2d27;
    text-decoration-thickness: 2px;
}

.link {
    color: black;
    text-decoration: none;
}

.navigation {
    display: flex;

    /* Remove, if you want the navigation to the left */
    /* and the logo to the right. */
    flex-direction: row-reverse; 

    /* Logo and navigation spread to left and right respectively */
    justify-content: space-between; 

    align-items: center; /* Vertical alignment og logo and navigation */
}

.burger-menu {
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.navigation ul.active {
    display: flex;
    position: absolute;
    flex-direction: column;
    width: 100%;
    top: 90px;
    left: 0;
    background-color: white;
    z-index: 1; /* the higher the number, the closer the element is to the user. Default = 0. I set it to one so that the burger menu items are above the logo */
    padding-bottom: 30px;
}

.navigation ul {
    display: none;
}

.navigation ul li {
    line-height: 4;
    text-align: center;
}

.burger-menu .line {
    width: 25px;
    height: 3px;
    background-color: #000;
    margin: 4px 0;
}

.navigation img {
    width: 200px;
}

.active-link {
    color: black;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-decoration-color: #ac2d27;
    -moz-text-decoration-color: #ac2d27;
}

.burger-menu.open .line:nth-child(1) {
    transform: rotate(-45deg) translate(-8px, 7px);
    -webkit-transform: rotate(-45deg) translate(-8px, 7px);
    -moz-transform: rotate(-45deg) translate(-8px, 7px);
    -ms-transform: rotate(-45deg) translate(-8px, 7px);
    -o-transform: rotate(-45deg) translate(-8px, 7px);
} 

.burger-menu.open .line:nth-child(2) { 
    opacity: 0; 
} 

.burger-menu.open .line:nth-child(3) {
    transform: rotate(45deg) translate(-8px, -7px);
    -webkit-transform: rotate(45deg) translate(-8px, -7px);
    -moz-transform: rotate(45deg) translate(-8px, -7px);
    -ms-transform: rotate(45deg) translate(-8px, -7px);
    -o-transform: rotate(45deg) translate(-8px, -7px);
}

/* ----------------------------------------------------- */

/* ------------ Footer with 3 content blocks ----------- */

.footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    gap: 20px;
    margin-top: 70px;
}

.footer img {
    width: 90px;
}

.footer-block {
    width: 240px;
}

.footer-block h3 {
    font-size: 16px;
    margin-top: 0;
}

.footer-block p, .footer-block ul, .footer-block li {
    margin: 5px 0;
}

.footer-block p, .footer-block a {
    font-size: 15px;
    line-height: 2;
}

.footer-block ul {
    list-style-type: none;
    padding: 0;
}

.footer-block a {
    color: black;
    text-decoration: none;
}

/* ----------------------------------------------------- *

/* --------------- Hero image in index.html ------------ */

.hero {
    position: relative;
    width: 100%;
    height: 60vh; /* Changed to half the screen height */
    overflow: hidden;
}

.hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter:opacity(0.8);
    -webkit-filter:opacity(0.9);
}

.hero-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 15px;
    width: 75%;
} 

.hero-text h1 {
    font-size: 22px;
    margin: 0;
}

.hero-text a {
    display: inline-block;
    font-size: 15px;
    padding: 10px 15px;
    margin-top: 20px;
    background-color: #ac2d27;
    color: white;
    border: 0;
    border-radius: 5px;
    text-decoration: none;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    -ms-border-radius: 5px;
    -o-border-radius: 5px;
}
/* ----------------------------------------------------- */

/* ----------------- Cards in index.html --------------- */

.card-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 60px;
    gap: 100px;
}

.card {
    display: flex;
    flex-direction: column;
    width: 320px;
}

.card img {
    width: 320px;
}

.card h3 {
    font-size: 16px;
    margin: 8px 0;
}

.card p {
    font-size: 15px;
    line-height: 2;
}

/* ----------------------------------------------------- */

/* ----------------- Referencer.php ------------------- */

.filter-box {
    background-color: #fff;
    border-radius: 8px;
    padding-bottom: 10px;
    width: 100%;
}

.filter-box select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

.gallery {
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
    grid-auto-flow: dense;
    justify-items: center;
}

.gallery img {
    width: 100%;
    height: auto;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s;
}
.gallery img:hover {
    transform: scale(1.05);
}
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center; 
    align-items: center;
}

.modal-content {
    /* margin: 15% auto; */
    display: block;
    max-width: 90%;
    max-height: 90%;
}

.close {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #fff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

/* ----------------------------------------------------- */

/* ----------------- Om os artikel i omos.html --------------- */

.omos-card-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0 auto;
}

.omos-card-container p {
    margin-top: 16px;
}

.omos-card-container img {
    object-fit: cover;
}

.indehaver {
    font-style: italic;
}

.kvalitet {
    background-color: #ac2d27;
    color: white;
    margin-top: 80px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    padding: 30px;
    gap: 20px;
}

.kvalitet p {
    width: 250px;
}

/* ----------------- MEDIA QUERIES ------------------ */

/* When the screen-width is 675 pixels or wider, */
/* I will change some css rules:  */
@media only screen and (min-width: 675px) {
    .footer {
        align-items: flex-start;
        justify-content: space-between;
        flex-direction: row;
    }

    .footer-block {
        width: auto;
    }

    .card {
        width: 655px;
        flex-direction: row;
        gap: 20px;
        height: 250px;
    }

    .card-reverse {
        flex-direction: row-reverse;
    }

    .navigation img {
        width: auto;
    }

    .card h3 {
        margin: 4px 0;
    }

    .modal-content {
        margin: 50px auto;
    }

    .gallery {
        grid-column-gap: 5px;
    }
}

/* When the screen-width is 768 pixels or wider, */
/* I will change some css rules:  */
@media only screen and (min-width: 768px) {

    /* Hides the burger-menu */
    .burger-menu {
        display: none;
    }

    /* Shows the menu items as a horizontal list */
    .navigation ul {
        list-style: none;
        padding: 0;
        display: flex;
        justify-content: center;
        gap: 20px;
    }

    .link {
        color: black;
    }

    .omos-card-container {
        flex-direction: row;
        gap: 40px;
    }

    .omos-card-container img {
        width: 50%;
    }

    .filter-box {
        width: 300px;
        margin: 0 auto 25px;
    }
}


@media only screen and (min-width: 895px) {
    .hero-text {
        width: 50%;
    }

    .hero-text h1 {
        font-size: 32px;
    }
}

/* --------------------------------------------------- */