* {
    cursor: none;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: #1D1D1D;
    color: #FFFFFF;
    overflow-x: hidden;
}

.back-button {
    color: white;
    text-decoration: none;
    margin-left: 200px;
    margin-top: 100px;
    padding-top: 10px;
    padding-bottom: 10px;
    margin-bottom: -40px;
    position: relative;
    display: inline-block;
    background-color: #1D1D1D;
    transition: 0.3s;
}

.back-button:hover {
    color: #CE9464;
    transition: 0.3s;
}

.back-button::before {
    content: '';
    position: absolute;
    width: clamp(40px, 50vw, 100px);
    height: clamp(40px, 50vw, 100px);
    border: 1px solid #ffffff;
    border-radius: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    pointer-events: none;
}

.back-button::after {
    content: '';
    position: absolute;
    height: 1px;
    background-color: white;
    top: 50%;
    left: -200px;
    /* Adjust as needed */
    width: 300px;
    /* Length of the line */
    transform: translate(-50%, -50%);
    z-index: -2;
}

.gallery-title {
    font-size: clamp(32px, 8vw, 96px);
    text-align: center;
    margin-block-end: 5rem;
}

/* Desktop Filters */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-bottom: 7rem;
    flex-wrap: wrap;
}

.filter {
    font-size: 26px;
    opacity: 0.3;
    transition: opacity 0.3s;
    cursor: none;
}

.filter.active,
.filter:hover {
    opacity: 1;
}

/* Mobile Filter Dropdown */
.gallery-filters-mobile {
    display: none;
    position: relative;
    margin-bottom: 3rem;
    text-align: center;
}

.filter-toggle {
    font-size: 16px;
    transition: opacity 0.3s;
    cursor: none;
    background: none;
    border: none;
    color: white;
    position: relative;
    padding: 15px 90px;
    border: 1px solid rgba(255, 255, 255);
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0 auto;
    min-width: 200px;
    justify-content: center;
}

.filter-toggle:hover {
    opacity: 1;
    border-color: rgba(255, 255, 255);
}

.filter-toggle::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid white;
    transition: transform 0.3s;
}

.filter-toggle.active::after {
    transform: rotate(180deg);
}

.filter-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(29, 29, 29, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255);
    border-radius: 20px;
    padding: 20px;
    margin-top: 10px;
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.filter-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(5px);
}

.filter-dropdown .filter {
    display: block;
    padding: 12px 20px;
    margin: 0;
    font-size: 20px;
    text-align: center;
    border-radius: 10px;
    transition: all 0.3s;
}

.filter-dropdown .filter:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Responsive breakpoints */
@media screen and (max-width: 768px) {
    .gallery-filters {
        display: none;
    }

    .gallery-filters-mobile {
        display: block;
    }

    .back-button {
        margin-left: 100px;
        margin-top: 50px;
    }



    .gallery-title {
        font-size: clamp(32px, 8vw, 96px);
        text-align: center;
        margin-block-end: 2rem;
    }


}

@media screen and (max-width: 1200px) and (min-width: 769px) {
    .gallery-filters {
        gap: 2rem;
    }

    .filter {
        font-size: 22px;
    }
}







html {
    box-sizing: border-box;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

.mansory-container {
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
    max-width: 1860px;
}

.mansory {
    max-width: 100%;
    column-gap: 30px;
}


@media only screen and (min-width: 1000px) {
    .mansory {
        column-count: 3;
    }
}

.mansory-item {
    margin: 0 0 30px;
    display: inline-block;
    width: 100%;
}

.box {
    height: 700px;
    position: relative;
    overflow: hidden;
}

.box2 {
    height: 800px;
    position: relative;
    overflow: hidden;
}

.box3 {
    height: 900px;
    position: relative;
    overflow: hidden;
}

.box,
.box2,
.box3 {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    z-index: 1;
}

.box img,
.box2 img,
.box3 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background-color: #2a2a2a;
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 2;
}

.box img.loaded,
.box2 img.loaded,
.box3 img.loaded {
    opacity: 1;
}

.box::before,
.box2::before,
.box3::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1d1d1d 0%, #1a1a1a 100%);
    opacity: 1;
    z-index: 2;
}

