/**
 * TK Timeline Cards Widget — Stylesheet v5.3.1
 * File: assets/tk-timeline-widget.css
 *
 * Style disesuaikan dengan referensi desain:
 *  - Gambar landscape ~56%
 *  - Badge kecil pojok kiri bawah gambar
 *  - Title besar bold hitam
 *  - Shadow tipis, radius sedang
 */

/* ============================================================
   CSS VARIABLES
============================================================ */
.tk-wrap {
    --tk-accent       : #22a94f;
    --tk-accent-rgb   : 34, 169, 79;
    --tk-card-bg      : #ffffff;
    --tk-card-border  : #e8e8e8;
    --tk-shadow       : 0 1px 8px rgba(0, 0, 0, 0.08);
    --tk-shadow-hover : 0 8px 32px rgba(0, 0, 0, 0.13);
    --tk-title-color  : #111111;
    --tk-desc-color   : #6b7280;
    --tk-year-color   : #111111;
    --tk-radius       : 12px;
    --tk-gap          : 24px;
    --tk-cols         : 3;
    --tk-image-ratio  : 56%;
    --tk-transition   : 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    --tk-nav-size     : 42px;
    --tk-nav-offset   : 0px;
}

/* ============================================================
   GRID MODE
============================================================ */
.tk-wrap .tk-grid {
    display: grid;
    grid-template-columns: repeat(var(--tk-cols), 1fr);
    gap: var(--tk-gap);
}

/* ============================================================
   CAROUSEL — Slick overrides
============================================================ */
.tk-wrap .tk-carousel-outer {
    overflow: hidden;
    padding: 8px 4px 12px;
    margin: -8px -4px -12px;
    position: relative;
}

.tk-wrap .tk-carousel-track {
    cursor: grab;
    user-select: none;
}

.tk-wrap .tk-carousel-track.slick-initialized {
    display: block;
}

/* Gap antar slide via padding */
.tk-wrap .tk-carousel-track .slick-slide {
    box-sizing: border-box;
    outline: none;
    margin: 10px;
}

.tk-wrap .slick-list {
    margin: 0 calc(-1 * var(--tk-gap) / 2);
    overflow: hidden;
}

.tk-wrap .tk-carousel-track .slick-slide > div {
    height: 100%;
}

.tk-wrap .tk-carousel-track.dragging .tk-card {
    pointer-events: none;
    cursor: grabbing;
}

/* ============================================================
   NAV BUTTON
============================================================ */
.tk-wrap .tk-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width:  var(--tk-nav-size);
    height: var(--tk-nav-size);
    border-radius: 50%;
    border: 2px solid var(--tk-accent);
    background: transparent;
    color: var(--tk-accent);
    font-size: 17px;
    cursor: pointer;
    transition: background var(--tk-transition),
                color var(--tk-transition),
                transform var(--tk-transition),
                opacity var(--tk-transition);
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    z-index: 10;
}

.tk-wrap .tk-nav-btn:hover {
    background: var(--tk-accent);
    color: #ffffff;
    transform: scale(1.08);
}

.tk-wrap .tk-nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
}

/* SVG Icon */
.tk-wrap .tk-nav-btn .tk-nav-icon {
    width:  calc(var(--tk-nav-size) * 0.38);
    height: calc(var(--tk-nav-size) * 0.38);
    fill: currentColor;
    display: block;
    flex-shrink: 0;
}

.tk-wrap .tk-nav-btn.tk-nav-prev .tk-nav-icon {
    transform: scaleX(-1);
}

/* ── MODE 1: BOTTOM CENTER ─── */
.tk-wrap[data-arrow-pos="bottom"] .tk-car-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 24px;
}

/* ── MODE 2: SIDE OVERLAY ─── */
.tk-wrap[data-arrow-pos="side-overlay"] .tk-nav-btn {
    position: absolute;
    top: calc(50% + var(--tk-nav-offset));
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-color: rgba(255,255,255,0.6);
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    color: var(--tk-accent);
}
.tk-wrap[data-arrow-pos="side-overlay"] .tk-nav-prev { left: 12px; }
.tk-wrap[data-arrow-pos="side-overlay"] .tk-nav-next { right: 12px; }
.tk-wrap[data-arrow-pos="side-overlay"] .tk-nav-btn:hover {
    background: var(--tk-accent);
    color: #fff;
    border-color: var(--tk-accent);
    transform: translateY(-50%) scale(1.08);
}
.tk-wrap[data-arrow-pos="side-overlay"] .tk-car-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 24px;
}

/* ── MODE 3: SIDE OUTSIDE ─── */
.tk-wrap[data-arrow-pos="side-outside"] .tk-side-outside-wrap {
    position: relative;
}
.tk-wrap[data-arrow-pos="side-outside"] .tk-side-btn-wrap {
    display: contents;
}
.tk-wrap[data-arrow-pos="side-outside"] .tk-nav-btn {
    position: absolute;
    top: calc(50% + var(--tk-nav-offset));
    transform: translateY(-50%);
    background: #fff;
    border: 1px solid var(--tk-accent);
    color: var(--tk-accent);
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    z-index: 10;
}
.tk-wrap[data-arrow-pos="side-outside"] .tk-nav-prev { left: -36px; }
.tk-wrap[data-arrow-pos="side-outside"] .tk-nav-next { right: -36px; }
.tk-wrap[data-arrow-pos="side-outside"] .tk-nav-btn:hover {
    background: var(--tk-accent);
    color: #fff;
    border-color: var(--tk-accent);
    transform: translateY(-50%) scale(1.08);
}
.tk-wrap[data-arrow-pos="side-outside"] .tk-nav-dots-only {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}
.tk-wrap[data-arrow-pos="side-outside"] .tk-side-outside-inner {
    width: 100%;
}

