/* ================================================================
   AUTHOR BANNERS — mobile-first
   Shown at the bottom of articles.
   1 card = centred, 2 = side-by-side, 3+ = carousel.
   ================================================================ */

:root {
    --ab-gold:       #d4af37;
    --ab-gold-dark:  #b8942d;
    --ab-gold-light: rgba(212, 175, 55, 0.35);
    --ab-dark:       #2c2c25;
    --ab-muted:      #555;
}

/* ── Section wrapper ── */
.blog-author-footer {
    max-width: min(1340px, 100%);
    margin: 0 auto;
    padding: 3rem clamp(15px, 3vw, 20px) 4rem;
    border-top: 2px solid var(--ab-gold-light);
}

.blog-author-footer__label {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--ab-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 2rem;
}

.blog-author-footer__names {
    text-align: center;
    color: var(--ab-dark);
}

/* ── Slider shell ── */
.ab-slider {
    position: relative;
    width: 100%;
}

/* Mobile: no side padding (arrows overlay) */
.ab-viewport {
    overflow: hidden;
    padding: 16px 52px;
    margin: -16px 0;
    width: 100%;
    box-sizing: border-box;
}

.ab-track {
    display: flex;
    gap: 24px;
    justify-content: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.ab-slider--carousel .ab-track { justify-content: flex-start; }

.ab-slider--carousel .ab-viewport { cursor: grab; }

.ab-slider--carousel .ab-viewport.is-dragging {
    cursor: grabbing;
    user-select: none;
    -webkit-user-select: none;
}

/* ── Card — mobile base: full width ── */
.ab-card {
    flex: 0 0 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ab-gold-dark) 0%, #f0d060 100%);
    border-radius: 20px;
    padding: 28px 20px;
    text-align: center;
    box-shadow: 0 10px 28px rgba(0,0,0,0.22);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    box-sizing: border-box;
    color: #fff;
}

/* 1 card: full width */
.ab-track:has(.ab-card:only-child) .ab-card {
    flex: 1 1 100%;
}

/* 2 cards on mobile: still full width, stacked via wrap */
.ab-track:has(.ab-card:nth-child(2):last-child) .ab-card {
    flex: 1 1 100%;
    max-width: 100%;
}

.ab-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(212,175,55,0.45);
}

/* ── Photo ── */
.ab-card__image {
    width: 130px; height: 130px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    display: block;
    margin: 0 auto 18px;
    border: 4px solid rgba(255,255,255,0.6);
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
    background: rgba(255,255,255,0.15);
}

.ab-card__image--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    width: 130px; height: 130px;
    margin: 0 auto 18px;
    border: 4px solid rgba(255,255,255,0.6);
}

/* ── Text ── */
.ab-card__name {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.ab-card__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    margin-bottom: 14px;
}

.ab-card__description {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.9);
    line-height: 1.7;
}

.ab-card:not(.ab-card--expanded) .ab-card__description {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Read more ── */
.ab-read-more {
    background: none;
    border: none;
    color: rgba(255,255,255,0.75);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    padding: 6px 0;
    display: inline-block;
    transition: color 0.2s ease;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ab-read-more:hover { color: #fff; }
.ab-read-more:focus-visible { color: #fff; outline: 2px solid rgba(255,255,255,0.8); outline-offset: 2px; }

/* ── Carousel controls ── */
.ab-control {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--ab-gold-dark) 0%, var(--ab-gold) 100%);
    color: #fff;
    border: none;
    width: 44px; height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: 300;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 20px rgba(212,175,55,0.4);
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.ab-slider--carousel .ab-control { display: flex; }

.ab-control:hover {
    background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 10px 28px rgba(0,0,0,0.3);
}

.ab-control:active  { transform: translateY(-50%) scale(1.04); }
.ab-control:focus-visible { outline: 3px solid #fff; outline-offset: 2px; background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%); }

.ab-control--prev { left: 6px; }
.ab-control--next { right: 6px; }

/* ============================================================
   BREAKPOINTS
   ============================================================ */

/* md+ — side-by-side cards, fixed widths */
@media (min-width: 768px) {
    .ab-viewport { padding: 28px 60px; margin: -28px 0; }

    .ab-track { gap: 28px; }

    .ab-card { flex: 0 0 340px; min-height: 400px; padding: 36px 24px; }

    /* 1 card: full width */
    .ab-track:has(.ab-card:only-child) .ab-card { flex: 1 1 100%; }

    /* 2 cards: half */
    .ab-track:has(.ab-card:nth-child(2):last-child) .ab-card {
        flex: 1 1 0;
        max-width: calc(50% - 14px);
    }

    .ab-slider--carousel .ab-card { flex: 0 0 340px; max-width: 340px; }

    .ab-card__image,
    .ab-card__image--placeholder { width: 150px; height: 150px; }

    .ab-control { width: 48px; height: 48px; font-size: 1.7rem; }
    .ab-control--prev { left: 10px; }
    .ab-control--next { right: 10px; }
}

/* lg+ — larger cards */
@media (min-width: 1024px) {
    .ab-viewport { padding: 32px 72px; margin: -32px 0; }
    .ab-card { flex: 0 0 420px; min-height: 440px; padding: 40px 28px; }
    .ab-slider--carousel .ab-card { flex: 0 0 420px; max-width: 420px; }
    .ab-card__image,
    .ab-card__image--placeholder { width: 160px; height: 160px; }
    .ab-control { width: 52px; height: 52px; font-size: 1.8rem; }
    .ab-control--prev { left: 12px; }
    .ab-control--next { right: 12px; }
}
