/* ============================================================
   TCGslider for Elementor — Frontend Styles
   Author: Mike Bachraty  |  Version: 1.0.0
   ============================================================ */

/* ── Wrapper ─────────────────────────────────────────────────── */
.tcg-wrapper {
    position: relative;
    width: 100%;
}

/* When arrows are outside, use flex column so the arrows-rail
   sits flush to each side at the slider's vertical midpoint    */
.tcg-has-outside-arrows {
    display: flex;
    flex-direction: column;
}

/* ── Slider Container ────────────────────────────────────────── */
.tcg-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #111;
    box-sizing: border-box;
}

/* ── Track ───────────────────────────────────────────────────── */
.tcg-track {
    position: absolute;
    inset: 0;
}

/* ── Individual Slide ────────────────────────────────────────── */
.tcg-slide {
    position: absolute;
    inset: 0;
    display: flex;
    opacity: 0;
    transition: opacity var(--tcg-transition, 700ms) ease;
    z-index: 1;
}

.tcg-slide.tcg-active {
    opacity: 1;
    z-index: 2;
}

/* ── Slide Background ────────────────────────────────────────── */
.tcg-slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transition: transform 0.4s ease;
    will-change: transform;
}

.tcg-ken-burns .tcg-slide.tcg-active .tcg-slide-bg {
    transform: scale(1.07);
    transition: transform 8000ms ease;
}
.tcg-ken-burns .tcg-slide:not(.tcg-active) .tcg-slide-bg {
    transform: scale(1);
    transition: transform 0.6s ease;
}

.tcg-sr-only {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ── Gradient Overlay ────────────────────────────────────────── */
.tcg-slide-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* ── Slide Content — bottom row: text-left, button-right ─────── */
.tcg-slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 30px 24px;
    box-sizing: border-box;
}

/* Text column — bottom left */
.tcg-slide-text {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 55%;
}

.tcg-slide-title {
    margin: 0 0 10px;
    font-size: clamp(18px, 2.8vw, 38px);
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
    word-break: break-word;
}

.tcg-slide-desc {
    margin: 0;
    font-size: clamp(12px, 1.4vw, 16px);
    line-height: 1.6;
    color: rgba(255,255,255,0.85);
    word-break: break-word;
}

/* Button cell — bottom right */
.tcg-btn-cell {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-end;
    padding-bottom: 2px;
}

.tcg-slide-btn {
    display: inline-block;
    padding: 10px 26px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: #fff;
    background-color: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.55);
    border-radius: 30px;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    box-sizing: border-box;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.tcg-slide-btn:hover {
    background-color: rgba(255,255,255,0.28);
    border-color: rgba(255,255,255,0.85);
    transform: translateY(-1px);
    text-decoration: none;
    color: #fff;
}
.tcg-slide-btn:active { transform: translateY(0); }

/* ── Navigation Arrows ───────────────────────────────────────── */
.tcg-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255,255,255,0.85);
    border: none;           /* ← no border */
    outline: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    box-shadow: none;       /* ← no shadow */
    transition: background-color 0.2s ease, transform 0.15s ease;
}
.tcg-nav-btn:hover {
    background-color: #fff;
    transform: translateY(-50%) scale(1.06);
}
.tcg-nav-btn:focus-visible {
    outline: 2px solid rgba(0,0,0,0.4);
    outline-offset: 2px;
}
.tcg-nav-btn svg {
    width: 18px; height: 18px;
    display: block;
    stroke: #333;
    flex-shrink: 0;
    pointer-events: none;
}
.tcg-nav-prev { left: 16px; }
.tcg-nav-next { right: 16px; }

/* ── Arrows OUTSIDE ──────────────────────────────────────────── */
/* A flex row that overlaps the slider using negative margin     */
.tcg-arrows-rail {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    z-index: 20;
    pointer-events: none;
    display: flex;
    justify-content: space-between;
    padding: 0;
}
/* Make the wrapper position:relative so the rail can overlay */
.tcg-has-outside-arrows {
    position: relative;
}
.tcg-arrows-rail .tcg-nav-btn {
    position: static;
    top: auto;
    transform: none;
    pointer-events: all;
    flex-shrink: 0;
}
.tcg-arrows-rail .tcg-nav-btn:hover {
    transform: scale(1.06);
}

/* ── Bullets / Dots ──────────────────────────────────────────── */
.tcg-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Inside the slider */
.tcg-dots-inside {
    position: absolute;
    bottom: 22px;
    left: 0;
    right: 0;
    z-index: 10;
}

/* Below the slider */
.tcg-dots-outside {
    width: 100%;
    margin-top: 14px;
}

.tcg-dot {
    display: block;
    width: 8px;
    height: 8px;
    border: none;           /* ← no border */
    outline: none;
    box-shadow: none;       /* ← no shadow */
    border-radius: 50%;
    background-color: rgba(0,0,0,0.3);
    cursor: pointer;
    padding: 0;
    transition: width 0.3s ease, background-color 0.3s ease, border-radius 0.3s ease;
    flex-shrink: 0;
}
.tcg-dot:focus-visible {
    outline: 2px solid rgba(0,0,0,0.4);
    outline-offset: 2px;
}
.tcg-dot.active {
    width: 26px;
    background-color: #333;
}

/* When outside, default dot colour is darker to show on light bg */
.tcg-dots-outside .tcg-dot        { background-color: rgba(0,0,0,0.25); }
.tcg-dots-outside .tcg-dot.active { background-color: #111; }

/* ── Bullet Style Variants ───────────────────────────────────── */
.tcg-bullet-square .tcg-dot,
.tcg-bullet-square .tcg-dot.active { border-radius: 2px; }

.tcg-bullet-line .tcg-dot {
    height: 3px;
    width: 20px;
    border-radius: 2px;
}
.tcg-bullet-line .tcg-dot.active {
    width: 38px;
    height: 3px;
}

/* ── Progress Bar ────────────────────────────────────────────── */
.tcg-progress-bar {
    position: absolute;
    bottom: 0; left: 0;
    width: 0%;
    height: 3px;
    background-color: rgba(255,255,255,0.7);
    z-index: 10;
    transition: width 0.1s linear;
    pointer-events: none;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .tcg-slide-text { max-width: 65% !important; }
}

@media (max-width: 768px) {
    .tcg-slide-content {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 20px 20px !important;
        gap: 12px;
    }
    .tcg-slide-text { max-width: 100% !important; }
    .tcg-btn-cell   { align-self: flex-start; }
    .tcg-slide-title { font-size: clamp(16px, 5vw, 26px); }
    .tcg-slide-desc  { font-size: clamp(12px, 3vw, 14px); }
    .tcg-nav-btn { width: 36px; height: 36px; }
    .tcg-nav-btn svg { width: 14px; height: 14px; }
    .tcg-nav-prev { left: 8px; }
    .tcg-nav-next { right: 8px; }
}

@media (max-width: 480px) {
    .tcg-slide-content { padding: 12px 14px 16px !important; }
    .tcg-slide-btn { padding: 8px 16px; font-size: 13px; }
    .tcg-nav-btn { width: 30px; height: 30px; }
    .tcg-nav-btn svg { width: 12px; height: 12px; }
    .tcg-dots-inside { bottom: 12px; }
}

/* ── Elementor Editor ────────────────────────────────────────── */
.elementor-editor-active .tcg-slider { min-height: 300px; }
.elementor-editor-active .tcg-track  { position: absolute; }
.tcg-preview .tcg-slide:not(.tcg-active) { opacity: 0; }
