/* ============================================================
   Profile Carousel – profile-carousel.css  v2.2
   6:9 portrait cards — padding-bottom ratio trick (bulletproof)
   4 desktop / 2 tablet / 1 mobile, no dots, floating arrows
   ============================================================ */

:root {
    --pc-accent:        #1a73e8;
    --pc-gap:           14px;
    --pc-radius:        14px;
    --pc-transition:    0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --pc-font:          inherit;
    --pc-heading-color: inherit;
    --pc-btn-size:      50px;
}

/* ── Wrapper — side padding reserves space for arrow buttons ── */
.pc-wrapper {
    position: relative;
    width: 100%;
    font-family: var(--pc-font);
    box-sizing: border-box;
    padding: 0 28px;
}

.pc-heading {
    color: var(--pc-heading-color);
    margin: 0 0 1.25rem;
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ── Stage — clips the scrolling track ─────────────────────── */
.pc-stage {
    overflow: hidden;
    position: relative;
}

/* ── Track ─────────────────────────────────────────────────── */
.pc-track {
    display: flex;
    gap: var(--pc-gap);
    will-change: transform;
    transition: transform var(--pc-transition);
}

/* ── Slide shell — width set by JS ─────────────────────────── */
.pc-slide {
    flex-shrink: 0;
    box-sizing: border-box;
    /* height is driven entirely by the inner ratio-box */
}

/* ── Ratio box: padding-bottom trick for 6:9 portrait ─────────
   6:9 = 66.666% width → 150% height, so padding-bottom = 150%  */
.pc-ratio-box {
    position: relative;
    width: 100%;
    padding-bottom: 150%;   /* 6:9 = height is 1.5× the width */
    border-radius: var(--pc-radius);
    overflow: hidden;
    background: #d4d4d4;
    box-shadow: 0 4px 20px rgba(0,0,0,.12);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

/* ── Card link wraps the ratio-box ─────────────────────────── */
.pc-card {
    display: block;
    text-decoration: none;
    cursor: pointer;
    border-radius: var(--pc-radius);
}

.pc-card:hover .pc-ratio-box {
    box-shadow: 0 10px 32px rgba(0,0,0,.22);
    transform: translateY(-5px) scale(1.013);
}

.pc-card:focus-visible .pc-ratio-box {
    outline: 3px solid var(--pc-accent);
    outline-offset: 3px;
}

/* ── Image wrapper — absolutely fills ratio-box ─────────────── */
.pc-img-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.pc-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;   /* face / head always at top */
    display: block;
    transition: transform 0.35s ease;
}

.pc-card:hover .pc-img-wrap img {
    transform: scale(1.05);
}

/* ── Gradient overlay — transparent top, dark bottom ───────── */
.pc-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 56%,
        rgba(0,0,0,0.12) 74%,
        rgba(0,0,0,0.68) 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* ── Caption ───────────────────────────────────────────────── */
.pc-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.85rem 0.9rem 0.8rem;
    z-index: 2;
}

.pc-caption-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #ffffff;
    font-size: clamp(0.72rem, 1vw, 0.9rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.03em;
    text-shadow: 0 1px 6px rgba(0,0,0,.7);
    text-transform: uppercase;
}

/* ── Controls row — arrows sit in the wrapper padding ──────── */
.pc-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    padding: 0;
    z-index: 20;
}

/* Dots — completely hidden */
.pc-dots { display: none !important; }

/* ── Arrow buttons ──────────────────────────────────────────── */
.pc-btn {
    pointer-events: all;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--pc-btn-size);
    height: var(--pc-btn-size);
    border-radius: 50%;
    border: none;
    background: #ffffff;
    color: #222;
    box-shadow: 0 2px 14px rgba(0,0,0,.22);
    cursor: pointer;
    transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
    flex-shrink: 0;
}

.pc-btn svg { width: 22px; height: 22px; }

.pc-btn:hover {
    background: var(--pc-accent);
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(26,115,232,.4);
}

.pc-btn:active { transform: scale(0.93); }

.pc-btn:disabled {
    opacity: 0;
    pointer-events: none;
}

.pc-btn:focus-visible {
    outline: 3px solid var(--pc-accent);
    outline-offset: 2px;
}

/* ── Empty ───────────────────────────────────────────────────── */
.pc-empty {
    text-align: center;
    padding: 2rem;
    color: #888;
    font-style: italic;
}

/* ── Reduced motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .pc-track, .pc-ratio-box,
    .pc-card:hover .pc-img-wrap img,
    .pc-btn { transition: none; transform: none; }
}

/* ── Drag cursor ─────────────────────────────────────────────── */
.pc-stage.is-dragging { cursor: grabbing; user-select: none; }
.pc-stage.is-dragging .pc-card { pointer-events: none; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
    :root { --pc-gap: 13px; --pc-btn-size: 46px; }
    .pc-wrapper { padding: 0 24px; }
}
@media (max-width: 600px) {
    :root { --pc-gap: 10px; --pc-btn-size: 40px; }
    .pc-wrapper { padding: 0 20px; }
}
