/*-- -------------------------- -->
<---          Gallery           -->
<--- -------------------------- -*/

/* Mobile - 360px */
@media only screen and (min-width: 0rem) {
  #gallery {
    padding: var(--sectionPadding);
  }
  #gallery .cs-container {
    width: 100%;
    /* changes to 1280px at desktop */
    max-width: 34.375em;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* 8px - 20px */
    gap: clamp(0.5rem, 2vw, 1.25rem);
  }
  #gallery .cs-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  #gallery .cs-text {
    /* 48px - 64px */
    margin-bottom: clamp(3rem, 6vw, 4rem);
  }
  #gallery .cs-cta {
    /* 14px - 16px */
    font-size: clamp(0.875rem, 1.5vw, 1.25rem);
    text-decoration: none;
    /* 16px - 20px */
    text-align: center;
    /* 141px - 224px */
    width: clamp(8.8125rem, 17vw, 14rem);
    height: clamp(8.8125rem, 17vw, 14rem);
    margin: 0 auto 0 0;
    /* 141px - 224px */

    margin-bottom: calc(clamp(8.8125rem, 17vw, 14rem) * -0.5);
    background-color: var(--secondary);
    color: var(--bodyTextColorWhite);
    /* prevents border from affecting height and width */
    box-sizing: border-box;
    border: clamp(12px, 3vw, 20px) solid #ffffff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    align-self: flex-end;
    position: relative;
    z-index: 10;
    transition: background-color 0.3s;
  }
  #gallery .cs-cta:hover {
    background-color: var(--primary);
  }
  #gallery .cs-cta:hover .cs-arrow {
    transform: translateX(3.75rem);
    opacity: 0;
  }
  #gallery .cs-cta:hover .cs-cta-text {
    transform: translateY(-0.9375rem);
  }
  #gallery .cs-arrow {
    width: 2.5rem;
    height: auto;
    transition: transform 0.3s, opacity 0.3s;
  }
  #gallery .cs-cta-text {
    transition: transform 0.3s;
  }
  #gallery .cs-content-picture {
    width: 100%;
    height: 19.375rem;
    border-radius: 0.75rem;
    /* clips the img corners */
    overflow: hidden;
    display: block;
    position: relative;
  }
  #gallery .cs-content-picture img {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    /* makes it behave like a background image */
    object-fit: cover;
  }

  #gallery .cs-content-picture:hover {
    cursor: pointer;
  }

  #gallery .cs-grid {
    display: grid;
    /* 12 so we can have rows of 3 and rows with 2 50/50 images */
    grid-template-columns: repeat(12, 1fr);
    /* 8px - 20px */
    grid-gap: clamp(0.5rem, 2vw, 1.25rem);
    grid-template-rows: repeat(20, 1fr);
  }
  #gallery .cs-picture {
    border-radius: 0.5rem;
    /* clips corners of img tags */
    overflow: hidden;
    position: relative;
    display: block;
  }

  #gallery .cs-picture:hover {
    cursor: pointer;
  }
  #gallery .cs-picture img {
    width: 100%;
    height: 100%;
    /* makes image behave like a background image */
    object-fit: cover;
  }
  #gallery .cs-picture1 {
    grid-column: 1 / 7;
    grid-row: 1 / 12;
  }
  #gallery .cs-picture2 {
    grid-column: 7 / 13;
    grid-row: 1 / 14;
  }
  #gallery .cs-picture3 {
    grid-column: 1 / 7;
    grid-row: 12 / 21;
  }
  #gallery .cs-picture4 {
    grid-column: 7 / 13;
    grid-row: 14 / 21;
  }
}
/* Tablet - 768px */
@media only screen and (min-width: 48rem) {
  #gallery .cs-container {
    max-width: 80rem;
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
  }
  #gallery .cs-content {
    max-width: 39.375rem;
    justify-content: flex-end;
  }
  #gallery .cs-text {
    width: 85%;
  }
  #gallery .cs-grid {
    width: 50%;
    max-width: 39.375rem;
    /* prevents flexbox from squishing it */
    flex: none;
  }
  #gallery .cs-content-picture {
    /* 229px - 532px */
    height: clamp(14.3125rem, 38vw, 33.25rem);
    aspect-ratio: 1.18;
  }
  #gallery .cs-picture1 {
    grid-column: 1 / 7;
    grid-row: 1 / 13;
  }
  #gallery .cs-picture2 {
    grid-column: 7 / 13;
    grid-row: 1 / 9;
  }
  #gallery .cs-picture3 {
    grid-column: 1 / 7;
    grid-row: 13 / 21;
  }
  #gallery .cs-picture4 {
    grid-column: 7 / 13;
    grid-row: 9 / 21;
  }
}
