/* ── Recommendations Section ──────────────────────────────────────────────────── */

.rec-section {
    padding: 60px 0 80px;
    background:
        radial-gradient(ellipse at 15% 40%, rgba(99, 102, 241, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 60%, rgba(6, 182, 212, 0.04) 0%, transparent 50%);
}

/* ── Section header ──────────────────────────────────────────────────────────── */

.rec-header {
    text-align: center;
    margin-bottom: 2rem;
}

/* ── Carousel: arrow | track | arrow ─────────────────────────────────────────── */

.rec-carousel {
    display: flex;
    align-items: center;
    gap: 12px;
    /* Force LTR so arrows stay in fixed positions in every language */
    direction: ltr;
}

/* ── Track wrapper: clips the scrolling row ──────────────────────────────────── */

.rec-track-wrapper {
    flex: 1;
    overflow: hidden;
    padding: 12px 0;
    min-width: 0;
}

/* ── Sliding row ─────────────────────────────────────────────────────────────── */

.rec-track {
    /* No overflow — only the wrapper clips */
}

.rec-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* ── Recommendation card ──────────────────────────────────────────────────────── */

.rec-card {
    flex: 0 0 340px;
    width: 340px;
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 16px;
    padding: 1.75rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    cursor: default;
    /* Keep text LTR inside cards regardless of page direction */
    direction: ltr;
}

.rec-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.18);
    border-color: #6366f1;
    z-index: 1;
}

/* ── Opening quote mark ──────────────────────────────────────────────────────── */

.rec-quote-mark {
    font-size: 4rem;
    line-height: 1;
    color: #6366f1;
    opacity: 0.35;
    font-family: Georgia, serif;
    position: absolute;
    top: 0.75rem;
    left: 1.25rem;
    user-select: none;
}

/* ── Quote text ──────────────────────────────────────────────────────────────── */

.rec-text {
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--text-muted, #64748b);
    margin: 0;
    padding: 0;
    border: none;
    padding-top: 1.5rem; /* make room for the large quote mark */
    font-style: italic;
    text-align: justify;
}

/* ── Person row ──────────────────────────────────────────────────────────────── */

.rec-person {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
}

/* ── Avatar circle ───────────────────────────────────────────────────────────── */

.rec-avatar {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

.rec-avatar--blue   { background: linear-gradient(135deg, #3b82f6, #06b6d4); box-shadow: 0 3px 8px rgba(59,130,246,0.3); }
.rec-avatar--purple { background: linear-gradient(135deg, #8b5cf6, #6366f1); box-shadow: 0 3px 8px rgba(139,92,246,0.3); }
.rec-avatar--teal   { background: linear-gradient(135deg, #06b6d4, #10b981); box-shadow: 0 3px 8px rgba(6,182,212,0.3); }
.rec-avatar--green  { background: linear-gradient(135deg, #10b981, #16a34a); box-shadow: 0 3px 8px rgba(16,185,129,0.3); }

/* ── Person info ─────────────────────────────────────────────────────────────── */

.rec-person-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rec-name {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-color, #1e293b);
    line-height: 1.2;
}

.rec-role {
    font-size: 12.5px;
    color: var(--text-muted, #64748b);
    line-height: 1.2;
}

.rec-company {
    font-size: 12px;
    font-weight: 600;
    color: #6366f1;
    line-height: 1.2;
}

/* ── Badges ──────────────────────────────────────────────────────────────────── */

.rec-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.rec-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 100px;
    line-height: 1.4;
}

.rec-badge--relation {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.rec-badge--linkedin {
    background: rgba(10, 102, 194, 0.1);
    color: #0a66c2;
    border: 1px solid rgba(10, 102, 194, 0.25);
}

.rec-badge--letter {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

/* ── Navigation arrow buttons ─────────────────────────────────────────────────── */

.rec-nav-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid #6366f1;
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    padding: 0;
    line-height: 1;
    user-select: none;
}

.rec-nav-btn:hover {
    background: rgba(99, 102, 241, 0.25);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    transform: scale(1.1);
}

/* ── Card reveal animation ───────────────────────────────────────────────────── */

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

@media (prefers-reduced-motion: no-preference) {
    .rec-section.is-visible .rec-header {
        animation: recReveal 0.55s ease 0s backwards;
    }
    .rec-section.is-visible .rec-carousel {
        animation: recReveal 0.55s ease 0.12s backwards;
    }
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
    .rec-section { padding: 48px 0 64px; }
}

@media (max-width: 768px) {
    /* Drop the radial gradients + permanent compositor layer on mobile to cut
       first-scroll paint cost; same rationale as the tech-stack section.
       The dark-mode selector is needed to beat the higher-specificity
       [data-theme="dark"] .rec-section rule further down. */
    .rec-section,
    [data-theme="dark"] .rec-section {
        padding: 36px 0 52px;
        background: none;
    }
    .rec-row { will-change: auto; }
    .rec-track-wrapper { contain: content; }
    .rec-card {
        flex: 0 0 280px;
        width: 280px;
        padding: 1.5rem 1.25rem 1.25rem;
    }
    .rec-text { font-size: 13.5px; }
    .rec-carousel { gap: 8px; }
    .rec-nav-btn { width: 36px; height: 36px; font-size: 15px; }
}

@media (max-width: 480px) {
    .rec-card {
        flex: 0 0 250px;
        width: 250px;
        padding: 1.25rem 1rem 1rem;
    }
    .rec-text { font-size: 13px; }
    .rec-nav-btn { width: 32px; height: 32px; font-size: 13px; }
    .rec-carousel { gap: 6px; }
}

/* ── Dark mode ───────────────────────────────────────────────────────────────── */

[data-theme="dark"] .rec-section {
    background:
        radial-gradient(ellipse at 15% 40%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 60%, rgba(6, 182, 212, 0.06) 0%, transparent 50%);
}

[data-theme="dark"] .rec-card {
    background: rgba(99, 102, 241, 0.06);
    border-color: var(--border-color, #334155);
}

[data-theme="dark"] .rec-card:hover {
    border-color: #6366f1;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.15);
}

[data-theme="dark"] .rec-name { color: #e2e8f0; }
[data-theme="dark"] .rec-text { color: #94a3b8; }

[data-theme="dark"] .rec-nav-btn {
    background: rgba(99, 102, 241, 0.12);
    border-color: #6366f1;
    color: #818cf8;
}

[data-theme="dark"] .rec-nav-btn:hover {
    background: rgba(99, 102, 241, 0.25);
}
