/* ======================================================
   PÁGINA TESTIMONIOS
====================================================== */

.testimonios-body,
.testimonios-main {
    background: #f7f6f3;
    color: #29312f;
    font-family: "Inter", Arial, sans-serif;
}

.testimonios-main { overflow: hidden; }
.testimonios-container { max-width: 1180px; }

.testimonios-eyebrow {
    display: block;
    color: #FFF;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 1.9px;
}

.testimonios-main h1,
.testimonios-main h2,
.testimonios-main h3,
.testimonio-card__contenido strong,
.testimonio-modal h2 {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 400;
}

.testimonios-hero {
    position: relative;
    min-height: 330px;
    overflow: hidden;
    background: #172825;
}

.testimonios-hero::before {
    position: absolute;
    top: -250px;
    right: -120px;
    width: 560px;
    height: 560px;
    border: 1px solid rgba(98, 187, 180, .22);
    border-radius: 50%;
    content: "";
}

.testimonios-hero::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 58px;
    background: #f7f6f3;
    clip-path: polygon(0 100%, 100% 30%, 100% 100%);
    content: "";
}

.testimonios-hero__grid {
    position: relative;
    z-index: 1;
    min-height: 330px;
    padding-top: 62px;
    padding-bottom: 82px;
}

.testimonios-hero__contenido {
    max-width: 760px;
}

.testimonios-hero h1 {
    margin: 14px 0 22px;
    color: #fff;
    font-size: 49px;
    line-height: 1.08;
}

.testimonios-hero__contenido p {
    max-width: 540px;
    margin: 0;
    color: #FFF;
    font-size: 15px;
    font-weight: 300;
    line-height: 1.8;
}

.testimonios-contenido { padding: 70px 0 120px; }

.testimonios-encabezado {
    max-width: 680px;
    margin-bottom: 64px;
}

.testimonios-encabezado h2 {
    margin: 11px 0 14px;
    color: #253431;
    font-size: 46px;
    line-height: 1.1;
}

.testimonios-encabezado p {
    margin: 0;
    color: #777;
    font-size: 14px;
    font-weight: 300;
}

.testimonios-anio + .testimonios-anio { margin-top: 80px; }

.testimonios-anio__titulo {
    display: flex;
    gap: 28px;
    align-items: center;
    margin-bottom: 30px;
}

.testimonios-anio__titulo h3 {
    flex: 0 0 auto;
    margin: 0;
    color: #263532;
    font-size: 27px;
}

.testimonios-anio__titulo span {
    width: 100%;
    height: 1px;
    background: #d9dcd7;
}

.testimonios-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 25px;
}

.testimonio-card {
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: inherit;
    text-align: left;
    box-shadow: 0 11px 30px rgba(24, 43, 39, .06);
    cursor: pointer;
    transition: transform .3s ease, box-shadow .3s ease;
}

.testimonio-card:hover,
.testimonio-card:focus-visible {
    outline: none;
    box-shadow: 0 20px 42px rgba(24, 43, 39, .13);
    transform: translateY(-6px);
}

.testimonio-card__foto {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #e8e8e4;
}

.testimonio-card__foto::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(18, 39, 35, .28), transparent 48%);
    content: "";
}

.testimonio-card__foto img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.testimonio-card:hover .testimonio-card__foto img { transform: scale(1.045); }

.testimonio-card__play {
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 1;
    width: 50px;
    height: 50px;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 50%;
    background: rgba(82, 170, 164, .92);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}

.testimonio-card__play::after {
    position: absolute;
    top: 50%;
    left: 52%;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 9px solid #fff;
    content: "";
    transform: translate(-50%, -50%);
}

.testimonio-card__contenido { display: block; padding: 23px 22px 22px; }

.testimonio-card__contenido strong {
    display: block;
    min-height: 50px;
    color: #243532;
    font-size: 22px;
    line-height: 1.2;
}

.testimonio-card__contenido small {
    display: block;
    min-height: 42px;
    margin-top: 7px;
    color: #747a77;
    font-size: 12px;
    font-weight: 300;
    line-height: 1.55;
}

.testimonio-card__contenido > span {
    display: flex;
    justify-content: space-between;
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid #e5e7e3;
    color: #000;
    font-family: "Inter", Arial, sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.2px;
}

.testimonio-card__contenido b { font-size: 15px; font-weight: 400; line-height: .7; }

/* Modal de video */
body.modal-abierta { overflow: hidden; }

.testimonio-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    visibility: hidden;
    align-items: center;
    justify-content: center;
    padding: 34px;
    opacity: 0;
    transition: opacity .3s ease, visibility .3s ease;
}

.testimonio-modal.is-visible { visibility: visible; opacity: 1; }

