*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    border-top: 10px solid #5d80a6;
}

body {
    display: flex;
    flex-direction: column;
    padding-left: 20px;
    padding-right: 20px;
    font-size: 16px;
    font-family: 'Lato', sans-serif;
    background-color: #edf0f4;
}

body::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../assets/backg.svg");
    opacity: 0.1;
    z-index: -1;
}

header {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 0.5px solid #5d80a6;
}

header img {
    height: 30px;
    width: auto;
}

header p {
    font-size: small;
    text-align: center;
}

#filters {
    display: flex;
    flex-direction: column;
    margin-bottom: 40px;
}

.select-wrap {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 400px;
}

select {
    appearance: none;
    background-color: transparent;
    border: none;
    padding: 0 2.25em 0 0;
    margin: 0;
    width: 100%;
    font-family: inherit;
    font-size: inherit;
    cursor: inherit;
    line-height: inherit;
}

select:focus {
    outline: 1px solid #5d80a6;
    border-radius: 20px;
}

label {
    font-weight: bold;
    margin-bottom: 5px;
    display: inline-block;
    color: #5d80a6;
}

.fa-square-caret-down {
    color: #5d80a6;
}

.select-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #5d80a6;
    font-size: 1.1em;
}

#hr-select {
    width: 100%;
    max-width: 400px;
    padding: 10px 12px;
    font-size: 16px;
    border-radius: 6px;
    background-color: #ffffff;
    color: #5d80a6;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-shadow: 0 2.5px 0 #5d80a6;
    border: 1.5px solid #5d80a6;
}

#hr-select:focus {
    border-color: #5d80a6;
    box-shadow: 0 0 2px #5d80a66e;
    outline: none;
        box-shadow: 0 2.5px 0 #5d80a6;
    border: 1.5px solid #5d80a6;
}

#hr-select optgroup {
    font-weight: bold;
    color: #333;
        box-shadow: 0 2.5px 0 #5d80a6;
    border: 1.5px solid #5d80a6;
}

#hr-select option:hover {
    background-color: #f0f0f0;
        box-shadow: 0 2.5px 0 #5d80a6;
    border: 1.5px solid #5d80a6;
}

h1,
h2 {
    color: #5d80a6;
}


article {
    height: auto;
    background-color: #ffffff;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    filter: drop-shadow(5px 5px 10px #0000002c);
    margin-bottom: 40px;
    box-shadow: 0 2.5px 0 #5d80a6;
    border: 1.5px solid #5d80a6;
}

article img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 20px 20px 0 0;
    border-bottom: 5px solid #5d80a6;
}

.article-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
}

article p {
    width: 90%;
    line-height: 1.5;
}

.tags ul {
    display: flex;
    flex-direction: row;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
    flex-wrap: wrap;
}

.tags li {
    background-color: #5d80a6;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    box-shadow: 0 2.5px 0 #d4dadf;
}

.article-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.article-link:focus {
    outline: 1px solid #5d80a6;
    border-radius: 20px;
}

#caseStudies article:hover,
.article-link:hover {
    transform: translateY(-6px);
    transition: transform 180ms ease;
    cursor: pointer;
}

#caseStudies article {
    transition: transform 180ms ease;
}

article a {
    text-decoration: none;
    color: black;
}

footer {
    background-color: #5d80a6;
    width: 100%;
    color: white;
    padding: 40px 20px;
}

.footer .container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
}

.footer-section {
    flex: 1 1 300px;
}

.footer-section p {
    font-size: small;
}

.footer h3,
.footer h4 {
    margin-bottom: 10px;
    font-weight: 600;
}

.footer p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-links a {
    color: #fff;
    text-decoration: underline;
    border-bottom: 1px solid transparent;
    transition: 0.2s ease;
}

.footer-links a:hover {
    border-bottom: 1px solid #fff;
}

/* Mediaqueries */
@media (min-width: 768px) {
    header {
        width: 100%;
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
    }

    header img {
        height: 30px;
        width: auto;
    }

    #articles {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 20px;
    }
}

@media (min-width: 992px) {
    #articles {
        grid-template-columns: repeat(2, 1fr);
    }

    body {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        min-height: 100vh;
    }

    main {
        width: 80%;
    }
}