/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Apercu Pro', sans-serif;
    font-weight: 600;
    background-color: black;
    color: white;
    font-size: 12px;
}

a {
    text-decoration: none;
    color: white;
}

/* Header styles */
header {
    width: 1140px;
    max-width: 80%;
    margin: auto;
    height: 50px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 100;
}

header a {
    margin-right: 40px;
}

/* Navbar styles */
nav {
    position: fixed; /* Change to fixed */
    top: 20px; /* Adjust top position */
    right: 20px; /* Adjust right position */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 35px;
    background: linear-gradient(96.85deg, rgba(255, 185, 40, 0.64) 6.09%, rgba(255, 57, 180, 0.64) 37.92%, rgba(95, 196, 236, 0.64) 65.58%);
    opacity: 1;
    border-radius: 50px;
    z-index: 1000; /* Ensure the navbar is always on top */
}

.nav-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav a {
    color: white;
    font-weight: bold;
    font-size: 14px;
    margin-left: 20px; /* Add margin between links */
}

/* Hamburger menu styles */
.hamburger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger-menu .bar {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 4px 0;
    transition: 0.4s;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
    }

    nav.active .nav-links {
        display: flex;
    }

    .hamburger-menu {
        display: flex;
    }

    .hamburger-menu.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 5px);
    }

    .hamburger-menu.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -5px);
    }
}

/* Improved Hamburger Menu Animation */
.hamburger-menu.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Carousel styles */
.carousel {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    margin-top: -50px;
    position: relative;
}

.carousel .list .item {
    position: absolute;
    inset: 0 0 0 0;
}

.carousel .list .item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel .list .item .content {
    position: absolute;
    top: 20%;
    width: 1140px;
    max-width: 80%;
    left: 50%;
    transform: translateX(-50%);
    padding-right: 30%;
}

.carousel .list .item .court-type {
    font-size: 16.61px;
    letter-spacing: 0.5em;
}

.carousel .list .item .title {
    font-size: 4.746875rem;
    font-family: 'Druk Wide Trial', sans-serif;
    color: #5FC4EC;
    -webkit-text-stroke: 1px black;
    text-shadow: 0 0 3px black;
}

.carousel .list .item .title.pakhus77 {
    color: #FFB928;
}

.carousel .list .item .title.risskov {
    color: #FF39B4;
}

.carousel .list .item .title.harbor {
    color: #5FC4EC;
}

.carousel .list .item .topic {
    font-size: 23.73px;
}

.carousel .list .item .buttons button {
    padding: 17px 34px;
    font-family: 'Apercu Pro', serif;
    font-weight: 600;
    text-transform: uppercase;
    background-color: #5FC4EC;
    border-radius: 10px;
    color: white;
    margin-top: 1.125rem;
    border: none;
    font-size: 16px;
    cursor: pointer;
}

.carousel .list .item .buttons button.pakhus77 {
    background-color: #FFB928;
}

.carousel .list .item .buttons button.risskov {
    background-color: #FF39B4;
}

.carousel .list .item .buttons button.harbor {
    background-color: #5FC4EC;
}

/* Thumbnail styles */
.thumbnail {
    position: absolute;
    bottom: 50px;
    left: 50%;
    width: max-content;
    z-index: 100;
    display: flex;
    gap: 20px;
}

.thumbnail .item {
    width: 150px;
    height: 220px;
    flex-shrink: 0;
    position: relative;
}

.thumbnail .item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.thumbnail .item .content {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
}

/* Arrow styles */
.arrows {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    position: fixed; /* Change to fixed */
    bottom: 120px; /* Adjust bottom position */
    right: 55%; /* Adjust right position */
    z-index: 200;
}

.arrows button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    color: white;
    background: #FF39B4;
    font-family: monospace;
    font-weight: bold;
    font-size: large;
    transition: .5s;
    cursor: pointer;
}

.arrows button:hover {
    background-color: #b62c81;
}

/* Carousel animation styles */
.carousel .list .item:nth-child(1) {
    z-index: 1;
}

.carousel .list .item:nth-child(1) .court-type,
.carousel .list .item:nth-child(1) .title,
.carousel .list .item:nth-child(1) .topic,
.carousel .list .item:nth-child(1) button {
    transform: translateY(50px);
    filter: blur(20px);
    opacity: 0;
    animation: showContent 0.5s 1s linear 1 forwards;
}

@keyframes showContent {
    to {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
    }
}

.carousel .list .item:nth-child(1) .court-type {
    animation-delay: 0.6s;
}

.carousel .list .item:nth-child(1) .title {
    animation-delay: 0.8s;
}

.carousel .list .item:nth-child(1) .topic {
    animation-delay: 1s;
}

