/*
 * ==========================================================
 * MTG UNIVERSAL TESTIMONIALS V2
 * DISEÑO CANONICO
 * ==========================================================
 */

.mtg-utestimonials {
    width:100%;
    padding:64px 0 !important;
    background:#f4fbfa !important;
    color:#111827 !important;
}


.mtg-utestimonials__shell {
    width:min(90%,1720px);
    margin:0 auto;
}


.mtg-utestimonials__head {
    margin:0 0 28px;
}


.mtg-utestimonials__title {
    margin:0 !important;
    color:#111827 !important;
    font-family:inherit !important;
    font-size:clamp(24px,2.1vw,34px) !important;
    font-weight:800 !important;
    line-height:1.15 !important;
    letter-spacing:-.025em !important;
    text-align:left !important;
}


.mtg-utestimonials__score {
    display:block !important;
    margin:18px 0 0 !important;
    color:#ff7a00 !important;
    font-size:17px !important;
    font-weight:800 !important;
    text-align:left !important;
}


.mtg-utestimonials__grid {
    display:grid !important;
    grid-template-columns:
        repeat(4,minmax(0,1fr)) !important;
    gap:20px !important;
    align-items:stretch !important;
}


.mtg-utestimonials__card {
    min-width:0 !important;
    min-height:218px !important;
    margin:0 !important;
    padding:22px 22px 24px !important;

    display:flex !important;
    flex-direction:column !important;

    background:#ffffff !important;
    border:1px solid #d9e3e2 !important;
    border-radius:20px !important;

    box-shadow:
        0 16px 38px
        rgba(15,23,42,.07) !important;

    color:#111827 !important;
}


.mtg-utestimonials__person {
    display:flex !important;
    align-items:center !important;
    gap:14px !important;
    margin:0 0 16px !important;
}


.mtg-utestimonials__avatar {
    flex:0 0 52px !important;
    width:52px !important;
    height:52px !important;

    display:flex !important;
    align-items:center !important;
    justify-content:center !important;

    border-radius:999px !important;

    background:#eaf8f6 !important;
    color:#9b321c !important;

    font-size:19px !important;
    font-weight:900 !important;

    overflow:hidden !important;
}


.mtg-utestimonials__avatar img {
    width:100% !important;
    height:100% !important;
    object-fit:cover !important;
    border-radius:inherit !important;
}


.mtg-utestimonials__identity {
    min-width:0 !important;
}


.mtg-utestimonials__name {
    display:block !important;

    margin:0 0 4px !important;

    color:#111827 !important;

    font-size:16px !important;
    font-weight:900 !important;
    line-height:1.2 !important;

    text-transform:uppercase !important;
}


.mtg-utestimonials__stars {
    display:block !important;

    color:#ff7a00 !important;

    font-size:14px !important;
    font-weight:900 !important;
    letter-spacing:1px !important;
}


.mtg-utestimonials__text {
    margin:0 !important;

    color:#526274 !important;

    font-size:16px !important;
    line-height:1.65 !important;

    text-align:left !important;
}


/*
 * Tablet
 */
@media (max-width:1100px) {

    .mtg-utestimonials__grid {
        grid-template-columns:
            repeat(2,minmax(0,1fr)) !important;
    }
}


/*
 * Mobile
 */
@media (max-width:640px) {

    .mtg-utestimonials {
        padding:44px 0 !important;
    }

    .mtg-utestimonials__shell {
        width:90%;
    }

    .mtg-utestimonials__grid {
        grid-template-columns:
            1fr !important;
    }

    .mtg-utestimonials__card {
        min-height:0 !important;
    }
}


/*
 * ==========================================================
 * MTG UNIVERSAL GALLERY V3
 *
 * REGLA:
 * - exactamente 3 elementos reales
 * - exactamente 3 columnas desktop
 * - ocupan TODO el ancho útil de la sección
 * - no conservan max-width pequeño del template
 * ==========================================================
 */


/*
 * SECTION
 */
body [data-core-section="gallery"] {
    width:100% !important;
    max-width:none !important;
    box-sizing:border-box !important;
}


/*
 * Contenedor principal interno.
 *
 * Cubrimos los wrappers utilizados por
 * TM1-TM7 sin modificar el HTML original.
 */
body [data-core-section="gallery"] > .container,
body [data-core-section="gallery"] > .wrap,
body [data-core-section="gallery"] > [class*="container"],
body [data-core-section="gallery"] > [class*="inner"],
body [data-core-section="gallery"] > [class*="shell"],
body [data-core-section="gallery"] > [class*="content"] {
    width:90% !important;
    max-width:1720px !important;
    margin-left:auto !important;
    margin-right:auto !important;
}


