.ltg-sponsored-gallery {
    box-sizing: border-box;
    width: min(100%, 980px);
    margin: 44px auto;
    padding: clamp(22px, 4vw, 42px);
    border-top: 1px solid #dce4ea;
    border-bottom: 1px solid #dce4ea;
    color: #17334f;
    background: #fff;
}

.ltg-gallery-heading > span {
    display: block;
    margin-bottom: 8px;
    color: #bd2639;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
}

.ltg-gallery-heading h2 {
    margin: 0;
    color: #082d59;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(26px, 3vw, 34px);
    line-height: 1.18;
}

.ltg-gallery-heading {
    margin-bottom: 18px;
}

.ltg-gallery-caption {
    margin: 18px 0 24px;
    color: #546879;
    font-size: 17px;
    line-height: 1.65;
}

.ltg-gallery-establishment {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin-top: 18px;
    color: #082d59;
}

.ltg-gallery-establishment span {
    color: #bd2639;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
}

.ltg-gallery-caption p {
    margin: 0 0 10px;
}

.ltg-gallery-caption p:last-child {
    margin-bottom: 0;
}

.ltg-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.ltg-gallery-image {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    padding: 0;
    border: 1px solid #dce5ec;
    border-radius: 12px;
    background: #f3f7fa;
    cursor: zoom-in;
    transition: transform .18s ease, box-shadow .18s ease;
}

.ltg-gallery-image[hidden] {
    display: none;
}

.ltg-gallery-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 18px;
}

.ltg-page-button {
    min-width: 38px;
    min-height: 36px;
    padding: 6px 11px;
    border: 1px solid #d6e0e8;
    border-radius: 8px;
    color: #082d59;
    background: #f6f9fb;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.ltg-page-button:hover,
.ltg-page-button:focus-visible,
.ltg-page-button.is-current {
    border-color: #082d59;
    color: #fff;
    background: #082d59;
}

.ltg-page-button:disabled {
    opacity: .45;
    cursor: default;
}

.ltg-gallery-image:hover,
.ltg-gallery-image:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(8, 45, 89, .16);
}

.ltg-gallery-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f3f7fa;
}

.ltg-gallery-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #e1e8ed;
}

.ltg-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 13px;
    border: 1px solid #d6e0e8;
    border-radius: 999px;
    color: #082d59;
    background: #f6f9fb;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.ltg-contact-link:hover,
.ltg-contact-link:focus-visible {
    color: #fff;
    border-color: #082d59;
    background: #082d59;
}

.ltg-contact-whatsapp {
    color: #147b4a;
}

body.ltg-modal-open {
    overflow: hidden;
}

.ltg-lightbox[hidden] {
    display: none;
}

.ltg-lightbox {
    position: fixed;
    z-index: 999999;
    inset: 0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding: 20px;
    color: #fff;
    background: rgba(3, 22, 45, .97);
}

.ltg-lightbox-close {
    position: absolute;
    z-index: 2;
    top: 16px;
    right: 18px;
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, .1);
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
}

.ltg-lightbox-stage {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 72px;
    align-items: center;
    gap: 18px;
    width: min(100%, 1320px);
    height: calc(100dvh - 104px);
    min-height: 0;
    margin: 0 auto;
}

.ltg-lightbox-figure {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    height: 100%;
    margin: 0;
}

.ltg-lightbox-image {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: calc(100dvh - 175px);
    height: auto;
    object-fit: contain;
    border-radius: 5px;
}

.ltg-lightbox-nav {
    display: grid;
    place-items: center;
    width: 58px;
    height: 72px;
    border: 0;
    border-radius: 16px;
    color: #fff;
    background: rgba(255, 255, 255, .12);
    font-size: 55px;
    line-height: 1;
    cursor: pointer;
}

.ltg-lightbox-nav:hover,
.ltg-lightbox-nav:focus-visible,
.ltg-lightbox-close:hover,
.ltg-lightbox-close:focus-visible {
    background: rgba(255, 255, 255, .22);
}

.ltg-lightbox-nav:disabled {
    opacity: .35;
    cursor: default;
}

.ltg-lightbox-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 0 0 auto;
    min-height: 30px;
    text-align: center;
    color: rgba(255, 255, 255, .85);
    font-size: 18px;
}

.ltg-lightbox-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 16px;
    border-radius: 999px;
    color: #fff;
    background: #159447;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.ltg-lightbox-whatsapp:hover,
.ltg-lightbox-whatsapp:focus-visible {
    color: #fff;
    background: #0e7537;
}

.ltg-lightbox-whatsapp[hidden] {
    display: none;
}

@media (max-width: 900px) {
    .ltg-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .ltg-sponsored-gallery {
        margin: 32px auto;
        padding: 26px 16px;
    }

    .ltg-gallery-caption {
        font-size: 16px;
    }

    .ltg-gallery-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .ltg-gallery-pagination {
        display: none;
    }

    .ltg-gallery-image {
        aspect-ratio: 4 / 3;
        border-radius: 10px;
    }

    .ltg-lightbox {
        padding: 8px;
    }

    .ltg-lightbox-close {
        top: 10px;
        right: 10px;
        width: 46px;
        height: 46px;
    }

    .ltg-lightbox-stage {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: minmax(0, 1fr) auto;
        gap: 10px;
        width: 100%;
        height: calc(100dvh - 55px);
        padding-top: 48px;
    }

    .ltg-lightbox-figure {
        grid-column: 1 / -1;
        grid-row: 1;
        width: 100%;
        height: auto;
    }

    .ltg-lightbox-image {
        max-width: 100%;
        max-height: calc(100dvh - 170px);
    }

    .ltg-lightbox-nav {
        grid-row: 2;
        width: 100%;
        height: 54px;
        border-radius: 12px;
        font-size: 42px;
    }

    .ltg-lightbox-previous {
        grid-column: 1;
    }

    .ltg-lightbox-next {
        grid-column: 2;
    }

    .ltg-lightbox-footer {
        min-height: 24px;
        font-size: 16px;
    }
}

/*
 * The news theme uses a column flex layout on small screens and assigns
 * explicit order values to its article sections. Keep the injected gallery
 * in the same flow so it renders after the article body and before sharing.
 */
@media (max-width: 560px) {
    .lt-article-main > .ltg-sponsored-gallery {
        order: 7;
    }
}
