/* TV Site Plugin — components.css */

/* ── Timer ────────────────────────────────────────────────────────────────── */

.tvs-timer {
    display:     flex;
    gap:         12px;
    align-items: flex-start;
    flex-wrap:   wrap;
}

.tvs-timer__unit {
    display:        flex;
    flex-direction: column;
    align-items:    center;
    min-width:      60px;
}

.tvs-timer__val {
    display:          block;
    font-size:        clamp(28px, 5vw, 48px);
    font-weight:      700;
    line-height:      1.1;
    background:       rgba(255,255,255,0.08);
    border-radius:    8px;
    padding:          8px 14px;
    min-width:        64px;
    text-align:       center;
}

.tvs-timer__label {
    font-size:    10px;
    font-weight:  600;
    letter-spacing: 0.1em;
    text-align:   center;
    margin-top:   6px;
    opacity:      0.7;
}

/* ── Counter ──────────────────────────────────────────────────────────────── */

.tvs-counter {
    display:     inline-block;
    font-weight: 700;
}

.tvs-counter__num {
    font-variant-numeric: tabular-nums;
}

/* ── Offer block ──────────────────────────────────────────────────────────── */

.tvs-offer {
    display:       grid;
    grid-template-columns: 1fr 1fr;
    gap:           32px;
    align-items:   center;
}

@media (max-width: 768px) {
    .tvs-offer { grid-template-columns: 1fr; }
}

