/**
 * Sekcja promocyjna (testimonial z wideo)
 * CPT: post_promo_section
 * @version 1.1
 *
 * Warianty:
 *   --bg-gradient           gradient wrapper z mniejszym container
 *   --bg-purple             fioletowy tekst, transparent tło sekcji
 *   --bg-purple-full-width  fioletowy tekst, pełna szerokość tła sekcji
 */

:root {
    --tp-color: #00B67A;
}

/* ========================================================================
   SECTION WRAPPER
   ======================================================================== */

.promo_section {
    background-color: var(--global_color_background);
    overflow: hidden;
    font-family: var(--root_font_family_2);
}

.promo_section .section_contener {
    max-width: 1312px;
}

/* ========================================================================
   INNER LAYOUT (2 columns)
   ======================================================================== */

.promo_section__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 16px;
}

.promo_section__text {
    height: 100%;
    position: relative;
}

.promo_section__video {
    width: 100%;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
}

/* ========================================================================
   QUOTE MARK (decorative)
   ======================================================================== */

.promo_section__quote_mark {
    position: absolute;
    top: -20px;
    left: -28px;
    width: 60px;
    height: 60px;
    background-image: url('../../../../../../wp-content/themes/autotestoNew/images/quotes-dark-vector.png');
    background-size: contain;
    background-repeat: no-repeat;
    user-select: none;
    pointer-events: none;
    z-index: 0;
}

.promo_section--bg-gradient .promo_section__quote_mark {
    background-image: url('../../../../../../wp-content/themes/autotestoNew/images/quotes-light-vector.png');
}

/* ========================================================================
   QUOTE TEXT
   ======================================================================== */

.promo_section__quote {
    color: var(--root_color_white);
    font-size: 36px;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 15px;
    z-index: 1;
    position: relative;
    max-width: 600px;
}

.promo_section__quote p {
    position: relative;
    z-index: 1;
    margin: 0;
}

.promo_section__quote strong {
    color: var(--root_color_gold);
    font-weight: 700;
}

/* ========================================================================
   SUB-QUOTE
   ======================================================================== */

.promo_section__sub_quote {
    color: var(--root_color_white);
    font-size: 18px;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 16px;
    z-index: 1;
}

/* ========================================================================
   AUTHOR
   ======================================================================== */

.promo_section__author {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 8px;
}

.promo_section__author_prefix {
    color: var(--root_color_white);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
}

.promo_section__author_name {
    color: var(--root_color_white);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

/* ========================================================================
   SIGNATURE
   ======================================================================== */

.promo_section__signature {
    position: absolute;
    display: block;
    max-width: 155px;
    height: auto;
    right: 24px;
    bottom: 20px;
}

/* ========================================================================
   TRUSTPILOT WIDGET
   ======================================================================== */

.promo_section__trustpilot {
    margin-top: 24px;
}

.promo_section__tp_card {
    display: inline-flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: var(--root_color_white);
    border-radius: 12px;
    padding: 12px 12px 16px 12px;
    width: 100%;
    border: 3px solid var(--tp-color);
}

.promo_section__tp_left {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.promo_section__tp_brand {
    display: flex;
    align-items: center;
    gap: 6px;
}

.promo_section__tp_star {
    width: 32px;
    height: auto;
}

.promo_section__tp_name {
    font-size: 21px;
    font-weight: 700;
    color: #000000;
}

.promo_section__tp_label {
    font-size: 14px;
    font-weight: 600;
    color: #555555;
}

.promo_section__tp_right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.promo_section__tp_score {
    font-size: 48px;
    font-weight: 700;
    color: var(--tp-color);
    line-height: 1;
}

.promo_section__tp_max {
    font-size: 32px;
    font-weight: 700;
    color: #b0b0b0;
}

.promo_section__tp_stars {
    height: 20px;
    width: auto;
}

/* ========================================================================
   VIDEO
   ======================================================================== */

.promo_section__video_player,
.promo_section__video_thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 16px;
}

.promo_section__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    cursor: pointer;
    z-index: 3;
    transition: transform 0.2s ease;
}

.promo_section__play:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

/* ========================================================================
   VARIANT: --bg-gradient
   ======================================================================== */

