/* ============================================================
   Sifency 3D Arc Carousel — Styles v2
   Layouts: 3d-arc | clip-path | circle-top | 3d-circle
   ============================================================ */

/* ─── Root Variables ─────────────────────────────────────── */
.sarc-wrapper {
    --sarc-radius:     50px;
    --sarc-transition: 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    --sarc-overlay:    rgba(0,0,0,0.35);
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* ─── Swiper base ────────────────────────────────────────── */
.sarc-wrapper .sarc-swiper {
    width: 100%;
    overflow: visible;
}

/* ─── Card ───────────────────────────────────────────────── */
.sarc-card {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: var(--sarc-radius);
    overflow: hidden;
    background: #111;
    cursor: pointer;
    transition:
        transform   var(--sarc-transition),
        box-shadow  var(--sarc-transition),
        clip-path   var(--sarc-transition);
}

.sarc-card-image {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.sarc-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--sarc-transition);
}

.sarc-card:hover .sarc-card-image img {
    transform: scale(1.06);
}

.sarc-card-link-mask {
    position: absolute;
    inset: 0;
    z-index: 2;
}

/* ─── Card Content ───────────────────────────────────────── */
.sarc-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 28px 28px 24px;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: background var(--sarc-transition);
}

.sarc-card-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    margin-bottom: 4px;
}

.sarc-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.3;
}

.sarc-card-title a {
    color: inherit;
    text-decoration: none;
}

.sarc-card-excerpt {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.75);
    margin: 0;
    line-height: 1.5;
}

.sarc-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    margin-top: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: #fff;
    background: transparent;
    border: 1.5px solid rgba(255,255,255,0.5);
    border-radius: 100px;
    text-decoration: none;
    transition:
        background     var(--sarc-transition),
        border-color   var(--sarc-transition);
    width: fit-content;
}

.sarc-card-btn:hover {
    background: rgba(255,255,255,0.15);
    border-color: #fff;
}

/* ─── Navigation ─────────────────────────────────────────── */
.sarc-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition:
        background    var(--sarc-transition),
        border-color  var(--sarc-transition);
}

.sarc-nav-btn:hover {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.5);
}

.sarc-prev { left: 16px; }
.sarc-next { right: 16px; }

/* ─── Pagination ─────────────────────────────────────────── */
.sarc-pagination {
    bottom: -32px !important;
}

.sarc-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: rgba(255,255,255,0.35);
    opacity: 1;
    transition: transform 0.3s, background 0.3s;
}

.sarc-pagination .swiper-pagination-bullet-active {
    background: #fff;
    transform: scale(1.4);
}

/* ============================================================
   3D ARC / ARCH LAYOUT
   ============================================================ */
.sarc-layout-3d-arc .sarc-swiper {
    perspective: 1400px;
    perspective-origin: 50% 50%;
}

.sarc-layout-3d-arc .sarc-slide {
    width: 340px;
    height: 460px;
    transform-origin: center bottom;
    transition:
        transform   var(--sarc-transition),
        box-shadow  var(--sarc-transition),
        opacity     var(--sarc-transition);
    will-change: transform;
}

.sarc-layout-3d-arc .sarc-slide.swiper-slide-active .sarc-card {
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}

/* ============================================================
   CLIP-PATH MORPH LAYOUT
   ============================================================ */
.sarc-layout-clip-path .sarc-swiper {
    overflow: hidden;
}

.sarc-layout-clip-path .sarc-slide {
    width: 420px;
    height: 520px;
    will-change: clip-path, transform;
}

/* Base fallback shape — JS presets override these */
.sarc-layout-clip-path .sarc-slide .sarc-card {
    clip-path: polygon(8% 0%, 100% 0%, 92% 100%, 0% 100%);
    transition: clip-path var(--sarc-transition);
    border-radius: 0;
}

.sarc-layout-clip-path .sarc-slide.swiper-slide-active .sarc-card {
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
}

.sarc-layout-clip-path .sarc-slide.swiper-slide-prev .sarc-card {
    clip-path: polygon(0% 0%, 92% 0%, 100% 100%, 8% 100%);
    opacity: 0.7;
}

.sarc-layout-clip-path .sarc-slide.swiper-slide-next .sarc-card {
    clip-path: polygon(8% 0%, 100% 0%, 92% 100%, 0% 100%);
    opacity: 0.7;
}

/* ============================================================
   CIRCLE TOP SLIDE LAYOUT
   Fan / perspective carousel viewed from above.
   Matches the reference image: cards fan out with Y-axis
   rotation and depth, the centre card is largest & upright.
   ============================================================ */
.sarc-layout-circle-top {
    overflow: visible;
}

.sarc-layout-circle-top .sarc-swiper {
    overflow: visible;
}

.sarc-layout-circle-top .swiper-wrapper {
    align-items: center;
}

.sarc-layout-circle-top .sarc-slide {
    width: 300px;
    height: 420px;
    transform-origin: center center;
    will-change: transform, opacity;
    flex-shrink: 0;
    border-radius: var(--sarc-radius);
    overflow: hidden;
}

.sarc-layout-circle-top .sarc-card {
    height: 100%;
    border-radius: inherit;
}

.sarc-layout-circle-top .sarc-slide.swiper-slide-active .sarc-card {
    box-shadow: 0 40px 100px rgba(0,0,0,0.45);
}

/* ============================================================
   3D CIRCLE LOOP LAYOUT — Fixed v2
   Uses virtualTranslate + slide.progress for correct
   positioning. No more index-based angle math.
   ============================================================ */
.sarc-layout-3d-circle {
    overflow: visible;
}

.sarc-layout-3d-circle .sarc-swiper {
    overflow: visible;
    perspective: 1200px;
    perspective-origin: 50% 50%;
}

.sarc-layout-3d-circle .swiper-wrapper {
    transform-style: preserve-3d;
    align-items: center;
}

.sarc-layout-3d-circle .sarc-slide {
    width: 280px;
    height: 380px;
    transform-style: preserve-3d;
    will-change: transform, opacity;
}

.sarc-layout-3d-circle .sarc-slide.swiper-slide-active .sarc-card {
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
    .sarc-layout-3d-arc .sarc-slide      { width: 280px; height: 380px; }
    .sarc-layout-clip-path .sarc-slide   { width: 340px; height: 440px; }
    .sarc-layout-circle-top .sarc-slide  { width: 240px; height: 350px; }
    .sarc-layout-3d-circle .sarc-slide   { width: 240px; height: 320px; }
}

@media (max-width: 767px) {
    .sarc-layout-3d-arc .sarc-slide      { width: 240px; height: 320px; }
    .sarc-layout-clip-path .sarc-slide   { width: 90vw;  height: 75vw;  max-height: 420px; }
    .sarc-layout-circle-top .sarc-slide  { width: 200px; height: 280px; }
    .sarc-layout-3d-circle .sarc-slide   { width: 200px; height: 280px; }
    .sarc-prev { left: 4px; }
    .sarc-next { right: 4px; }
    .sarc-nav-btn { width: 40px; height: 40px; font-size: 15px; }
}