.tvs-offer__badge {
    display:       inline-block;
    font-size:     11px;
    font-weight:   700;
    letter-spacing: 0.1em;
    color:         var(--tv-btn-primary-bg, #C9A227);
    margin-bottom: 8px;
}

.tvs-offer__title {
    font-size:   clamp(28px, 4vw, 48px);
    font-weight: 700;
    line-height: 1.1;
    margin:      0 0 12px;
}

.tvs-offer__subtitle {
    font-size:   15px;
    opacity:     0.85;
    margin:      0 0 20px;
    line-height: 1.5;
}

.tvs-offer__timer {
    margin-bottom: 24px;
}

.tvs-offer__media {
    position:      relative;
    border-radius: 12px;
    overflow:      hidden;
}

.tvs-offer__image {
    width:         100%;
    height:        100%;
    object-fit:    cover;
    display:       block;
    border-radius: 12px;
}

/* ── Founder block ────────────────────────────────────────────────────────── */

.tvs-founder {
    display:       grid;
    grid-template-columns: 1fr 2fr;
    gap:           40px;
    align-items:   center;
    border-radius: 16px;
    padding:       32px;
    background:    var(--tv-btn-primary-bg, #C9A227);
}

@media (max-width: 768px) {
    .tvs-founder { grid-template-columns: 1fr; }
}

.tvs-founder__photo-wrap {
    position: relative;
}

.tvs-founder__photo {
    width:         100%;
    aspect-ratio:  1;
    object-fit:    cover;
    border-radius: 12px;
    display:       block;
    border:        3px solid rgba(255,255,255,0.4);
}

.tvs-founder__name {
    display:        block;
    text-align:     center;
    margin-top:     8px;
    font-weight:    700;
    font-size:      14px;
    background:     rgba(255,255,255,0.9);
    color:          #111;
    border-radius:  6px;
    padding:        4px 10px;
}

.tvs-founder__title {
    font-size:   clamp(24px, 3.5vw, 40px);
    font-weight: 800;
    line-height: 1.1;
    margin:      0 0 24px;
    color:       #111;
}

.tvs-founder__text {
    margin-top: 20px;
    font-size:  15px;
    line-height: 1.65;
    color:      rgba(0,0,0,0.8);
}

/* ── Founder button с прогресс-баром ─────────────────────────────────────── */

.tvs-founder-btn {
    --tvs-audio-progress: 0;

    position:        relative;
    display:         inline-flex;
    align-items:     center;
    overflow:        hidden;
    border-radius:   50px;
    background:      #ffffff !important;
    color:           #121212 !important;
    border:          none !important;
    border-radius:   16px !important;
    padding:         16px 20px 16px 16px;
    height:          60px;
    font-size:       15px;
    font-weight:     600;
    cursor:          pointer;
    gap:             16px;
    white-space:     nowrap;
    transition:      background 0.2s, transform 0.2s;
}

.tvs-founder-btn:hover {
    background:  #F0F0F0 !important;
    transform:   translateY(-2px);
}

/* Прогресс — псевдоэлемент поверх кнопки */
.tvs-founder-btn__progress {
    position:        absolute;
    inset:           0;
    background:      rgba(0, 0, 0, 0.25);
    transform-origin: left center;
    transform:       scaleX(var(--tvs-audio-progress));
    transition:      transform 0.1s linear;
    border-radius:   inherit;
    pointer-events:  none;
    z-index:         0;
}

/* Содержимое поверх прогресса */
.tvs-founder-btn__inner {
    position:    relative;
    z-index:     1;
    display:     flex;
    align-items: center;
    gap:         8px;
}

.tvs-founder-btn__icon {
    display:     flex;
    align-items: center;
    flex-shrink: 0;
}

.tvs-founder-btn.is-playing .tvs-founder-btn__progress {
    background: rgba(0, 0, 0, 0.15);
}

/* ── FAQ аккордеон ────────────────────────────────────────────────────────── */

.tvs-faq {
    list-style: none;
    margin:     0;
    padding:    0;
    display:    flex;
    flex-direction: column;
    gap:        32px;
}

@media (max-width: 1024px) {
    .tvs-faq { gap: 24px; }
}

.tvs-faq__item {
    background:    #252525;
    border-radius: 24px;
    padding:       24px 18px;
}

@media (max-width: 1024px) {
    .tvs-faq__item {
        border-radius: 18px;
        padding:       18px;
    }
}

.tvs-faq__question {
    display:         flex;
    justify-content: space-between;
    align-items:     center;
    cursor:          pointer;
    font-family:     'Geologica', sans-serif;
    font-weight:     500;
    font-size:       24px;
    color:           #F0F0F0;
    gap:             16px;
    user-select:     none;
}

.tvs-faq__icon {
    flex-shrink: 0;
    width:       24px;
    height:      24px;
    display:     flex;
    align-items: center;
    justify-content: center;
    transition:  opacity 0.2s;
}

.tvs-faq__icon .tvs-icon-plus  { display: block; }
.tvs-faq__icon .tvs-icon-minus { display: none;  }

.tvs-faq__item.is-open .tvs-faq__icon .tvs-icon-plus  { display: none;  }
.tvs-faq__item.is-open .tvs-faq__icon .tvs-icon-minus { display: block; }

.tvs-faq__answer {
    overflow:    hidden;
    max-height:  0;
    transition:  max-height 0.35s ease, padding 0.2s;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size:   16px;
    line-height: 1.65;
    color:       #F5F5F5;
    padding:     0;
}

.tvs-faq__item.is-open .tvs-faq__answer {
    max-height: 800px;
    padding:    16px 0 0;
}

/* ── Gallery (карусель и case) ────────────────────────────────────────────── */

/* ── Base Gallery (generic) ───────────────────────────────────────────────── */

.tvs-gallery {
    display:               grid;
    grid-template-columns: repeat(3, 1fr);
    gap:                   22px;
}

.tvs-gallery__item {
    display:       block;
    overflow:      hidden;
    border-radius: 12px;
    aspect-ratio:  412 / 355;
}

.tvs-gallery__img {
    width:      100%;
    height:     100%;
    object-fit: cover;
    display:    block;
    transition: transform 0.3s ease;
}

.tvs-gallery__item:hover .tvs-gallery__img {
    transform: scale(1.04);
}

/* ── Case Gallery overrides ───────────────────────────────────────────────── */

.tvs-case-gallery.tvs-gallery {
    grid-template-columns: repeat(3, 1fr) !important;
    gap:                   22px !important;
    display:               grid !important;
    flex-wrap:             unset;
}

.tvs-case-gallery .tvs-gallery__item {
    flex:         none !important;
    max-width:    none !important;
    width:        100% !important;
    aspect-ratio: 412 / 355 !important;
}

@media (max-width: 1024px) {
    .tvs-gallery,
    .tvs-case-gallery.tvs-gallery {
        grid-template-columns: repeat(2, 1fr) !important;
        gap:                   18px !important;
    }
    .tvs-gallery__item,
    .tvs-case-gallery .tvs-gallery__item {
        aspect-ratio:  175 / 200 !important;
        border-radius: 18px !important;
        width:         auto !important;
        height:        auto !important;
    }
}

/* ── Case Solution list ───────────────────────────────────────────────────── */

.tvs-solution__title {
    font-size:   20px;
    font-weight: 700;
    margin:      0 0 20px;
}

.tvs-solution__list {
    list-style: none;
    margin:     0;
    padding:    0;
    display:    flex;
    flex-direction: column;
    gap:        24px;
}

.tvs-solution__item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tvs-solution__item-header {
    display:     flex;
    align-items: center;
    gap:         10px;
}

.tvs-solution__arrow {
    flex-shrink: 0;
    display:     block;
    width:       32px;
    height:      32px;
}

.tvs-solution__item-title {
    font-size:   18px;
    font-weight: 700;
    line-height: 1.2;
}

.tvs-solution__item-text {
    margin:    0 0 0 44px;
    font-size: 14px;
    line-height: 1.65;
    opacity:   0.8;
    max-width: 410px;
}

@media (max-width: 768px) {
    .tvs-solution__item-text {
        max-width: 320px;
    }
}

/* ── Case Review card ─────────────────────────────────────────────────────── */

.tvs-case-review {
    display:        flex;
    flex-direction: column;
    gap:            16px;
}

.tvs-case-review__text {
    font-family:  'Inter', sans-serif;
    font-weight:  400;
    font-size:    16px;
    line-height:  150%;
    color:        #666666;
    margin:       0;
    padding:      0;
    border:       none;
    font-style:   normal;
}

.tvs-case-review__footer {
    display:     flex;
    align-items: center;
    gap:         12px;
    margin-top:  4px;
}

.tvs-case-review__avatar {
    width:         50px;
    height:        50px;
    border-radius: 50%;
    object-fit:    cover;
    flex-shrink:   0;
}

.tvs-case-review__avatar-placeholder {
    width:           50px;
    height:          50px;
    border-radius:   50%;
    background:      var(--e-global-color-primary, #C9A227);
    color:           #0D0D0D;
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-weight:     700;
    font-size:       20px;
    flex-shrink:     0;
}

.tvs-case-review__meta {
    display:        flex;
    flex-direction: column;
    gap:            2px;
}

.tvs-case-review__name {
    font-family:  'Inter', sans-serif;
    font-weight:  500;
    font-size:    20px;
    line-height:  100%;
    color:        #0D0D0D;
    font-style:   normal;
}

.tvs-case-review__location {
    font-family:  'Inter', sans-serif;
    font-weight:  400;
    font-size:    16px;
    line-height:  120%;
    color:        #666666;
}

@media (max-width: 768px) {
    .tvs-case-review__avatar,
    .tvs-case-review__avatar-placeholder {
        width:  30px;
        height: 30px;
        font-size: 13px;
    }
    .tvs-case-review__name { font-size: 16px; }
}


/* ── Posts Loop filter gap ────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .tvs-loop-filters {
        margin-bottom: 48px !important;
    }
}
