/* MKY Testimonial Carousel — mky-carousel.css */

.mky-tc-wrap {
    --mky-primary:   #1a1a2e;
    --mky-accent:    #4f46e5;
    --mky-accent-lt: #ede9fe;
    --mky-text:      #374151;
    --mky-muted:     #6b7280;
    --mky-star:      #f59e0b;
    --mky-bg:        #ffffff;
    --mky-border:    #e5e7eb;
    --mky-radius:    18px;
    --mky-shadow:    0 4px 24px rgba(0,0,0,.08);
    --mky-ease:      0.45s cubic-bezier(0.4,0,0.2,1);
    --mky-photo-w:   50%;

    position: relative;
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    font-family: inherit;
}

/* Track */
.mky-tc-track {
    position: relative;
    overflow: hidden;
    border-radius: var(--mky-radius);
    box-shadow: var(--mky-shadow);
    background: var(--mky-bg);
    transition: height var(--mky-ease);
}

/* Slide */
.mky-tc-slide {
    display: none;
    align-items: stretch;
    background: var(--mky-bg);
    border-radius: var(--mky-radius);
    overflow: hidden;
    opacity: 0;
    transform: translateX(30px);
    transition: opacity var(--mky-ease), transform var(--mky-ease);
}
.mky-tc-slide.mky-tc-slide--active {
    display: flex;
    opacity: 1;
    transform: translateX(0);
}
.mky-tc-slide.mky-tc-img-right { flex-direction: row-reverse; }
.mky-tc-slide.mky-tc-slide--out {
    display: flex;
    opacity: 0;
    transform: translateX(-30px);
    pointer-events: none;
    position: absolute;
    inset: 0;
}
.mky-tc-slide.mky-tc-slide--out.mky-tc-dir-prev { transform: translateX(30px); }

/* Photo */
.mky-tc-photo {
    flex: 0 0 50%;
    width: 50%;
    min-height: 280px;
    overflow: hidden;
    background: var(--mky-accent-lt);
}
.mky-tc-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}
.mky-tc-slide--active .mky-tc-photo img { transform: scale(1.03); }

/* Body */
.mky-tc-body {
    flex: 1 1 auto;
    padding: 40px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    position: relative;
}

/* Big quote mark */
.mky-tc-quote-mark {
    position: absolute;
    top: 14px;
    right: 24px;
    font-size: 100px;
    line-height: 1;
    color: var(--mky-accent-lt);
    font-family: Georgia, serif;
    pointer-events: none;
    user-select: none;
}

/* Stars */
.mky-tc-stars { display: flex; gap: 3px; }
.mky-tc-star  { font-size: 18px; color: var(--mky-border); }
.mky-tc-star--on { color: var(--mky-star); }

/* Text */
.mky-tc-text { font-size: 1rem; line-height: 1.75; color: var(--mky-text); }
.mky-tc-text p { margin: 0 0 .5em; }
.mky-tc-text p:last-child { margin-bottom: 0; }
.mky-tc-text--collapsed .mky-tc-excerpt {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mky-tc-full { margin-top: 10px; }

/* Read more */
.mky-tc-readmore {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    background: none;
    border: none;
    padding: 4px 0;
    font-size: .875rem;
    font-weight: 600;
    color: var(--mky-accent);
    cursor: pointer;
    transition: gap .2s;
    line-height: 1.4;
    min-height: 2em; /* keeps button height stable whether label is "Read more" or "Read less" */
}
.mky-tc-readmore-label { white-space: nowrap; }
.mky-tc-readmore:hover { gap: 8px; }
.mky-tc-readmore svg  { transition: transform .25s; flex-shrink: 0; }
.mky-tc-readmore[aria-expanded="true"] svg { transform: rotate(180deg); }

/* Author */
.mky-tc-author {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 16px;
    border-top: 1px solid var(--mky-border);
    margin-top: 4px;
}
.mky-tc-name { font-size: 1rem; font-weight: 700; color: var(--mky-primary); }
.mky-tc-meta { font-size: .8125rem; color: var(--mky-muted); }

/* Controls */
.mky-tc-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 22px;
}
.mky-tc-btn {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid var(--mky-border);
    background: var(--mky-bg);
    color: var(--mky-primary);
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s, transform .15s;
    flex-shrink: 0;
}
.mky-tc-btn:hover {
    background: var(--mky-accent);
    border-color: var(--mky-accent);
    color: #fff;
    transform: scale(1.08);
}
.mky-tc-btn:focus-visible { outline: 3px solid var(--mky-accent); outline-offset: 2px; }

/* Dots */
.mky-tc-dots { display: flex; gap: 8px; align-items: center; }
.mky-tc-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--mky-border);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background .25s, width .25s, border-radius .25s;
}
.mky-tc-dot--active { background: var(--mky-accent); width: 24px; border-radius: 4px; }
.mky-tc-dot:focus-visible { outline: 3px solid var(--mky-accent); outline-offset: 2px; }

/* No-image */
.mky-tc-no-img .mky-tc-body { padding: 44px 52px; }

/* Empty */
.mky-tc-empty { text-align: center; color: var(--mky-muted); padding: 2em 1em; }

/* Responsive */
@media (max-width: 720px) {
    .mky-tc-slide.mky-tc-slide--active,
    .mky-tc-slide.mky-tc-img-right { flex-direction: column; }
    .mky-tc-photo { width: 100%; height: 220px; }
    .mky-tc-body  { padding: 28px 24px; }
    .mky-tc-no-img .mky-tc-body { padding: 28px 24px; }
    .mky-tc-quote-mark { font-size: 60px; }
}
@media (max-width: 480px) {
    .mky-tc-photo { height: 180px; }
    .mky-tc-body  { padding: 20px 18px; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .mky-tc-slide, .mky-tc-btn, .mky-tc-dot,
    .mky-tc-track, .mky-tc-photo img { transition: none !important; }
}

/* ── Nav position variants ─────────────────────────────── */

/* above: controls render before the track */
.mky-tc-nav-above .mky-tc-controls {
    margin-top: 0;
    margin-bottom: 16px;
}

/* sides: arrows float left/right of the track, dots stay below */
.mky-tc-nav-sides {
    position: relative;
    padding: 0 56px;
}
.mky-tc-nav-sides .mky-tc-controls {
    position: static;
    margin-top: 16px;
}
.mky-tc-nav-sides .mky-tc-btn.mky-tc-prev,
.mky-tc-nav-sides .mky-tc-btn.mky-tc-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
}
.mky-tc-nav-sides .mky-tc-btn.mky-tc-prev { left: 0; }
.mky-tc-nav-sides .mky-tc-btn.mky-tc-next { right: 0; }
.mky-tc-nav-sides .mky-tc-btn:hover {
    background: var(--mky-accent);
    border-color: var(--mky-accent);
    color: #fff;
    transform: translateY(-50%) scale(1.08);
}

@media (max-width: 720px) {
    .mky-tc-nav-sides { padding: 0 44px; }
}