.promo_section--bg-gradient {
    background-color: transparent;

    .section_contener {
        border-radius: 16px;
        padding: 24px;
        background: linear-gradient(to right, #211C33 49%, #3D3363 91%, #211C33 100%);
        max-width: 1200px;
    }

    .promo_section__inner {
        gap: 40px;
    }

    .promo_section__text {
        place-content: center;
        padding: 24px 48px;
    }

    .promo_section__video {
        height: 100%;
    }

    .promo_section__sub_quote {
        font-size: 16px;
    }

    .promo_section__author {
        max-width: 304px;
    }

    .promo_section__author_prefix,
    .promo_section__author_name {
        font-size: 16px;
    }

    .promo_section__author_name {
        position: relative;
    }

    .promo_section__signature {
        max-width: 94px;
        right: 0;
        bottom: 0;
    }

    .promo_section__quote_mark {
        top: -10px;
        left: -38px;
    }

    .promo_section__trustpilot {
        max-width: 304px;
    }
}

/* ========================================================================
   VARIANTS: --bg-purple & --bg-purple-full-width (shared base)
   ======================================================================== */

.promo_section--bg-purple,
.promo_section--bg-purple-full-width {
    .promo_section__text {
        background-color: var(--global_color_background_2);
        border-radius: 16px;
        place-content: center;
        padding: 0 74px;
    }

    .promo_section__quote_mark {
        width: 80px;
    }
}

.promo_section--bg-purple {
    background-color: transparent;
}

/* ========================================================================
   RESPONSIVE: desktop-narrow (1026–1120px)
   ======================================================================== */

@media (min-width: 1026px) and (max-width: 1120px) {
    .promo_section--bg-purple .promo_section__text,
    .promo_section--bg-purple-full-width .promo_section__text {
        padding: 0 30px;
    }
}

/* ========================================================================
   RESPONSIVE: tablet & mobile (<=1025px)
   ======================================================================== */

@media (max-width: 1025px) {

    /* --- Base layout --- */

    .promo_section__inner {
        display: flex;
        flex-direction: column-reverse;
        gap: 0;
    }

    .promo_section__text {
        padding: 24px 16px;
        width: 100%;
    }

    .promo_section__quote {
        font-size: var(--global_font_size_h1);
    }

    .promo_section__sub_quote {
        position: relative;
        z-index: 1;
        font-size: 16px;
    }

    .promo_section__play {
        width: 48px;
        height: 48px;
    }

    .promo_section__signature {
        max-width: 95px;
        right: 22px;
        bottom: 24px;
    }

    .promo_section__video {
        border-radius: 16px 16px 0 0;
    }

    .promo_section__video_player,
    .promo_section__video_thumbnail {
        border-radius: 16px 16px 0 0;
    }

    /* --- Shared variant resets (gradient, purple, purple-full-width) --- */

    .promo_section--bg-gradient,
    .promo_section--bg-purple,
    .promo_section--bg-purple-full-width {
        .promo_section__inner {
            gap: 0;
        }

        .promo_section__quote_mark {
            top: 0;
            left: -5px;
        }

        .promo_section__signature {
            right: 0;
            bottom: 0;
        }

        .promo_section__author {
            position: relative;
            max-width: inherit;
        }

        .promo_section__trustpilot {
            max-width: inherit;
        }
    }

    /* --- bg-gradient specifics --- */

    .promo_section--bg-gradient {
        .section_contener {
            padding: 0;
            background: var(--global_color_background_2);
        }

        .promo_section__text {
            padding: 12px 16px 16px 16px;
        }

        .promo_section__sub_quote {
            max-width: 600px;
        }

        .promo_section__video {
            position: relative;
            display: block;
        }

        .promo_section__video::after {
            content: "";
            position: absolute;
            inset: 0;
            pointer-events: none;
            border-radius: inherit;
            background: linear-gradient(
                to top,
                var(--global_color_background_2) 0%,
                rgba(107, 54, 203, 0) 30%,
                transparent 100%
            );
        }
    }

    /* --- bg-purple specifics --- */

    .promo_section--bg-purple {
        .promo_section__text {
            padding: 24px 16px;
            border-radius: 0 0 16px 16px;
        }

        .promo_section__quote {
            max-width: 600px;
        }

        .promo_section__sub_quote {
            max-width: 600px;
        }

        .promo_section__author {
            position: relative;
        }
    }

    /* --- bg-purple-full-width specifics --- */

    .promo_section--bg-purple-full-width {
        .promo_section__text {
            width: 100%;
            border-radius: 0 0 16px 16px;
            padding: 24px 16px;

            .promo_section__quote_mark {
                left: -5px;
                top: 0;
            }
        }
    }
}

/* ========================================================================
   RESPONSIVE: mobile (<=768px)
   ======================================================================== */

@media (max-width: 768px) {
    .promo_section__quote {
        font-size: 24px;
    }

    .promo_section--bg-purple .promo_section__sub_quote {
        padding-right: 0;
    }
}
