@media (min-width: 800px) {
    @media (min-height: 950px) { /*if the device has at least 800 of w, and 800 h*/
        .title { margin-bottom: 250px;}
    }
}

@media (max-width: 860px) {
    header {
        grid-template-areas:
        "logo button"
        "topics topics";
        row-gap: 20px;
        justify-content: center;
        padding: 50px 60px 40px 60px;
    }
    .topics {
        margin-left: 0px;
        padding: 0;
        margin-inline: 0px;
    }

    .title { margin-bottom: 100px;}
}

@media (max-width: 540px) {
    body {
        background: var(--background) url(../assets/blur-mobile.png) no-repeat bottom;
        background-size: cover;
    }

    .logo{
        height: 33px;
        width: 171px;
        background: url(../assets/logo-mobile.svg) no-repeat;
    }

    .hamburger {
        grid-area: hamburguer;
        width: 24px;
        height: 8px;
        background-image: url(../assets/menu-buguer-open.svg);
    }

    .logo, .hamburger {
        margin: 37px 25px 37px 25px;
    }

    header {
        grid-template-areas:
        "logo hamburguer"
        "topics topics";
        justify-content: space-between;
        padding: 0px;
        row-gap: 0;
    }

    .button {display: none;}

    .topics {
        display: flex;
        flex-direction: column;
        gap: 0px;
        position: absolute;
        top: 0px;
        width: 100%;
        opacity: 0;
        transform: translateY(250px);
        transition: all 0.5s ease-in-out;
        z-index: -1;
        cursor: default;
    }

    .radio {
        padding: 15px 30px;
        border-top: 1px solid var(--border);
    }

    .radio:last-child {
        border-bottom: 1px solid var(--border);
    }

    input[type="radio"]:checked + .radio {
        border-left: 5px solid var(--button);
        border-bottom: none;
        font-weight: 700;
        padding: 15px 25px;
    }

    main {
        grid-template-areas:
        "title"
        "image";
        justify-items: center;
    }

    .title {
        font-weight: 700;
        font-size: 24px;
        margin-bottom: 0px;
    }

    .coffee-image {width: 390px;}
    
    .new-button {
        all: unset;
        border: 1px solid var(--button);
        width: 172px;
        height: 37px;
        border-radius: 6px;
        color: var(--text-color);
        font-family: 'Manrope';
        font-weight: 700;
        font-size: 11px;
        letter-spacing: 0.02em;
        cursor: pointer;
        margin-bottom: 98px;
        z-index: 1;
    }

    .new-button::after {
        content: '';
        height: 13px;
        width: 8px;
        display: inline-block; /*to display the full size of the box*/
        margin-left: 10px;
        vertical-align: bottom;
        background-image: url(../assets/arrow.svg);
    }

    .new-button:hover {
        background-color: var(--button);
        box-shadow: 0px 0px 6px var(--button);
    }

    p {
        color: var(--text-color);
        display: flex;
        justify-content: center;
        font-family: 'Manrope';
        font-size: 30px;
        font-weight: 700;
        margin: 88px 27px 88px 27px;
    }

    /* hamburger menu */

    .hamburger {cursor: pointer;}

    body.open {
        background: var(--background);
    }

    body.open main {display: none;}

    body.open .hamburger {
        width: 18px;
        height: 18px;
        background-image: url(../assets/menu-buguer-close.svg);
    }

    body.open .topics {
        z-index: 1;
        margin-top: 107px;
        opacity: 1;
        transform: translateY(0px);
    }

    body.open label {
        cursor: pointer;
    }
}

@media (max-width: 390px) {
    .coffee-image {width: 275px;}

    .title {font-size: 18px;}

    p {
        font-size: 22px;
        margin: 60px 27px 60px 27px;
    }

    .new-button {
        margin-bottom: 65px;
    }
}