/* Reviews Component - Mobile First */

/* Base Styles - Mobile */
.dh-reviews {
    width: 100%;
    background: var(--primary-white);
    overflow: hidden;
    padding: 40px 0;
}

/* Header Container - Centered with standard padding */
.dh-reviews__header-container {
    width: 100%;
    padding: 0;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.dh-reviews__header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
}

.dh-reviews__header-content {
    width: 100%;
}

/* Ocultar flechas de desktop en mobile */
.dh-reviews__nav-wrapper--desktop {
    display: none;
}

.dh-reviews__nav--desktop {
    display: none;
}

.dh-reviews__title {
    color: var(--primary-black-100);
    text-align: left;
    font-family: var(--font-lato);
    font-size: 28px;
    font-style: normal;
    font-weight: 700;
    line-height: 116%;
    margin: 0;
}

.dh-reviews__title sup {
    font-size: 0.6em;
    vertical-align: super;
    line-height: 0;
    top: 0;
    position: relative;
}

.dh-reviews__description {
    color: var(--primary-grey-100);
    text-align: left;
    font-family: var(--font-lato);
    font-size: 14px;
    font-weight: 400;
    line-height: 140%;
    margin: 0;
}

/* Slider Container - Left aligned, overflow visible to right */
.dh-reviews__slider-container {
    width: 100%;
    margin-top: 30px;
    padding-left: 0;
    /* Padding izquierdo igual al del header */
    padding-right: 0;
    /* Sin padding derecho para desbordamiento */
    /* Usar clip-path para recortar el padding izquierdo y permitir overflow por la derecha */
    overflow: visible;
    clip-path: polygon(0% -50%, 250% -50%, 250% 150%, 0% 150%);
}

.dh-reviews__slider-wrapper {
    position: relative;
    width: 100%;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 68px;
    /* Espacio para flechas mobile */
}

.dh-reviews__slider {
    width: 100%;
    overflow: visible;
}

.dh-reviews__slider .swiper-wrapper {
    display: flex;
    align-items: stretch;
}

.dh-reviews__card {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 22px;
    background: var(--white-red);
    border: 1px solid var(--light-red);
    border-radius: 10px;
    height: auto;
    width: 300px;
    /* max-width removido para dejar que swiper controle el ancho */
}

.dh-reviews__rating {
    display: flex;
    align-items: center;
    gap: 2px;
}

.dh-reviews__star {
    width: 16px;
    height: 16px;
}

.dh-reviews__star {
    width: 16px;
    height: 16px;
    color: var(--primary-red-90);
    /* Set main color for SVG */
}

/* Filled Star */
.dh-reviews__star--filled path {
    fill: currentColor !important;
    stroke: none !important;
}

/* Outline Star */
.dh-reviews__star:not(.dh-reviews__star--filled) path {
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.5px;
}

.dh-reviews__rating-text {
    color: var(--primary-red-100);
    font-family: var(--font-lato);
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    letter-spacing: 1.44px;
    text-transform: uppercase;
    margin-left: 6px;
}

.dh-reviews__highlight {
    color: var(--primary-red-90);
    font-family: var(--font-lato);
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 132%;
    margin: 0;
}

.dh-reviews__testimonial {
    color: var(--primary-black-90);
    font-family: var(--font-lato);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 132%;
    margin: 0;
}

.dh-reviews__testimonial p {
    margin: 0;
}

.dh-reviews__testimonial p::before {
    content: '"';
}

.dh-reviews__testimonial p::after {
    content: '"';
}

.dh-reviews__footer {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    /* Estirar para que el logo ocupe el alto disponible */
    gap: 16px;
    margin-top: auto;
}

.dh-reviews__author {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-style: normal;
    justify-content: center;
    /* Centrar verticalmente el texto si el logo es más alto */
}

.dh-reviews__author-name {
    color: var(--primary-grey-100);
    font-family: var(--font-lato);
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    letter-spacing: 0.24px;
    margin: 0;
}

.dh-reviews__author-position {
    color: var(--primary-grey-100);
    font-family: var(--font-lato);
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    letter-spacing: 0.24px;
    margin: 0;
}

.dh-reviews__logo {
    flex-shrink: 0;
    width: auto !important;
    /* Ancho automático según la imagen */
    height: 36px !important;
    /* Alto automático (se estirará por align-items: stretch del padre) */
    display: flex;
    align-items: center;
    justify-content: center;
}

.dh-reviews__logo img,
.dh-reviews__logo picture,
.dh-reviews__logo picture img {
    max-height: 100% !important;
    height: 100% !important;
    /* Ocupar todo el alto disponible */
    width: auto !important;
    /* Mantener proporción */
    object-fit: contain;
    object-position: center;
}