@media (max-width: 767px) {
    .tk-wrap[data-arrow-pos="side-outside"] .tk-nav-prev {
        left: calc(-1 * var(--tk-nav-size) / 2);
    }
    .tk-wrap[data-arrow-pos="side-outside"] .tk-nav-next {
        right: calc(-1 * var(--tk-nav-size) / 2);
    }
}

/* ============================================================
   DOTS
============================================================ */
.tk-wrap .tk-dots {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.tk-wrap .tk-dot {
    width: 7px;
    height: 7px;
    border-radius: 100px;
    background: #d1d5db;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all var(--tk-transition);
    flex-shrink: 0;
}

.tk-wrap .tk-dot.active {
    width: 22px;
    background: var(--tk-accent);
}

/* ============================================================
   PROGRESS BAR
============================================================ */
.tk-wrap .tk-progress-bar {
    height: 3px;
    background: #e5e7eb;
    border-radius: 100px;
    overflow: hidden;
    margin-top: 12px;
}

.tk-wrap .tk-progress-inner {
    height: 100%;
    background: var(--tk-accent);
    border-radius: 100px;
    width: 0%;
}

/* ============================================================
   CARD — Persis seperti referensi
============================================================ */
.tk-wrap .tk-card {
    background: var(--tk-card-bg);
    border-radius: var(--tk-radius);
    box-shadow: var(--tk-shadow);
    border: 1px solid var(--tk-card-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--tk-transition), box-shadow var(--tk-transition);
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.tk-wrap .tk-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--tk-shadow-hover);
}

/* ── Card Image ───────────────────────────────────────────── */
.tk-wrap .tk-card-image {
    position: relative;
    width: 100%;
    padding-top: var(--tk-image-ratio); /* 56% = landscape 16:9 ish */
    overflow: hidden;
    background: #e5e7eb;
    flex-shrink: 0;
}

.tk-wrap .tk-card-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
    display: block;
}

.tk-wrap .tk-card:hover .tk-card-image img {
    transform: scale(1.05);
}

/* ── Card Badge ───────────────────────────────────────────── */
/*
 * Badge: lingkaran hijau kecil di pojok kiri bawah gambar,
 * setengah menempel di batas gambar & body card.
 * Sesuai referensi: ukuran ~40px, icon ~16px
 */
.tk-wrap .tk-card-badge {
    position: absolute;
    bottom: 0px;   /* setengah badge turun ke area body */
    left: 16px;
    width: 40px;
    height: 40px;
    background: var(--tk-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #ffffff;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.tk-wrap .tk-card-badge svg {
    width: 16px;
    height: 16px;
    display: block;
    fill: #ffffff;
    flex-shrink: 0;
}

.tk-wrap .tk-card-badge i {
    font-size: 16px;
    color: #ffffff;
    line-height: 1;
    display: block;
}

.tk-wrap .tk-card-badge i::before {
    display: block;
    line-height: 1;
}

/* ── Card Body ────────────────────────────────────────────── */
/*
 * Padding top lebih besar untuk memberi ruang badge yang turun ke bawah.
 * Sesuai referensi: badge ukuran 40px, setengah (20px) masuk ke body,
 * jadi padding-top minimal 20px + 12px jarak = 32px
 */
.tk-wrap .tk-card-body {
    padding: 32px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Title: besar, hitam, bold — persis referensi */
.tk-wrap .tk-card-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--tk-title-color);
    margin: 0 0 10px;
    line-height: 1.3;
    letter-spacing: -0.2px;
    height: 80px;
}

/* Deskripsi: abu-abu kecil */
.tk-wrap .tk-card-desc {
    font-size: 13px;
    color: var(--tk-desc-color);
    line-height: 1.7;
    flex: 1;
    margin: 0 0 16px;
}

/* Tahun: bold, hitam, seperti referensi */
.tk-wrap .tk-card-year {
    font-size: 14px;
    font-weight: 800;
    color: var(--tk-year-color);
    display: block;
    letter-spacing: 0.1px;
}

/* ============================================================
   RESPONSIVE — kolom otomatis via Slick breakpoint
   CSS variable --tk-cols bisa dioverride per device
   di Elementor responsive control
============================================================ */
@media (max-width: 1024px) {
    .tk-wrap {
        --tk-gap: 20px;
    }
}

@media (max-width: 767px) {
    .tk-wrap {
        --tk-gap: 16px;
        --tk-image-ratio: 58%;
    }
    .tk-wrap .tk-card-title {
        font-size: 16px;
    }
}

@media (max-width: 479px) {
    .tk-wrap {
        --tk-gap: 12px;
        --tk-image-ratio: 60%;
    }
}

/* ============================================================
   UTILITY
============================================================ */
.tk-wrap .tk-hidden {
    display: none !important;
}