﻿/* Global styles */
body {
    margin: 0;
    padding: 0;
}

@media (min-width: 1000px) {
    body {
        background-image: url('/assets/images/travelbackgroudrepeat.png');
        background-repeat: repeat; /* Ensures the image repeats */
        background-attachment: scroll; /* Makes the background scroll with the content */
    }
}

main {
    width: 100%;
    max-width: var(--max-width);
    background-color: var(--bg-color);
    border-radius: 8px;
}

/* Filter buttons */
.travel-filters {
    text-align: center;
    margin-bottom: 1rem;
}

    .travel-filters button {
        background-color: white;
        color: #008080;
        border: 2px solid #008080;
        padding: 10px 20px;
        border-radius: 25px;
        cursor: pointer;
        font-weight: bold;
        transition: all 0.2s ease;
        margin-top: 0.25rem;
    }

        .travel-filters button:hover {
            background-color: #e0f7f7;
        }

        .travel-filters button.active {
            background-color: #008080;
            color: white;
            border-color: #005f5f;
            box-shadow: 0 0 10px rgba(0, 128, 128, 0.4);
            transform: scale(1.05);
        }

/* Travel cards container */
.travel-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    opacity: 1;
    transition: opacity 0.4s ease;
}

    .travel-content.fade-out {
        opacity: 0;
    }

    .travel-content.fade-in {
        opacity: 1;
    }

/* Individual travel card */
.travel-card {
    background-color: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

    .travel-card h3 {
        margin-top: 0;
        color: #008080;
    }

    .travel-card .date {
        font-weight: bold;
        color: #555;
    }

    .travel-card .summary {
        margin: 0.5rem 0;
    }

    .travel-card .photos {
        display: flex;
        overflow-x: auto;
        gap: 10px;
        margin-top: 0.5rem;
    }

        .travel-card .photos img {
            max-height: 150px;
            border-radius: 5px;
            flex-shrink: 0;
            object-fit: cover;
        }

/* Responsive for travel-card photos */
@media (min-width: 768px) {
    .travel-card .photos img {
        max-height: 200px;
    }
}

/* YouTube buttons */
.travel-card .youtube-btn {
    display: inline-block;
    margin-top: 0.75rem;
    background-color: #ff0000;
    color: white;
    padding: 6px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
}

.youtube-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #008080;
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

    .youtube-btn:hover {
        background-color: #00a3a3;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
        transform: translateY(-2px);
    }

.arrow-icon {
    display: inline-block;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 8px solid white;
    transition: transform 0.3s ease;
}

.youtube-btn:hover .arrow-icon {
    transform: translateX(4px);
}

/* YouTube red link button */
.youtube-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.5em 1.2em;
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
    background-color: #FF0000; /* solid YouTube red */
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    user-select: none;
    box-shadow: 0 0 6px #FF0000AA;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin-top: 1rem;
}

    .youtube-link:hover,
    .youtube-link:focus {
        transform: scale(1.08);
        box-shadow: 0 0 12px 4px #FF0000DD;
        outline: none;
    }

/* Load More button */
.load-more-container {
    text-align: center;
    margin-top: 1rem;
}

#load-more-btn {
    background-color: #008080;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 0;
    margin: 1rem;
}

    #load-more-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -75%;
        width: 50%;
        height: 100%;
        background: linear-gradient( 120deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0) 100% );
        transform: skewX(-20deg);
        animation: shimmer 2.5s infinite;
        z-index: 1;
    }

@keyframes shimmer {
    0% {
        left: -75%;
    }

    100% {
        left: 125%;
    }
}

#load-more-btn:hover {
    background-color: #00a3a3;
}

/* Photo carousel */
.photo-carousel {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 1rem auto 0;
    user-select: none;
}

.carousel-wrapper {
    overflow: visible; /* Show overlap */
    position: relative;
    width: 100%;
    height: clamp(200px, 40vw, 350px);
}

.carousel-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    position: relative;
    height: 100%;
}

    .carousel-list li {
        position: absolute;
        top: 0;
        width: 80%;
        max-width: 800px;
        height: clamp(200px, 40vw, 350px);
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        transition: transform 0.5s ease, opacity 0.5s ease;
        cursor: grab;
        overflow: hidden;
        background: #fff;
        opacity: 0;
        pointer-events: none;
        left: 50%;
        transform: translateX(-50%) scale(0.8);
        z-index: 1;
    }

        /* Active (front) carousel item */
        .carousel-list li.active {
            opacity: 1;
            pointer-events: auto;
            transform: translateX(-50%) scale(1);
            z-index: 3;
            border: 2px solid #008080;
            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.9);
            border-radius: 12px;
            cursor: grab;
        }

        /* Previous and next peek */
        .carousel-list li.prev,
        .carousel-list li.next {
            opacity: 0.6;
            pointer-events: none;
            z-index: 2;
            left: 50%;
            cursor: default;
        }

        .carousel-list li.prev {
            transform: translateX(-80%) scale(0.8);
        }

        .carousel-list li.next {
            transform: translateX(-20%) scale(0.8);
        }

        /* Hide others */
        .carousel-list li:not(.active):not(.prev):not(.next) {
            opacity: 0;
            pointer-events: none;
        }

    /* Images fill carousel items */
    .carousel-list img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        border-radius: 8px;
    }

/* Carousel navigation buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: #008080;
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    user-select: none;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    line-height: 1;
}

    .carousel-btn:hover {
        opacity: 1;
    }

    .carousel-btn.prev {
        left: -30px;
    }

    .carousel-btn.next {
        right: -30px;
    }

@media (max-width: 600px) {
    .photo-carousel {
        max-width: 100%;
    }

    .carousel-btn.prev {
        left: 5px;
    }

    .carousel-btn.next {
        right: 5px;
    }
}
