.siam-hero-slider {
    --siam-hero-h-desktop: 720px;
    --siam-hero-h-tablet: 560px;
    --siam-hero-h-mobile: 430px;
    --siam-hero-radius: 12px;
    --siam-hero-transition: 550ms;
    --siam-hero-title-desktop: 62px;
    --siam-hero-title-tablet: 48px;
    --siam-hero-title-mobile: 34px;
    --siam-hero-title-color: #fff;
    --siam-hero-category-size: 15px;
    --siam-hero-category-text: #fff;
    --siam-hero-category-bg: #e4231f;
    --siam-hero-meta-size: 14px;
    --siam-hero-meta-color: #fff;
    --siam-hero-excerpt-size: 18px;
    --siam-hero-excerpt-size-tablet: 16px;
    --siam-hero-excerpt-size-mobile: 14px;
    --siam-hero-excerpt-color: #fff;
    --siam-hero-button-size: 16px;
    --siam-hero-button-text: #fff;
    --siam-hero-button-bg: #07172a;
    --siam-hero-button-hover: #e4231f;
    --siam-hero-arrow-color: #fff;
    --siam-hero-arrow-bg: #07172a;
    --siam-hero-arrow-hover: #e4231f;
    position: relative;
    width: 100%;
    height: var(--siam-hero-h-desktop);
    min-height: 260px;
    overflow: hidden;
    border-radius: var(--siam-hero-radius);
    background: #07172a;
    color: #fff;
    isolation: isolate;
}

/* Protect the new slider from legacy .td-hero-block rules in the site CSS. */
.siam-hero-slider.siam-hero-slider {
    box-sizing: border-box !important;
    padding: 0 !important;
    background-color: #07172a !important;
}

.siam-hero-slider.siam-hero-match-active {
    height: var(--siam-hero-live-height, var(--siam-hero-h-desktop));
}

/* Padding cannot collapse into the surrounding Newspaper rows like margin can. */
.siam-hero-layout-row.siam-hero-layout-row {
    padding-top: var(--siam-hero-row-gap-desktop, 35px) !important;
}

.siam-hero-slides,
.siam-hero-slide,
.siam-hero-media,
.siam-hero-media img,
.siam-hero-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.siam-hero-slide {
    z-index: 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--siam-hero-transition) ease, visibility var(--siam-hero-transition) ease;
}

.siam-hero-slide.is-active {
    z-index: 1;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.siam-hero-media {
    z-index: 0;
    display: block;
    background: linear-gradient(135deg, #273f5e, #07172a);
}

.siam-hero-media img {
    display: block;
    object-fit: cover;
    object-position: center;
    transform: scale(1.002);
    transition: transform 7s ease;
}

.siam-hero-slide.is-active .siam-hero-media img {
    transform: scale(1.045);
}

.siam-hero-overlay {
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(3, 13, 28, 0.06) 25%, rgba(3, 13, 28, 0.4) 56%, rgba(3, 13, 28, 0.96) 100%),
        linear-gradient(90deg, rgba(3, 13, 28, 0.58), transparent 65%);
}

.siam-hero-content {
    position: absolute;
    z-index: 2;
    left: clamp(24px, 4.5vw, 70px);
    right: clamp(24px, 7vw, 110px);
    bottom: clamp(42px, 7.5%, 76px);
    max-width: 930px;
    color: #fff;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
}

.siam-hero-category {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    margin: 0 0 15px;
    padding: 6px 14px;
    border-radius: 4px;
    background: var(--siam-hero-category-bg);
    color: var(--siam-hero-category-text) !important;
    font-size: var(--siam-hero-category-size);
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none !important;
    text-shadow: none;
}

.siam-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-bottom: 10px;
    color: var(--siam-hero-meta-color);
    font-size: var(--siam-hero-meta-size);
    line-height: 1.4;
}

.siam-hero-title {
    max-width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--siam-hero-title-color);
    font-size: var(--siam-hero-title-desktop);
    font-weight: 700;
    line-height: 1.13;
    letter-spacing: -0.025em;
}

.siam-hero-title a,
.siam-hero-title a:hover,
.siam-hero-title a:focus {
    color: var(--siam-hero-title-color) !important;
    text-decoration: none !important;
}

.siam-hero-excerpt {
    display: none;
    max-width: 760px;
    margin: 15px 0 0;
    color: var(--siam-hero-excerpt-color);
    font-size: var(--siam-hero-excerpt-size);
    line-height: 1.55;
}

@media (min-width: 1025px) {
    .siam-hero-excerpt.is-visible-desktop {
        display: block;
    }
}

.siam-hero-read-more {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 46px;
    margin-top: 20px;
    padding: 10px 19px;
    border: 0 !important;
    border-radius: 5px;
    background: var(--siam-hero-button-bg);
    box-shadow: none !important;
    color: var(--siam-hero-button-text) !important;
    font-size: var(--siam-hero-button-size);
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    text-shadow: none;
    backdrop-filter: blur(5px);
    transition: background-color 180ms ease;
}

