/* ============================================================
   WC Testimonials with Proof — Front-end Styles
   Theme-agnostic: scoped entirely under .wct-* classes
   ============================================================ */

/* ── Section wrapper ─────────────────────────────────────────────────────── */
.wct-testimonials-wrap {
    /* Defaults; overridden via wp_add_inline_style from Settings */
    --wct-accent: #f4a11d;
    --wct-accent-end: #e05c2a;
    margin: 36px 0 20px;
    font-family: inherit;
    max-width: 1200px;
    margin: 10px auto !important;
}

.wct-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e8e8f0;
    letter-spacing: -0.01em;
}

.wct-title-icon {
    color: var(--wct-accent);
    font-size: 1.1em;
    line-height: 1;
}

/* ── Grid ─────────────────────────────────────────────────────────────────── */
.wct-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* ── Card ─────────────────────────────────────────────────────────────────── */
.wct-card {
    background: #ffffff;
    border: 1px solid #e4e4ed;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    position: relative;
    overflow: hidden;
}

.wct-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--wct-accent), var(--wct-accent-end));
    border-radius: 12px 12px 0 0;
}

.wct-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.10);
    transform: translateY(-2px);
}

/* ── Card header ─────────────────────────────────────────────────────────── */
.wct-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.wct-avatar {
    flex-shrink: 0;
}

.wct-photo {
    width: 56px !important;
    height: 56px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid var(--wct-accent);
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.wct-avatar-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--wct-accent), var(--wct-accent-end));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
}

.wct-name-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wct-name {
    font-weight: 700;
    font-size: 1rem;
    color: #1a1a2e;
    line-height: 1.2;
}

.wct-verified {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #16a34a;
    background: #dcfce7;
    padding: 2px 8px;
    border-radius: 999px;
    width: fit-content;
}

.wct-verified svg {
    flex-shrink: 0;
}

/* ── Quote ───────────────────────────────────────────────────────────────── */
.wct-quote {
    font-size: 0.9rem;
    line-height: 1.65;
    color: #444455;
    margin-bottom: 18px;
    padding: 12px 14px;
    background: #f8f8fc;
    border-radius: 8px;
    border-left: 3px solid var(--wct-accent);
    position: relative;
}

.wct-quote-mark {
    font-family: Georgia, serif;
    font-size: 1.4em;
    color: var(--wct-accent);
    line-height: 0;
    vertical-align: -0.3em;
}

.wct-quote-mark.wct-quote-close {
    margin-left: 2px;
}

/* ── Marksheets ──────────────────────────────────────────────────────────── */
.wct-marksheet-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888899;
    margin-bottom: 10px;
}

.wct-marksheet-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.wct-marksheet-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e4e4ed;
    flex: 0 0 auto;
    max-width: 100%;
    cursor: zoom-in; /* visual hint that item is clickable */
}

.wct-marksheet-img {
    display: block;
    max-width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    border-radius: 7px;
    user-select: none;
    -webkit-user-drag: none;
    /* pointer-events: none  <-- REMOVED: was blocking lightbox click listener */
}

/* Subtle overlay to prevent easy screenshot identification */
.wct-img-overlay {
    position: absolute;
    inset: 0;
    background: transparent;
    pointer-events: none; /* sits above img in stacking order; must not steal clicks for lightbox */
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media ( max-width: 600px ) {
    .wct-grid {
        grid-template-columns: 1fr;
    }

    .wct-card {
        padding: 16px;
    }

    .wct-marksheet-img {
        max-height: 160px;
    }
}

/* ── Lightbox ────────────────────────────────────────────────────────────── */

body.wct-lb-open {
    overflow: hidden;
}

.wct-lb-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.88);
    align-items: center;
    justify-content: center;
}
.wct-lb-overlay.wct-lb-active {
    display: flex;
}

@media (prefers-reduced-motion: no-preference) {
    .wct-lb-overlay {
        animation: wct-lb-fadein 0.18s ease;
    }
    @keyframes wct-lb-fadein {
        from { opacity: 0; }
        to   { opacity: 1; }
    }
}

.wct-lb-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: min(92vw, 960px);
    max-height: 92vh;
    width: 100%;
}

.wct-lb-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: calc(92vh - 72px);
    width: 100%;
}

.wct-lb-img {
    display: block;
    max-width: 100%;
    max-height: calc(92vh - 72px);
    object-fit: contain;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.15s ease;
    -webkit-user-select: none;
    user-select: none;
    pointer-events: none;
}
.wct-lb-img.wct-lb-loaded {
    opacity: 1;
}

.wct-lb-caption {
    margin-top: 10px;
    color: #e0e0e0;
    font-size: 14px;
    text-align: center;
    max-width: 90%;
}

.wct-lb-counter {
    margin-top: 4px;
    color: #888;
    font-size: 12px;
    text-align: center;
    min-height: 16px;
}

.wct-lb-prev,
.wct-lb-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    transition: background 0.15s ease;
}

.wct-lb-close {
    /* Viewport top-right corner (fixed; safe-area only so notches/status don’t cover it). */
    position: fixed;
    z-index: 100000;
    box-sizing: border-box;
    margin: 0;
    top: env(safe-area-inset-top, 0px);
    right: env(safe-area-inset-right, 0px);
    bottom: auto;
    left: auto;
    width: 36px;
    height: 36px;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: visible;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    transition: background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.wct-lb-close:hover,
.wct-lb-prev:hover,
.wct-lb-next:hover,
.wct-lb-close:focus-visible,
.wct-lb-prev:focus-visible,
.wct-lb-next:focus-visible {
    background: rgba(255, 255, 255, 0.25);
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.wct-lb-prev,
.wct-lb-next {
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wct-lb-prev { left:  -52px; }
.wct-lb-next { right: -52px; }

@media (max-width: 640px) {
    .wct-lb-prev { left:  4px; }
    .wct-lb-next { right: 4px; }
    .wct-lb-inner {
        max-width: 100vw;
        max-height: 100dvh;
    }
}