/* rem and em do NOT depend on html font-size in media queries!
Instead, 1rem = 1em = 16px */

/**********************************/
/* BELOW 1184px (Landscape tablets) */
/**********************************/

@media (max-width: 74em) {
  .section-hero {
    height: 70rem;
  }

  .hero-text {
    padding: 4.8rem;
  }

  .member-drawing-1 {
    width: 55%;
    transform: translate(20%, 20%);
  }

  .member-drawing-2 {
    width: 50%;
    transform: translateY(8%);
  }
}

/**********************************/
/* BELOW 1008px  */
/**********************************/

@media (max-width: 65em) {
  .primary-heading {
    font-size: 6.4rem;
  }
  .kids-grid {
    row-gap: 1.6rem;
    column-gap: 1.6rem;
  }

  .kids-committee {
    font-size: 3.6rem;
  }

  .member-drawing-1,
  .member-drawing-2 {
    visibility: hidden;
  }

  .members-layout {
    display: flex;
    flex-direction: column;
  }

  .members-committee {
    font-size: 3.6rem;
  }

  .cta {
    display: flex;
    flex-direction: column;
  }

  .cta-img {
    width: 0;
  }

  /* MOBILE NAV */
  .btn-mobile-nav {
    display: block;
    z-index: 9999;
  }

  .nav {
    background-color: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    transform: translateX(100%);
    z-index: 8888;

    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease-in;

    /* HIDE nav */
    opacity: 0;
    /* hide from keyboard */
    pointer-events: none;
    /* hide from screen readers */
    visibility: hidden;
  }

  .nav-open .nav {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translateX(0);
  }

  .nav-open .icon-mobile-nav[name="close-outline"] {
    color: #500000;
    display: block;
  }

  .nav-open .icon-mobile-nav[name="menu-outline"] {
    display: none;
  }

  .nav-list {
    flex-direction: column;
    gap: 4.8rem;
  }

  .nav-link:link,
  .nav-link:visited {
    font-size: 3rem;
    color: #500000;
  }

  .nav-link:active,
  .nav-link:hover {
    font-size: 3.2rem;
  }

  .events {
    grid-template-columns: 1fr 1fr;
  }
}

/**********************************/
/* BELOW 848px  */
/**********************************/

@media (max-width: 53em) {
  .secondary-heading {
    font-size: 4.4rem;
  }

  .hero {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
  }

  .hero-text {
    grid-column: 1 / -1;
    align-content: end;
  }

  .hero-img {
    grid-row: 2;
    width: 75%;
  }

  .hero-img--1 {
    grid-column: 1 / 2;
    justify-self: center;
  }

  .hero-img--2 {
    grid-column: 2 / 3;
    justify-self: center;
  }

  .hero-drawing--1 {
    top: 0%;
    left: 0%;
    transform: translate(0%, 5%);
  }

  .hero-drawing--2 {
    top: 0%;
    right: 50%;
    transform: translate(100%, 5%);
  }

  .kids-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(6, 1fr);
    row-gap: 2rem;
  }

  .kids-img-box {
    width: 80%;
    justify-self: center;
    margin-top: 2.4rem;
  }

  .kids-grid .kids-text-box:nth-of-type(2) {
    order: 2;
  }
  .kids-grid .kids-img-box:nth-of-type(3) {
    order: 3;
  }
  .kids-grid .kids-text-box:nth-of-type(4) {
    order: 4;
  }
  .kids-grid .kids-img-box:nth-of-type(5) {
    order: 5;
  }
  .kids-grid .kids-text-box:nth-of-type(6) {
    order: 6;
  }

  .accordion {
    width: 75%;
  }

  .members-committee-img {
    width: 20.24rem;
    height: 20.24rem;
  }
}

/**********************************/
/* BELOW 720px  */
/**********************************/

@media (max-width: 45em) {
  html {
    /* 8px */
    font-size: 50%;
  }

  .events {
    grid-template-columns: 1fr;
  }

  .event-card {
    width: 75%;
    justify-self: center;
  }
}

/**********************************/
/* BELOW 512px  */
/**********************************/

@media (max-width: 32em) {
  .logo-date {
    font-size: 2.4rem;
    font-weight: 500;
  }

  .secondary-heading {
    font-size: 3.6rem;
  }

  .kids-committee {
    font-size: 3.6rem;
  }

  .kids-committee-description {
    font-size: 2rem;
  }

  .committee-box {
    background-color: #fff;
    flex-direction: column;
    padding: 1.2rem;
    margin: 0;
  }

  .members-text-box {
    background-color: #629fac;
    justify-items: center;
  }

  .members-committee {
    width: 100%;
  }

  .members-committee-description {
    max-width: 100%;
  }

  .members-committee-img {
    order: -1;
    width: 25rem;
    height: 25rem;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    letter-spacing: 1.2;
  }

  .cta-text-box {
    padding: 2.4rem;
  }

  .event-name {
    font-size: 2rem;
  }

  .accordion-number,
  .accordion-question {
    font-size: 1.8rem;
  }

  .accordion-arrow {
    width: 1.8rem;
    height: 1.8rem;
  }

  .grid--footer {
    grid-template-columns: 1fr 1fr;
    row-gap: 2.4rem;
  }

  .logo-col {
    grid-row: 2;
    grid-column: 1 / span 2;
  }
}

/**********************************/
/* BELOW 432px  */
/**********************************/

@media (max-width: 27em) {
  .hero {
    grid-template-rows: 1.5fr 1fr;
  }
}

/**********************************/
/* Fixing safari flexbox gap */
/**********************************/

.no-flexbox-gap .nav-list li:not(:last-child) {
  margin-right: 4.8rem;
}

.no-flexbox-gap .date:not(:last-child) {
  margin-bottom: 1.6rem;
}

.no-flexbox-gap .date-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 .nav-list li:not(:last-child) {
    margin-right: 3.2rem;
  }
}

@media (max-width: 59em) {
  .no-flexbox-gap .nav-list li:not(:last-child) {
    margin-right: 0;
    margin-bottom: 4.8rem;
  }
}
