/**
 * Tiger Testimonial Carousel — front-end styles.
 *
 * Widget-scoped class names (tg-tc-*). 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. SWIPER RESETS & ANTI-SHAKE
   ========================================== */

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

.tg-tc-cont .tiger-swiper-wrapper {
    will-change: transform;
    display: flex;
    transition-timing-function: cubic-bezier(0.25, 1, 0.5, 1) !important;
    box-sizing: border-box;
    align-items: stretch;
}

.tg-tc-cont .tiger-swiper-slide {
    height: auto;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Persistent baseline layout — driven by inline --tc-cols / --tc-gap
   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). */
.tg-tc-cont .tiger-swiper-slide.tg-tc-card {
    flex-shrink: 0;
    width: calc((100% - (var(--tc-cols, 3) - 1) * var(--tc-gap, 30px)) / var(--tc-cols, 3));
    margin-right: var(--tc-gap, 30px);
}

.tg-tc-cont .tiger-swiper-slide.tg-tc-card:last-child {
    margin-right: 0;
}

/* ==========================================
   2. MAIN LAYOUT
   ========================================== */

.tg-tc-wrap {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

.tg-tc-cont {
    width: 100%;
    /* Vertical padding makes room for the lifted hover state and overlapping
       quote icon. Horizontal stays 0 so Swiper's loop clones can't leak in. */
    padding: 60px 0 60px 0 !important;
    overflow: hidden;
    touch-action: pan-y;
}

/* ==========================================
   3. TESTIMONIAL CARD
   ========================================== */

.tg-tc-card {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    box-sizing: border-box;
}

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

.tg-tc-quote-icon {
    position: absolute;
    top: -20px;
    right: 40px;
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.tg-tc-rating {
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
}
.tg-tc-rating .tg-tc-star {
    flex: 0 0 1em;
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: middle;
}

.tg-tc-text {
    flex-grow: 1;
    margin-bottom: 30px;
}

/* ==========================================
   4. USER INFO
   ========================================== */

.tg-tc-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-top: 20px;
    margin-top: auto;
}

img.tg-tc-user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.tg-tc-user-details .tg-tc-user-name {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.tg-tc-user-details p {
    margin: 2px 0 0 0;
}

.tg-tc-verified-badge {
    font-size: 0.8rem;
}

.tg-tc-date {
    display: block;
    margin-top: 4px;
}

/* ==========================================
   5. NAVIGATION ARROWS
   ========================================== */

.tg-tc-nav-prev,
.tg-tc-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% */
}

.tg-tc-nav-prev { left: -20px; }
.tg-tc-nav-next { right: -20px; }

/* ==========================================
   6. PAGINATION
   ========================================== */

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

.tg-tc-pag-pos-inside .tg-tc-pag {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 30px;
    margin: 0;
}

.tg-tc-pag-pos-outside .tg-tc-pag {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    margin-top: 20px;
}
.tg-tc-pag-pos-outside .tg-tc-cont {
    padding-bottom: 0 !important;
}

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

.tg-tc-pag-bullet-active {
    width: 30px;
    border-radius: 5px;
}

/* ==========================================
   7. RESPONSIVE
   ========================================== */

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

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

@media (max-width: 767px) {
    .tg-tc-cont {
        padding-bottom: 80px !important;
    }
    .tg-tc-pag {
        bottom: 10px !important;
    }
    .tg-tc-wrap {
        --tc-cols: var(--tc-cols-mobile, 1);
        --tc-gap:  var(--tc-gap-mobile, 15px);
    }
}
