/*
 * Hotel e Appartamenti - external stylesheet, version 1.
 * Upload to /templates/yoo_eat/css/ and load from a dedicated footer module:
 * <link rel="stylesheet" href="/templates/yoo_eat/css/rt-hotel-appartamenti-20261110.css?v=1">
 * Assign that module ONLY to the Italian Hotel e Appartamenti menu item.
 *
 * Public markup checked: article.uk-article > .tm-article-content.
 * Article 5650 has no article-specific HTML id or body class in that markup.
 * Scope therefore uses the rt-stay classes inside the article content.
 * Four of six row images have no rt-stay-image class; cover direct img too.
 * No changes to custom.css, phone.css, or CSS Homepage TEST are required.
 */

body article.uk-article .tm-article-content .rt-stay-section {
    box-sizing: border-box !important;
    clear: both !important;
    margin: 24px 0 !important;
    padding: 0 !important;
}

/* Includes the final heading outside the section wrappers. */
body article.uk-article .tm-article-content .rt-stay-title {
    clear: both !important;
    width: auto !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
    text-align: left !important;
    text-align-last: left !important;
}

/* Desktop: two columns, with the image and copy sharing a bottom edge. */
body article.uk-article .tm-article-content .rt-stay-section > .rt-stay-row {
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-end !important;
    justify-content: flex-start !important;
    gap: 16px !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

body article.uk-article .tm-article-content .rt-stay-section > .rt-stay-row > img,
body article.uk-article .tm-article-content .rt-stay-section > .rt-stay-row > .rt-stay-image {
    box-sizing: border-box !important;
    display: block !important;
    flex: 0 0 200px !important;
    order: 0 !important;
    float: none !important;
    width: 200px !important;
    min-width: 200px !important;
    max-width: 200px !important;
    height: 133px !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    object-fit: cover !important;
    object-position: center !important;
}

body article.uk-article .tm-article-content .rt-stay-section > .rt-stay-row > .rt-stay-copy {
    box-sizing: border-box !important;
    display: flex !important;
    flex: 1 1 0% !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-end !important;
    order: 1 !important;
    float: none !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 133px !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: justify !important;
    text-align-last: auto !important;
    line-height: 1.5 !important;
    overflow-wrap: break-word !important;
}

body article.uk-article .tm-article-content .rt-stay-copy p,
body article.uk-article .tm-article-content .rt-stay-title + p {
    margin: 0 0 12px !important;
    text-align: justify !important;
    text-align-last: auto !important;
    line-height: 1.5 !important;
    overflow-wrap: break-word !important;
}

body article.uk-article .tm-article-content .rt-stay-copy p:last-child {
    margin-bottom: 0 !important;
}

/* Mobile, including Samsung phones: image above text, 3:2 crop.
 * Reset min-width as well as width to override the desktop fixed column.
 * height:auto overrides the HTML height attribute; aspect-ratio sets the box.
 */
@media (max-width: 767px) {
    body article.uk-article .tm-article-content .rt-stay-section > .rt-stay-row {
        display: block !important;
    }

    body article.uk-article .tm-article-content .rt-stay-section > .rt-stay-row > img,
    body article.uk-article .tm-article-content .rt-stay-section > .rt-stay-row > .rt-stay-image {
        flex: none !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: auto !important;
        aspect-ratio: 3 / 2 !important;
        margin: 0 0 12px !important;
    }

    body article.uk-article .tm-article-content .rt-stay-section > .rt-stay-row > .rt-stay-copy {
        display: block !important;
        flex: none !important;
        width: 100% !important;
        min-height: 0 !important;
    }
}
/* Desktop: foto e testo allineati in alto */
@media (min-width: 768px) {
    body article.uk-article .tm-article-content .rt-stay-section > .rt-stay-row {
        align-items: flex-start !important;
    }

    body article.uk-article .tm-article-content .rt-stay-section > .rt-stay-row > .rt-stay-copy {
        justify-content: flex-start !important;
        min-height: 0 !important;
    }
}
/* Piccola correzione visiva del testo su desktop */
@media (min-width: 768px) {
    body article.uk-article .tm-article-content .rt-stay-section > .rt-stay-row > .rt-stay-copy {
        position: relative;
        top: -5px;
    }
}