@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@300;700&display=swap");
@import url("./loader.css");

* {
  user-select: none;
}

*::selection,
*::-moz-selection {
  background: none;
}

html,
body {
  margin: 0;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  /* height: -webkit-fill-available; */
}

/*       html {
        background-image: url('https://cdn.glitch.global/0c5dae87-ac06-4d96-883f-df9ead81e9c6/bgd1.jpg');
        background-size: cover;
      }
      body {
        background: radial-gradient(circle at 50%, rgba(6,6,6,0.25), rgba(0,0,0, 0.5) 100%);
      } */
div[data-vbg] {
  z-index: -1 !important;
}

.node {
  cursor: pointer;
}

.tag {
  opacity: 0.5;
  stroke-dasharray: 4;
  stroke-linecap: round;
  display: none;
}

.btn {
  border: 2px solid;
  padding: 0.25rem 1rem;
}

path {
  fill: none;
  stroke: white;
  stroke-width: 1;
  pointer-events: none;
}

.tag {
  pointer-events: all;
  cursor: pointer;
}

g.label {
  opacity: 0;
}

text {
  fill: white;
  font-family: "Poppins", sans-serif;
}

circle {
  /*   stroke: #fff; */
  /*   stroke-width: 1.5px; */

}

image {
  pointer-events: none;
}

#modal {
  display: none;
  width: 100%;
  height: 90vh;
  height: 86svh;
  z-index: 100000001;
  position: absolute;
  top: 5vh;
  flex-direction: column;
  max-width: 1280px;
  left: calc(0.5 * (100vw - 1280px));
  /*         overflow: auto; */
}


@media only screen and (max-width: 1280px) {
  #modal {
    left: 0;
  }
}

#modal>iframe {
  height: 90%;
  border: none;
  width: 90%;
  max-width: 1280px;
  overflow: auto;
  margin: 0 auto;
  padding: 0;
  background: #f5f2ef;
  display: block;
  box-sizing: border-box;
  position: relative;
}

#modal>iframe body {
  margin: 0;
  padding: 20px;
  width: calc(100% - 40px);
  min-height: 100%;
  background: #f5f2ef;
  box-sizing: border-box;
}

#modal>iframe body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  background: #f5f2ef;
}

#modal>iframe img {
  max-width: 100% !important;
  height: auto !important;
  display: block;
  margin: 10px auto !important;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#modal>iframe p,
#modal>iframe h1,
#modal>iframe h2,
#modal>iframe h3,
#modal>iframe div {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: 0 10px;
}

#modal>h1 {
  font-family: "Poppins", sans-serif;
  font-size: 2.5rem;
  text-align: center;
  border-top: solid 2px;
  /* border-bottom: solid 2px; */
  /* margin-bottom: 0; */
  width: 90%;
  max-width: 1280px;
  margin: auto;
  background: hsla(26, 24%, 95%, 1);
  margin-bottom: 0px;
}

#modal h3 {
  margin: 0.25rem;
  padding: 0;
  font-family: "Poppins", sans-serif;
  text-align: center;
  text-transform: lowercase;
  /*         border-bottom: solid 1px; */
}

#modal>button {
  width: 2rem;
  height: 2rem;
  background: white;
  border-radius: 1rem;
  position: absolute;
  right: 3.5rem;
  border: none;
  top: -0.7rem;
  user-select: none;
  cursor: pointer;
  box-shadow: 0px 0.125rem 0.125rem rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  color: black;
}

foreignObject {
  pointer-events: none;
}

.tooltip {
  background: black;
  border: 1px solid white;
  padding: 0.5rem;
  font-family: "Poppins", sans-serif;
  font-weight: bold;
  text-transform: lowercase;
  text-align: center;
  position: fixed;
  top: 0;
  color: white;
  display: none;
  pointer-events: none;
  z-index: 100000000;
}

/* Mobile & Tablet (≤ 1024px) */
@media (max-width: 1280px) {
  .tooltip {
    background: black;
    border: 1px solid white;
    padding: 0.5rem 1rem;
    font-family: "Poppins", sans-serif;
    font-weight: bold;
    text-transform: lowercase;
    text-align: center;
    position: absolute;
    top: 5rem;
    left: 20%;
    transform: translateX(-50%);
    color: white;
    display: none;
    pointer-events: none;
    z-index: 100000000;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-size: 15px;
    width: 80px;
  }
}


footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  display: flex;
  justify-content: center;
  font-family: "Roboto", sans-serif;
  transform: translateY(100%);
  transition: transform 330ms ease-in-out;
  background: #E5E5E5;
  gap: 1rem;
  z-index: 100000;
}

footer p {
  font-size: 0.875rem;
  margin: 0;
  padding: 0;
}

footer p:first-of-type {
  text-align: center;
}

footer p:last-of-type {
  display: flex;
  gap: 0.5rem;
}

footer ul {
  list-style: none;
  font-size: 0.875rem;
  margin: 0;
  padding: 0;
}

footer ul h3 {
  margin: 0;
  font-size: 0.875rem;
}

footer a {
  color: initial;
  font-weight: 300;
}

footer>div {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  width: 100%;
}

footer>div>img {
  height: 4.5rem;
  width: 100%;
  object-fit: contain;
}

footer>div>section {
  display: flex;
  gap: 4rem;
}

footer>button {
  position: absolute;
  margin-top: -4rem;
  width: 7rem;
  height: 3.5rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0.35rem;
  border-radius: 0.5rem;
  border: none;
  transform: rotate(0);
  transition: transform 330ms ease-in-out;
  cursor: pointer;
  background: none;
}

footer>button>svg {
  width: 7rem;
  height: 3.5rem;
}

footer.open {
  transform: translateY(0);
}

footer .base {
  fill: #E5E5E5;
}

footer .arrow {
  stroke: black;
}

footer a>img {
  height: 25px;
}

aside {
  position: fixed;
  right: 1rem;
  top: 1rem;
  bottom: 1rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  font-family: "Roboto", sans-serif;
  transform: translateX(calc(1rem + 100%));
  transition: transform 330ms ease-in-out;
  background: #E5E5E5;
  gap: 1rem;
  z-index: 100001;
}

aside>h5 {
  margin-bottom: -.5rem;
}

#list_view {
  overflow: auto;
  flex: 1;
  padding-right: 1rem;
}

#list_view ul {
  margin: 0;
  margin-bottom: 1rem;
  list-style: none;
  padding-left: 1rem;
}

#list_view ul>li {
  cursor: pointer;
  margin: 0.25rem;
}

aside>button.home-button {
  position: absolute;
  left: -4.1rem;
  width: 4.4375rem;
  height: 8.875rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  transform: rotate(0);
  cursor: pointer;
  user-select: none;
  background: none;
  top: 1rem;
  margin: 0;
  z-index: 10;
}

/* Adjust for mobile */
@media only screen and (max-width: 980px) {
  aside {
    padding-top: 6rem;
    /* Add space at the top for the home button */
  }

  aside>button.home-button {
    top: 1rem;
    left: -4.3rem;
    z-index: 10;
  }

  aside h4 {
    margin-top: 0;
    padding: 1rem 0;
    background: #E5E5E5;
    position: relative;
    z-index: 2;
  }
}

aside>button>svg {
  width: 4.4375rem;
  height: 8.875rem;
}

.base {
  fill: black;
  stroke: none;
}

.arrow {
  fill: transparent;
  stroke: hsla(26, 24%, 95%, 1);
  stroke-width: 0.25rem;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform-origin: 50% 50%;
  transition: transform 330ms ease-in-out;
}

aside.open {
  transform: translateY(0);
}

.open .arrow {
  transform: rotate(180deg);
}

aside>ul {
  list-style: none;
  font-size: 0.875rem;
  margin: 0;
  padding: 0;
}

aside a {
  color: initial;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
}

aside details {
  border-bottom: 2px solid;
  padding: 0.5rem 0;
}

aside summary {
  font-size: 1.125rem;
  text-transform: uppercase;
  line-height: 1.75rem;
  cursor: pointer;
  margin-left: 0;
}

details>summary::-webkit-details-marker,
details>summary::marker {
  display: none;
  visibility: hidden;
  color: transparent;
}

.background {
  width: 100vw;
  height: 100vh;
  height: 100svh;
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
}

.background>img {
  width: 100%;
  height: 100%;
  opacity: 0;
  --d: 10000ms;
  /*         //animation: fadeIn var(--d) infinite;  */
  animation-name: fadeIn;
  animation-duration: var(--d);
  animation-fill-mode: forwards;
  animation-iteration-count: infinite;
  position: absolute;
  object-fit: cover;

}