.siam-hero-read-more:hover,
.siam-hero-read-more:focus {
    border: 0 !important;
    background: var(--siam-hero-button-hover);
    box-shadow: none !important;
}

/* Keep the read-more arrow white even when Newspaper overrides link children. */
.siam-hero-read-more > span,
.siam-hero-read-more:hover > span,
.siam-hero-read-more:focus > span {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

.siam-hero-arrows {
    position: absolute;
    z-index: 4;
    top: 50%;
    right: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transform: translateY(-50%);
}

.siam-hero-arrow {
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 50%;
    outline: 0;
    background: var(--siam-hero-arrow-bg) !important;
    color: var(--siam-hero-arrow-color) !important;
    cursor: pointer;
    font: inherit;
    font-size: 34px;
    line-height: 1;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.siam-hero-arrow:hover,
.siam-hero-arrow:focus-visible {
    border-color: var(--siam-hero-arrow-hover) !important;
    background: var(--siam-hero-arrow-hover) !important;
    transform: scale(1.05);
}

.siam-hero-dots {
    position: absolute;
    z-index: 4;
    right: 28px;
    bottom: 25px;
    left: 28px;
    display: flex;
    justify-content: center;
    gap: 9px;
}

.siam-hero-dot {
    width: 10px;
    height: 10px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    outline: 2px solid transparent;
    outline-offset: 3px;
    background: rgba(255, 255, 255, 0.58);
    cursor: pointer;
    transition: width 180ms ease, border-radius 180ms ease, background-color 180ms ease;
}

.siam-hero-dot[hidden] {
    display: none !important;
}

.siam-hero-dot.is-active {
    width: 27px;
    border-radius: 8px;
    background: #e4231f;
}

.siam-hero-dot:focus-visible {
    outline-color: #fff;
}

.siam-hero-empty {
    padding: 24px;
    border-left: 4px solid #e4231f;
    background: #f5f6f7;
    color: #222;
    font-size: 15px;
}

.siam-latest-news {
    --siam-latest-image-width: 36%;
    --siam-latest-item-gap: 24px;
    --siam-latest-radius: 8px;
    --siam-latest-heading-size: 28px;
    --siam-latest-title-size: 20px;
    --siam-latest-excerpt-size-desktop: 13px;
    --siam-latest-excerpt-size-tablet: 13px;
    --siam-latest-excerpt-size-mobile: 13px;
    --siam-latest-category-size: 14px;
    --siam-latest-heading-color: #20242b;
    --siam-latest-title-color: #14213d;
    --siam-latest-accent: #d83a34;
    --siam-latest-all-color: #1264c5;
    --siam-latest-meta-color: #6f7782;
    width: 100%;
    box-sizing: border-box;
}

.siam-latest-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 26px;
}

.siam-latest-heading {
    margin: 0 !important;
    padding: 0 !important;
    color: var(--siam-latest-heading-color);
    font-size: var(--siam-latest-heading-size);
    font-weight: 700;
    line-height: 1.2;
}

.siam-latest-all,
.siam-latest-all:hover,
.siam-latest-all:focus {
    flex: 0 0 auto;
    color: var(--siam-latest-all-color) !important;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
}

.siam-latest-all span {
    display: inline-block;
    font-size: 1.3em;
    line-height: 0;
    transition: transform 180ms ease;
}

.siam-latest-all:hover span,
.siam-latest-all:focus span {
    transform: translateX(3px);
}

.siam-latest-list {
    display: flex;
    flex-direction: column;
    gap: var(--siam-latest-item-gap);
}

.siam-latest-item {
    display: grid;
    grid-template-columns: minmax(100px, var(--siam-latest-image-width)) minmax(0, 1fr);
    align-items: start;
    gap: 18px;
    margin: 0;
    padding: 0;
}

.siam-latest-item.has-no-image {
    grid-template-columns: minmax(0, 1fr);
}

.siam-latest-media {
    position: relative;
    display: block;
    aspect-ratio: 1.42 / 1;
    overflow: hidden;
    border-radius: var(--siam-latest-radius);
    background: #e9edf2;
}

.siam-latest-media img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 350ms ease;
}

.siam-latest-item:hover .siam-latest-media img {
    transform: scale(1.045);
}

.siam-latest-content {
    min-width: 0;
}

.siam-latest-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 10px;
    margin-bottom: 7px;
    color: var(--siam-latest-meta-color);
    font-size: 12px;
    line-height: 1.35;
}

.siam-latest-category,
.siam-latest-category:hover,
.siam-latest-category:focus {
    color: var(--siam-latest-accent) !important;
    font-size: var(--siam-latest-category-size);
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none !important;
}

.siam-latest-title {
    margin: 0 !important;
    padding: 0 !important;
    font-size: var(--siam-latest-title-size);
    font-weight: 500;
    line-height: 1.35;
}

