/*-- -------------------------- -->
<---       Side By Side         -->
<--- -------------------------- -*/

/* Mobile - 360px */
@media only screen and (min-width: 0rem) {
  #groblje,
  #groblje_desno {
    padding: var(--sectionPadding);
  }
  #groblje .cs-container,
  #groblje_desno .cs-container {
    width: 100%;
    max-width: 80rem;
    margin: auto;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    align-items: center;
  }
  #groblje .cs-content,
  #groblje_desno .cs-content {
    text-align: left;
    width: auto;
    max-width: 40.625rem;
    margin: 0 1rem;
    margin-top: -18.75rem;
    /* 40px - 60px top and bottom */
    /* 20px - 60px left and right */
    padding: clamp(2.5rem, 7vw, 3.75rem) clamp(1.25rem, 5.5vw, 3.75rem);
    background-color: #fafbfc;
    /* prevents padding from affecting width and height */
    box-sizing: border-box;
    border-radius: 0.75rem;
    /* clips the pseudo element */
    overflow: hidden;
    box-shadow: 0px 24px 54px rgba(87, 107, 147, 0.12);
    display: flex;
    flex-direction: column;
    /* centers content horizontally, set to flex-start to left align */
    align-items: flex-start;
    position: relative;
    z-index: 10;
  }
  #groblje .cs-content:before,
  #groblje_desno .cs-content:before {
    /* green border top */
    content: "";
    width: 100%;
    height: 0.5rem;
    background: var(--primary);
    opacity: 1;
    position: absolute;
    display: block;
    top: 0;
    left: 0;
  }

  #groblje .cs-text,
  #groblje_desno .cs-text {
    margin-bottom: 1rem;
  }
  #groblje .cs-text:last-of-type,
  #groblje_desno .cs-text:last-of-type {
    margin-bottom: 2rem;
  }
  #groblje .cs-button-solid,
  #groblje_desno .cs-button-solid {
    font-size: 1rem;
    /* 46px - 56px */
    line-height: clamp(2.875rem, 5.5vw, 3.5rem);
    text-decoration: none;
    font-weight: 700;
    text-align: center;
    margin: 0;
    color: #fff;
    min-width: 9.375rem;
    padding: 0 1.5rem;
    background-color: var(--primary);
    border-radius: 0.25rem;
    display: inline-block;
    position: relative;
    z-index: 1;
    /* prevents padding from adding to the width */
    box-sizing: border-box;
  }

  #groblje .cs-picture,
  #groblje_desno .cs-picture {
    width: 100%;
    height: auto;
    height: 27.6875rem;
    /* clips the img corners */
    overflow: hidden;
    border-radius: 1.5rem;
    display: block;
    /* sends it to the top */
    order: -1;
    position: relative;
  }
  #groblje .cs-picture img,
  #groblje_desno .cs-picture img {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    object-fit: cover;
  }
}
/* Tablet - 768px */
@media only screen and (min-width: 48rem) {
  #groblje .cs-container,
  #groblje_desno .cs-container {
    padding: 3.75rem 0;
    position: relative;
    align-items: flex-end;
    justify-content: center;
  }
  #groblje .cs-content,
  #groblje_desno .cs-content {
    width: 65%;
    margin: 0;
  }
  #groblje .cs-picture,
  #groblje_desno .cs-picture {
    /* 465px - 617px */
    width: clamp(29.0625rem, 53vw, 38.5625rem);
    position: absolute;
    left: 0;
    height: 100%;
  }
}
/* Small Desktop - 1024px */
@media only screen and (min-width: 64rem) {
  #groblje .cs-content,
  #groblje_desno .cs-content {
    /* 90px - 108px */
    margin-right: clamp(5rem, 8.5vw, 6.75rem);
  }
}

/*-- -------------------------- -->
<---   Side By Side Reverse     -->
<--- -------------------------- -*/

/* Mobile - 360px */
@media only screen and (min-width: 0rem) {
  #groblje_desno {
    background-color: #f7f7f7;
  }
}
/* Tablet - 768px */
@media only screen and (min-width: 48rem) {
  #groblje_desno .cs-container {
    align-items: flex-start;
  }
  #groblje_desno .cs-picture {
    left: auto;
    right: 0;
  }
}
/* Small Desktop - 1024px */
@media only screen and (min-width: 64rem) {
  #groblje_desno .cs-content {
    margin-right: 0;
    /* 90px - 108px */
    margin-left: clamp(5rem, 8.5vw, 6.75rem);
  }
}

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

