.rides-page {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 1rem 2rem;
}

.rides-page h1 {
    text-align: center;
    margin: 0 0 1rem 0;
    font-size: 2.5rem;
    color: #112145;
}

.rides-text p {
    text-align: center;
    line-height: 1.6;
    color: #2c2c43;
    font-family: Gotham_Book, serif;
    font-size: 1rem;
    max-width: 1000px;
    margin: 0 auto 2rem;
}

#rides-filters {
    max-width: 900px;
    margin: 0 auto;
}

#search-bar {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 50px;
    border: 1px solid #ccc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

#search-bar:focus {
    outline: none;
    border-color: #0f59aa;
    box-shadow: 0 4px 12px rgba(15, 89, 170, 0.3);
}

#rides-container {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.attraction {
    margin-left: auto;
    margin-right: auto;
}

/* === Filtres catégories === */
#category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1.2rem 0;
    justify-content: center;
}

.category-filter {
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    border: 1px solid #0f59aa;
    background: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #0f59aa;
    font-family: Gotham_Book, sans-serif;
}

.category-filter:hover {
    background: #f0f7ff;
    transform: scale(1.05);
}

.category-filter.active {
    background: #0f59aa;
    color: #fff;
    box-shadow: 0 3px 8px rgba(15, 89, 170, 0.4);
}

/* === Toggle switch "Nouveautés uniquement" === */
#filter-new {
    display: none; /* cacher la checkbox brute */
}

.toggle-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin: 1.5rem 0;
    font-family: Avenir_Black, sans-serif;
    font-size: 1.1rem;
    color: #2c2c43;
}

/* Switch visuel */
.toggle-label {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-label input {
    display: none;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.4s;
}

/* Quand activé */
.toggle-label input:checked + .slider {
    background-color: #0f59aa;
}

.toggle-label input:checked + .slider:before {
    transform: translateX(24px);
}

.filters {
    display: flex;
    justify-content: center;
    gap: 5rem;
    margin-bottom: 2rem;
}

#loading,
#rides-container p {
    text-align: center;
    line-height: 1.6;
    color: #2c2c43;
    font-family: Gotham_Book, serif;
    font-size: 1rem;
    max-width: 1000px;
    margin: 0 auto 2rem;
}

#loading {
    font-weight: bold;
}

.attraction h4 {
    font-size: 1.4rem !important;
    left: 1rem;
}

.ride-layout small {
    display: block;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #666;
    text-align: left;
}

@media (max-width: 560px) {
    .section h2 {
        font-size: 2rem;
    }
}

@media (max-width: 730px) {
    .filters {
        gap: 2rem;
    }
}
@media (max-width: 666px) {
    .filters {
        gap: 0;
        flex-direction: column;
    }
    #category-filters {
        margin-bottom: 0;
    }
}

.ride-tag {
    font-size: 1rem;
    color: white;
    display: inline-block;
    margin-bottom: 0.3rem; /* spacing between tag and name */
    position: absolute;
    z-index: 3;
    border-radius: 12px 0 4px 0;
    padding: 0.4rem 0.8rem 0.2rem;
}

.tag-new {
    background: linear-gradient(45deg, #a69254, #958043);
}

.tag-en-construction {
    background: linear-gradient(45deg, #d9534f, #c12d2d);
}

.ride-tags-page {
    font-size: 0.85rem;
    font-weight: 500;
    color: #fff;
    padding: 5px 12px;
    white-space: nowrap;
    border-radius: 4px;
}

.tags-rides {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.7rem 0 0.6rem;
}

.tag-en-construction-page {
    background: linear-gradient(45deg, #d9534f, #c12d2d);
}

.ride-main p {
    font-family: Gotham_Book, serif;
    text-align: justify;
    line-height: 1.6;
    color: #2c2c43;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.ride-main {
    text-align: center;
}

#show-more-rides {
    align-self: flex-start;
    color: #0f59aa;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s
    ease;
    display: inline-block;
}

#show-more-rides:hover {
    color: #023061;
}

.ride-main h2 {
    font-size: 3.2rem;
}

.ride-main h4 {
    text-align: center;
    margin-top: -0.9rem;
    padding-bottom: 1.7rem;
    font-size: 1.2rem;
    color: #2b4889;
}

#ride-technical-list {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    padding-top: 10px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

#ride-technical-list > div:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
}