.box img.loaded~ ::before,
.box2 img.loaded~ ::before,
.box3 img.loaded~ ::before {
    opacity: 0;
}

.mansory img {
    width: 100%;
    image-rendering: auto;
    object-fit: cover;
    display: block;
}

.progress-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

/* Responsive progress bar size */
@media (max-width: 768px) {
    .progress-container svg {
        width: 50px !important;
        height: 50px !important;
    }

    .progress-container text {
        font-size: 10px !important;
    }
}








/* Cursor ============================================================ */
.cursor {
    pointer-events: none;
}

#cursor {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    pointer-events: none;
    will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
    .cursor__circle {
        width: 48px;
        height: 48px;
        margin-top: -50%;
        margin-left: -50%;
        border-radius: 50%;
        border: solid 1px rgb(255, 255, 255);
        transition: opacity 0.3s cubic-bezier(0.25, 1, 0.5, 1),
            background-color 0.3s cubic-bezier(0.25, 1, 0.5, 1),
            border-color 0.3s cubic-bezier(0.25, 1, 0.5, 1),
            width 0.3s cubic-bezier(0.25, 1, 0.5, 1),
            height 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    }

    #cursor.arrow::after {
        content: 'TIRER';
        bottom: 16px;
        position: absolute;
        transform: translate(-50%, -100%);
        font-size: 14px;
        color: white;
        font-weight: lighter;
    }

    #cursor.close::after {
        content: 'FERMER';
        bottom: 16px;
        position: absolute;
        transform: translate(-50%, -100%);
        font-size: 14px;
        color: white;
        font-weight: lighter;
    }

    #cursor.overlay::after {
        content: 'CLICK';
        bottom: 16px;
        position: absolute;
        transform: translate(-50%, -100%);
        font-size: 14px;
        color: white;
        font-weight: lighter;
    }

    #cursor.subtle .cursor__circle {
        width: 32px;
        height: 32px;
    }

    #cursor.small .cursor__circle {
        width: 16px;
        height: 16px;
    }

    #cursor.overlay .cursor__circle {
        width: 96px;
        height: 96px;
    }

    #cursor.close .cursor__circle {
        width: 96px;
        height: 96px;
        background-color: rgba(255, 255, 255, 0.212);
        border: none;
    }

    #cursor.arrow .cursor__circle {
        width: 96px;
        height: 96px;
    }
}

/* Scrollbar ========================================================== */
* {
    scrollbar-width: thin;
    scrollbar-color: #888 #1D1D1D;
}




/* Animation ========================================================= */
/* Left animation */
.slide-animation-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 1.2s ease-out, transform 0.8s ease-out;
}

.slide-animation-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-animation-left.hidden-left {
    opacity: 0;
    transform: translateX(-30px);
}

.slide-animation-left.hidden-right {
    opacity: 0;
    transform: translateX(30px);
}

/* Right animation */
.slide-animation-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 1.2s ease-out, transform 0.8s ease-out;
}

.slide-animation-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-animation-right.hidden-left {
    opacity: 0;
    transform: translateX(-30px);
}

.slide-animation-right.hidden-right {
    opacity: 0;
    transform: translateX(30px);
}

/* Vertical animations */
.slide-animation {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.slide-animation.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-animation.hidden-bottom {
    opacity: 0;
    transform: translateY(30px);
}

.slide-animation.hidden-top {
    opacity: 0;
    transform: translateY(-30px);
}




/* Back to Top Button - matching language selector style */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background-color: #1d1d1d;
    border-radius: 50px;
    padding: 24px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    user-select: none;
    transition: all 0.3s ease;
    border: #323232 solid 1px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    min-width: 60px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top svg {
    color: #686868;
    transition: all 0.3s ease;
    display: block;
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
    background-color: #252525;
}

.back-to-top:hover svg {
    color: #ffffff;
    transform: scale(1.0.5) translateY(-1px);
}

.back-to-top:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Responsive */
@media (max-width: 1000px) {
    .back-to-top {
        bottom: 30px;
        right: 30px;
        padding: 20px;
        min-width: 56px;
        min-height: 56px;
    }
    
    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
}