/*
 * GRID.
 *
 * Selectores generales + aliases históricos
 * de TM1-TM7.
 */
body [data-core-section="gallery"] .gallery__grid,
body [data-core-section="gallery"] [class*="gallery-grid"],
body [data-core-section="gallery"] [class*="gallery__grid"],
body [data-core-section="gallery"] [class*="gallery-grid"],
body [data-core-section="gallery"] .mtg-gallery-grid,
body [data-core-section="gallery"] .tm2-gallery-grid,
body [data-core-section="gallery"] .tm3-gallery-grid,
body [data-core-section="gallery"] .tm4-gallery-grid,
body [data-core-section="gallery"] .tm5-gallery-grid,
body [data-core-section="gallery"] .tm6-gallery-grid,
body [data-core-section="gallery"] .tm7-gallery-grid {
    width:100% !important;
    max-width:none !important;

    display:grid !important;

    grid-template-columns:
        repeat(3,minmax(0,1fr)) !important;

    gap:20px !important;

    margin-left:0 !important;
    margin-right:0 !important;
}


/*
 * Algunos TMs usan el propio wrapper de items
 * sin una clase gallery-grid explícita.
 */
body [data-core-section="gallery"]
[class*="gallery"]
> div:has(> article),

body [data-core-section="gallery"]
[class*="gallery"]
> div:has(> a) {
    grid-template-columns:
        repeat(3,minmax(0,1fr)) !important;
}


/*
 * ITEM
 */
body [data-core-section="gallery"] .gallery__item,
body [data-core-section="gallery"] [class*="gallery-item"],
body [data-core-section="gallery"] [class*="gallery__item"] {
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    margin:0 !important;
}


/*
 * IMAGEN
 */
body [data-core-section="gallery"] .gallery__item img,
body [data-core-section="gallery"] [class*="gallery-item"] img,
body [data-core-section="gallery"] [class*="gallery__item"] img {
    display:block !important;

    width:100% !important;
    max-width:none !important;

    aspect-ratio:1 / 1 !important;

    object-fit:cover !important;

    border-radius:22px !important;
}


/*
 * TM3
 */
body .mtg-tm3-core-gallery {
    width:100% !important;
    max-width:none !important;
}

body .mtg-tm3-core-gallery
[class*="gallery"] {
    max-width:none !important;
}


/*
 * TM4
 */
body .tm4-core-gallery,
body .mtg-tm4-core-gallery {
    width:100% !important;
    max-width:none !important;
}

body .tm4-core-gallery
[class*="gallery"],
body .mtg-tm4-core-gallery
[class*="gallery"] {
    max-width:none !important;
}


/*
 * TABLET
 */
@media (max-width:960px) {

    body [data-core-section="gallery"] .gallery__grid,
    body [data-core-section="gallery"] [class*="gallery-grid"],
    body [data-core-section="gallery"] [class*="gallery__grid"],
    body [data-core-section="gallery"] .mtg-gallery-grid {
        grid-template-columns:
            repeat(2,minmax(0,1fr)) !important;
    }
}


/*
 * MOBILE
 */
@media (max-width:640px) {

    body [data-core-section="gallery"] > .container,
    body [data-core-section="gallery"] > .wrap,
    body [data-core-section="gallery"] > [class*="container"],
    body [data-core-section="gallery"] > [class*="inner"],
    body [data-core-section="gallery"] > [class*="shell"],
    body [data-core-section="gallery"] > [class*="content"] {
        width:90% !important;
    }

    body [data-core-section="gallery"] .gallery__grid,
    body [data-core-section="gallery"] [class*="gallery-grid"],
    body [data-core-section="gallery"] [class*="gallery__grid"],
    body [data-core-section="gallery"] .mtg-gallery-grid {
        grid-template-columns:
            1fr !important;
    }
}


/* MTG_UNIVERSAL_GALLERY_LAYOUT_V3_END */



/*
 * ==========================================================
 * MTG UNIVERSAL GALLERY IMAGE FIT FIX V4
 *
 * REGLA:
 * - 3 items reales
 * - imagen NO se estira
 * - imagen centrada
 * - si sobra espacio se ve fondo
 * - usar contain, no cover
 * ==========================================================
 */

body [data-core-section="gallery"] .gallery__item,
body [data-core-section="gallery"] [class*="gallery-item"],
body [data-core-section="gallery"] [class*="gallery__item"],
body .mtg-tm3-core-gallery [class*="gallery-item"],
body .mtg-tm4-core-gallery [class*="gallery-item"],
body .tm4-core-gallery [class*="gallery-item"] {
    aspect-ratio: 1 / 1 !important;
    background: #f4f6f8 !important;
    border-radius: 22px !important;
    overflow: hidden !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 12px !important;
    box-sizing: border-box !important;
}

