/* =================================================
   IOD KENYA — TESTIMONIALS
   Self-contained. Used on the homepage, the listing
   page and inside certification / service / event /
   membership / about pages, so nothing here relies
   on styles defined inline on a single template.
   ================================================= */

/* Defined on :root, not on .iod-testimonials — cards are also used outside that
   wrapper (the listing page grid, embedded page sections), and a var() that
   cannot resolve makes the whole declaration invalid: the card would lose its
   background and its border-width would compute to 0. */
:root {
    --iod-navy: #1a2b59;
    --iod-orange: #E67E22;
    --iod-orange-dark: #D35400;
    --iod-muted: #6c757d;
    --iod-line: #e6e9f0;
    --iod-surface: #ffffff;
}

.iod-testimonials {
    position: relative;
    padding: 80px 0;
}

.iod-testimonials.iod-t-tinted {
    background: #f7f8fa;
}

/* ---------- Section header ---------- */

.iod-t-header {
    text-align: center;
    margin-bottom: 50px;
}

.iod-t-badge {
    display: inline-block;
    background: rgba(230, 126, 34, 0.1);
    color: var(--iod-orange);
    padding: 5px 16px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.iod-t-title {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--iod-navy);
    margin-bottom: 12px;
    line-height: 1.3;
}

.iod-t-subtitle {
    font-size: 0.95rem;
    color: var(--iod-muted);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ---------- Card ---------- */

.iod-t-card {
    background: var(--iod-surface);
    border: 1px solid var(--iod-line);
    border-radius: 18px;
    padding: 30px 28px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.iod-t-card:hover {
    border-color: rgba(230, 126, 34, 0.45);
    transform: translateY(-3px);
}

.iod-t-quote-mark {
    font-size: 34px;
    line-height: 1;
    color: var(--iod-orange);
    opacity: 0.28;
    margin-bottom: 14px;
}

.iod-t-headline {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--iod-navy);
    line-height: 1.45;
    margin: 0 0 10px;
}

.iod-t-quote {
    font-size: 0.93rem;
    line-height: 1.75;
    color: #4a5568;
    margin: 0 0 20px;
    flex-grow: 1;
}

/* ---------- Rating ---------- */

.iod-t-rating {
    margin-bottom: 16px;
    font-size: 13px;
    letter-spacing: 2px;
    color: var(--iod-orange);
}

.iod-t-rating .iod-t-star-off {
    color: #d7dbe3;
}

/* ---------- Author ---------- */

.iod-t-author {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 18px;
    border-top: 1px solid var(--iod-line);
}

.iod-t-avatar {
    width: 52px;
    height: 52px;
    min-width: 52px;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(230, 126, 34, 0.35);
}

/* Owl sets `.owl-carousel .owl-item img { width: 100% }`, which would stretch
   the avatar across the whole card in the homepage slider. Win on specificity. */
.iod-testimonials .owl-carousel .owl-item img.iod-t-avatar {
    display: inline-block;
    width: 52px;
    height: 52px;
}

/* Shown when there is no photo, or when the photo fails to load. */
.iod-t-avatar-ph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f3f7;
    color: #9aa3b2;
    font-size: 21px;
    box-sizing: border-box;
}

.iod-t-author-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--iod-navy);
    margin: 0;
    line-height: 1.35;
}

.iod-t-author-role {
    font-size: 0.78rem;
    color: var(--iod-muted);
    margin: 2px 0 0;
    line-height: 1.4;
}

.iod-t-verified {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #0f766e;
    background: #d1fae5;
    padding: 1px 8px;
    border-radius: 50px;
    margin-left: 6px;
    vertical-align: middle;
}

/* ---------- Card footer links ---------- */

.iod-t-card-footer {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.iod-t-readmore {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--iod-orange);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.iod-t-readmore:hover {
    color: var(--iod-orange-dark);
    text-decoration: none;
}

.iod-t-video-tag {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--iod-navy);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.iod-t-context {
    display: inline-block;
    align-self: flex-start;   /* stop the flex container stretching it full width */
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--iod-navy);
    background: rgba(26, 43, 89, 0.07);
    padding: 3px 10px;
    border-radius: 50px;
    margin-bottom: 14px;
}

/* ---------- Compact layout (sidebars / narrow slots) ---------- */

.iod-t-card.iod-t-compact {
    padding: 22px 20px;
    border-radius: 14px;
}

.iod-t-card.iod-t-compact .iod-t-quote {
    font-size: 0.87rem;
    margin-bottom: 14px;
}

.iod-t-card.iod-t-compact .iod-t-avatar {
    width: 42px;
    height: 42px;
}

/* ---------- Grid ---------- */

.iod-t-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    /* 1fr rows so every card is the same height, not just the ones sharing a row */
    grid-auto-rows: 1fr;
    align-items: stretch;
    gap: 26px;
}

/* ---------- Slider (reuses the theme's Owl carousel) ---------- */

.iod-testimonials .testimonial-slider .owl-stage {
    display: flex;
}

.iod-testimonials .testimonial-slider .owl-item {
    display: flex;
    height: auto;
}

.iod-testimonials .testimonial-slider .owl-item > div {
    display: flex;
    width: 100%;
}

.iod-testimonials .owl-dots {
    text-align: center;
    margin-top: 34px;
}

.iod-testimonials .owl-dots .owl-dot span {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin: 0 5px;
    border-radius: 50%;
    border: none;
    background: #cfd5e0;
    transition: all 0.3s ease;
}

.iod-testimonials .owl-dots .owl-dot.active span {
    background: var(--iod-orange);
    width: 26px;
    border-radius: 50px;
}

/* ---------- Section CTA ---------- */

.iod-t-cta {
    text-align: center;
    margin-top: 44px;
}

.iod-t-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--iod-orange);
    color: #ffffff;
    padding: 13px 26px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    transition: background 0.3s ease;
}

.iod-t-btn:hover {
    background: var(--iod-orange-dark);
    color: #ffffff;
    text-decoration: none;
}

.iod-t-btn-ghost {
    background: transparent;
    color: var(--iod-navy);
    border: 2px solid var(--iod-line);
}

.iod-t-btn-ghost:hover {
    background: var(--iod-navy);
    border-color: var(--iod-navy);
    color: #ffffff;
}

/* ---------- Empty state ---------- */

.iod-t-empty {
    text-align: center;
    padding: 50px 20px;
    border: 1px dashed var(--iod-line);
    border-radius: 18px;
    color: var(--iod-muted);
}

.iod-t-empty i {
    font-size: 34px;
    color: var(--iod-orange);
    opacity: 0.5;
    margin-bottom: 14px;
    display: block;
}

/* ---------- Responsive ---------- */

@media (max-width: 767px) {
    .iod-testimonials {
        padding: 55px 0;
    }

    .iod-t-header {
        margin-bottom: 34px;
    }

    .iod-t-title {
        font-size: 1.45rem;
    }

    .iod-t-card {
        padding: 24px 20px;
    }

    .iod-t-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

/* ---------- Bare variant: embedded inside a page's own column ---------- */

.iod-testimonials.iod-t-bare {
    padding: 0;
    background: transparent;
}

.iod-testimonials.iod-t-bare .iod-t-header {
    text-align: left;
    margin-bottom: 28px;
}

.iod-testimonials.iod-t-bare .iod-t-subtitle {
    margin: 0;
}

.iod-t-bare-inner {
    width: 100%;
}