/* Mobile - 360px */
@media only screen and (min-width: 0rem) {
  #gallery_groblje {
    padding: var(--sectionPadding);
    background-color: #f1f1f1;
  }
  #gallery_groblje .cs-container {
    width: 100%;
    max-width: 80rem;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* 48px - 64px */
    gap: clamp(3rem, 6vw, 4rem);
  }
  #gallery_groblje .cs-content {
    /* set text align to left if content needs to be left aligned */
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    /* centers content horizontally, set to flex-start to left align */
    align-items: center;
  }

  #gallery_groblje .cs-title {
    margin: 0;
  }
  #gallery_groblje .cs-image-group {
    width: 100%;
    /* changes to 1280px at large desktop */
    max-width: 49rem;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(20, minmax(9vw, 1fr));
    /* 16px - 20px */
    gap: clamp(1rem, 2vw, 1.25rem);
  }
  #gallery_groblje .cs-picture {
    width: 100%;
    height: 100%;
    display: block;
    position: relative;
  }
  #gallery_groblje .cs-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
  }
  #gallery_groblje .cs-picture1 {
    grid-column: 1 / span 6;
    grid-row: span 4;
  }
  #gallery_groblje .cs-picture2 {
    grid-column: 7 / span 6;
    grid-row: span 5;
  }
  #gallery_groblje .cs-picture3 {
    grid-column: 1 / span 6;
    grid-row: 5 / span 6;
  }
  #gallery_groblje .cs-picture4 {
    grid-column: 7 / span 6;
    grid-row: 6 / span 5;
  }
  #gallery_groblje .cs-picture5 {
    grid-column: 1 / span 6;
    grid-row: 11 / span 4;
  }
  #gallery_groblje .cs-picture6 {
    grid-column: 7 / span 6;
    grid-row: 11 / span 5;
  }
  #gallery_groblje .cs-picture7 {
    grid-column: 1 / span 6;
    grid-row: 15 / span 6;
  }
  #gallery_groblje .cs-picture8 {
    grid-column: 7 / span 6;
    grid-row: 16 / span 5;
  }
}
/* Tablet - 768px */
@media only screen and (min-width: 48rem) {
  #gallery_groblje .cs-image-group {
    grid-template-rows: repeat(20, minmax(6rem, 1fr));
  }
}
/* Large Desktop 1300px */
@media only screen and (min-width: 81.25rem) {
  #gallery_groblje .cs-image-group {
    max-width: 80rem;
    height: 49.0625rem;
    grid-template-rows: repeat(12, 1fr);
  }
  #gallery_groblje .cs-picture1 {
    grid-column: 1 / span 3;
    grid-row: 1 / span 7;
  }
  #gallery_groblje .cs-picture2 {
    grid-column: 4 / span 3;
    grid-row: 1 / span 10;
  }
  #gallery_groblje .cs-picture3 {
    grid-column: 7 / span 3;
    grid-row: 1 / span 5;
  }
  #gallery_groblje .cs-picture4 {
    grid-column: 10 / span 3;
    grid-row: 1 / span 7;
  }
  #gallery_groblje .cs-picture5 {
    grid-column: 1 / span 3;
    grid-row: 8 / span 13;
  }
  #gallery_groblje .cs-picture6 {
    grid-column: 4 / span 3;
    grid-row: 11 / span 10;
  }
  #gallery_groblje .cs-picture7 {
    grid-column: 7 / span 3;
    grid-row: 6 / span 15;
  }
  #gallery_groblje .cs-picture8 {
    grid-column: 10 / span 3;
    grid-row: 8 / span 13;
  }
}

/*-- -------------------------- -->
<---       Side By Side         -->
<--- -------------------------- -*/

