/* ─────────────────────────────────────────────
   Testimonials Component
   CSS custom properties injected inline by Blade.
   ───────────────────────────────────────────── */
.testimonials-component.block {
    font-family: 'Hanken Grotesk', sans-serif;
    background-color: var(--tc-bg, #ffffff);
}

/* ── Slider wrapper ─────────────────────────── */
.testimonials-slider {
    position: relative;
    overflow: hidden;
}

/* ── Individual slide ───────────────────────── */
.testimonial-slide {
    display: none;
    position: relative;
    height: 100%;
}

.testimonial-slide.is-active {
    display: block;
    height: 100%;
}

/* During height measurement JS temporarily sets position:static */
.testimonial-slide[style*="position: static"] {
    height: auto !important;
}

/* ── Card fills the slide ───────────────────── */
.testimonial-card {
    height: 100%;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 200px 220px 1fr;
    align-items: center;
    gap: 3rem;
    padding: 3rem 3.5rem;
    border: 1px solid var(--tc-border, #e6e6e6);
    border-radius: 12px;
    background: var(--tc-card-bg, #ffffff);
}

/* ══════════════════════════════════════════════
   TRANSITIONS
══════════════════════════════════════════════ */
.transition-fade .tc-leaving { pointer-events: none; z-index: 0; }
.transition-fade .tc-fade-enter { opacity: 0; transition: opacity 0.5s ease; z-index: 1; }
.transition-fade .tc-fade-enter-active { opacity: 1; }

.transition-fade-scale .tc-scale-leave { pointer-events: none; opacity: 0; transform: scale(1.04); transition: opacity 0.5s ease, transform 0.5s ease; }
.transition-fade-scale .tc-scale-enter { opacity: 0; transform: scale(0.96); transition: opacity 0.5s ease, transform 0.5s ease; z-index: 1; }
.transition-fade-scale .tc-scale-enter-active { opacity: 1; transform: scale(1); }

.tc-leaving { position: absolute !important; top: 0; left: 0; width: 100%; }

/* ── Logo ───────────────────────────────────── */
.testimonial-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.testimonial-logo img {
    max-width: 140px;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.testimonial-logo-fallback {
    font-size: 22px;
    font-weight: 700;
    color: var(--tc-logo-fb, #18211e);
}

/* ── Person ─────────────────────────────────── */
.testimonial-person {
    border-left: 1px solid var(--tc-divider, #e6e6e6);
    padding-left: 3rem;
}

.testimonial-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--tc-name, #18211e);
    margin: 0 0 0.15rem;
    line-height: 1.4;
}

.testimonial-position,
.testimonial-company {
    font-size: 15px;
    font-weight: 400;
    color: var(--tc-meta, #8a9a96);
    margin: 0;
    line-height: 1.5;
}

/* ── Quote column ───────────────────────────── */
.testimonial-quote-col {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.25rem;
}

.testimonial-quote {
    margin: 0;
    padding: 0;
    border: none;
    position: relative;
    padding-top: 2rem;
}

/* Opening quote mark */
.testimonial-quote::before {
    content: '\201C';
    position: absolute;
    top: -0.25rem;
    left: 0;
    font-size: 4rem;
    line-height: 1;
    color: var(--tc-quote, #18211e);
    opacity: 0.15;
    font-family: Georgia, serif;
    pointer-events: none;
}

/* Closing quote mark — inline after the last element */
.testimonial-quote::after {
    content: '\201D';
    font-size: 2.5rem;
    line-height: 0;
    vertical-align: -0.6em;
    margin-left: 0.1em;
    color: var(--tc-quote, #18211e);
    opacity: 0.15;
    font-family: Georgia, serif;
    pointer-events: none;
    /* Make it flow inline after the last child */
    display: inline;
    float: right;
    shape-outside: none;
}

/* Because ::after on a block element doesn't flow inline,
   we use a clearfix trick with a real inline element via CSS */
.testimonial-quote > *:last-child::after {
    content: '\201D';
    font-size: 4rem;
    line-height: 0;
    vertical-align: -0.75em;
    margin-left: 0.15em;
    color: var(--tc-quote, #18211e);
    opacity: 0.15;
    font-family: Georgia, serif;
}

/* Remove the blockquote ::after since we use last-child approach */
.testimonial-quote::after {
    content: none;
}

.testimonial-quote p,
.testimonial-quote li {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--tc-quote, #18211e);
    margin: 0;
}

/* ── Button link ────────────────────────────── */
.testimonial-link-btn {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 0.4rem;
    margin-top: 1.25rem;
    font-size: 15px;
    font-weight: 500;
    color: var(--tc-nav, #18211e);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    padding-bottom: 2px;
    transition: color 0.2s ease;
}

.testimonial-link-btn:hover { color: var(--tc-nav-hover, #5d7374); }

.testimonial-link-btn::after {
    content: '↗';
    font-size: 13px;
    transition: transform 0.2s ease;
}

.testimonial-link-btn:hover::after { transform: translate(2px, -2px); }

/* ── Navigation ─────────────────────────────── */
.testimonials-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.75rem;
}

.testimonials-prev,
.testimonials-next {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 28px;
    font-weight: 300;
    color: var(--tc-nav, #18211e);
    line-height: 1;
    padding: 0.1rem 0.4rem;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.testimonials-prev:hover,
.testimonials-next:hover { color: var(--tc-nav-hover, #5d7374); }

.testimonials-prev:focus,
.testimonials-next:focus { outline: 2px solid var(--tc-nav-hover, #5d7374); border-radius: 4px; }

.testimonials-prev.is-disabled,
.testimonials-next.is-disabled { opacity: 0.35; cursor: default; pointer-events: none; }

/* ─────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────── */

/* Large desktop — tighten columns */
@media (max-width: 1280px) {
    .testimonial-card {
        grid-template-columns: 180px 200px 1fr;
        gap: 2.5rem;
        padding: 2.5rem 3rem;
    }
}

/* Tablet landscape — 2-col top, quote full width bottom */
@media (max-width: 1024px) {
    .testimonial-card {
        grid-template-columns: 160px 1fr;
        grid-template-rows: auto auto;
        gap: 1.75rem 2rem;
        padding: 2.5rem;
        align-items: start;
    }

    .testimonial-logo  { grid-column: 1 / 2; grid-row: 1 / 2; align-self: center; }
    .testimonial-person { grid-column: 2 / 3; grid-row: 1 / 2; }

    .testimonial-quote-col {
        grid-column: 1 / -1;
        grid-row: 2 / 3;
        padding-top: 1.5rem;
        border-top: 1px solid var(--tc-divider, #e6e6e6);
    }

    .testimonial-person {
        border-left: 1px solid var(--tc-divider, #e6e6e6);
        padding-left: 2rem;
    }
}

/* Tablet portrait — logo above person */
@media (max-width: 768px) {
    .testimonials-component.block {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .testimonial-card {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 1.5rem;
        padding: 2rem;
        align-items: start;
    }

    .testimonial-logo  { grid-column: 1; grid-row: 1; }
    .testimonial-person { grid-column: 1; grid-row: 2; border-left: none; border-top: 1px solid var(--tc-divider, #e6e6e6); padding-left: 0; padding-top: 1.25rem; }
    .testimonial-quote-col { grid-column: 1; grid-row: 3; padding-top: 1.25rem; border-top: 1px solid var(--tc-divider, #e6e6e6); }

    .testimonial-quote p { font-size: 15px; }

    .testimonial-quote::before { font-size: 3rem; }
    .testimonial-quote > *:last-child::after { font-size: 3rem; vertical-align: -0.65em; }

    .testimonials-nav { margin-top: 1.25rem; }
    .testimonials-prev,
    .testimonials-next { font-size: 24px; }
}

/* Mobile */
@media (max-width: 480px) {
    .testimonial-card {
        padding: 1.5rem;
        border-radius: 8px;
        gap: 1.25rem;
    }

    .testimonial-logo img {
        max-width: 110px;
        max-height: 50px;
    }

    .testimonial-name { font-size: 15px; }
    .testimonial-position,
    .testimonial-company { font-size: 14px; }

    .testimonial-quote p { font-size: 14px; line-height: 1.6; }
    .testimonial-quote::before { font-size: 2.5rem; top: -0.1rem; }
    .testimonial-quote > *:last-child::after { font-size: 2.5rem; vertical-align: -0.6em; }

    .testimonial-link-btn { font-size: 14px; }

    .testimonials-prev,
    .testimonials-next { font-size: 22px; }
}