.siam-latest-title a,
.siam-latest-title a:hover,
.siam-latest-title a:focus {
    color: var(--siam-latest-title-color) !important;
    text-decoration: none !important;
}

.siam-latest-title a:hover,
.siam-latest-title a:focus {
    color: var(--siam-latest-accent) !important;
}

.siam-latest-excerpt {
    display: none;
    overflow: hidden;
    margin: 8px 0 0;
    color: var(--siam-latest-meta-color);
    font-size: var(--siam-latest-excerpt-size-desktop);
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

@media (min-width: 1025px) {
    .siam-latest-excerpt.is-visible-desktop {
        display: -webkit-box;
    }
}

@media (max-width: 1024px) {
    .siam-hero-layout-row.siam-hero-layout-row {
        padding-top: var(--siam-hero-row-gap-tablet, 20px) !important;
    }

    .siam-hero-slider,
    .siam-hero-slider.siam-hero-match-active {
        height: var(--siam-hero-h-tablet);
    }

    .siam-hero-title {
        font-size: var(--siam-hero-title-tablet);
    }

    .siam-hero-excerpt {
        font-size: var(--siam-hero-excerpt-size-tablet);
    }

    .siam-latest-excerpt {
        font-size: var(--siam-latest-excerpt-size-tablet);
    }

}

@media (min-width: 768px) and (max-width: 1024px) {
    .siam-hero-excerpt.is-visible-tablet {
        display: block;
    }

    .siam-latest-excerpt.is-visible-tablet {
        display: -webkit-box;
    }

    /* Newspaper keeps narrow desktop columns on iPad. Stack only this Hero row. */
    body .siam-hero-layout-row.siam-hero-layout-row {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    body .siam-hero-layout-row > .tdc-column,
    body .siam-hero-layout-row > .tdc-inner-column,
    body .siam-hero-layout-row > .vc_column,
    body .siam-hero-layout-row > .vc_column_inner,
    body .siam-hero-layout-row > .vc_column_container,
    body .siam-hero-layout-row > [class*="td-pb-span"] {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        float: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }

    body .siam-hero-layout-row .td_block_siam_hero_slider,
    body .siam-hero-layout-row .td_block_siam_latest_news {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    body .siam-hero-layout-row .td_block_siam_latest_news {
        margin-top: 26px !important;
    }

    .siam-latest-item {
        grid-template-columns: clamp(140px, var(--siam-latest-image-width), 220px) minmax(0, 1fr);
        gap: 16px;
    }

    .siam-latest-title {
        font-size: min(var(--siam-latest-title-size), 18px);
        line-height: 1.4;
    }
}

@media (max-width: 767px) {
    .siam-hero-layout-row.siam-hero-layout-row {
        padding-top: var(--siam-hero-row-gap-mobile, 15px) !important;
    }

    .siam-hero-slider,
    .siam-hero-slider.siam-hero-match-active {
        height: var(--siam-hero-h-mobile);
        min-height: 240px;
    }

    .siam-hero-content {
        left: 20px;
        right: 20px;
        bottom: 44px;
    }

    .siam-hero-category {
        min-height: 30px;
        margin-bottom: 10px;
        padding: 5px 10px;
    }

    .siam-hero-meta {
        margin-bottom: 7px;
    }

    .siam-hero-title {
        display: -webkit-box;
        overflow: hidden;
        font-size: var(--siam-hero-title-mobile);
        line-height: 1.18;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
    }

    .siam-hero-excerpt {
        display: none;
        font-size: var(--siam-hero-excerpt-size-mobile);
    }

    .siam-hero-excerpt.is-visible-mobile {
        display: block;
    }

    .siam-latest-excerpt {
        font-size: var(--siam-latest-excerpt-size-mobile);
    }

    .siam-latest-excerpt.is-visible-mobile {
        display: -webkit-box;
    }

    .siam-hero-read-more {
        min-height: 40px;
        margin-top: 14px;
        padding: 8px 14px;
    }

    .siam-hero-arrows {
        top: 18px;
        right: 16px;
        flex-direction: row;
        transform: none;
    }

    .siam-hero-arrow {
        width: 36px;
        height: 36px;
        font-size: 27px;
    }

    .siam-hero-dots {
        bottom: 18px;
    }

    .siam-latest-header {
        margin-bottom: 20px;
    }

    .siam-latest-item {
        grid-template-columns: minmax(96px, var(--siam-latest-image-width)) minmax(0, 1fr);
        gap: 14px;
    }
}

@media (max-width: 420px) {
    .siam-latest-heading {
        font-size: min(var(--siam-latest-heading-size), 25px);
    }

    .siam-latest-title {
        font-size: min(var(--siam-latest-title-size), 17px);
    }

    .siam-latest-all {
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .siam-hero-slide,
    .siam-hero-media img,
    .siam-hero-arrow,
    .siam-hero-dot {
        transition-duration: 0.01ms !important;
    }
}
