:root {
    --mtc-super-hero-margin-top: 0px;

    --mtc-super-hero-overlay-z-index: 20;
    --mtc-super-hero-overlay-width: 1200px;

    --mtc-super-hero-overlay-padding-x: 32px;
    --mtc-super-hero-overlay-padding-y: 20px;

    --mtc-super-hero-overlay-padding-x-mobile: 24px;
    --mtc-super-hero-overlay-padding-y-mobile: 14px;

    --mtc-super-hero-logo-width: 150px;
    --mtc-super-hero-logo-height: 75px;

    --mtc-super-hero-logo-width-mobile: 150px;
    --mtc-super-hero-logo-height-mobile: 65px;

    --mtc-super-hero-control-color-full: var(--mtc-color-primary, #c026d3);
    --mtc-super-hero-control-color-light: #ffffff;
    --mtc-super-hero-control-color-dark: #111827;

    --mtc-super-hero-control-size: 58px;
    --mtc-super-hero-control-size-mobile: 48px;

    --mtc-super-hero-dot-size: 10px;
    --mtc-super-hero-dot-size-active: 13px;
}

/**
 * Root
 */
.mtc-super-hero {
    position: relative;
    width: 100%;
    margin-top: var(--mtc-super-hero-margin-top);
    overflow: hidden;

    --mtc-super-hero-current-control-color: var(--mtc-super-hero-control-color-full);
}

.mtc-super-hero--full {
    --mtc-super-hero-current-control-color: var(--mtc-super-hero-control-color-full);
}

.mtc-super-hero--light {
    --mtc-super-hero-current-control-color: var(--mtc-super-hero-control-color-light);
}

.mtc-super-hero--dark {
    --mtc-super-hero-current-control-color: var(--mtc-super-hero-control-color-dark);
}

/**
 * Slides
 *
 * Importante:
 * El alto lo define la imagen activa.
 * No usamos aspect-ratio ni height: 100%.
 */
.mtc-super-hero__slides,
.mtc-slide__track.mtc-super-hero__slides {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
    line-height: 0;
}

.mtc-super-hero__slide,
.mtc-slide__item.mtc-super-hero__slide {
    display: none;
    position: relative;
    width: 100%;
    height: auto;
    line-height: 0;
    aspect-ratio: 3/1;
    overflow: hidden;
}

.mtc-super-hero__slide.is-active,
.mtc-slide__item.mtc-super-hero__slide.is-active {
    display: block;
}

/**
 * Link / Picture / Image
 *
 * Todo en auto para que no genere espacio blanco.
 */
.mtc-super-hero__link,
.mtc-slide__link.mtc-super-hero__link {
    display: block;
    width: 100%;
    height: auto;
    line-height: 0;
    text-decoration: none;
    color: inherit;
}

.mtc-super-hero__picture,
.mtc-slide__picture.mtc-super-hero__picture {
    display: block;
    width: 100%;
    height: auto;
    line-height: 0;
}

.mtc-super-hero__image,
.mtc-slide__media.mtc-super-hero__image {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: cover;
    object-position: center center;
}

/**
 * Overlay Header
 */
.mtc-super-hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    z-index: var(--mtc-super-hero-overlay-z-index);
    width: 100%;
    line-height: normal;
    pointer-events: none;
}

.mtc-super-hero__overlay-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--mtc-space-4, 1rem);
    width: min(
        100% - var(--mtc-super-hero-overlay-padding-x),
        var(--mtc-super-hero-overlay-width)
    );
    margin-inline: auto;
    padding-block: var(--mtc-super-hero-overlay-padding-y);
    pointer-events: auto;
}

/**
 * Brand / Logo
 */
.mtc-super-hero__brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    color: inherit;
    line-height: 0;
    text-decoration: none;
}