.background>img:nth-of-type(1) {
  animation-delay: calc(0 * var(--d) * 0.5);
}

.background>img:nth-of-type(2) {
  animation-delay: calc(1 * var(--d) * 0.5);
}

.background>img:nth-of-type(3) {
  animation-delay: calc(2 * var(--d) * 0.5);
}

.background>img:nth-of-type(4) {
  animation-delay: calc(3 * var(--d) * 0.5);
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

/*       .background {
        width: 100vw;
        height: 100vh;
        position: absolute;
        top: 0;
        left: 0;
        z-index: -1;
      }
      
      .background > img {
        width: 100%;
        height: 100%;
        animation-name: fadeInOut;
        animation-timing-function: ease-in-out;
        animation-iteration-count: infinite;
        animation-duration: 8s;
        position: absolute;
        top: 0;
        left: 0;
      }
    
      
      @keyframes fadeInOut {
        0% {
          opacity:1;
        }
        17% {
          opacity:1;
        }
        25% {
          opacity:0;
        }
        92% {
          opacity:0;
        }
        100% {
          opacity:1;
        }
      }

      .background > img:nth-of-type(1) {
        animation-delay: 6s;
      }
      .background > img:nth-of-type(2) {
        animation-delay: 4s;
      }
      .background > img:nth-of-type(3) {
        animation-delay: 2s;
      }
      .background > img:nth-of-type(4) {
        animation-delay: 0;
      } */

@media only screen and (max-width: 1312px) {
  #modal>button {
    width: 1.2rem;
    height: 1.2rem;
    background: white;
    right: 0.7rem;
  }
}

/* @media only screen and (min-width: 1312px) {
      #prev, #next {
    margin-top: -4px;

  }
}

#modal.hide-nav>nav {
  display: none;
}  */

#modal>nav {
  background: hsla(26, 24%, 95%, 1);
  display: flex;
  /* switch to flexbox */
  justify-content: space-between;
  /* evenly space items */
  align-items: center;
  border-bottom: solid 1px;
  /* margin-top: 0.5rem; */
  width: 100%;
  max-width: 1280px;
  /* margin: auto; */
  /* padding: 4px 0; */
  box-sizing: border-box;
}
/* original property */
/* #prev{
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f3f3f3;
  border: 1px solid #000;
  border-radius: 20px;
  padding: 2px 8px;      small padding
  text-decoration: none;
  color: #000;
  font-size: 12px;
  font-weight: 500;
  width: auto;           let text decide width
  min-width: unset;      remove any fixed width
  height: 22px;
  box-sizing: border-box;
  transition: all 0.2s ease-in-out;
  position: relative;
  left: 2cm; 
} */

/* original property */
/* #next {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f3f3f3;
  border: 1px solid #000;
  border-radius: 20px;
  padding: 2px 8px;      small padding
  text-decoration: none;
  color: #000;
  font-size: 12px;
  font-weight: 500;
  width: auto;           let text decide width
  min-width: unset;      remove any fixed width
  height: 22px;
  box-sizing: border-box;
  transition: all 0.2s ease-in-out;
  position: relative;
  left: -2cm; 
} */

@media (max-width: 780px) {
  #modal>nav {
    flex-direction: column;
    /* stack vertically */
    gap: 8px;
    /* spacing between title and buttons */
    /* padding: 8px 0; */
  }

  #modal>nav h3 {
    order: -1;
    /* move heading above buttons */
    font-size: 1rem;
    margin-bottom: 4px;
  }

  #modal>nav a {
    width: 60%;
    /* responsive width */
    max-width: 200px;
    /* prevent overflow */
    min-width: 120px;
    /* maintain minimum size */
    font-size: 13px;
    height: 28px;
    /* padding: 4px 8px; */
    margin: 0 auto;
    /* center buttons horizontally */
    text-align: center;
  }
}

/* original property */
/* #prev:hover,
#next:hover {
  background-color: #000;
  color: #fff;
} */

nav {
  width: 90%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  padding: 6px 0;
  margin: 0 auto;
  box-sizing: border-box;
}

nav h3 {
  font-weight: bold;
  font-size: 0.95rem;
  margin: 0;
  text-align: center;
  flex: 1;
}

