/* ************************************ */
/* BELOW 1344px */
/* ************************************ */
@media (min-width: 94em) {
  #slider {
    width: 74%;
    max-width: 116rem;
  }

  .apartment-content {
    gap: 2rem;
  }

  .image-grid {
    gap: 1.2rem;
  }
}

@media (max-width: 84em) {
  .hero {
    max-width: 120rem;
  }

  .heading-primary {
    font-size: 4.4rem;
  }

  .gallery {
    gap: 0.7rem;
  }
}

/* Media Query for 940px to 1340px */
@media (min-width: 940px) and (max-width: 1340px) {
  .btn-group {
    justify-content: center;
    width: 100%;
  }

  .btn {
    flex: 1;
    max-width: 200px;
    /* Adjust the max-width as needed */
  }
}

@media (max-width: 768px) {
  .apartment-wrapper {
    flex-direction: column;
    align-items: flex-start;
  }

  .apartment-details {
    margin-left: 0;
    margin-top: 1rem;
  }
}

@media screen and (max-width: 900px) {

  #slide1:checked~#controls label:nth-child(2),
  #slide2:checked~#controls label:nth-child(3),
  #slide3:checked~#controls label:nth-child(1),
  #slide1:checked~#controls label:nth-last-child(2),
  #slide2:checked~#controls label:nth-last-child(3),
  #slide3:checked~#controls label:nth-last-child(1) {
    margin: 0;
  }

  #slides {
    max-width: calc(100% - 140px);
    margin: 0 auto;
  }
}

/* ************************************ */
/* BELOW 1200px */
/* ************************************ */
@media (max-width: 75em) {
  html {
    font-size: 56.25%;
  }

  .grid {
    column-gap: 4.8rem;
    row-gap: 6.4rem;
  }

  .heading-secondary {
    font-size: 3.6rem;
  }

  .heading-tretiary {
    font-size: 2.4rem;
  }

  .header {
    padding: 0 3.2rem;
  }

  .main-nav-list {
    gap: 3.2rem;
  }

  .hero {
    gap: 4.8rem;
  }

  #slider {
    width: 86%;
  }

  .testimonials-container {
    padding: 9.6rem 3.2rem;
  }
}

/* ************************************ */
/* BELOW 944px  (TABLETS) */
/* ************************************ */
@media (max-width: 59em) {
  html {
    font-size: 50%;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 0 8rem;
    gap: 6.4rem;
  }

  .hero-text-box,
  .hero-img-box {
    text-align: center;
  }

  .hero-img {
    width: 60%;
  }

  .delivered-meals {
    justify-content: center;
    margin-top: 3.2rem;
  }

  .logos img {
    height: 2.4rem;
  }

  .step-number {
    font-size: 7.4rem;
  }

  .meal-content {
    padding: 2.4rem 3.2rem 3.2rem 3.2rem;
  }

  .section-testimonials {
    grid-template-columns: 1fr;
  }

  .apartment-content {
    flex-direction: column;
    gap: 1.2rem;
  }

  #slider {
    width: 92%;
  }

  .gallery-container {
    flex-direction: column;
    gap: 2.4rem;
  }

  .gallery-left,
  .gallery-right {
    width: 100%;
  }

  .gallery {
    padding-right: 0;
  }

  .lightbox-nav {
    width: 4.2rem;
    height: 4.2rem;
    font-size: 2.8rem;
  }

  .slider-arrow {
    width: 3.4rem;
    height: 3.4rem;
  }

  .slider-arrow-left {
    left: -4rem;
  }

  .slider-arrow-right {
    right: -4rem;
  }

  .cta {
    grid-template-columns: 3fr 2fr;
  }

  .cta-form {
    grid-template-columns: 1fr;
  }

  .btn--form {
    margin-bottom: 1.2rem;
  }

  /* MOBILE NAVIGATION */
  .btn-mobile-nav {
    display: block;
    z-index: 9999;
  }

  .main-nav {
    background-color: rgba(50, 67, 54, 0.897);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(10px);
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    transform: translateX(100%);
    z-index: 9998;

    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 500ms ease-in;

    /* Hide navigation */

    /* 1) hide element visually */
    opacity: 0;

    /* 2) Make it unaccesible to mouse and keybord */
    pointer-events: none;

    /* 3) hide it from screen readers */
    visibility: hidden;
  }

  .nav-open .main-nav {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translateX(0);
  }

  .nav-open .icon-mobile-nav[name="close-outline"] {
    display: block;
  }

  .nav-open .icon-mobile-nav[name="menu-outline"] {
    display: none;
  }

  .main-nav-list {
    flex-direction: column;
    gap: 4.8rem;
  }

  .main-nav-list:link,
  .main-nav-list:visited {
    font-size: 3rem;
  }
}

