/**
 * Tiger Custom Carousel — front-end styles.
 *
 * Widget-scoped class names (tg-cc-*) so this carousel can never collide
 * with any other Tiger carousel on the page. Typography/colors/borders/
 * paddings are driven by per-widget Elementor Style controls (which can be
 * linked to Global Colors / Global Fonts). Only structural rules live here.
 *
 * @package TigerElements
 */

/* ==========================================
   1. RESETS — hide bundled Swiper defaults
   ========================================== */

.tg-cc-nav-prev:after,
.tg-cc-nav-next:after {
    display: none !important;
}

/* ==========================================
   2. HOLDER & ANTI-SHAKE STABILIZERS
   ========================================== */

.tg-cc-wrap {
    position: relative;
    padding: 20px 0;
}

.tg-cc-cont .tiger-swiper-wrapper {
    will-change: transform;
    display: flex;
    transition-timing-function: cubic-bezier(0.25, 1, 0.5, 1) !important;
    transition-property: transform, height !important;
}

/* Persistent baseline layout — driven by the inline CSS variables emitted
   on the holder. Mirrors Swiper's own width + margin-right spacing so the
   pre-init layout matches what Swiper produces after init (no 0-gap flash).
   Using margin-right (not flex gap) is intentional — flex gap would
   compound with Swiper's margin-right and double the spacing after init. */
.tg-cc-slide {
    flex-shrink: 0;
    width: calc((100% - (var(--cc-cols, 3) - 1) * var(--cc-gap, 30px)) / var(--cc-cols, 3));
    margin-right: var(--cc-gap, 30px);
}

.tg-cc-slide:last-child {
    margin-right: 0;
}

.tg-cc-cont {
    padding: 10px 0 !important;
    overflow: hidden;
    touch-action: pan-y;
}

/* ==========================================
   3. SLIDE DESIGN
   ========================================== */

.tg-cc-slide {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    height: 100%;

    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

.tg-cc-slide:hover {
    transform: translateY(-10px) translateZ(0);
}

/* ==========================================
   4. IMAGE
   ========================================== */

.tg-cc-img {
    width: 100%;
    overflow: hidden;
    line-height: 0;
    aspect-ratio: 16 / 9;
}

.tg-cc-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s ease;
}

.tg-cc-slide:hover .tg-cc-img img {
    transform: scale(1.1);
}

/* ==========================================
   5. CONTENT
   ========================================== */

.tg-cc-title {
    margin: 20px 20px 10px;
}

.tg-cc-desc {
    margin: 0 20px 25px;
    flex-grow: 1;
}

.tg-cc-btn-wrap {
    margin: auto 20px 25px;
}

.tg-cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-align: center;
    width: fit-content;
}

.tg-cc-btn-icon {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}
.tg-cc-btn-icon svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
    display: block;
}

/* ==========================================
   6. NAVIGATION ARROWS
   ========================================== */

.tg-cc-nav-prev,
.tg-cc-nav-next {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -25px; /* vertical centering against Swiper's top:50% */
    cursor: pointer;
}

.tg-cc-nav-prev { left: 10px; }
.tg-cc-nav-next { right: 10px; }

/* ==========================================
   7. PAGINATION BULLETS
   ========================================== */

.tg-cc-pag {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 20px;
    width: 100%;
    margin: 0;
    text-align: center;
    line-height: 0;
    z-index: 10;
}

.tg-cc-pag-bullet {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    opacity: 1;
    margin: 0 4px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tg-cc-pag-bullet-active {
    width: 25px;
    border-radius: 5px;
}

/* ==========================================
   8. RESPONSIVE
   ========================================== */

@media (max-width: 1300px) {
    .tg-cc-nav-prev { left: 4px; }
    .tg-cc-nav-next { right: 4px; }
}

@media (max-width: 1024px) {
    .tg-cc-nav-prev,
    .tg-cc-nav-next {
        display: none;
    }
    .tg-cc-wrap {
        --cc-cols: var(--cc-cols-tablet, 2);
        --cc-gap:  var(--cc-gap-tablet, 20px);
    }
}

@media (max-width: 767px) {
    .tg-cc-wrap {
        --cc-cols: var(--cc-cols-mobile, 1);
        --cc-gap:  var(--cc-gap-mobile, 10px);
    }
}