.carousel .list .item:nth-child(1) button {
    animation-delay: 1.2s;
}

/* Next button effect */
.carousel.next .list .item:nth-child(1) img {
    width: 150px;
    height: 220px;
    position: absolute;
    left: 50%;
    bottom: 50px;
    border-radius: 20px;
    animation: showImage 0.5s linear 1 forwards;
}

@keyframes showImage {
    to {
        width: 100%;
        height: 100%;
        left: 0;
        bottom: 0;
        border-radius: 0;
    }
}

.carousel.next .thumbnail.item:nth-last-child(1) {
    width: 0;
    overflow: hidden;
    animation: showThumbnail .5s linear 1 forwards;
}

@keyframes showThumbnail {
    to {
        width: 150px;
    }
}

.carousel.next .thumbnail {
    transform: translateX(150px);
    animation: transformThumbnail .5s linear 1 forwards;
}

@keyframes transformThumbnail {
    to {
        transform: translateX(0);
    }
}

/* Previous button effect */
.carousel.prev .list .item:nth-child(2) {
    z-index: 2;
}

.carousel.prev .list .item:nth-child(2) img {
    position: absolute;
    bottom: 0;
    left: 0;
    animation: outImage 0.5s linear forwards;
}

@keyframes outImage {
    to {
        width: 150px;
        height: 220px;
        border-radius: 20px;
        left: 50%;
        bottom: 50px;
    }
}

.carousel.prev .thumbnail .item:nth-child(0) {
    width: 0;
    overflow: hidden;
    opacity: 0;
    animation: showThumbnail 0.5s linear 1 forwards;
}

.carousel.prev .list .item:nth-child(2) .court-type,
.carousel.prev .list .item:nth-child(2) .title,
.carousel.prev .list .item:nth-child(2) .topic,
.carousel.prev .list .item:nth-child(2) button {
    animation: contentOut 1.5s linear 1 forwards;
}

@keyframes contentOut {
    to {
        transform: translateY(-150px);
        filter: blur(20px);
        opacity: 0;
    }
}

.carousel.next .arrows button,
.carousel.prev .arrows button {
    pointer-events: none;
}

/* Media Queries */

/* Small screens (phones) */
@media screen and (max-width: 480px) {
    .carousel .list .item .title {
        font-size: 28px;
    }

    .carousel .list .item .topic {
        font-size: 16px;
    }

    .cards .container {
        flex-direction: row;
        gap: 100px;
    }

    .carousel .list .item .buttons button {
        padding: 8px 22px;
        font-family: 'Apercu Pro', serif;
        font-weight: 600;
        text-transform: uppercase;
        background-color: #5FC4EC;
        border-radius: 10px;
        color: white;
        margin-top: 1.125rem;
        border: none;
        font-size: 12px;
        cursor: pointer;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
    }

    nav.active .nav-links {
        display: flex;
    }

    .hamburger-menu {
        display: flex;
    }

    .hamburger-menu.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .hamburger-menu.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    .hamburger-menu.active .bar:nth-child(2) {
        opacity: 0;
    }
}

/* Medium screens (tablets and larger smartphones) */
@media screen and (min-width: 481px) and (max-width: 768px) {
    .carousel .list .item .title {
        font-size: 48px;
    }

    .carousel .list .item .topic {
        font-size: 20px;
    }

    .cards .container {
        flex-direction: row;
        gap: 100px;
    }

    .carousel .list .item .buttons button {
        padding: 10px 24px;
        font-family: 'Apercu Pro', serif;
        font-weight: 600;
        text-transform: uppercase;
        background-color: #5FC4EC;
        border-radius: 10px;
        color: white;
        margin-top: 1.125rem;
        border: none;
        font-size: 14px;
        cursor: pointer;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
    }

    nav.active .nav-links {
        display: flex;
    }

    .hamburger-menu {
        display: flex;
    }

    .hamburger-menu.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .hamburger-menu.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    .hamburger-menu.active .bar:nth-child(2) {
        opacity: 0;
    }
}

/* Large screens (laptops and larger tablets) */
@media screen and (min-width: 769px) and (max-width: 1279px) {
    .carousel .list .item .title {
        font-size: 54px;
    }

    .carousel .list .item .topic {
        font-size: 20px;
    }

    .cards .container {
        flex-direction: row;
        gap: 100px;
    }

    .carousel .list .item .buttons button {
        padding: 12px 28px;
        font-family: 'Apercu Pro', serif;
        font-weight: 600;
        text-transform: uppercase;
        background-color: #5FC4EC;
        border-radius: 10px;
        color: white;
        margin-top: 1.125rem;
        border: none;
        font-size: 14px;
        cursor: pointer;
    }
}