/* ************************************ */
/* BELOW 704px  (TABLETS) */
/* ************************************ */

@media (max-width: 44em) {

  .grid--3-cols,
  .grid--4-cols {
    grid-template-columns: repeat(2, 1fr);
  }

  .diets {
    grid-column: 1 / -1;
    justify-self: center;
  }

  .heading-secondary {
    margin-bottom: 4.8rem;
  }

  .pricing-plan {
    width: 100%;
  }

  .grid-footer {
    grid-template-columns: repeat(6, 1fr);
  }

  .logo-col,
  .address-col {
    grid-column: span 3;
  }

  .nav-col {
    grid-row: 1;
    grid-column: span 2;
    margin-bottom: 3.2rem;
  }

  .history-container {
    flex-direction: column;
    align-items: stretch;
  }

  .history-left {
    display: none;
  }

  .history-right {
    width: 100%;
  }

  .history-coa {
    display: block;
    width: 10rem;
    height: auto;
    margin: 0 auto 1.6rem;
  }

  .contact-content {
    flex-direction: column;
    align-items: stretch;
  }

  .contact-info {
    order: 1;
    padding-top: 2.4rem;
  }

  .contact-map {
    order: 2;
    width: 100%;
  }

  .contact-map iframe {
    height: 32rem;
  }

  /* .logo-col,
  .address-col {
    grid-row: 2;
  } */
}

/* ************************************ */
/* BELOW 544px  (TABLETS) */
/* ************************************ */

@media (max-width: 34em) {
  .grid {
    row-gap: 4.8rem;
  }

  .grid--2-cols,
  .grid--3-cols,
  .grid--4-cols {
    grid-template-columns: repeat(1, 1fr);
  }

  .slider-arrow {
    width: 3rem;
    height: 3rem;
  }

  .slider-arrow-left {
    left: -3rem;
  }

  .slider-arrow-right {
    right: -3rem;
  }

  .btn,
  .btn:link,
  .btn:visited {
    padding: 2.4rem 1.6rem;
  }

  .section-hero {
    padding: 2.4rem 0 4.8rem 0;
  }

  .hero {
    padding: 0 2rem;
  }

  .logo-big {
    width: min(88vw, 36rem);
    max-width: 88vw;
    max-height: none;
    height: auto;
  }

  .btn-group {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 1.2rem;
  }

  .margin-right-sm {
    margin-right: 0 !important;
  }

  .hero-img {
    width: 80%;
  }

  .footer {
    height: auto;
    padding: 1.6rem 1.2rem;
  }

  .grid--footer {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .logo-col,
  .info-col {
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .copyright {
    font-size: 1.1rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  .logos img {
    height: 1.2rem;
  }

  .step-img-box:nth-child(2) {
    grid-row: 1;
  }

  .step-img-box:nth-child(6) {
    grid-row: 5;
  }

  .step-igm-box {
    transform: translateY(2.4rem);
  }

  .testimonials {
    grid-template-columns: 1fr;
  }

  .section-apartments .container {
    padding: 0 1.2rem;
  }

  #slider {
    width: 100%;
    max-width: none;
    border-radius: 1.2rem;
  }

  .apartment-content {
    flex-direction: column;
    height: auto;
    gap: 1rem;
  }

  .apartment-images {
    width: 100%;
    height: auto;
  }

  .image-grid {
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    gap: 0.8rem;
    padding: 0.8rem;
  }

  .image-grid img {
    aspect-ratio: 1 / 1;
  }

  .apartment-details {
    text-align: center;
    flex: 0 0 auto;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .slider-arrow {
    display: none;
  }

  .gallery {
    gap: 1.2rem;
  }

  .cta {
    grid-template-columns: 1fr;
  }

  .cta-img-box {
    height: 32rem;
    grid-row: 1;
  }

  .cta-text-box {
    padding: 3.2rem;
  }
}

/* ************************************ */
/* FIXING SAFARI FLEXBOX GAP (może się przydać dla używtkowników iOS którzy stracili dostęp do aktualizacji w/przed 2021)*/
/* ************************************ */

.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;
  }
}