body {
    margin: 0;
    background-color: rgb(218, 218, 218);
}

header {
    background-color: rgb(0, 50, 119);
    color: rgb(255, 255, 255);
    padding: 20px 15vw;
    font-family: 'Segoe UI', Tahoma, 'Geneva', Verdana, sans-serif;
    display: flex;
    justify-content: space-between;
    height: 70px;
    align-items: center;
}

.logo {
    font-weight: bold;
    font-size: 1.4rem;
    line-height: 1;
}

.menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.mobile-menu {
    display: none;
}

.menu-item {
    margin-right: 2.5em;
}

.menu-item-link::after {
    content: '';
    display: block;
    background-color: transparent;
    width: 100%;
    height: 2px;
    margin-top: 0.25em;
}

.menu-item:last-of-type {
    margin-right: 0;
}

a.menu-item-link {
    text-decoration: none;
    color: white;
    padding: 0 0.5em;   
    display: flex;
    align-items: center;
}

.menu-item:hover > .menu-item-link::after {
    background-color: gold;
}

.has-submenu {
    position: relative;
}

.has-submenu span {
    display: inline-block;
    margin-left: 0.25em;
    font-size: 0.8em;
}

.sub-menu {
    position: absolute;
    background-color: black;
    margin: 0;
    padding: 10px;
    list-style: none;
    left: -10px;
    visibility: hidden;
    opacity: 0;
}

.main-button {
    border-radius: 3rem;
    padding: 0.6em 1em;
    background-color: rgb(0, 191, 255);
    color: white;
    text-decoration: none;
    display: inline-block;
}

.secondary-button {
    border-radius: 3rem;
    padding: 0.6em 1.2em;
    background-color: rgb(83, 83, 83);
    color: white;
    text-decoration: none;
    display: inline-block;
}

.sub-menu .menu-item {
    margin-top: 0.5em;
    white-space: nowrap;
}

.has-submenu:hover .sub-menu {
    opacity: 1;
    visibility: visible;
}

/*--------------- | Cards | --------------*/

.card {
    border: 1.2px grey solid;
    border-radius: 10px;
    transition: all 150ms;  
}

.row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 120px;
    padding: 60px;
    max-width: 1000px;
    margin: 70px auto;
}

.card-img {
    height: 150px;
    overflow: hidden;
    border-top-right-radius: 10px;
    border-top-left-radius: 10px;

}
.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 500ms;
    object-position: 50% 30%;
}

.card-content {
    padding: 20px;
    background-color: white;
}

.card-content h2 {
    margin-top: 0;
}

.card:hover {
    transform: translateY(-3.5px);
    .card-img img {
        transform: scale(1.1);
    }
}

.button {
    border-radius: 4rem;
    padding: 0.8em 1.2em;
    background-color: darkblue;
    color: white;
    text-decoration: none;
    display: inline-block;
    
}

a.button:hover {
    animation: wiggle 300ms linear infinite alternate;
}
@keyframes wiggle {
    0% {transform: rotate(-3.5deg)}
    100% {transform: rotate(3.5deg)}
}

/*--------------- | Dropdown Cards | --------------*/

.intro {
    font-size: 1.3rem;
    line-height: 1.5;
}

.accordion-content {
    height: 0;
    overflow: hidden;
    padding: 0;
    transition: all 200ms;
}

.accordion-content :first-of-type {
    margin: 0;
}

.accordion {
    border-bottom: 1px solid;
}

.accordion-title::before {
    content: "\221F";
    display: inline-block;
    margin-right: 0.6em;
    rotate: -45deg;
    font-size: 1.4em;
    line-height: 0;
}

.accordion.open {
    .accordion-content {
        height: auto;
        padding-bottom: 10px;
    }
    .accordion-title::before {
        rotate: 135deg
    }
}

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

@media screen and (max-width: 1100px) {
    header {
        padding: 20px;
    }
}

@media screen and (max-width: 800px) {
    header {
        z-index: 5;
    }
    nav {
        position: absolute;
        background-color: rgb(0, 191, 255);
        top: 62px;
        width: 100vw;
        left: 0;
        z-index: -1;
        transition: all 200ms;
        transform: translateY(-100%);
    }
    .menu {
        display: block;
        padding: 20px;
    }
    .menu-item {
        margin-right: 0;
        margin-bottom: 1.5em;
    }
    .sub-menu {
        position: static;
        visibility: visible;
        opacity: 1;
        height: 0;
        overflow: hidden;
        padding: 0;
    }
    .has-submenu:hover .sub-menu {
        height: auto;
        padding: 10px;
    }
    .menu-item-link:after {
        display: none;
    }
    nav.open {
        transform: translateY(0);
    }
    .mobile-menu {
        display: block;
    }
}

