/*
===============================================
Temple Carousel - Refined Glass Carousel Styles
===============================================
*/

.temple-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow-x: hidden;
    overflow-y: visible;
    padding: 56px 0 42px;
    min-height: calc(var(--temple-card-height) + 118px);

    /* Theme tokens */
    --temple-accent: #d4af37;
    --temple-title-color: #ddb06d;
    --temple-location-color: rgba(255, 247, 235, 0.9);
    --temple-dot-color: rgba(212, 175, 55, 0.56);
    --temple-dot-color-active: #f1cf8e;
    --temple-glass-bg: rgba(24, 16, 11, 0.28);
    --temple-glass-blur: 18px;

    /* Layout tokens */
    --temple-gutter: 18px;
    --temple-card-width: 280px;
    --temple-card-height: 380px;
    --temple-scale-active: 1.03;
    --temple-scale-neighbor: 0.97;
    --temple-scale-peek: 0.92;
    --temple-content-padding-y: 28px;
    --temple-text-max-width: 220px;
    --temple-icon-offset: 22px;
}

.temple-swiper-container {
    padding-top: 20px;
    padding-bottom: 56px;
    padding-inline: var(--temple-gutter);
    box-sizing: border-box;
    overflow: visible;
    min-height: calc(var(--temple-card-height) + 76px);
    opacity: 0;
    transition: opacity 220ms ease;
}

.temple-swiper-container.is-ready {
    opacity: 1;
}

.temple-swiper-container .temple-swiper-track {
    display: flex;
    align-items: center;
    min-height: var(--temple-card-height);
}

.temple-slide {
    width: var(--temple-card-width);
    height: var(--temple-card-height);
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    will-change: transform, opacity, filter;
    transition:
        transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 240ms ease,
        filter 240ms ease;
    opacity: var(--temple-slide-opacity, 0.52);
    transform: translate3d(0, var(--temple-slide-translate-y, 0px), 0) scale(var(--temple-slide-scale, 0.9));
    filter:
        saturate(var(--temple-slide-saturate, 0.82))
        brightness(var(--temple-slide-brightness, 1))
        blur(var(--temple-slide-blur, 0px));
    transform-origin: center center;
}

.temple-slide.temple-swiper-slide-visible {
    opacity: var(--temple-slide-opacity, 0.76);
    transform: translate3d(0, var(--temple-slide-translate-y, 0px), 0) scale(var(--temple-slide-scale, var(--temple-scale-peek)));
    filter:
        saturate(var(--temple-slide-saturate, 0.92))
        brightness(var(--temple-slide-brightness, 1))
        blur(var(--temple-slide-blur, 0px));
}

.temple-slide.temple-swiper-slide-prev,
.temple-slide.temple-swiper-slide-next {
    z-index: 5;
}

.temple-slide.temple-swiper-slide-active {
    z-index: 10;
}

.temple-slide-inner {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 22px;
    padding:
        var(--temple-content-padding-y)
        18px
        calc(var(--temple-content-padding-y) + 42px + var(--temple-icon-offset));
    text-align: center;
    overflow: hidden;

    background:
        linear-gradient(180deg, rgba(255, 241, 219, 0.14) 0%, rgba(255, 241, 219, 0.03) 18%, rgba(17, 11, 8, 0.2) 100%),
        linear-gradient(135deg, rgba(112, 80, 38, 0.2) 0%, rgba(31, 22, 16, 0.18) 42%, rgba(12, 9, 8, 0.34) 100%),
        var(--temple-glass-bg);
    backdrop-filter: blur(var(--temple-glass-blur)) saturate(145%) contrast(1.04);
    -webkit-backdrop-filter: blur(var(--temple-glass-blur)) saturate(145%) contrast(1.04);

    border: 1px solid rgba(226, 185, 116, 0.62);
    box-shadow:
        0 18px 34px rgba(9, 7, 5, 0.2),
        0 3px 18px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 244, 224, 0.2),
        inset 0 -1px 0 rgba(120, 81, 39, 0.16);
    transform:
        perspective(1200px)
        translate3d(var(--temple-slide-shift-x, 0px), 0, 0)
        rotateY(var(--temple-slide-rotate-y, 0deg));
    transition:
        transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
        border-color 260ms ease,
        box-shadow 320ms ease;
}

.temple-slide-inner::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 245, 225, 0.08) 18%, rgba(255, 255, 255, 0) 46%),
        linear-gradient(180deg, rgba(255, 210, 140, 0.1) 0%, rgba(255, 210, 140, 0) 28%);
    opacity: 0.78;
    mix-blend-mode: screen;
}

.temple-slide-inner::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    pointer-events: none;
    border: 1px solid rgba(255, 241, 219, 0.12);
    opacity: 0.95;
    box-shadow: inset 0 0 0 1px rgba(255, 228, 184, var(--temple-slide-glow, 0.18));
    transition: box-shadow 320ms ease;
}

.temple-slide-body {
    display: grid;
    place-items: center;
    height: 100%;
}