/* #modal>nav>a {
  font-family: 'Poppins', sans-serif;
  text-decoration: none;
  color: black;
}

#modal>nav>a[href="#prev"] {
  margin-left: 0.5rem;
}

#modal>nav>a[href="#next"] {
  text-align: right;
  margin-right: 0.5rem;
} */

/*   g[data-group="3"]:hover {
    transform: scale(1.7);
    transition: transform 100ms ease-in-out;
  } */

/*   g[data-group="3"] {
    opacity: 0.7;
  }
  
  g[data-group="3"]:hover {
    opacity: 1;
    transition: opacity 100ms ease-in-out;
  } */
#scroll-video {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  overflow: auto;
}

.invisible {
  user-select: none;
  pointer-events: none;
  opacity: 0;
  transition: opacity 500ms ease-in;
  transition-delay: 100ms;
}

#intro {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: fixed;
  left: 0;
  top: 0;
  transition: opacity 330ms ease-out;
  opacity: 1;
  background-image: url('https://cdn.glitch.global/0c5dae87-ac06-4d96-883f-df9ead81e9c6/first-frame.png');
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 1;
  transition: opacity 300ms ease-in;
  z-index: 1;
}

#intro.hide {
  opacity: 0;
  pointer-events: none;
}

#set-height {
  display: block;
}

#skip {
  position: fixed;
  top: calc(50vh - 4rem);
  z-index: 100000;
  left: 0;
  right: 0;
  width: 100%;
  background: none;
  border: none;
  color: white;
  /*         text-decoration: underline; */
  font-family: Poppins, Roboto, sans-serif;
  transition: top 600ms ease-in-out;
  display: flex;
  align-items: center;
  flex-direction: column;
  opacity: 1;
  transition: opacity 300ms ease-in;
}

#skip>span {
  display: flex;
  gap: 4rem;
}

#skip button {
  cursor: pointer;
  width: 7rem;
  border: 1px solid white;
  color: white;
  background: none;
  padding: .5rem;
}

#skip button:hover {
  background: rgba(255, 255, 255, 0.5);
}

#skip button:active {
  background: rgba(255, 255, 255, 0.75);
}

#skip img {
  height: 5.75rem;
  margin-bottom: 4rem;
}

#skip.top {
  top: 0.25rem;
  font-size: 1.2rem;
}

#skip.top img,
#skip.top #play_btn {
  display: none;
}

img[data-href] {
  cursor: pointer;
}


@media only screen and (max-width: 639px) and (-Webkit-min-device-pixel-ratio: 1.5),
only screen and (max-width: 639px) and (-moz-min-device-pixel-ratio: 1.5),
only screen and (max-width: 639px) and (-o-min-device-pixel-ratio: 3/2),
only screen and (max-width: 639px) and (min-device-pixel-ratio: 1.5),
only screen and (min-width: 640px) and (max-width: 980px) {
  html {
    font-size: 42px;
  }

  aside>button {
    margin-left: -4.4375rem;
  }

  /* h1 {
              font-size: 2.5rem;
          }

          h2 {
              font-size: 2.25rem;
          }

          h3 {
              font-size: 2rem;
          }

          h4 {
              font-size: 1.75rem;
          }

          h5 {
              font-size: 1.5rem;
          }

          h6 {
              font-size: 1.25rem;
          } */

  button,
  span {
    font-size: 1rem;
  }

  footer {
    flex-direction: column;
    justify-content: flex-start;
    max-height: 70vh;
  }

  footer>div {
    overflow: auto;
    flex-direction: column;
  }

  aside summary,
  aside li {
    font-size: 0.75rem;
  }

  footer>button {
    left: calc(50% - 3rem);
    top: 1rem;
    color: black;
    user-select: none;
  }

  footer p:first-of-type {
    max-width: initial;
  }

  footer a>img {
    height: 1rem;
  }

  #modal {
    z-index: 100000001;
  }

  #modal>h1 {
    font-size: 1.25rem;
  }

  ol>li {
    font-size: 1.75rem;
  }
}

/* * { 
        outline:1px blue solid;
      }  */


/* new css for Previous and next buttons */

/* --- SHARED BASE STYLES --- */
/* .nav-prev {
  margin-left: 1rem;
}

.nav-next {
  margin-right: 1rem;
} */

