/* 
#### points
  # condition in media query tag uses browser default font size 
    i.e 1rem = 16 px not html one set as 10px
  # In some browsers rem in condition has bug so use 
    em instead 
  # 1rem = 1em 
  # rem is root font size and em is current font-size 
  # media query as a rule of thumb should work for 200 to 300px
    range from breakpoint
 */

/*******************************/
/* Small laptops Query(1344px) */
/*******************************/
/* 1366px is an common screen hd so we will choose 
 breakpoint between 1300 to 1366px ,now check for break 
 in this range  */
/* we choose at random 1350 ~1344 */
@media (max-width:84em) {
    .hero {
        max-width: 120rem;
    }

    .heading__primary {
        font-size: 4.4rem;
    }

    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }

}

/***********************************/
/* Landscape tablets Query(1200px) */
/***********************************/
@media (max-width:75em) {

    /* use of our imp responsive unit rem  */
    /* 9px/16px = 56.25%  */
    html {
        font-size: 56.25%;
    }

    .heading__secondary {
        font-size: 3.6rem;
    }

    .heading__tertiary {
        font-size: 2.4rem;
    }

    .grid {
        column-gap: 4.8rem;
        row-gap: 6.4rem;
    }

    .header__nav-list {
        gap: 3.2rem;
    }

    .testimonials__container {
        padding: 4.8rem;
    }
}

/***********************************/
/*  tablets Query(944px) */
/***********************************/

@media (max-width:59em) {

    html {
        /* 8px/16px= 50% */
        font-size: 50%;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 0 8rem;
    }

    .delivered {
        justify-content: center;
        margin-top: 4.8rem;
    }

    .hero__img {
        width: 60%;
    }

    .logo {
        height: 2.4rem;
    }

    .step__number {
        font-size: 6.4rem;
    }

    .meal__content {
        padding: 2.4rem 2.4rem 2.4rem 3.2rem;
    }

    .section-testimonials {
        grid-template-columns: 1fr;
    }

    .gallery {
        grid-template-columns: repeat(6, 1fr);
    }

    .testimonials__container {
        padding: 6.4rem;
    }

    /* extra  */
    .pricing__card {
        width: 83%;
    }

    .cta {
        grid-template-columns: 3fr 2fr;
    }

    .cta__form {
        grid-template-columns: 1fr;
    }

    .button--form {
        margin-top: 1.2rem;
    }

    /* mobile nav handling  */
    .mobile-nav__icon[name="menu-outline"] {
        display: flex;
    }

    .header__nav {
        position: absolute;
        left: 0;
        top: 0;
        background-color: rgba(255, 255, 255, 0.9);
        -webkit-backdrop-filter: blur(5px);
        backdrop-filter: blur(10px);
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100vh;
        width: 100%;
        transition: all 0.3s ease-in;
        transform: translateX(100%);

        /*Hide navigation */
        /* but this allows no transition at all  */
        /* display: none; */
        /* other method */

        /* 1) hide it visually  */
        opacity: 0;
        /* 2) make it unaccessible to mouse and keyboard  */
        pointer-events: none;
        /* 3) hide it from screen readers  */
        visibility: hidden;
    }

    .mobile-nav {
        display: block;
        /* focus mode bug  */
        z-index: 9999;
    }

    .nav-open .header__nav {
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
        transform: translateX(0);
        /* overflow: hidden; */
    }

    .nav-open .mobile-nav__icon[name="close-outline"] {
        display: block;
    }

    .nav-open .mobile-nav__icon[name="menu-outline"] {
        display: none;
    }

    .header__nav-list {
        flex-direction: column;
    }

    .header__nav-link:link,
    .header__nav-link:visited {
        font-size: 3rem;
    }

}

/***********************************/
/*   smaller tablets Query(704px)  */
/***********************************/
@media (max-width:44em) {
    .heading__secondary {
        margin-bottom: 4.8rem;
    }

    .grid--3-cols,
    .grid--4-cols {
        grid-template-columns: repeat(2, 1fr);
    }

    .diets {
        grid-column: 1 / -1;
        justify-self: center;
    }

    .pricing__card {
        width: 100%;
    }

    .grid--footer {
        grid-template-columns: repeat(6, 1fr);
    }

    .footer__nav {
        grid-row: 1;
        grid-column: span 2;
        margin-bottom: 3.2rem;
    }

    .footer__logo,
    .footer__contact {
        grid-column: span 3;
    }
}

/***********************************/
/*  Phones Query(544px)  */
/***********************************/
@media (max-width:34em) {

    .grid--3-cols,
    .grid--2-cols,
    .grid--4-cols {
        grid-template-columns: 1fr;
    }

    .header {
        padding: 0 2.4rem;
    }

    .section-hero {
        padding: 2.4rem 0 6.4rem 0
    }

    .hero {
        padding: 0 4.8rem;
    }

    .button,
    .button:link,
    .button:visited {
        font-size: 1.8rem;
        padding: 1.6rem;
    }

    .delivered__text {
        font-size: 1.4rem;
    }

    .hero__img {
        width: 100%;
    }

    .logos {
        gap: 1rem;
    }

    .logo {
        height: 1.2rem;
    }

    .section-how {
        padding: 6.4rem 0;
    }

    .step__img-box:nth-child(2) {
        grid-row: 1;
    }

    .step__img-box:nth-child(6) {
        grid-row: 5;
    }

    .step__img-box {
        transform: translateY(4.8rem);
    }

    .testimonials {
        grid-template-columns: 1fr;
    }

    .gallery {
        grid-template-columns: repeat(4, 1fr);
    }

    .cta {
        grid-template-columns: 1fr;
    }

    .cta__img-box {
        height: 32rem;
        grid-row: 1;
    }

    .cta__text-box {
        padding: 3.2rem;
    }

}

/***********************************/
/*fix flexbox gap in safari brows  */
/***********************************/

.no-flexbox-gap .main-nav-list li:not(:last-child) {
    margin-right: 4.8rem;
}

.no-flexbox-gap .list-item:not(:last-child) {
    margin-bottom: 1.6rem;
}

.no-flexbox-gap .list-icon:not(:last-child) {
    margin-right: 1.6rem;
}

.no-flexbox-gap .delivered-faces {
    margin-right: 1.6rem;
}

.no-flexbox-gap .meal-attribute:not(:last-child) {
    margin-bottom: 2rem;
}

.no-flexbox-gap .meal-icon {
    margin-right: 1.6rem;
}

.no-flexbox-gap .footer-row div:not(:last-child) {
    margin-right: 6.4rem;
}

.no-flexbox-gap .social-links li:not(:last-child) {
    margin-right: 2.4rem;
}

.no-flexbox-gap .footer-nav li:not(:last-child) {
    margin-bottom: 2.4rem;
}

@media (max-width: 75em) {
    .no-flexbox-gap .main-nav-list li:not(:last-child) {
        margin-right: 3.2rem;
    }
}

@media (max-width: 59em) {
    .no-flexbox-gap .main-nav-list li:not(:last-child) {
        margin-right: 0;
        margin-bottom: 4.8rem;
    }
}