.mtc-super-hero__logo-picture {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.mtc-super-hero__logo {
    display: block;
    width: auto;
    max-width: var(--mtc-super-hero-logo-width) !important;
    height: var(--mtc-super-hero-logo-height) !important;
    object-fit: contain;
}

.mtc-super-hero__brand-text {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}

/**
 * Overlay menu
 */
.mtc-super-hero__menu-list {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mtc-super-hero__menu-link {
    color: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: opacity 160ms ease;
}

.mtc-super-hero__menu-link:hover {
    opacity: 0.72;
}

.mtc-super-hero__menu--mobile {
    display: none;
}

/**
 * Overlay schemes
 */
.mtc-super-hero__overlay--full,
.mtc-super-hero__brand--full {
    color: var(--mtc-color-primary, #c026d3);
}

.mtc-super-hero__overlay--light,
.mtc-super-hero__brand--light {
    color: #ffffff;
}

.mtc-super-hero__overlay--dark,
.mtc-super-hero__brand--dark {
    color: #111827;
}

/**
 * Arrows
 */
.mtc-super-hero__nav,
.mtc-slide__nav.mtc-super-hero__nav {
    position: absolute;
    top: 50%;
    z-index: calc(var(--mtc-super-hero-overlay-z-index) + 2);

    display: grid;
    place-items: center;

    width: var(--mtc-super-hero-control-size);
    height: var(--mtc-super-hero-control-size);
    padding: 0;

    border: 1.5px solid var(--mtc-super-hero-current-control-color);
    border-radius: 999px;
    background: color-mix(in srgb, var(--mtc-super-hero-current-control-color) 10%, transparent);

    color: transparent;
    cursor: pointer;

    font-size: 0;
    line-height: 1;

    transform: translateY(-50%);
    opacity: 0.96;

    transition:
        opacity 160ms ease,
        transform 160ms ease,
        background-color 160ms ease,
        border-color 160ms ease;
}

.mtc-super-hero__nav::before,
.mtc-slide__nav.mtc-super-hero__nav::before {
    display: block;
    color: var(--mtc-super-hero-current-control-color);
    font-size: 44px;
    font-weight: 300;
    line-height: 1;
    transform: translateY(-3px);
}

.mtc-super-hero__nav--prev::before,
.mtc-slide__nav--prev.mtc-super-hero__nav--prev::before {
    content: "‹";
}

.mtc-super-hero__nav--next::before,
.mtc-slide__nav--next.mtc-super-hero__nav--next::before {
    content: "›";
}

.mtc-super-hero__nav:hover,
.mtc-slide__nav.mtc-super-hero__nav:hover {
    opacity: 1;
    background: var(--mtc-super-hero-current-control-color);
    transform: translateY(-50%) scale(1.04);
}

.mtc-super-hero__nav:hover::before,
.mtc-slide__nav.mtc-super-hero__nav:hover::before {
    color: var(--mtc-color-on-primary, #ffffff);
}

.mtc-super-hero__nav--prev,
.mtc-slide__nav--prev.mtc-super-hero__nav--prev {
    left: 32px;
}

.mtc-super-hero__nav--next,
.mtc-slide__nav--next.mtc-super-hero__nav--next {
    right: 32px;
}

/**
 * Dots
 */
.mtc-super-hero__dots,
.mtc-slide__dots.mtc-super-hero__dots {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: calc(var(--mtc-super-hero-overlay-z-index) + 2);

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    line-height: normal;
    transform: translateX(-50%);
}

.mtc-super-hero__dot,
.mtc-slide__dot.mtc-super-hero__dot {
    display: block;
    width: var(--mtc-super-hero-dot-size);
    height: var(--mtc-super-hero-dot-size);
    padding: 0;

    border: 1.5px solid var(--mtc-super-hero-current-control-color);
    border-radius: 999px;

    background: transparent;
    cursor: pointer;
    opacity: 0.9;

    transition:
        width 160ms ease,
        height 160ms ease,
        background-color 160ms ease,
        border-color 160ms ease,
        opacity 160ms ease,
        transform 160ms ease;
}

.mtc-super-hero__dot.is-active,
.mtc-slide__dot.mtc-super-hero__dot.is-active {
    width: var(--mtc-super-hero-dot-size-active);
    height: var(--mtc-super-hero-dot-size-active);
    background: var(--mtc-super-hero-current-control-color);
    opacity: 1;
    transform: scale(1.05);
}

.mtc-super-hero__dot:hover,
.mtc-slide__dot.mtc-super-hero__dot:hover {
    background: var(--mtc-super-hero-current-control-color);
    opacity: 1;
}

/**
 * Mobile
 */
@media (max-width: 768px) {
    .mtc-super-hero__overlay-inner {
        width: min(
            100% - var(--mtc-super-hero-overlay-padding-x-mobile),
            var(--mtc-super-hero-overlay-width)
        );
        padding-block: var(--mtc-super-hero-overlay-padding-y-mobile);
    }

    .mtc-super-hero__logo {
        max-width: var(--mtc-super-hero-logo-width-mobile) !important;
        height: var(--mtc-super-hero-logo-height-mobile) !important;
    }

    .mtc-super-hero__menu--desktop {
        display: none;
    }

    .mtc-super-hero__menu--mobile {
        display: block;
    }

    .mtc-super-hero__menu-list {
        gap: 12px;
    }

    .mtc-super-hero__menu-link {
        font-size: 0.85rem;
    }

    .mtc-super-hero__nav,
    .mtc-slide__nav.mtc-super-hero__nav {
        width: var(--mtc-super-hero-control-size-mobile);
        height: var(--mtc-super-hero-control-size-mobile);
    }

    .mtc-super-hero__nav::before,
    .mtc-slide__nav.mtc-super-hero__nav::before {
        font-size: 38px;
        transform: translateY(-3px);
    }

    .mtc-super-hero__nav--prev,
    .mtc-slide__nav--prev.mtc-super-hero__nav--prev {
        left: 16px;
    }

    .mtc-super-hero__nav--next,
    .mtc-slide__nav--next.mtc-super-hero__nav--next {
        right: 16px;
    }

    .mtc-super-hero__dots,
    .mtc-slide__dots.mtc-super-hero__dots {
        bottom: 18px;
        gap: 8px;
    }

    .mtc-super-hero__dot,
    .mtc-slide__dot.mtc-super-hero__dot {
        width: 9px;
        height: 9px;
    }

    .mtc-super-hero__dot.is-active,
    .mtc-slide__dot.mtc-super-hero__dot.is-active {
        width: 12px;
        height: 12px;
    }

    .mtc-super-hero__slide, .mtc-slide__item.mtc-super-hero__slide{
        aspect-ratio: 4/5;
    }
}

/**
 * Full width hero desktop sin scroll horizontal
 */
@media (min-width: 769px) {
    html,
    body {
        overflow-x: clip;
    }

    .mtc-super-hero__image, .mtc-slide__media.mtc-super-hero__image{
        object-fit: cover;
    }

    .elementor-widget-matec_super_hero,
    .elementor-widget-matec_super_hero > .elementor-widget-container {
        width: 100%;
        max-width: none;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .mtc-super-hero {
        position: relative;
        left: 50%;
        right: 50%;
        width: 100dvw;
        max-width: 100dvw;
        margin-left: -50dvw;
        margin-right: -50dvw;
    }

    .mtc-super-hero__slides,
    .mtc-slide__track.mtc-super-hero__slides,
    .mtc-super-hero__slide,
    .mtc-slide__item.mtc-super-hero__slide,
    .mtc-super-hero__link,
    .mtc-slide__link.mtc-super-hero__link,
    .mtc-super-hero__picture,
    .mtc-slide__picture.mtc-super-hero__picture,
    .mtc-super-hero__image,
    .mtc-slide__media.mtc-super-hero__image {
        width: 100%;
        max-width: 100%;
    }

    .mtc-super-hero__image,
    .mtc-slide__media.mtc-super-hero__image {
        height: auto;
    }
}