/* a.nav-btn {
  Combined base styles from 'button' and specific styles (SHARED STYLES)
  position: relative;
  Anchor for absolutely positioned children
  display: inline-block;
  cursor: pointer;
  outline: none;
  border: 0;
  vertical-align: middle;
  text-decoration: none;
  background: transparent;
  padding: 0;
  font-size: 1rem;
  font-family: inherit;

  width: 13rem;
  Fixed width for the button container
  height: 2.5rem;
  Fixed height for vertical alignment
} */

/* --- CIRCLE BASE STYLES (now absolutely positioned) --- */
/* a.nav-btn .circle1,
a.nav-btn .circle2 {
  transition: all 0.45s cubic-bezier(0.65, 0, 0.076, 1);
  position: absolute;
  top: 50%;
  Center vertically
  transform: translateY(-50%);
  margin: 0;
  width: 2.5rem;
  height: 2.5rem;
  Match button height
  background: #282936;
  border-radius: 1.625rem;
} */

/* --- ICON BASE STYLES (applies to both circles) --- */
/* a.nav-btn .circle1 .icon,
a.nav-btn .circle2 .icon {
  transition: all 0.45s cubic-bezier(0.65, 0, 0.076, 1);
  position: absolute;
  top: 0;
  bottom: 0;
  margin: auto;
  width: 1.125rem;
  height: 0.15rem;
  background: none;
} */

/* --- BUTTON TEXT BASE STYLES (Absolute position to prevent layout shift) --- */
/* a.nav-btn .button-text {
  transition: all 0.45s cubic-bezier(0.65, 0, 0.076, 1);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  line-height: 2.5rem;
  Match button height for vertical centering
  color: #282936;
  font-weight: 700;
  text-transform: uppercase;
  FIX: Ensure text stays on top of the expanding circle
  z-index: 10;
} */

/* ======================================================================= */
/* --- PREVIOUS BUTTON (nav-prev) - Left Aligned --- */
/* ======================================================================= */
/* a.nav-btn.nav-prev .circle1 {
  left: 0;
  Anchor to the far left. Expands right.
  border-radius: 1.625rem;
  Keep initial rounded corner on left
} */

/* Arrow Setup */
/* a.nav-btn.nav-prev .circle1 .icon.arrow {
  left: 0.8rem;
  Center arrow in the circle
} */

/* a.nav-btn.nav-prev .circle1 .icon.arrow::before {
  position: absolute;
  content: "";
  top: -0.25rem;
  left: 0.25rem;
  width: 0.5rem;
  height: 0.5rem;
  border-top: 0.125rem solid #fff;
  border-left: 0.125rem solid #fff;
  border-right: none;
  transform: rotate(-45deg);
  Pointing left
} */

/* Text Positioning */
/* a.nav-btn.nav-prev .button-text {
  text-align: left;
  padding-left: 3.25rem;
  Space for circle
  padding-right: 0.5rem;
} */

/* HOVER: PREVIOUS */
/* a.nav-btn.nav-prev:hover .circle1 {
  width: 100%;
  Expand to the right over the whole button
  border-radius: 2.5rem;
  Soften the corners when expanded
} */

/* a.nav-btn.nav-prev:hover .circle1 .icon.arrow {
  background: #fff;
  transform: translate(-0.15rem, 0);
  Arrow moves slightly left (into the previous action)
} */


/* ======================================================================= */
/* --- NEXT BUTTON (nav-next) - Right Aligned (Mirror) --- */
/* ======================================================================= */
/* a.nav-btn.nav-next .circle2 {
  right: 0;
  Anchor to the far right. **Crucial** for right-to-left expansion.
  border-radius: 1.625rem;
  Keep initial rounded corner on right
} */

/* Arrow Setup */
/* a.nav-btn.nav-next .circle2 .icon.arrow {
  right: 0.8rem;
  Center arrow in the circle (relative to the right edge)
  left: auto;
  Override inherited left: 0
} */

/* a.nav-btn.nav-next .circle2 .icon.arrow::before {
  position: absolute;
  content: "";
  top: -0.25rem;
  right: 0.25rem;
  left: auto;
  width: 0.5rem;
  height: 0.5rem;
  border-top: 0.125rem solid #fff;
  border-right: 0.125rem solid #fff;
  border-left: none;
  transform: rotate(45deg);
  Pointing right
} */

