/* ============================================
   Image Tab Slider v3 — Front-end
   Matches reference design exactly:
   - Edge-to-edge images, no gaps between cards
   - Square corners, no border-radius, no shadows
   - Title text below image, centered
   - Dots below carousel
   - Chevron arrow pointing down to content
   - Content panel: centred title + body text
   ============================================ */

.its-wrap *,
.its-wrap *::before,
.its-wrap *::after { box-sizing: border-box; margin: 0; padding: 0; }

.its-wrap {
    width: 100%;
    max-width: 100%;
    margin: 0 auto 2.5rem;
    font-family: inherit;
    --its-trans: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Carousel shell ────────────────────────── */
.its-carousel-shell {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
}

/* ── Arrows ────────────────────────────────── */
.its-arrow {
    flex-shrink: 0;
    width: 28px;
    background: transparent;
    border: none;
    color: #aaaaaa;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.18s;
    align-self: center;
    user-select: none;
    -webkit-user-select: none;
}
.its-arrow:hover { color: #555555; }

/* ── Viewport: clips the track ─────────────── */
.its-viewport {
    flex: 1;
    overflow: hidden;
    min-width: 0;
    cursor: grab;
    user-select: none;
}
.its-viewport:active {
    cursor: grabbing;
}

/* ── Track: flex row of tabs ───────────────── */
.its-track {
    display: flex;
    gap: 0;                      /* NO gap — edge-to-edge */
    transition: transform var(--its-trans);
    will-change: transform;
}

/* ── Each image tab ────────────────────────── */
.its-img-tab {
    flex-shrink: 0;
    cursor: pointer;
    outline: none;
    position: relative;
    /* No border-radius, no box-shadow, no border */
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    overflow: hidden;
    /* Width set by JS */
}

/* Active state: just a thin bottom line matching active dot */
.its-img-tab.its-active .its-img-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.06);
}

/* ── Image background ─────────────────────── */
.its-img-bg {
    width: 100%;
    background-size: cover;
    background-position: center top;
    display: block;
    position: relative;
    transition: filter 0.22s;
    overflow: hidden;
}
.its-img-tab:not(.its-active) .its-img-bg {
    filter: brightness(0.94);
}
.its-img-tab:hover .its-img-bg {
    filter: brightness(1) !important;
}

/* ── Title INSIDE image — plain white text ─── */
.its-img-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
    padding: 10px 8px;
    background: none;
    color: #ffffff !important;
    line-height: 1.3;
    z-index: 2;
    pointer-events: none;
}

/* ── Per-tab dot below each image ─────────── */
.its-tab-dot-row {
    display: flex;
    justify-content: center;
    padding: 6px 0;
}
.its-tab-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #cccccc;
    display: block;
    transition: background 0.2s;
    pointer-events: none;
}
.its-img-tab.its-active .its-tab-dot {
    background: #555555;
}

/* ── Global dots (hidden — per-tab dots used instead) ── */
.its-dots { display: none; }

/* ── Chevron row ──────────────────────────── */
.its-chevron-row {
    display: flex;
    justify-content: center;
    padding: 16px 0 4px;
    /* hidden until a panel is open */
    visibility: hidden;
    opacity: 0;
    height: 0;
    overflow: hidden;
    transition: opacity 0.25s, height 0.25s;
}
.its-wrap.its-panel-open .its-chevron-row {
    visibility: visible;
    opacity: 1;
    height: 36px;
}
.its-chevron {
    font-size: 28px;
    color: #999999;
    line-height: 1;
    /* animate the chevron bouncing once when content opens */
    animation: none;
}
.its-wrap.its-panel-open .its-chevron {
    animation: itsChevronBounce 0.4s ease;
}
@keyframes itsChevronBounce {
    0%   { transform: translateY(0); }
    40%  { transform: translateY(5px); }
    100% { transform: translateY(0); }
}

/* ── Content panels ───────────────────────── */
.its-panels {
    width: 100%;
    overflow: hidden;
}
.its-panel {
    padding: 28px 20px 32px;
    text-align: center;
    animation: itsPanelIn 0.3s ease both;
}
.its-panel[hidden] { display: none; }

@keyframes itsPanelIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.its-panel-title {
    font-size: clamp(18px, 2.5vw, 26px);
    font-weight: 700;
    color: #222222;
    margin-bottom: 14px;
    letter-spacing: -0.01em;
}

.its-panel-body {
    max-width: 560px;
    margin: 0 auto;
    color: #666666;
    font-size: 14px;
    line-height: 1.8;
}
.its-panel-body p  { margin-bottom: 0.7em; }
.its-panel-body p:last-child { margin-bottom: 0; }
.its-panel-body a  { color: #333; }
.its-panel-body ul,
.its-panel-body ol { text-align: left; display: inline-block; padding-left: 1.4em; }

/* ── Responsive: slot widths handled by JS ── */
@media (max-width: 480px) {
    .its-arrow { font-size: 22px; width: 22px; }
    .its-img-title { font-size: 11px; padding: 8px 4px; }
    .its-panel { padding: 20px 14px 24px; }
}
