/* =========================================
   SMARTHOME
   Desktop/Tablet: 2 columnas (media derecha) + overlay
   Mobile: texto arriba + imagen cuadrada abajo (overlay oculto, más pequeña)
========================================= */

.smarthome {
    padding: 72px 0 88px;
    color: var(--color-text);
}

.smarthome__container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 48px;
}

.smarthome__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.smarthome__content {
    max-width: 520px;
}

.smarthome__eyebrow {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.45;
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0.02em;
    color: var(--color-cta);
}

.smarthome__title {
    margin: 0 0 14px;
    font-size: 24px;
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.smarthome__text {
    margin: 0 0 10px;
    font-size: 17px;
    line-height: 1.55;
    color: var(--color-nav-hover);
}

.smarthome__note {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--color-nav);
}

.smarthome__media {
    position: relative;
    overflow: visible;
}

.smarthome__img {
    width: 100%;
    height: 520px;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 28px;
}

.smarthome__overlay {
    position: absolute;
    right: -27px;
    bottom: -20px;

    width: min(54%, 220px);
    height: auto;

    border-radius: 7px;
}

/* 1400 ↓ */
@media (max-width: 1400px) {
   

    .smarthome__img {
        height: 500px;
    }

    .smarthome__title {
        font-size: 30px;
    }
}

/* 1200 ↓ */
@media (max-width: 1200px) {
    
    .smarthome__container {
        padding: 0 36px;
    }

    .smarthome__grid {
        gap: 48px;
    }

    .smarthome__img {
        height: 460px;
    }

    .smarthome__title {
        font-size: 28px;
    }
}

/* 1000 ↓ */
@media (max-width: 1000px) {   

    .smarthome__grid {
        gap: 36px;
    }

    .smarthome__img {
        height: 420px;
    }
}

/* MOBILE (<= 820px) */
@media (max-width: 820px) {
    .smarthome {
        padding: 28px 0 48px;
    }

    .smarthome__container {
        padding: 0 24px;
    }

    /* ✅ Texto arriba SIEMPRE */
    .smarthome__grid {
        display: flex;
        flex-direction: column;
        gap: 18px;
    }

    .smarthome__content {
        order: 1;
        max-width: 560px;
    }

    .smarthome__media {
        order: 2;
    }

    .smarthome__title {
        font-size: 24px;
        line-height: 1.12;
        text-wrap: balance;
    }

    .smarthome__media {
        border-radius: 22px;

        /* ✅ Imagen mucho más pequeña y centrada */
        max-width: 340px;
        margin: 0 auto;
    }

    .smarthome__img {
        height: auto;
        aspect-ratio: 1 / 1;
    }

    /* ✅ Overlay oculto en móvil */
    .smarthome__overlay {
        display: none;
    }
}

/* SMALL (<= 420px) */
@media (max-width: 420px) {
 
    .smarthome__container {
        padding: 0 20px;
    }

    .smarthome__title {
        font-size: 22px;
    }

    /* ✅ Aún más estrecho */
    .smarthome__media {
        max-width: 280px;
    }
}