.dg-testimonials {
    padding: 80px 0;
}

.dg-testimonials-header {
    max-width: 640px;
    margin: 0 auto 40px;
    text-align: center;
}

/* ===== Carousel shell ===== */
.dg-testimonials-carousel {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dg-testimonials-viewport {
    flex: 1;
    overflow: hidden;
}

.dg-testimonials-track {
    display: flex;
    gap: 24px;
    will-change: transform;
    transition: transform 0.5s ease;
}

.dg-testimonial-card {
    flex: 0 0 calc(33.333% - 16px);
    width: calc(33.333% - 16px);
    display: flex;
    flex-direction: column;
}

.dg-testimonial-photo {
    position: relative;
    aspect-ratio: 4 / 5;
    background-size: cover;
    background-position: center;
    filter: grayscale(100%);
    border-radius: var(--dg-radius);
    overflow: hidden;
    transition: filter 0.3s ease;
    min-height: 370px;
    max-height: 370px;
}

.dg-testimonial-photo-horizontal {
    aspect-ratio: 16 / 9;
    background: #141414;
    filter: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dg-testimonial-photo-horizontal:hover {
    filter: none;
}

.dg-testimonial-photo-img {
    max-width: 82%;
    max-height: 70%;
    object-fit: contain;
    display: block;
}

.dg-testimonial-card:hover .dg-testimonial-photo {
    filter: grayscale(40%);
}

.dg-testimonial-company {
    position: absolute;
    top: 16px;
    left: 16px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.dg-testimonial-play {
    position: absolute !important;
    bottom: 16px !important;
    left: 16px !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    border: none !important;
    background: rgba(255, 255, 255, 0.9) !important;
    color: var(--dg-black) !important;
    font-size: 13px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: transform 0.2s ease, background 0.2s ease !important;
}

.dg-testimonial-play:hover {
    background: #fff !important;
    transform: scale(1.08) !important;
}

/* ===== Nav arrows ===== */
.dg-testimonial-nav {
    flex: none !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    border: 1px solid var(--dg-border) !important;
    background: #fff !important;
    color: var(--dg-black) !important;
    font-size: 20px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.2s ease, opacity 0.2s ease !important;
}

.dg-testimonial-nav:hover {
    background: var(--dg-light-gray) !important;
}

.dg-testimonial-nav:disabled {
    opacity: 0.35 !important;
    cursor: default !important;
    background: #fff !important;
}

/* ===== Card footer ===== */
.dg-testimonial-footer {
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.dg-testimonial-text {
    flex: 1;
}

.dg-testimonial-quote {
    font-size: 14px;
    line-height: 1.5;
    color: var(--dg-black);
    margin: 0 0 8px;
}

.dg-testimonial-name {
    font-size: 12px;
    color: var(--dg-gray);
    margin: 0;
}

.dg-testimonial-cta {
    flex: 0 0 auto !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 8px 16px !important;
    border-radius: var(--dg-radius-pill) !important;
    background: var(--dg-light-gray) !important;
    color: var(--dg-black) !important;
    border: none !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    transition: background 0.2s ease !important;
}

.dg-testimonial-cta:hover {
    background: #e8e8e8 !important;
}

.dg-testimonial-cta-featured {
    background: var(--dg-black) !important;
    color: #fff !important;
}

.dg-testimonial-cta-featured:hover {
    background: #000 !important;
}

/* ===== Dots ===== */
.dg-testimonials-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 28px;
}

.dg-testimonial-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: var(--dg-border);
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, transform 0.2s ease;
}

.dg-testimonial-dot-active {
    background: var(--dg-black);
    transform: scale(1.25);
}

/* ===== Modal ===== */
.dg-testimonial-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 1000000 !important;
}

.dg-testimonial-modal-panel.dg-modal-horizontal {
    flex-direction: column;
}

.dg-testimonial-modal-panel.dg-modal-horizontal .dg-testimonial-modal-photo {
    flex: none;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 0;
    background: #141414;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dg-testimonial-modal-photo-img {
    max-width: 70%;
    max-height: 65%;
    object-fit: contain;
}

.dg-testimonial-modal.dg-testimonial-modal-open {
    display: flex;
}

.dg-testimonial-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.dg-testimonial-modal-panel {
    position: relative;
    background: #fff;
    border-radius: 20px;
    max-width: 760px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    display: flex;
    gap: 0;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

.dg-testimonial-modal-close {
    color: #000 !important;
    position: absolute !important;
    top: 14px!important;
    right: 14px!important;
    width: 34px!important;
    height: 34px!important;
    border-radius: 50%!important;
    border: none!important;
    background: rgba(255, 255, 255, 0.9)!important;
    font-size: 20px!important;
    line-height: 1!important;
    cursor: pointer!important;
    z-index: 2!important;
}

.dg-testimonial-modal-photo {
    flex: 0 0 42%;
    background-size: cover;
    background-position: center;
    min-height: 320px;
}

.dg-testimonial-modal-body {
    flex: 1;
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dg-testimonial-modal-company {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--dg-gray);
    margin-bottom: 14px;
}

.dg-testimonial-modal-quote {
    font-size: 18px;
    line-height: 1.6;
    color: var(--dg-black);
    margin: 0 0 20px;
}

.dg-testimonial-modal-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--dg-black);
    margin: 0;
}

@media (max-width: 768px) {
    .dg-testimonial-card {
        flex: 0 0 85%;
    }

    .dg-testimonial-nav {
        display: none;
    }

    .dg-testimonial-modal-panel {
        flex-direction: column;
        max-height: 92vh;
    }

    .dg-testimonial-modal-photo {
        min-height: 220px;
    }

    .dg-testimonial-modal-body {
        padding: 28px 24px;
    }
}