:root {
    --main-blue: #043e9f;
    --white: #ffffff;
    --footer: #101015;
    --footer-text: #b8b8c2;
    --container-width: 1200px;
    --mobile-padding: 18px;
    --radius: 18px;
    --shadow: 0 7px 24px rgba(0, 0, 0, 0.2);
}

/* =========================================================
   BASE
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-width: 320px;
    background-color: var(--main-blue) !important;
    color: var(--white);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

button {
    font: inherit;
    -webkit-tap-highlight-color: transparent;
}

.site-container {
    width: min(
        calc(100% - (var(--mobile-padding) * 2)),
        var(--container-width)
    );
    margin-right: auto;
    margin-left: auto;
}

/* =========================================================
   ENCABEZADO Y LOGO PRINCIPAL
   ========================================================= */

.site-header {
    width: 100%;
    padding:
        calc(20px + env(safe-area-inset-top))
        0
        24px;
    background-color: var(--main-blue);
}

.brand {
    display: flex;
    justify-content: center;
    width: 100%;
}

.brand__image {
    width: 100%;
    max-width: 620px;
    height: auto;
    margin: 0 auto;
}

.home-introduction {
    max-width: 720px;
    margin: 22px auto 0;
    padding: 0 5px;
    color: var(--white);
    text-align: center;
}

.home-introduction h1 {

    margin: 0;
    font-size: clamp(18px, 5vw, 28px);
    font-weight: 700;
    line-height: 1.25;

}
.home-introduction p {

    margin: 8px 0 0;
    font-size: clamp(14px, 4vw, 18px);
    line-height: 1.45;
    opacity: .95;

}

/* =========================================================
   SLIDER
   ========================================================= */

.home-slider {
    width: 100%;
    padding: 0;
    background-color: var(--main-blue);
}

.slider {
    position: relative;
    width: min(100%, var(--container-width));
    margin: 0 auto;
    overflow: hidden;
    background-color: #d8d8d8;
}

.slider__viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 1200 / 585;
    overflow: hidden;
}

.slider__slide {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 550ms ease,
        visibility 550ms ease;
}

.slider__slide.is-active {
    z-index: 2;
    opacity: 1;
    visibility: visible;
}

.slider__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider__button {
    position: absolute;
    top: 50%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 58px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: rgba(0, 0, 0, 0.44);
    color: var(--white);
    cursor: pointer;
    transform: translateY(-50%);
}

.slider__button span {
    display: block;
    margin-top: -4px;
    font-size: 44px;
    font-weight: 300;
    line-height: 1;
}

.slider__button--previous {
    left: 12px;
}

.slider__button--next {
    right: 12px;
}

.slider__indicators {
    position: absolute;
    right: 0;
    bottom: 14px;
    left: 0;
    z-index: 10;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.slider__indicator {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 2px solid var(--white);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

.slider__indicator.is-active {
    background: var(--white);
    transform: scale(1.25);
}

/* =========================================================
   BLOQUE MERLO IA
   ========================================================= */

.merlo-ia-promotion {
    width: 100%;
    padding: 30px 0 20px;
    background-color: var(--main-blue);
}

.merlo-ia-link {
    display: block;
    width: 100%;
    color: var(--white);
    text-align: center;
}

.merlo-ia-logo {
    width: 120px !important;
    max-width: 120px !important;
    height: auto !important;
    margin: 0 auto 16px !important;
    border-radius: 10px;
    object-fit: contain;
}

.merlo-ia-content {
    max-width: 650px;
    margin: 0 auto;
}

.merlo-ia-content h2 {
    margin: 0;
    font-size: clamp(23px, 6.5vw, 35px);
    font-weight: 700;
    line-height: 1.22;
}

.merlo-ia-content p {
    margin: 12px 0 20px;
    font-size: clamp(16px, 4.4vw, 20px);
    line-height: 1.45;
}

.merlo-ia-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 13px 29px;
    border: 2px solid var(--white);
    border-radius: 30px;
    background-color: var(--white);
    color: var(--main-blue);
    font-size: 17px;
    font-weight: 700;
    box-shadow: var(--shadow);
}

/* =========================================================
   CATEGORÍAS
   ========================================================= */

.categories {
    width: 100%;
    padding: 18px 0 36px;
    background-color: var(--main-blue);
}

.categories__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.category-card {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 500 / 235;
    overflow: hidden;
    border-radius: var(--radius);
    background-color: #d8d8d8;
    box-shadow: var(--shadow);
    isolation: isolate;
}

.category-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 350ms ease;
}

.category-card__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(
            to top,
            rgba(0, 0, 0, 0.72) 0%,
            rgba(0, 0, 0, 0.1) 64%,
            rgba(0, 0, 0, 0.02) 100%
        );
}

.category-card__title {
    position: absolute;
    right: 15px;
    bottom: 15px;
    left: 15px;
    z-index: 2;
    color: var(--white);
    font-size: clamp(27px, 8vw, 39px);
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    text-shadow: 0 2px 9px rgba(0, 0, 0, 0.82);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.category-card:active {
    transform: scale(0.985);
}

.category-card:hover .category-card__image {
    transform: scale(1.03);
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    position: relative;
    width: 100%;
    padding:
        48px
        0
        calc(34px + env(safe-area-inset-bottom));
    background-color: var(--footer) !important;
    color: var(--footer-text);
    text-align: center;
}

.footer-top {
    position: absolute;
    top: -18px;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 8px 8px 0 0;
    background-color: var(--footer);
    color: #787884;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transform: translateX(-50%);
}

.site-footer__text {
    margin: 0;
    padding: 0 5px;
    color: var(--footer-text);
    font-size: 14px;
    line-height: 1.6;
}

.social-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 20px;
}

.social-links a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 34px !important;
    height: 34px !important;
    color: #777782;
}

.social-links svg {
    display: block !important;
    width: 20px !important;
    max-width: 20px !important;
    height: 20px !important;
    max-height: 20px !important;
    fill: currentColor !important;
}

.social-links a:hover {
    color: var(--white);
}

/* =========================================================
   TABLETS
   ========================================================= */

@media (min-width: 700px) {

    :root {
        --mobile-padding: 24px;
    }

    .brand__image {
        max-width: 650px;
    }

    .slider {
        border-radius: 15px;
        box-shadow: var(--shadow);
    }

    .merlo-ia-link {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 30px;
        text-align: left;
    }

    .merlo-ia-logo {
        flex: 0 0 145px;
        width: 145px !important;
        max-width: 145px !important;
        margin: 0 !important;
    }

    .merlo-ia-content {
        max-width: 600px;
        margin: 0;
    }

    .categories__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }

    .category-card__title {
        font-size: clamp(22px, 3vw, 34px);
    }

}

/* =========================================================
   COMPUTADORAS
   ========================================================= */

@media (min-width: 1024px) {

    .site-header {
        padding-top: 28px;
        padding-bottom: 30px;
    }

    .merlo-ia-promotion {
        padding-top: 42px;
        padding-bottom: 28px;
    }

    .categories {
        padding-bottom: 48px;
    }

}

/* =========================================================
   ACCESIBILIDAD
   ========================================================= */

.slider__button:focus-visible,
.slider__indicator:focus-visible,
.category-card:focus-visible,
.brand:focus-visible,
.merlo-ia-link:focus-visible,
.social-links a:focus-visible {
    outline: 3px solid var(--white);
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

}