.temple-slide-content {
    position: relative;
    z-index: 1;
    width: min(100%, var(--temple-text-max-width));
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.temple-slide-title {
    color: var(--temple-title-color);
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.16;
    margin: 0;
    text-wrap: balance;
}

.temple-slide-location {
    color: var(--temple-location-color);
    font-size: 14px;
    font-weight: 300;
    line-height: 1.45;
    margin: 0;
    max-width: 100%;
}

.temple-slide-footer {
    position: absolute;
    right: 0;
    bottom: var(--temple-icon-offset);
    left: 0;
    z-index: 1;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.temple-slide-icon {
    color: var(--temple-accent);
    transition: color 0.26s ease, transform 0.26s ease, opacity 0.26s ease;
}

.temple-slide-icon svg {
    width: 25px;
    height: 25px;
    opacity: 0.92;
}

.temple-slide-link {
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
}

.temple-slide-link:focus-visible {
    outline: 2px solid rgba(241, 207, 142, 0.95);
    outline-offset: 3px;
}

.temple-slide.temple-swiper-slide-active:hover .temple-slide-inner,
.temple-slide:focus-within .temple-slide-inner {
    border-color: rgba(241, 207, 142, 0.88);
    box-shadow:
        0 22px 42px rgba(9, 7, 5, 0.24),
        0 6px 22px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 248, 236, 0.22),
        inset 0 -1px 0 rgba(160, 111, 54, 0.22);
}

.temple-slide.temple-swiper-slide-active:hover .temple-slide-icon,
.temple-slide:focus-within .temple-slide-icon {
    color: #f3d298;
    transform: translateY(-1px);
}

.temple-carousel-wrapper.is-dragging .temple-slide,
.temple-carousel-wrapper.is-dragging .temple-slide-inner,
.temple-carousel-wrapper.is-dragging .temple-slide-inner::after,
.temple-carousel-wrapper.is-dragging .temple-slide-icon {
    transition-duration: 60ms;
}

.temple-swiper-button-prev,
.temple-swiper-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(226, 185, 116, 0.9);
    z-index: 20;
    cursor: pointer;
    transition:
        color 0.24s ease,
        opacity 0.24s ease,
        transform 0.24s ease,
        filter 0.24s ease;
    opacity: 0.8;
    filter: drop-shadow(0 6px 18px rgba(12, 8, 5, 0.18));
}

.temple-swiper-button-prev:hover,
.temple-swiper-button-next:hover {
    opacity: 1;
    color: #f3d298;
    transform: translateY(-50%) scale(1.05);
}

.temple-swiper-button-prev {
    left: 6px;
}

.temple-swiper-button-next {
    right: 6px;
}

.temple-swiper-button-disabled,
.temple-swiper-button-lock {
    opacity: 0.35;
    pointer-events: none;
}

.temple-swiper-button-hidden {
    opacity: 0;
    pointer-events: none;
}

.temple-swiper-pagination {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 12px;
    z-index: 20;
}

.temple-swiper-pagination .temple-swiper-pagination-bullet {
    width: 14px;
    height: 14px;
    margin: 0;
    background: transparent;
    border: 0;
    opacity: 1;
    position: relative;
    cursor: pointer;
}

.temple-swiper-pagination .temple-swiper-pagination-bullet::before {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: var(--temple-dot-color);
    transition:
        transform 0.22s ease,
        background-color 0.22s ease,
        opacity 0.22s ease,
        box-shadow 0.22s ease;
}

.temple-swiper-pagination .temple-swiper-pagination-bullet-active::before {
    background: var(--temple-dot-color-active);
    transform: scale(1.15);
    box-shadow: 0 0 0 4px rgba(241, 207, 142, 0.14);
}

.temple-swiper-pagination.temple-swiper-pagination-lock,
.temple-swiper-pagination.temple-swiper-pagination-hidden {
    display: none;
}

@media (max-width: 1024px) {
    .temple-carousel-wrapper {
        --temple-card-width: clamp(180px, 25vw, 240px);
        --temple-card-height: clamp(300px, 38vw, 360px);
    }
}

@media (max-width: 768px) {
    .temple-carousel-wrapper {
        --temple-card-width: clamp(138px, 40vw, 168px);
        --temple-card-height: clamp(252px, 72vw, 310px);
        --temple-gutter: 12px;
        --temple-content-padding-y: 24px;
        --temple-text-max-width: 84%;
        --temple-icon-offset: 18px;
    }

    .temple-swiper-container {
        padding-bottom: 50px;
        min-height: calc(var(--temple-card-height) + 70px);
    }

    .temple-slide-inner {
        border-radius: 20px;
        padding-inline: 14px;
    }

    .temple-slide {
        transition-duration: 240ms;
    }

    .temple-slide-inner {
        transition-duration: 300ms;
    }

    .temple-slide-title {
        font-size: 15px;
        letter-spacing: 0.05em;
    }

    .temple-slide-location {
        font-size: 12px;
        line-height: 1.42;
    }

    .temple-slide-icon svg {
        width: 22px;
        height: 22px;
    }

    .temple-swiper-pagination {
        gap: 8px;
    }

    .temple-swiper-pagination .temple-swiper-pagination-bullet {
        width: 12px;
        height: 12px;
    }
}

@supports (color: color-mix(in srgb, #000 50%, transparent)) {
    .temple-slide-inner {
        border-color: color-mix(in srgb, var(--temple-accent) 56%, rgba(255, 241, 219, 0.18));
    }

    .temple-slide.temple-swiper-slide-active:hover .temple-slide-inner,
    .temple-slide:focus-within .temple-slide-inner {
        border-color: color-mix(in srgb, var(--temple-accent) 74%, rgba(255, 241, 219, 0.24));
    }
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .temple-slide-inner {
        background:
            linear-gradient(180deg, rgba(70, 48, 26, 0.24) 0%, rgba(15, 10, 8, 0.68) 100%),
            rgba(18, 12, 10, 0.84);
    }

    .temple-slide-inner::before {
        opacity: 0.42;
    }
}
