/* Global body styling */
body {
    background-size: cover;
    backdrop-filter: blur(7px);
    margin: 0;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    font-weight: 500;
    font-size: 1.5em;
    color: rgb(255, 255, 255);
    -webkit-overflow-scrolling: touch;
}

/* Reset box-sizing */
* {
    box-sizing: border-box;
}

/* Hide scrollbar */
::-webkit-scrollbar {
    width: 1px;
    height: 1px;
}

::-webkit-scrollbar-button {
    width: 1px;
    height: 1px;
}

.external {
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* Horizontal scroll wrapper */
.horizontal-scroll-wrapper {
  position: fixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100vh;
    transform: rotate(-90deg) translate3d(0,-100vh,0);
    transform-origin: right top;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100vw;
    perspective: 1px;
    transform-style: preserve-3d;
    padding-bottom: 10rem;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Image wrapper styling */
.img-wrapper {
    transform-origin: 50% 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40vh;
    transition: 1s;
    transform: rotate(90deg) translateZ(0.1px) scale(0.9) translateX(0px) translateY(-3vh);
}

/* Hover effect for images */
.img-wrapper:hover {
    min-height: 65vh;
}

.slower {
    transform: rotate(90deg) translateZ(-0.2px) scale(1.1) translateX(0%) translateY(-10vh);
}

.slower1 {
    transform: rotate(90deg) translateZ(-0.25px) scale(1.05) translateX(0%) translateY(8vh);
}

.slower2 {
    transform: rotate(90deg) translateZ(-0.3px) scale(1.3) translateX(0%) translateY(2vh);
}

.slower-down {
    transform: rotate(90deg) translateZ(-0.2px) scale(1.1) translateX(0%) translateY(16vh);
}

.faster {
    transform: rotate(90deg) translateZ(0.15px) scale(0.8) translateX(0%) translateY(14vh);
}

.faster1 {
    transform: rotate(90deg) translateZ(0.05px) scale(0.8) translateX(0%) translateY(10vh);
}

.fastest {
    transform: rotate(90deg) translateZ(0.22px) scale(0.7) translateX(-10vh) translateY(-15vh);
}

.vertical {
    transform: rotate(90deg) translateZ(-0.15px) scale(1.15) translateX(0%) translateY(0%);
}

.last {
    transform: rotate(90deg) translateZ(-0.2px) scale(1.1) translateX(25vh) translateY(-8vh);
}

/* Scroll-info and header styles */
.scroll-info{
    position: absolute;
    left: 1rem;
}

.scroll-info {
    top: 1rem;
    display: flex;
    align-items: center;
}

a {
    color: inherit;
    font-weight: 500;
    text-decoration: none;
}

h1 {
    font-weight: 300;
    font-size: 1rem;
}

.img-wrapper a {
    overflow: hidden;
    display: block;
    padding: 1vh;
    background: #ffffff;
    box-shadow: 0 10px 50px #00000082;
    touch-action: manipulation;
}

img {
    max-width: 45vh;
    max-height: 50vh;
    transition: 0.5s;
    vertical-align: top;
    filter: saturate(40%) grayscale(30%) hue-rotate(5deg);
}

a:hover img {
    filter: none;
}

p {
    margin: 0;
}

.icon svg {
  transform: rotate(90deg);
  width: 50px;
  fill: currentcolor;
}

@media (max-width: 768px) {
  body {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .horizontal-scroll-wrapper {
    /* Reset transforms for mobile */
    margin-top: 5rem;
    transform: none !important;
    width: 100vw;
    height: auto;
    /* Horizontal scroll layout */
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2rem 0 3rem; /* Extra bottom padding for scrollbar */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 1.5rem;
    /* Clean scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.5) transparent;
  }

  /* Custom scrollbar for WebKit browsers */
  .horizontal-scroll-wrapper::-webkit-scrollbar {
    height: 6px;
    background: transparent;
  }

  .horizontal-scroll-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.5);
    border-radius: 3px;
  }

  .horizontal-scroll-wrapper::-webkit-scrollbar-track {
    background: transparent;
  }

  .img-wrapper {
    /* Mobile card styling */
    transform: none !important;
    width: 85vw;
    max-width: 400px;
    height: 60vh;
    min-height: 350px;
    flex: 0 0 auto;
    scroll-snap-align: center;
    margin: 0 0 0 2vw; /* Only left margin for gap */
    transition: transform 0.3s ease;
  }

  /* First item needs left margin */
  .img-wrapper:first-child {
    margin-left: 4vw;
  }

  /* Last item needs right padding */
  .img-wrapper:last-child {
    padding-right: 4vw;
  }

  .img-wrapper a {
    /* Clean card styling */
    width: 100%;
    height: 100%;
    padding: 1rem;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-radius: 12px;
  }

  img {
    /* Improved image display */
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    filter: saturate(90%);
    transition: filter 0.3s ease;
  }

  .img-wrapper:hover img {
    filter: saturate(120%);
  }

  /* Scroll indicator hint */
  .scroll-hint {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    padding-top: 1rem;
    position: relative;
  }

  .scroll-hint::after {
    content: "→";
    display: inline-block;
    margin-left: 0.5rem;
    animation: bounce 2s infinite;
  }

  @keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateX(0);}
    40% {transform: translateX(10px);}
    60% {transform: translateX(5px);}
  }
}