.testimonio-modal__fondo {
    position: absolute;
    inset: 0;
    background: rgba(2, 9, 8, .92);
    backdrop-filter: blur(6px);
}

.testimonio-modal__dialogo {
    position: relative;
    z-index: 1;
    width: min(1060px, 100%);
    transform: translateY(18px) scale(.985);
    transition: transform .35s ease;
}

.testimonio-modal.is-visible .testimonio-modal__dialogo { transform: translateY(0) scale(1); }

.testimonio-modal__cerrar {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    width: 48px;
    height: 48px;
    border: 0;
    background: #CDB991;
    color: #000;
    font-family: Arial, sans-serif;
    font-size: 32px;
    font-weight: 200;
    line-height: 45px;
    cursor: pointer;
}

.testimonio-modal__cerrar:hover,
.testimonio-modal__cerrar:focus { background: #fff; color: #172825; outline: none; }

.testimonio-modal__encabezado { padding: 0 62px 20px 0; color: #fff; }
.testimonio-modal__encabezado > span { color: #FFF; font-size: 9px; font-weight: 700; letter-spacing: 1.6px; }
.testimonio-modal__encabezado h2 { margin: 7px 0 3px; font-size: 32px; line-height: 1.1; }
.testimonio-modal__encabezado p { margin: 0; color: #FFF; font-size: 12px; font-weight: 300; }

.testimonio-modal__video {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
}

.testimonio-modal__video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Contenedor de la imagen dentro del modal */
.testimonio-modal__imagen {
    display: flex;
    justify-content: center;
    align-items: center;
    max-height: 75vh; /* Limita la altura máxima al 75% de la pantalla */
    overflow: hidden;
}

/* Imagen ampliada dentro del modal */
#testimonio-imagen-ampliada {
    max-width: 100%;    /* Nunca será más ancha que su contenedor */
    max-height: 75vh;   /* Nunca será más alta que el 75% de la pantalla */
    width: auto;        /* Mantiene su proporción original */
    height: auto;       /* Mantiene su proporción original */
    object-fit: contain; /* Asegura que la imagen completa se vea sin recortarse */
    border-radius: 8px;  /* Opcional: bordes redondeados estéticos */
}

@media (max-width: 991px) {
    .testimonios-hero h1 { font-size: 45px; }
    .testimonios-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .testimonios-container { width: 100%; padding-right: 20px; padding-left: 20px; }
    .testimonios-hero { min-height: auto; }
    .testimonios-hero::after { height: 45px; clip-path: polygon(0 100%, 100% 62%, 100% 100%); }
    .testimonios-hero__grid { min-height: auto; padding-top: 52px; padding-bottom: 72px; }
    .testimonios-hero h1 { font-size: 42px; }
    .testimonios-contenido { padding: 62px 0 85px; }
    .testimonios-encabezado { margin-bottom: 48px; }
    .testimonios-encabezado h2 { font-size: 37px; }
    .testimonios-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
    .testimonio-card__contenido { padding: 19px 16px; }
    .testimonio-card__contenido strong { min-height: 45px; font-size: 19px; }
    .testimonio-card__play { right: 13px; bottom: 13px; width: 43px; height: 43px; }
    .testimonio-modal { padding: 20px; }
    .testimonio-modal__encabezado h2 { font-size: 26px; }
}

@media (max-width: 480px) {
    .testimonios-hero h1 { font-size: 37px; }
    .testimonios-encabezado h2 { font-size: 33px; }
    .testimonios-anio + .testimonios-anio { margin-top: 62px; }
    .testimonios-anio__titulo { gap: 18px; }
    .testimonios-anio__titulo h3 { font-size: 24px; }
    .testimonios-grid { grid-template-columns: 1fr; gap: 22px; }
    .testimonio-card { display: grid; grid-template-columns: 42% 58%; }
    .testimonio-card__contenido { display: flex; flex-direction: column; justify-content: center; }
    .testimonio-card__contenido strong,
    .testimonio-card__contenido small { min-height: 0; }
    .testimonio-card__contenido > span { margin-top: 13px; padding-top: 12px; }
    .testimonio-card__play { width: 39px; height: 39px; }
    .testimonio-modal { padding: 14px; }
    .testimonio-modal__cerrar { width: 42px; height: 42px; font-size: 27px; line-height: 40px; }
    .testimonio-modal__encabezado { padding-right: 48px; }
    .testimonio-modal__encabezado h2 { font-size: 23px; }
}

@media (prefers-reduced-motion: reduce) {
    .testimonio-card,
    .testimonio-card__foto img,
    .testimonio-modal,
    .testimonio-modal__dialogo { transition: none; }
}
