/* ======================================================
   TESTEMUNHOS EM VÍDEO  (index, espacos, formacoes, palestras, consultoria)
   One white panel: the video on the left, the list of people on the right.
   Markup: <section id="testimonials" class="tv"> ... ; behaviour: js/testimonials.js
   The panel carries its own colours, so it looks the same on the light home page
   and on the dark service pages.
   ====================================================== */
#testimonials.tv {
    height: auto;                      /* the old quote carousel fixed this at 60vh */
    margin: clamp(4rem, 9vw, 8rem) 0;
    padding: 0 1.25rem;
    overflow-x: clip;
}

.tv-wrap {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
}

.tv-head {
    text-align: center;
    margin-bottom: clamp(1.4rem, 3vw, 2.2rem);
}

#testimonials.tv .tv-head h2 {
    /* same as the other section titles (Montserrat, regular h2 weight, same size) */
    font-family: "Montserrat", serif;
    font-size: clamp(1.9rem, 3.6vw, 2.6rem);
    letter-spacing: -0.01em;
    margin: 0;
    color: var(--white, #fff);   /* the section sits on the dark background on every page */
}

#testimonials.tv .tv-head p {
    margin: 0.6rem auto 0;
    max-width: 34rem;
    font-family: "Manrope", sans-serif;
    font-size: 1rem;
    color: var(--ash-soft, #8a97a0);
}

/* ---------- the panel ---------- */
.tv-panel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
    gap: clamp(0.9rem, 1.6vw, 1.4rem);
    padding: clamp(0.8rem, 1.5vw, 1.25rem);
    border-radius: 28px;
    background: #fff;
    border: 1px solid rgba(1, 1, 51, 0.08);
    box-shadow: 0 30px 70px -30px rgba(1, 9, 48, 0.55);
}

/* ---------- the stage (video) ---------- */
.tv-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    overflow: hidden;
    background: #000;
    align-self: center;
}

.tv-stage video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* soft shade at the bottom so the name reads over any frame */
.tv-stage::after {
    content: "";
    position: absolute;
    inset: 35% 0 0;
    background: linear-gradient(to top, rgba(1, 1, 30, 0.94) 0%, rgba(1, 1, 30, 0.7) 32%, rgba(1, 1, 30, 0) 100%);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.tv-caption {
    position: absolute;
    left: clamp(1rem, 2.4vw, 1.75rem);
    right: clamp(1rem, 2.4vw, 1.75rem);
    bottom: clamp(0.9rem, 2.2vw, 1.5rem);
    z-index: 2;
    color: #fff;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tv-caption .tv-name {
    display: block;
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: clamp(1.15rem, 2.2vw, 1.6rem);
    line-height: 1.2;
}

.tv-caption .tv-role {
    display: block;
    margin-top: 0.2rem;
    font-family: "Manrope", sans-serif;
    font-size: clamp(0.85rem, 1.3vw, 1rem);
    color: #a9eae4;
}

.tv-play {
    position: absolute;
    z-index: 3;
    top: 50%;
    left: 50%;
    width: clamp(64px, 8vw, 88px);
    height: clamp(64px, 8vw, 88px);
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #04bfcd;
    color: #010133;
    cursor: pointer;
    box-shadow: 0 0 0 0 rgba(4, 191, 205, 0.55), 0 14px 34px -10px rgba(0, 0, 0, 0.6);
    animation: tvPulse 2.4s ease-out infinite;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.tv-play svg { width: 38%; height: 38%; margin-left: 6%; }   /* the triangle looks centred a bit to the right */
.tv-play:hover { transform: translate(-50%, -50%) scale(1.07); background: #72dcdc; }
.tv-play:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }

@keyframes tvPulse {
    0%   { box-shadow: 0 0 0 0 rgba(4, 191, 205, 0.55), 0 14px 34px -10px rgba(0, 0, 0, 0.6); }
    70%  { box-shadow: 0 0 0 22px rgba(4, 191, 205, 0), 0 14px 34px -10px rgba(0, 0, 0, 0.6); }
    100% { box-shadow: 0 0 0 0 rgba(4, 191, 205, 0), 0 14px 34px -10px rgba(0, 0, 0, 0.6); }
}

/* while a video plays: the button, name and shade step aside for the browser's own controls */
.tv-stage.is-playing .tv-play { display: none; }
.tv-stage.is-playing .tv-caption { opacity: 0; transform: translateY(8px); }
.tv-stage.is-playing::after { opacity: 0; }

/* ---------- the list of people ---------- */
.tv-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-auto-rows: 1fr;
    gap: 0.6rem;
}

.tv-item {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: clamp(84px, 9vw, 116px) minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.85rem;
    padding: 0.55rem 0.9rem 0.55rem 0.55rem;
    text-align: left;
    color: #010133;
    background: #f3f6f8;
    border: 1px solid rgba(1, 1, 51, 0.06);
    border-radius: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.tv-item:hover { background: #e8eef2; transform: translateX(-3px); }
.tv-item:focus-visible { outline: 3px solid #04bfcd; outline-offset: 2px; }

.tv-item[aria-pressed="true"] {
    background: rgba(4, 191, 205, 0.12);
    border-color: #04bfcd;
}

.tv-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
}

.tv-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* small play mark on the thumbnail; becomes "sound bars" on the one that is selected */
.tv-thumb::after {
    content: "";
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #04bfcd url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23010133' d='M9 6.5v11l9-5.5z'/%3E%3C/svg%3E") center / 16px no-repeat;
}

.tv-meta { min-width: 0; }

.tv-item .tv-name {
    display: block;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    font-size: 0.98rem;
    line-height: 1.25;
}

.tv-item .tv-role {
    display: block;
    margin-top: 0.15rem;
    font-family: "Manrope", sans-serif;
    font-size: 0.82rem;
    line-height: 1.3;
    color: #5b6b76;
}

.tv-time {
    font-family: "Manrope", sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #0390a0;
}

/* ---------- tablets and phones: video on top, people underneath ---------- */
@media (max-width: 991.98px) {
    .tv-panel { grid-template-columns: 1fr; border-radius: 22px; }
    .tv-stage { border-radius: 14px; }
    .tv-list { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 575.98px) {
    #testimonials.tv { padding: 0 0.9rem; margin: 4rem 0; }
    .tv-list { grid-template-columns: 1fr; gap: 0.5rem; }
    .tv-item { grid-template-columns: 84px minmax(0, 1fr) auto; }
    .tv-item:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .tv-play { animation: none; }
    .tv-item, .tv-caption, .tv-play { transition: none; }
}
