@import url('https://fonts.googleapis.com/css2?family=Abel&family=Anton&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Abel&family=Agdasima:wght@400;700&family=Anton&display=swap');

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif ;
    height: 100dvh;
    font-size: clamp(1rem, );
}

h1, h2, h3 {
    font-family: Agdasima, sans-serif;
}

button {
    cursor: pointer;
}


/* try to make only the upper header sticky */
header {
    position: sticky;
    top: 0;
    top: 0;
    position: fixed;
    z-index: 100;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: hsl(0, 0%, 10%);
    padding: 20px min(4rem, 5%);
    gap: 6rem;
}

header a {
    text-decoration: none;
    color: #eee;
}

.upper-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* appear in @media */
.menu-section {
    display: none;
}

/* navigation bar */

    /* upper section of the header */

.upper-header nav {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.upper-header ul.nav-list {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    flex-grow: 1;
    list-style-type: none;
}

.nav-list li {
    padding: 6px 12px;
    border-radius: 15px;
    transition: background-color .2s ease;
}

.nav-list li:hover {
    background-color: hsla(0, 0%, 20%);
}

.nav-list .curr-page {
    color: red;
}

.upper-header .logo {
    color: red;
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    font-size: 2.6rem;
    font-weight: 800;
    border: 2px solid red;
    padding: 2px 8px;
    border-radius: 0 0 15px;
}

    /*===== lower section of the header ======*/

.lower-header {
    position: relative;
    top: 95px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px min(4rem, 5%);
    background-color: hsla(0, 0%, 0%, .2);
    /* background-image: linear-gradient(to left, black 10%, rgb(219, 27, 27)); */
}

.search-section {
    display: flex;
    justify-content: center;
    flex-grow: 1;
    gap: 12px;
}

.lower-header button{
    background: none;
    border: none;
    transition: transform .15s linear;
    padding: 0;
    margin: 0;
}

.lower-header button:hover {
    transform: scale(1.07);
    background: none;
}

.lower-header button img {
    width: 28px;
    height: auto;
}

.lower-header input {
    padding: 2px 16px;
    width: 46%;
    border: none;
    border-radius: 15px;
    box-shadow: inset 0 0 5px hsla(0, 0%, 0%, .2);
    background-color: hsl(0, 0%, 89%);
    font-size: .95rem;
}

.lower-header input:focus {
    background-color: white;
}

 /*---------- icon-section -----------*/

.icon-section {
    display: flex;
    gap: 10px;
}

/* for responsiveness */
.icon-section .search {
    display: none;
}

/* for light and dark toggle */
.icon-section .dark {
    display: none;
}

.author span {
    display: none;
    background-color: #08465d;
    border-radius: 16px;
    padding: 4px 8px;
    font-family: "Abel", sans-serif;
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: .07rem;
    transition: opacity 10s linear;
}

.author:hover {
    opacity: .8;
}

/* ===== footer ====== */

footer {
    background-color: hsla(0, 0%, 12%);
    color: #eee;
    padding-bottom: 80px;
}

footer a {
    color: #eee;
    text-decoration: none;
}

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

.upper-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: start;
    gap: 5vw;
    padding: 40px 5%;
}

/* horizontal separation */
.hr-c {
    display: flex;
    justify-content: center;
}
hr {
    width: 85%;
    border-bottom: 0;
    border-right: 0;
    border-left: 0;
}

.lower-footer {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 40px 5%;
}

.lower-footer p {
    padding-bottom: 10px;
}

.contacts {
    display: flex;
    gap: 15px;
}

.contacts img {
    width: 20px;
    transition: opacity .25s linear;
}

.contacts img:hover {
    opacity: .8;
}

.copyryt {
    padding: 0;
    padding-top: 20px;
    font-weight: 200;
    opacity: .86;
}

/* to top button */
.to-top {
    text-decoration: none;
    font-weight: 400;
    transform: rotate(-90deg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid red;
    border-radius: 10px;
    /* width and height are interchanged because of rotation */
    width: 54px;
    height: 70px;
    margin-right: 22px;
    /* since the button icon is typed directely in the
    html and rotated -90deg, padding right becomes padding bottom */
    padding-bottom: 9px;
    font-size: 2rem;
    position: sticky;
    bottom: 0;
    left: 100%;
    background-image: linear-gradient(to top right, black, red);
    box-shadow: 0 0 4px red;
    color: white;
    z-index: 10;
}
.to-top:hover {
    animation: upDown 1.4s linear infinite;
}

@keyframes upDown {
    50% {
        transform: translateY(-5px) rotate(-90deg);
    }

    100% {
        transform: translateY(0) rotate(-90deg);
    }
}

@media screen and (max-width: 728px) {
    .upper-header nav {
        display: none;
    }
    .upper-header .menu-section {
        display: block;
    }
    .menu {
        background: none;
        border: none;
        border-radius: 0;
        transition: transform .15s linear;
    }
    .menu:hover {
        transform: scale(1.07);
    }
    .menu img {
        width: 28px;
    }
}

@media screen and (max-width: 680px) {
    .search-section {
        display: none;
    }
    .icon-section .search {
        display: block;
    }
    .lower-header {
        justify-content: end;
    }

}

/* this is for making the links visible for users that cant hover(phone users) */
@media screen and (max-width: 568px) {
    footer {
        padding-bottom: 10px;
    }
    footer a {
        text-decoration: underline;
    }
}