/* Mobile - 360px */
@media only screen and (min-width: 0rem) {
  #groblje_povijest {
    padding: var(--sectionPadding);
    /* clips the green box so it doesn't cause overflows */
    overflow: hidden;
  }
  #groblje_povijest .cs-container {
    width: 100%;
    /* changes to 1280px at 1024px */
    max-width: 34.375rem;
    margin: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* 48px - 64px */
    gap: clamp(3rem, 6vw, 4rem);
  }
  #groblje_povijest .cs-content {
    /* set text align to left if content needs to be left aligned */
    text-align: left;
    width: 100%;
    max-width: 39.375rem;
    display: flex;
    flex-direction: column;
    /* centers content horizontally, set to flex-start to left align */
    align-items: flex-start;
  }

  #groblje_povijest .cs-text {
    margin-bottom: 1rem;
  }
  #groblje_povijest .cs-text:last-of-type {
    margin-bottom: 2rem;
  }
  #groblje_povijest .cs-button-solid {
    font-size: 1rem;
    /* 46px - 56px */
    line-height: clamp(2.875rem, 5.5vw, 3.5rem);
    text-decoration: none;
    font-weight: 700;
    text-align: center;
    margin: 0;
    color: #fff;
    min-width: 9.375rem;
    padding: 0 1.5rem;
    background-color: var(--primary);
    border-radius: 0.25rem;
    display: inline-block;
    position: relative;
    z-index: 1;
    /* prevents padding from adding to the width */
    box-sizing: border-box;
  }
  #groblje_povijest .cs-button-solid:before {
    content: "";
    position: absolute;
    height: 100%;
    width: 0%;
    background: #000;
    opacity: 1;
    top: 0;
    left: 0;
    z-index: -1;
    border-radius: 0.25rem;
    transition: width 0.3s;
  }
  #groblje_povijest .cs-button-solid:hover:before {
    width: 100%;
  }
  #groblje_povijest .cs-picture {
    width: 100%;
    max-width: 32.625rem;
    height: auto;
    /* same margin top as the top value for the :after to offset the amount it overlaps the container */
    /* 56px - 100px */
    margin: clamp(3.5rem, 7vw, 6.25rem) 0 0 0;
    aspect-ratio: 1;
    border-radius: 50%;
    display: block;
    position: relative;
  }
  #groblje_povijest .cs-picture:before {
    /* green shape */
    content: "";
    /* 80px - 164px, changes at 1024px */
    width: clamp(5rem, 20vw, 10.2rem);
    height: clamp(5rem, 20vw, 10.2rem);
    background: var(--primaryLight);
    border: clamp(6px, 2vw, 12px) solid #ffffff;
    border-radius: 2rem 2rem 100% 2rem;
    opacity: 1;
    position: absolute;
    display: block;
    /* wrapped in a calc function to multiple the clamp value by -1 to get a negative number */
    bottom: calc(clamp(6px, 2vw, 12px) * -1);
    right: calc(clamp(6px, 2vw, 12px) * -1);
    z-index: 10;
  }
  #groblje_povijest .cs-picture:after {
    content: "";
    width: 31.25rem;
    /* changes at 1024px */
    height: 70%;
    border-radius: 2rem;
    background: var(--primaryLight);
    opacity: 0.16;
    position: absolute;
    display: block;
    /* 56px - 100px */
    top: calc(clamp(3.5rem, 7vw, 6.25rem) * -1);
    right: 50%;
    z-index: -1;
  }
  #groblje_povijest .cs-picture img {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    border-radius: 50%;
    object-fit: cover;
  }
  .cs-contact-group {
    width: 100%;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
  }
  .cs-link {
    text-decoration: none;

    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
    position: relative;
  }
  .cs-link:hover:before {
    width: 100%;
    height: 3.5em;
    border-radius: 1.875rem;
  }
  .cs-link:hover .cs-wrapper {
    transform: scale(1.2);
  }
  .cs-link:hover .cs-icon-fixed {
    transform: translateX(0.4375rem);
  }
  .cs-link:before {
    /* light green circle that animates on hover */
    content: "";
    width: 3rem;
    height: 3rem;
    background: #eff1f0;
    border-radius: 1.5rem;
    opacity: 1;
    position: absolute;
    display: block;
    top: 50%;
    left: 0;
    z-index: -1;
    transform: translateY(-50%);
    transition: width 0.3s, height 0.3s, border-radius 0.3s;
  }
  .cs-wrapper-contact {
    display: flex;
    justify-content: center;
    align-items: center;
    /* prevents flexbox from squishing it */
    flex: none;
    transition: transform 0.3s;
  }
  .cs-icon-fixed {
    width: 1.5rem;
    height: auto;
    display: block;
    transition: transform 0.3s;
    /* put icon in the center of the circle */
    transform: translateX(0.75rem);
  }
  .cs-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  .cs-header {
    font-size: 1rem;
    line-height: 1.2em;
    font-weight: 700;
    margin: 0;
    color: var(--headerColor);
    display: block;
  }
  .cs-link-content {
    font-size: 1rem;
    line-height: 1.2em;
    font-weight: 400;
    margin: 0;
    color: var(--bodyTextColor);
    display: block;
  }
}
/* Small Desktop - 1024px */
@media only screen and (min-width: 64rem) {
  #groblje_povijest .cs-container {
    max-width: 80rem;
    flex-direction: row;
    justify-content: space-between;
  }
  #groblje_povijest .cs-content {
    width: clamp(46.6%, 45.7vw, 51%);
  }
  #groblje_povijest .cs-picture {
    width: 41%;
  }
  #groblje_povijest .cs-picture:before {
    /* 125px - 164px */
    width: clamp(7.8125rem, 13vw, 10.2rem);
    height: clamp(7.8215rem, 13vw, 10.2rem);
    border-radius: 2rem 2rem 50% 2rem;
    bottom: -2.25rem;
  }
  #groblje_povijest .cs-picture:after {
    height: 31.25rem;
  }
}

/* modal */
.hidden {
  display: none !important; /* Make sure this rule takes precedence */
}

#modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
}

#catalog-container {
  position: relative;
  width: 900px;
  height: 600px;
  margin: 50px auto;
  overflow: hidden;
}

.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2em;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

#prevPage {
  left: 10px;
}

#nextPage {
  right: 10px;
}

.page {
  display: none;
  width: 100%;
  height: 100%;
  position: absolute;
  object-fit: contain; /* This ensures the image fits into the container */
}