/* Ocultar flechas por defecto de Swiper */
.dh-reviews__slider .swiper-button-prev::after,
.dh-reviews__slider .swiper-button-next::after {
    display: none;
}

/* Botones de navegación - Mobile First */
.dh-reviews__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    position: absolute;
    top: calc(100% + 30px);
    bottom: auto;
    margin-top: 0;
    flex-shrink: 0;
}

.swiper-button-next.swiper-button-disabled,
.swiper-button-prev.swiper-button-disabled {
    opacity: 1;
}

/* Posicionar flechas debajo del carrusel, centradas en mobile */
.dh-reviews__nav--prev {
    left: 50%;
    transform: translateX(calc(-50% - 25.25px));
    right: auto;
}

.dh-reviews__nav--next {
    left: 50%;
    transform: translateX(calc(-50% + 25.25px));
    right: auto;
}

/* Iconos SVG en mobile */
.dh-reviews__nav--prev::before,
.dh-reviews__nav--next::before {
    content: '';
    display: block;
    width: 38px;
    height: 38px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.dh-reviews__nav--prev::before {
    background-image: url('../../img/icons/arrows/arrow-carrusel-default.svg');
    transform: rotate(180deg);
}

.dh-reviews__nav--next::before {
    background-image: url('../../img/icons/arrows/arrow-carrusel-default.svg');
    transform: rotate(0deg);
}

.dh-reviews__nav:hover.dh-reviews__nav--prev::before {
    background-image: url('../../img/icons/arrows/arrow-carrusel-hover.svg');
    transform: rotate(180deg);
}

.dh-reviews__nav:hover.dh-reviews__nav--next::before {
    background-image: url('../../img/icons/arrows/arrow-carrusel-hover.svg');
    transform: rotate(0deg);
}

.dh-reviews__nav.swiper-button-disabled.dh-reviews__nav--prev::before {
    background-image: url('../../img/icons/arrows/arrow-carrusel-disable.svg');
    transform: rotate(0deg);
}

.dh-reviews__nav.swiper-button-disabled.dh-reviews__nav--next::before {
    background-image: url('../../img/icons/arrows/arrow-carrusel-disable.svg');
    transform: rotate(180deg);
}

/* Tablet Small - 600px y más */
@media (min-width: 600px) {
    .dh-reviews__card {
        width: 340px;
        max-width: none;
        min-width: 0;
    }
}

/* Tablet - 768px a 1023px */
@media (min-width: 768px) and (max-width: 1100px) {
    .dh-reviews {
        padding: 60px 0;
    }

    .dh-reviews__header-container {
        padding: 0;
    }

    .dh-reviews__slider-container {
        padding-left: 0;
        clip-path: polygon(0% -50%, 250% -50%, 250% 150%, 0% 150%);
    }

    .dh-reviews__slider .swiper-slide:last-child {
        margin-right: 40px !important;
    }


}

/* Desktop - 1024px y más */
@media (min-width: 1024px) {
    .dh-reviews {
        padding: 60px 0;
    }

    .dh-reviews__header-container {
        padding: 0;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0;
    }

    .dh-reviews__header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 0;
    }

    .dh-reviews__header-content {
        width: auto;
        flex: 1;
    }

    /* Mostrar flechas de desktop */
    .dh-reviews__nav-wrapper--desktop {
        display: flex;
        align-items: center;
        margin-top: 2px;
        gap: 12.5px;
        flex-shrink: 0;
    }

    .dh-reviews__nav--desktop {
        display: flex !important;
    }

    /* Ocultar flechas de mobile */
    .dh-reviews__slider .dh-reviews__nav:not(.dh-reviews__nav--desktop) {
        display: none !important;
    }

    .dh-reviews__title {
        font-size: 36px;
        max-width: 1116px;
    }

    .dh-reviews__description {
        font-size: 16px;
    }

    .dh-reviews__slider-container {
        padding-left: 0;
        margin-top: 40px;
        transition: padding-right 0.3s ease;
        clip-path: polygon(0% -50%, 250% -50%, 250% 150%, 0% 150%);
    }

    .dh-reviews__slider-wrapper {
        padding-bottom: 0;
    }

    /* Flechas desktop */
    .dh-reviews__nav--desktop {
        position: static !important;
        transform: none !important;
        margin: 0;
    }
}

/* Pantallas grandes - .dh-container handles centering */
@media (min-width: 1441px) {
    .dh-reviews__header-container {
        max-width: 1440px;
        padding: 0;
        margin: 0 auto;
    }

    .dh-reviews__slider-container {
        /* .dh-container now handles all centering and padding */
        width: auto;
        /* Dejar que ocupe el resto */
        clip-path: polygon(0% -50%, 250% -50%, 250% 150%, 0% 150%);
    }
}