.ride-technical-list {
    flex: 0 1 auto;
    width: 33%;
    color: #4565ad;
    display: flex;
    min-width: 250px;
    margin-bottom: 20px;
    padding: 0 10px;
    margin-left: auto;
    margin-right: auto;
}

.ride-technical-list strong {
    font-weight: bold;
    text-transform: uppercase;
    font-family: Avenir_Black, sans-serif;
}


.ride-technical-list .icon {
    padding: 10px 10px 0 0;
    max-height: 70px;
    max-width: 70px;
    flex: 0 0 70px;
}

.section {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.ride-main {
    margin-bottom: 2rem;
}

.ride-technical-list .content {
    display: flex;
    flex-direction: column;
    font-family: Gotham_Book, serif;
    margin-top: auto;
    margin-bottom: auto;
}

#related-rides {
    margin-bottom: 2.5rem;
    margin-top: 1rem;
}

#lightbox-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0);
    display: none;
    z-index: 9998;
    transition: background-color 0.4s ease;
}

#lightbox-overlay.visible {
    background-color: rgba(0, 0, 0, 0.8);
    display: block;
}

#lightbox-overlay img {
    position: fixed;
    top: 50%;
    left: 50%;
    max-width: min(90vw, 1350px);
    max-height: min(85vh, 1000px);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.4s ease, opacity 0.4s ease;
    cursor: zoom-out;
    object-fit: contain;
    z-index: 10000;
    opacity: 0;
}

#lightbox-overlay.visible img {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

#lightbox-overlay .lightbox-caption {
    position: fixed;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    color: #cccccc; /* gris clair, mais pas blanc pur */
    font-size: 1.2rem;
    z-index: 10001;
    max-width: 90vw;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}


#lightbox-overlay.visible .lightbox-caption {
    opacity: 1;
}

#lightbox-overlay .lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 32px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    z-index: 10002;
    transition: color 0.3s ease;
}

/* Scrollable gallery container */
#ride-images {
    display: flex;
    overflow-x: auto; /* horizontal scroll */
    gap: 1rem;
    user-select: none;
    scrollbar-width: none;
    padding: 1rem 0;
    scroll-behavior: smooth; /* smooth scroll for mouse/touch */
    flex-wrap: nowrap;
    justify-content: flex-start;
}

/* Hide default scrollbar (optional) */
#ride-images::-webkit-scrollbar {
    display: none;
}
#ride-images::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
}
#ride-images::-webkit-scrollbar-track {
    background: transparent;
}

.gallery-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-top: 1rem;
}

.gallery-container {
    display: flex;
    gap: 1rem;
    transition: scroll-left 0.3s ease;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 1rem;
}

/* Images in a row */
.gallery-container img {
    flex: 0 0 auto; /* prevent wrapping */
    width: 60%;
    max-width: 400px;
    border-radius: 10px;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.gallery-container img:hover {
    transform: scale(1.05);
}

/* Dots indicator */
.gallery-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.gallery-dots span {
    display: block;
    width: 12px;
    height: 12px;
    background: #ccc;
    border-radius: 50%;
    transition: background 0.3s;
}

.gallery-dots span.active {
    background: #3979bc;
}

/* Gallery images */
#ride-images img {
    flex: 0 0 auto; /* don't shrink */
    width: 60%; /* slightly bigger than before */
    height: auto;
    border-radius: 10px;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.25);
    cursor: grab;
    transition: transform 0.3s ease;
    -webkit-user-drag: none;
    user-drag: none;
}

#lightbox-overlay .lightbox-close:hover {
    color: rgba(255, 255, 255, 1);
}


.ride-technical-list .icon svg path {
    fill: #4565ad;
}

h2 {
    font-size: 2rem;
}

.ride-technical-list .icon svg {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
}