body [data-core-section="gallery"] .gallery__item img,
body [data-core-section="gallery"] [class*="gallery-item"] img,
body [data-core-section="gallery"] [class*="gallery__item"] img,
body .mtg-tm3-core-gallery [class*="gallery-item"] img,
body .mtg-tm4-core-gallery [class*="gallery-item"] img,
body .tm4-core-gallery [class*="gallery-item"] img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;

    object-fit: contain !important;
    object-position: center center !important;

    background: transparent !important;
    border-radius: 16px !important;
    display: block !important;
}


/*
 * Si algún TM mete anchor wrapping
 */
body [data-core-section="gallery"] .gallery__item > a,
body [data-core-section="gallery"] [class*="gallery-item"] > a,
body [data-core-section="gallery"] [class*="gallery__item"] > a {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}


/* MTG_UNIVERSAL_GALLERY_IMAGE_FIT_FIX_V4_END */



/*
 * ==========================================================
 * MTG CTA FINAL MATRIX V4
 * ==========================================================
 */

[data-core-section="cta"] .mtg-cta-final-v4{
    width:90%;
    max-width:1720px;
    margin:0 auto;
    padding:46px;

    display:grid;
    grid-template-columns:
        minmax(0,1.15fr)
        minmax(360px,.9fr);

    gap:52px;
    align-items:center;

    box-sizing:border-box;

    border-radius:30px;

    background:#201719;
    color:#fff;
}

[data-core-section="cta"] .mtg-cta-final-v4 h2{
    margin:0;

    color:inherit;

    font-size:clamp(
        36px,
        4vw,
        58px
    );

    line-height:.98;
    letter-spacing:-.035em;
}

[data-core-section="cta"]
.mtg-cta-final-v4__copy > p{
    max-width:900px;

    margin:22px 0 0;

    color:rgba(255,255,255,.88);

    font-size:17px;
    line-height:1.6;
}

[data-core-section="cta"]
.mtg-cta-final-v4__actions{
    margin-top:28px;

    display:flex;
    flex-wrap:wrap;

    gap:16px;
}

[data-core-section="cta"]
.mtg-cta-final-v4__button{
    min-height:58px;

    padding:0 30px;

    display:inline-flex;
    align-items:center;
    justify-content:center;

    border-radius:17px;

    text-decoration:none;
    font-weight:800;
}

[data-core-section="cta"]
.mtg-cta-final-v4__button--primary{
    background:#e87d7f;
    color:#fff;
}

[data-core-section="cta"]
.mtg-cta-final-v4__button--secondary{
    background:#f3eeee;
    color:#d36e70;
}

[data-core-section="cta"]
.mtg-cta-final-v4__features{
    display:grid;
    gap:14px;
}

[data-core-section="cta"]
.mtg-cta-final-v4__feature{
    min-height:58px;

    padding:14px 20px;

    display:flex;
    align-items:center;

    border:
        1px solid
        rgba(255,255,255,.12);

    border-radius:18px;

    background:
        rgba(255,255,255,.08);

    color:#fff;

    font-size:16px;
    font-weight:750;
    line-height:1.35;
}


/* personalidad visual */

body.mtg-template-tm1
[data-core-section="cta"]
.mtg-cta-final-v4{
    background:#181818;
}

body.mtg-template-tm2
[data-core-section="cta"]
.mtg-cta-final-v4{
    background:#2a2030;
}

body.mtg-template-tm3
[data-core-section="cta"]
.mtg-cta-final-v4{
    background:#201719;
}

body.mtg-template-tm4
[data-core-section="cta"]
.mtg-cta-final-v4{
    background:#111827;
}

body.mtg-template-tm5
[data-core-section="cta"]
.mtg-cta-final-v4{
    background:#17332a;
}

body.mtg-template-tm6
[data-core-section="cta"]
.mtg-cta-final-v4{
    background:#121212;
}

body.mtg-template-tm7
[data-core-section="cta"]
.mtg-cta-final-v4{
    background:#153b67;
}


@media (max-width:900px){

    [data-core-section="cta"]
    .mtg-cta-final-v4{
        width:92%;

        padding:30px 24px;

        grid-template-columns:1fr;

        gap:30px;
    }

    [data-core-section="cta"]
    .mtg-cta-final-v4__actions{
        display:grid;
        grid-template-columns:1fr;
    }

    [data-core-section="cta"]
    .mtg-cta-final-v4__button{
        width:100%;
    }

}