/* Text Positioning */
/* a.nav-btn.nav-next .button-text {
  text-align: right;
  padding-right: 3.25rem;
  Space for circle
  padding-left: 0.5rem;
} */

/* HOVER: NEXT */
/* a.nav-btn.nav-next:hover .circle2 {
  width: 100%;
  **Expands to the left** over the whole button because it's anchored right: 0
  border-radius: 2.5rem;
  Soften the corners when expanded
} */

/* a.nav-btn.nav-next:hover .circle2 .icon.arrow {
  background: #fff;
  transform: translate(0.15rem, 0);
  Arrow moves slightly right (into the next action)
} */

/* --- HOVER SHARED --- */
/* a.nav-btn:hover .button-text {
  color: #fff;
} */

/* ======================================================================= */
/* --- MOBILE MEDIA QUERY (Max 768px) --- */
/* ======================================================================= */
/* @media (max-width: 996px) {
  previous button
  a.nav-btn.nav-prev .button-text {
    display:none;
  }
  a.nav-btn.nav-prev:hover .circle1 {
    width: 2.5rem;
  }
  a.nav-btn.nav-prev:hover .circle1 .icon.arrow {
    transform: translate(0, 0);
  }

   next button
  a.nav-btn.nav-next .button-text {
    display:none;
  }
  a.nav-btn.nav-next:hover .circle2 {
    width: 2.5rem;
  }
  a.nav-btn.nav-next:hover .circle2 .icon.arrow {
    transform: translate(0, 0);
  }
} */

/* end of new css for Previous and next buttons */

/* css for next and previous buttons version 2 */

/* prev button */
#prev {
  /* Match .button base styles */
  background-color: #ffffff00;
  color: #000;
  border: 1px solid #000;
  border-radius: 25px;
  transition: all 0.6s ease;
  text-decoration: none; /* Remove underline */

  /* REFINED SIZE AND LAYOUT */
  /* Reduced overall size to prevent it from being too wide */
  width: auto; /* Let the content determine the width */
  min-width: 8.5em; /* Keep a minimum width */
  height: 22px;

  /* Use Flexbox for better alignment and spacing of the content and icon */
  display: inline-flex;
  align-items: center; /* Vertically center the text */
  justify-content: flex-end; /* Text sits on the right */

  /* Set Padding for the text itself. This is the new .text margin */
  padding-left: 0rem;
  padding-right: 0.75rem;
  margin-left: 1rem; /* Space from the left edge */

  /* box-sizing: border-box; */
  position: relative; /* Needed for absolute positioning of the icon */
  font-size: 12px;
}

.previous-button {
  background-image: linear-gradient(to left, #000 50%, #ffffff00 50%);
  background-size: 200% 100%;
  background-position: 0 0;
  transition: background-position 0.6s ease;
}

#prev.previous-button:hover {
  background-position: 100% 0;
}

#prev:hover {
  /* Match .button:hover */
  /* background-color: #3654ff; */
  cursor: pointer;
  color: #fff;
}

/* --- Arrow Icon using ::before pseudo-element --- */

#prev::before {
  content: "";
  display: flex;
  position: absolute; /* Relative to #prev */
  
  /* REFINED ICON POSITIONING */
  left: 1rem; /* Adjusted position for a better gap from the border and text */
  top: 50%;
  /* transform: translateY(-50%); Center vertically */
  transform: translateY(-50%) scaleX(-1); /* Flip horizontally for previous */
  
  width: 1rem; /* Match .button svg width */
  height: 1rem; /* Ensure the content box is square */
  transition: all 0.6s ease;

  /* Base64-encoded SVG for the arrow (stroke set to white: #fff) */
  background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZT0iI2ZmZiI+PHBhdGggc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJNNC41IDEyaDE1bTAgMGwtNi43NS02Ljc1TDE5LjUgMTJsLTYuNzUgNi43NSIvPjwvc3ZnPg==');
  filter: invert(100%);
  background-size: contain;
  background-repeat: no-repeat;
  margin-left: -0.45rem;
}

/* Hover effect for the icon */
#prev:hover::before {
  /* Match .button:hover svg - the arrow moves slightly */
  /* transform: translateY(-50%) translateX(5px); */
  transform: translateY(-50%) scaleX(-1) translateX(5px);
  filter: none;
}

