/* ElectroWorld Testimonials — frontend styling */

.electro-testimonials {
    position: relative;
    width: 100%;
    max-width: 1240px;
    margin: 60px auto;
    padding: 0 20px;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: #0b2b55;
}

.electro-testimonials *,
.electro-testimonials *::before,
.electro-testimonials *::after {
    box-sizing: border-box;
}

/* ---- Header row: heading LEFT + controls RIGHT on one line ---- */
.electro-testimonials__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 40px;
}

.electro-testimonials__heading {
    font-size: 46px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #0b2b55;
    margin: 0;
    line-height: 1.05;
    /* Don't let the heading get larger than its column to prevent
       collision with the card that overlaps the header area. */
    flex: 0 1 auto;
    min-width: 0;
}

.electro-testimonials__controls {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #0b2b55;
    flex-shrink: 0;
}

.electro-testimonials__btn {
    background: transparent;
    border: none;
    color: #0b2b55;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: opacity 0.15s ease;
}

.electro-testimonials__btn:hover { opacity: 0.55; }

.electro-testimonials__btn:focus-visible {
    outline: 2px solid #e31e2b;
    outline-offset: 3px;
}

.electro-testimonials__counter {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #0b2b55;
    min-width: 34px;
    text-align: center;
}

/* ---- Stage: full-width image with card overlapping top-center-right ---- */
.electro-testimonials__stage {
    position: relative;
    width: 100%;
}

.electro-testimonials__image {
    width: 100%;
    height: clamp(260px, 38vw, 460px);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: block;
}

.electro-testimonials__image--placeholder {
    background: linear-gradient(135deg, #14427f 0%, #0b2b55 100%);
}

/* Dark testimonial card — sits on top of the image, extending above its top edge */
.electro-testimonials__card {
    position: absolute;
    top: -90px; /* extends up into the header area */
    right: 13%;
    width: 41%;
    min-height: 340px;
    background: #0b2b55;
    color: #fff;
    padding: 32px 38px;
    border-radius: 4px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    display: flex;
    flex-direction: column;
}

.electro-testimonials__slides {
    position: relative;
    flex: 1;
}

.electro-testimonials__slide {
    display: none;
    animation: electroFade 0.35s ease;
}

.electro-testimonials__slide.is-active {
    display: block;
}

@keyframes electroFade {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.electro-testimonials__title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.8px;
    margin: 0 0 20px;
    text-transform: uppercase;
    color: #fff;
    line-height: 1.25;
}

.electro-testimonials__body {
    font-size: 13.5px;
    line-height: 1.7;
    color: #d5dfee;
    margin-bottom: 22px;
}

.electro-testimonials__body p { margin: 0 0 8px; }
.electro-testimonials__body p:last-child { margin-bottom: 0; }

.electro-testimonials__author {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

/* =====================================================
   Responsive breakpoints
   =====================================================
   At narrower widths the header gets crowded because the
   card originally extends upward into it. From ~1200px and
   below we keep the card fully inside the image area so the
   heading has room to breathe. */

/* --- Below 1200: shrink heading, pin card into image area --- */
@media (max-width: 1200px) {
    .electro-testimonials__heading { font-size: 38px; }
    .electro-testimonials__card {
        top: 30px;        /* no longer extends above image */
        right: 5%;
        width: 48%;
        min-height: 320px;
        padding: 28px 32px;
    }
}

/* --- Below 1000 (small laptop / large tablet) --- */
@media (max-width: 1000px) {
    .electro-testimonials__heading { font-size: 32px; }
    .electro-testimonials__card {
        top: 24px;
        right: 4%;
        width: 52%;
        padding: 26px 28px;
        min-height: 300px;
    }
    .electro-testimonials__body {
        font-size: 13px;
        line-height: 1.6;
    }
}

/* --- Below 900: stack the card below the image --- */
@media (max-width: 900px) {
    .electro-testimonials {
        margin: 40px auto;
    }
    .electro-testimonials__header {
        margin-bottom: 24px;
    }
    .electro-testimonials__image {
        height: 320px;
    }
    .electro-testimonials__card {
        position: relative;
        top: auto;
        right: auto;
        width: calc(100% - 30px);
        max-width: 640px;
        margin: -60px auto 0;
        min-height: 0;
        padding: 30px 32px;
    }
}

/* --- Small tablet / large phone: 560-768 --- */
@media (max-width: 768px) {
    .electro-testimonials__image {
        height: 260px;
    }
    .electro-testimonials__card {
        width: calc(100% - 20px);
        margin: -50px auto 0;
        padding: 26px 26px;
    }
    .electro-testimonials__title {
        font-size: 17px;
    }
}

/* --- Phone: 560 and under — stack header, tighter padding --- */
@media (max-width: 560px) {
    .electro-testimonials {
        padding: 0 16px;
        margin: 30px auto;
    }
    .electro-testimonials__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 22px;
    }
    .electro-testimonials__controls {
        align-self: flex-end;
    }
    .electro-testimonials__image {
        height: 220px;
    }
    .electro-testimonials__card {
        width: calc(100% - 16px);
        margin: -40px auto 0;
        padding: 24px 22px;
        min-height: 0;
    }
    .electro-testimonials__title {
        font-size: 16px;
        margin-bottom: 16px;
    }
    .electro-testimonials__body {
        font-size: 13px;
        margin-bottom: 18px;
    }
}

/* --- Very small phones --- */
@media (max-width: 380px) {
    .electro-testimonials__heading {
        font-size: 22px;
    }
    .electro-testimonials__image {
        height: 180px;
    }
    .electro-testimonials__card {
        padding: 20px 18px;
    }
}