/* next button */

#next {
  /* Match .button base styles */
  background-color: #ffffff00;
  color: #000;
  border: 1px solid #000;
  border-radius: 25px;
  transition: all 0.6s ease;
  text-decoration: none; /* Remove underline */

  /* REFINED SIZE AND LAYOUT */
  /* Reduced overall size to prevent it from being too wide */
  width: auto; /* Let the content determine the width */
  min-width: 8.5em; /* Keep a minimum width */
  height: 22px;

  /* Use Flexbox for better alignment and spacing of the content and icon */
  display: inline-flex;
  align-items: center; /* Vertically center the text */
  justify-content: flex-start; /* Text sits on the left */

  /* Set Padding for the text itself. This is the new .text margin */
  padding-left: 0.75rem;
  padding-right: 0rem;
  margin-right: 1rem; /* Space from the right edge */

  /* box-sizing: border-box; */
  position: relative; /* Needed for absolute positioning of the icon */
  font-size: 12px;
}

.next-button {
  background-image: linear-gradient(to right, #000 50%, #ffffff00 50%);
  background-size: 200% 100%;
  background-position: 100% 0;
  transition: background-position 0.6s ease;
}

#next.next-button:hover {
  background-position: 0 0;
}

#next:hover {
  /* Match .button:hover */
  /* background-color: #3654ff; */
  cursor: pointer;
  color: #fff;
}

/* --- Arrow Icon using ::before pseudo-element --- */

#next::before {
  content: "";
  display: flex;
  position: absolute; /* Relative to #prev */
  
  /* REFINED ICON POSITIONING */
  right: 1rem; /* Adjusted position for a better gap from the border and text */
  top: 50%;
  transform: translateY(-50%); /* Center vertically */
  
  width: 1rem; /* Match .button svg width */
  height: 1rem; /* Ensure the content box is square */
  transition: all 0.6s ease;

  /* Base64-encoded SVG for the arrow (stroke set to white: #fff) */
  background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZT0iI2ZmZiI+PHBhdGggc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJNNC41IDEyaDE1bTAgMGwtNi43NS02Ljc1TDE5LjUgMTJsLTYuNzUgNi43NSIvPjwvc3ZnPg==');
  filter: invert(100%);
  background-size: contain;
  background-repeat: no-repeat;
  margin-right: -0.45rem;
}

/* Hover effect for the icon */
#next:hover::before {
  /* Match .button:hover svg - the arrow moves slightly */
  transform: translateY(-50%) translateX(5px);
  filter: none;
}

@media (max-width: 996px) {
  /* for prev button */

  /* 1. Hide the text and adjust the button size */
  #prev {
    /* Hide the "Previous Story" text */
    text-indent: 100%;
    white-space: nowrap;
    overflow: hidden;
    
    /* Set a fixed, small size suitable for just an arrow */
    width: 4em;
    min-width: 3em;
    height: 4em;
    min-height: 3em;
    padding: 0;    /* Remove all internal padding */
    
    /* Center the internal content for the swipe effect to look right */
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  /* 2. Re-position the Arrow Icon */
  #prev::before {
    /* The icon is now centered in the small button */
    left: 0.75rem;

    width: auto;
    min-width: 0.65rem;
    height: auto;
    min-height: 0.65rem;
    
    /* Temporarily reset transition to make sure all changes apply immediately */
    transition: none;
  }

  /* for next button */

  /* 1. Hide the text and adjust the button size */
  #next {
    /* Hide the "Next Story" text */
    text-indent: 100%;
    white-space: nowrap;
    overflow: hidden;
    
    /* Set a fixed, small size suitable for just an arrow */
    width: 4em;
    min-width: 3em;
    height: 4em;
    min-height: 3em;
    padding: 0;    /* Remove all internal padding */
    
    /* Center the internal content for the swipe effect to look right */
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  /* 2. Re-position the Arrow Icon */
  #next::before {
    /* The icon is now centered in the small button */
    right: 0.70rem;

    width: auto;
    min-width: 0.65rem;
    height: auto;
    min-height: 0.65rem;
    
    /* Temporarily reset transition to make sure all changes apply immediately */
    transition: none;
  }
}

/* end of css for next and previous buttons version 2 */