/* MTS Divi Modules — base styles (design settings from the builder override these) */
.mts_callout { background: #f0fdfa; border-left: 5px solid #0f766e; border-radius: 6px; padding: 24px 28px; }
.mts_callout .mts_callout_title { margin: 0 0 8px; font-size: 20px; font-weight: 700; color: #0b1f1e; line-height: 1.3em; }
.mts_callout .mts_callout_content { font-size: 16px; line-height: 1.8em; color: #333; }
.mts_callout .mts_callout_content p:last-child { margin-bottom: 0; }
.mts_callout :lang(lo), .mts_callout [lang="lo"] { line-height: 1.8em; }

/* ---- Lao QR Pay ---- */
.mts_qr .mts_inner { text-align: center; }
.mts_qr_code { display: inline-block; margin: 12px auto; background: #fff; padding: 10px; border-radius: 12px; box-shadow: 0 4px 18px rgba(0,0,0,.08); }
.mts_qr_code svg { display: block; width: 100%; height: 100%; }
.mts_qr_amount { font-size: 28px; font-weight: 800; color: #0f766e; margin: 6px 0 10px; }
.mts_qr_placeholder { padding: 30px; border: 2px dashed #cbd5e1; border-radius: 10px; color: #64748b; }
.mts_qr_error { border-color: #ef4444; color: #b91c1c; }
/* ---- Ohlom login button ---- */
.mts_ohlom_align_left .ohlom-login-wrap { text-align: left; } .mts_ohlom_align_center .ohlom-login-wrap { text-align: center; } .mts_ohlom_align_right .ohlom-login-wrap { text-align: right; }
.mts_ohlom .ohlom-login-button.mts_ohlom_fallback { display: inline-block; padding: 12px 28px; border-radius: 50px; background: linear-gradient(90deg,#ff7a45,#ff2d75); color: #fff; font-weight: 700; text-decoration: none; }
.mts_ohlom .ohlom-login-wrap .ohlom-login-button { display: inline-block; width: auto; min-width: 260px; }
.mts_ohlom_hint { font-size: 12px; color: #94a3b8; margin-top: 6px; }
/* ---- Bilingual text ---- */
.mts_bilingual_lang + .mts_bilingual_lang { margin-top: 12px; }
.mts_bilingual_lo { line-height: 1.8; }
.mts_bilingual_switch { display: inline-flex; border: 1px solid #cbd5e1; border-radius: 50px; overflow: hidden; margin-bottom: 14px; }
.mts_bilingual_switch button { border: 0; background: #fff; padding: 6px 16px; cursor: pointer; font: inherit; color: #334155; }
.mts_bilingual_switch button.is-active { background: #0f766e; color: #fff; }
/* ---- Data table ---- */
.mts_table_search { margin: 0 0 10px; } .mts_table_search input { width: 100%; max-width: 320px; padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 6px; font: inherit; }
.mts_table_wrap { overflow-x: auto; }
.mts_table_el { width: 100%; border-collapse: collapse; font-size: 15px; }
.mts_table_el th, .mts_table_el td { padding: 10px 12px; border-bottom: 1px solid #e2e8f0; text-align: left; line-height: 1.7; }
.mts_table .mts_table_el thead th, .et_pb_module.mts_table table thead th { background: #0f766e; color: #fff !important; font-weight: 700; }
.mts_table_el.is-striped tbody tr:nth-child(even) { background: #f8fafc; }

/* ---- News / Image Slider ---- */
.mts_slider_el { position: relative; overflow: hidden; --mts-slide-h: 480px; --mts-overlay: rgba(11,31,30,.65); border-radius: 12px; outline: none; }
.mts_slider_track { display: flex; transition: transform .6s cubic-bezier(.4,0,.2,1); will-change: transform; }
.mts_slide { position: relative; margin: 0; padding: 0 6px; box-sizing: border-box; flex: 0 0 100%; max-width: 100%; }
.mts_slider_el[data-per-view="1"] .mts_slide { padding: 0; }
.mts_slide_img { height: var(--mts-slide-h); background-size: cover; background-position: center; border-radius: 12px; transition: transform 8s linear; }
.has-kenburns .mts_slide.is-active .mts_slide_img { transform: scale(1.08); }
.mts_slide_body { color: #fff; }
.et_pb_module .mts_slide_body .mts_slide_title, .et_pb_module .mts_slide_body .mts_slide_title a { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.mts_slider .mts_inner > .mts_slider_title { padding: 0 24px 14px; }
.mts_slide_btn { align-self: flex-start; }
.mts_slide_meta { font-size: 13px; letter-spacing: 1px; text-transform: uppercase; opacity: .9; margin-bottom: 8px; display: flex; gap: 12px; }
.mts_slide_cat { background: rgba(255,255,255,.18); padding: 2px 10px; border-radius: 20px; }
.mts_slide_title { margin: 0 0 8px; font-size: 30px; font-weight: 800; line-height: 1.25; }
.mts_slide_title a { color: inherit; text-decoration: none; }
.mts_slide_text { margin: 0 0 14px; font-size: 16px; line-height: 1.7; opacity: .92; }
.mts_slide_btn { display: inline-block; padding: 10px 22px; border-radius: 50px; background: #fff; color: #0b1f1e; font-weight: 700; text-decoration: none; font-size: 14px; }
/* keep overlay text clear of the arrows */
@media (min-width: 768px) { .mts_slider_el[data-arrows="on"].mts_slider_layout_overlay_bl .mts_slide_body { padding-left: 84px; } .mts_slider_el[data-arrows="on"].mts_slider_layout_overlay_br .mts_slide_body { padding-right: 84px; } .mts_slider_el[data-arrows="on"].mts_slider_layout_split .mts_slide_body { padding-right: 84px; } }
/* overlay layouts */
.mts_slider_layout_overlay_bl .mts_slide_body, .mts_slider_layout_overlay_br .mts_slide_body, .mts_slider_layout_overlay_center .mts_slide_body { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px; background: linear-gradient(to top, var(--mts-overlay), rgba(0,0,0,0)); border-radius: 0 0 12px 12px; }
.mts_slider_layout_overlay_bl .mts_slide_body { max-width: 720px; }
.mts_slider_layout_overlay_br .mts_slide_body { text-align: right; padding-left: 30%; }
.mts_slider_layout_overlay_br .mts_slide_meta { justify-content: flex-end; }
.mts_slider_layout_overlay_center .mts_slide_body { top: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; background: var(--mts-overlay); border-radius: 12px; }
.mts_slider_layout_overlay_center .mts_slide_meta { justify-content: center; }
.mts_slider_el[data-per-view="2"] .mts_slide_title, .mts_slider_el[data-per-view="3"] .mts_slide_title, .mts_slider_el[data-per-view="4"] .mts_slide_title { font-size: 20px; }
.mts_slider_el[data-per-view="3"] .mts_slide_body, .mts_slider_el[data-per-view="4"] .mts_slide_body { padding: 22px; }
.mts_slider_el[data-per-view="3"] .mts_slide_text, .mts_slider_el[data-per-view="4"] .mts_slide_text { display: none; }
/* card layout */
.mts_slider_layout_card .mts_slide { background: #fff; background-clip: padding-box; border: 8px solid transparent; border-radius: 20px; box-shadow: none; overflow: hidden; padding: 0; margin: 0; }
.mts_slider_layout_card .mts_slide > * { background: #fff; }
.mts_slider_layout_card .mts_slide_img { border-radius: 12px 12px 0 0; }
.mts_slider_layout_card .mts_slide_body { border-radius: 0 0 12px 12px; box-shadow: 0 6px 24px rgba(0,0,0,.08); }
.mts_slider_layout_card .mts_slide_img { border-radius: 0; }
.et_pb_module .mts_slider_layout_card .mts_slide_body { color: #1f2937; padding: 22px 24px 26px; }
.et_pb_module .mts_slider_layout_card .mts_slide_body .mts_slide_title, .et_pb_module .mts_slider_layout_card .mts_slide_body .mts_slide_title a { color: #111827; text-shadow: none; }
.mts_slider_layout_card .mts_slide_meta { color: #0f766e; }
.mts_slider_layout_card .mts_slide_cat { background: #e6f4f1; }
.mts_slider_layout_card .mts_slide_btn { background: #0f766e; color: #fff; }
/* split layout */
.mts_slider_layout_split .mts_slide { padding: 0; display: grid; grid-template-columns: 1.15fr 1fr; background: #0b1f1e; border-radius: 12px; overflow: hidden; }
.mts_slider_layout_split .mts_slide_img { border-radius: 0; }
.mts_slider_layout_split .mts_slide_body { padding: 48px; display: flex; flex-direction: column; justify-content: center; }
/* fade effect */
.mts_slider_el.is-fade .mts_slider_track { display: block; position: relative; height: var(--mts-slide-h); transform: none !important; }
.mts_slider_el.is-fade .mts_slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s; max-width: 100%; }
.mts_slider_el.is-fade .mts_slide.is-active { opacity: 1; z-index: 1; }
.mts_slider_el.is-fade.mts_slider_layout_card .mts_slider_track, .mts_slider_el.is-fade.mts_slider_layout_split .mts_slider_track { height: auto; min-height: var(--mts-slide-h); }
/* controls */
.mts_slider_arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: #0b1f1e; font-size: 18px; cursor: pointer; z-index: 2; box-shadow: 0 2px 10px rgba(0,0,0,.2); }
.mts_slider_arrow.prev { left: 14px; } .mts_slider_arrow.next { right: 14px; }
.mts_slider_layout_card .mts_slider_arrow { top: calc(var(--mts-slide-h) / 2); }
.mts_slider_dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.mts_slider_layout_card .mts_slider_dots { position: static; margin-top: 14px; }
.mts_slider_dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(255,255,255,.55); cursor: pointer; padding: 0; }
.mts_slider_dots button.is-active { background: #fff; width: 24px; border-radius: 6px; }
.mts_slider_layout_card .mts_slider_dots button { background: #cbd5e1; } .mts_slider_layout_card .mts_slider_dots button.is-active { background: #0f766e; }
.mts_slider_empty { padding: 60px 20px; text-align: center; border: 2px dashed #cbd5e1; border-radius: 12px; color: #64748b; }
@media (max-width: 980px) { .mts_slider_el { --mts-slide-h: min(var(--mts-slide-h), 380px); } .mts_slide_title { font-size: 24px; } .mts_slider_layout_overlay_bl .mts_slide_body, .mts_slider_layout_overlay_br .mts_slide_body { padding: 28px; } }
@media (max-width: 767px) { .mts_slider_el { --mts-slide-h: 300px !important; } .mts_slider_arrow { width: 36px; height: 36px; font-size: 14px; } .mts_slide_text { font-size: 14px; } .mts_slide_title { font-size: 22px; } .mts_slider_layout_split .mts_slide { grid-template-columns: 1fr; } .mts_slider_layout_split .mts_slide_body, .mts_slider_layout_overlay_bl .mts_slide_body, .mts_slider_layout_overlay_br .mts_slide_body { padding: 22px; } }

/* ==========================================================================
   MTS Card Module
   ========================================================================== */
.mts-card {
    --mts-card-font-sans: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
    --mts-card-font-lao: "Noto Sans Lao", system-ui, sans-serif;
    --mts-card-bg: #ffffff;
    --mts-card-border: #E8EDF3;
    --mts-card-ink: #111E48;
    --mts-card-body: #475467;
    --mts-card-accent: #C8102E;
    --mts-card-accent-soft: rgba(200, 16, 46, 0.08);
    --mts-card-border-hover: rgba(200, 16, 46, 0.25);
    --mts-card-badge-bg: rgba(22, 38, 92, 0.05);
    --mts-card-badge-border: rgba(22, 38, 92, 0.08);
    --mts-card-badge-text: #16265C;
    --mts-card-radius: 28px;
    --mts-card-media-radius: 18px;
    --mts-card-shadow: 0 1px 3px rgba(16, 24, 40, 0.04), 0 16px 36px -12px rgba(17, 30, 72, 0.16);
    --mts-card-shadow-hover: 0 4px 6px -1px rgba(16, 24, 40, 0.06), 0 28px 56px -14px rgba(17, 30, 72, 0.26);

    font-family: var(--mts-card-font-sans);
    color: var(--mts-card-ink);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    position: relative;
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    background: var(--mts-card-bg);
    border: 1px solid var(--mts-card-border);
    border-radius: var(--mts-card-radius);
    padding: 12px;
    box-shadow: var(--mts-card-shadow);
    will-change: transform;
    transition: box-shadow 0.4s ease, border-color 0.4s ease, transform 0.12s ease-out;
    cursor: pointer;
    box-sizing: border-box;
}

.mts-card.is-button-click-only {
    cursor: default;
}

.et_pb_module.mts-card.is-full-height,
.mts-card.is-full-height {
    height: 100%;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.mts-card.is-full-height .mts-card-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.mts-card.is-full-height .mts-card-badge {
    align-self: flex-start;
}

.mts-card.is-full-height .mts-card-cta {
    margin-top: auto;
    align-self: flex-start;
}

.mts-card-inner-wrap {
    display: contents;
}

.mts-card:has(.mts-card-link-stretched:focus-visible),
.mts-card:has(.mts-card-link:focus-visible) {
    outline: 2px solid var(--mts-card-accent);
    outline-offset: 4px;
}

@media (hover: hover) {
    .mts-card:hover {
        border-color: var(--mts-card-border-hover, rgba(200, 16, 46, 0.25));
        box-shadow: var(--mts-card-shadow-hover);
    }
}

.mts-card-media {
    position: relative;
    border-radius: var(--mts-card-media-radius);
    overflow: hidden;
    background-color: #EAEFF5;
    isolation: isolate;
    margin: 0;
}

.mts-card-ar-16-10 { aspect-ratio: 16 / 10; }
.mts-card-ar-16-9  { aspect-ratio: 16 / 9; }
.mts-card-ar-4-3   { aspect-ratio: 4 / 3; }
.mts-card-ar-1-1   { aspect-ratio: 1 / 1; }

.mts-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.01);
    transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) {
    .mts-card.has-zoom:hover .mts-card-img {
        transform: scale(1.07);
    }
}

.mts-card.has-sheen .mts-card-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.32) 50%, transparent 70%);
    transform: translateX(-140%);
    transition: transform 0.9s ease;
    pointer-events: none;
}

@media (hover: hover) {
    .mts-card.has-sheen:hover .mts-card-media::after {
        transform: translateX(140%);
    }
}

.mts-card-content {
    padding: 14px 16px 16px;
    box-sizing: border-box;
}

.mts-card-badge {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    width: fit-content;
    gap: 7px;
    font-family: var(--mts-card-font-lao);
    color: var(--mts-card-badge-color, var(--mts-card-badge-text));
    background: var(--mts-card-badge-bg-color, var(--mts-card-badge-bg));
    border: 1px solid var(--mts-card-badge-border);
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.45;
    margin-bottom: 14px;
    letter-spacing: 0.01em;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.mts-card-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--mts-card-dot-color, var(--mts-card-accent));
    flex: none;
}

@media (hover: hover) {
    .mts-card:hover .mts-card-badge {
        background: var(--mts-card-badge-hover-bg, rgba(200, 16, 46, 0.07));
        border-color: var(--mts-card-badge-hover-border, rgba(200, 16, 46, 0.15));
        color: var(--mts-card-badge-hover-color, var(--mts-card-accent));
    }
}

.mts-card-title {
    font-size: clamp(24px, 5.5vw, 29px);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin: 0 0 12px;
    color: var(--mts-card-ink);
}

.mts-card-title a {
    color: inherit;
    text-decoration: none;
}

.mts-card-link-stretched::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: var(--mts-card-radius);
}

.mts-card-link-stretched:focus-visible,
.mts-card-link:focus-visible {
    outline: 2px solid var(--mts-card-accent);
    outline-offset: 4px;
    border-radius: 6px;
}

.mts-card-excerpt {
    color: var(--mts-card-body);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.6;
    margin: 0 0 var(--mts-card-excerpt-mb, 24px);
}

.mts-card-excerpt p:last-child {
    margin-bottom: 0;
}

/* Excerpt Line Clamp Utilities */
.mts-card-excerpt-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mts-card-excerpt-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mts-card-excerpt-clamp-4 {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mts-card-cta {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    width: fit-content;
    gap: 12px;
    color: var(--mts-card-button-color, var(--mts-card-accent));
    font-weight: 700;
    font-size: 16.5px;
    text-decoration: none;
    user-select: none;
    transition: color 0.3s ease;
}

.mts-card-cta-label {
    padding-bottom: 2px;
    background: linear-gradient(currentColor, currentColor) left bottom / 0% 2px no-repeat;
    transition: background-size 0.35s ease;
}

.mts-card-cta-icon {
    width: 36px;
    height: 36px;
    flex: none;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--mts-card-button-icon-bg, var(--mts-card-accent-soft));
    color: var(--mts-card-button-color, var(--mts-card-accent));
    transition: background 0.35s ease, color 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mts-card-cta-icon svg {
    width: 18px;
    height: 18px;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (hover: hover) {
    .mts-card:hover .mts-card-cta {
        color: var(--mts-card-button-hover-color, var(--mts-card-button-color, var(--mts-card-accent)));
    }

    .mts-card:hover .mts-card-cta-label {
        background-size: 100% 2px;
    }

    .mts-card:hover .mts-card-cta-icon {
        background: var(--mts-card-button-hover-color, var(--mts-card-accent));
        color: #ffffff;
        transform: scale(1.1);
    }

    .mts-card:hover .mts-card-cta-icon svg {
        transform: translateX(3px);
    }
}

.mts-card:active {
    transform: scale(0.99);
}

.mts-card-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

@media (max-width: 480px) {
    .mts-card {
        border-radius: 24px;
        padding: 10px;
    }
    .mts-card-media {
        border-radius: 16px;
    }
    .mts-card-content {
        padding: 18px 10px 14px;
    }
    .mts-card-title {
        font-size: 24px;
    }
    .mts-card-excerpt {
        font-size: 15px;
        margin-bottom: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mts-card,
    .mts-card *,
    .mts-card *::before,
    .mts-card *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* ==========================================================================
   MTS Timeline — mts/timeline (parent) + mts/timeline-item (child)
   "Classic Line": left rail, pulsing markers, gradient connector.
   Colours come from --mts-tl-primary / --mts-tl-secondary (printed on the
   track by the parent), so any value — including var(--gcid-*) — works.
   ========================================================================== */
.mts_timeline {
    width: 100%;
    position: relative;
    box-sizing: border-box;
}

.mts_timeline *,
.mts_timeline *::before,
.mts_timeline *::after {
    box-sizing: border-box;
}

.mts_timeline_track {
    position: relative;
    width: 100%;
    /* --mts-tl-width is printed here by the parent, so the width limit lives here too. */
    max-width: var(--mts-tl-width, 100%);
    margin-left: auto;
    margin-right: auto;
}

.mts_timeline_list {
    display: flex;
    flex-direction: column;
    position: relative;
}

.mts_timeline_item {
    display: flex;
    position: relative;
    min-height: 130px;
}

/* Server and Visual Builder both wrap the item markup in .mts_inner.
   The rail must stretch to the full item height so its connector segment
   meets the next item's marker (the marker sits at the top of the rail). */
.mts_timeline_item > .mts_inner {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.mts_timeline--reveal .mts_timeline_item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mts_timeline--reveal .mts_timeline_item.mts_timeline_item--visible {
    opacity: 1;
    transform: translateY(0);
}

.mts_timeline_item:last-child {
    min-height: auto;
    padding-bottom: 20px;
}

.mts_timeline_rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 44px;
    flex-shrink: 0;
    margin-right: 28px;
}

.mts_timeline_node {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-top: 2px;
    z-index: 2;
}

.mts_timeline_marker {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 4px solid var(--mts-tl-primary, #1664c0);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--mts-tl-primary, #1664c0) 18%, #ffffff);
    position: relative;
    z-index: 2;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mts_timeline_pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background-color: color-mix(in srgb, var(--mts-tl-primary, #1664c0) 28%, transparent);
    z-index: 1;
    opacity: 0;
    animation: mts-tl-pulse 2.6s infinite cubic-bezier(0.24, 0, 0.38, 1);
}

@keyframes mts-tl-pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.6);
        opacity: 0.8;
    }

    60% {
        transform: translate(-50%, -50%) scale(1.6);
        opacity: 0;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.6);
        opacity: 0;
    }
}

.mts_timeline_seg {
    width: 3px;
    position: absolute;
    top: 30px;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    border-radius: 4px;
    overflow: hidden;
}

.mts_timeline_seg--solid {
    background-color: var(--mts-tl-primary, #1664c0);
}

/* Fallback colour; mts-timeline.js upgrades this to the true primary→accent
   ramp per segment (so a no-JS render shows a clean single-colour line). */
.mts_timeline_seg--blend {
    background-color: var(--mts-tl-primary, #1664c0);
}

.mts_timeline_seg::after {
    content: "";
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to bottom, transparent, #ffffff, transparent);
    opacity: 0.7;
    animation: mts-tl-flow 3.5s infinite linear;
}

@keyframes mts-tl-flow {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(600%);
    }
}

.mts_timeline--single .mts_timeline_seg {
    display: none;
}

/* Short accent stub under the final marker */
.mts_timeline_item:last-child .mts_timeline_seg {
    height: 60px;
    bottom: auto;
    background-color: var(--mts-tl-secondary, #b69324);
    background-image: none;
}

.mts_timeline_item:last-child .mts_timeline_seg::after {
    display: none;
}

.mts_timeline_body {
    padding: 2px 0 44px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mts_timeline_item:last-child .mts_timeline_body {
    padding-bottom: 4px;
}

.mts_timeline_year {
    font-size: 17px;
    font-weight: 700;
    color: var(--mts-tl-primary, #1664c0);
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.mts_timeline_title {
    font-size: 19px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    letter-spacing: -0.015em;
}

.mts_timeline_content {
    font-size: 15px;
    font-weight: 400;
    color: #64748b;
    line-height: 1.6;
}

.mts_timeline_content p {
    margin: 0 0 6px;
}

.mts_timeline_content p:last-child {
    margin-bottom: 0;
}

.mts_timeline_content a {
    color: var(--mts-tl-primary, #1664c0);
}

/* Accent (highlight) items */
.mts_timeline_item--accent .mts_timeline_marker {
    border-color: var(--mts-tl-secondary, #b69324);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--mts-tl-secondary, #b69324) 18%, #ffffff);
}

.mts_timeline_item--accent .mts_timeline_pulse {
    background-color: color-mix(in srgb, var(--mts-tl-secondary, #b69324) 28%, transparent);
}

.mts_timeline_item--accent .mts_timeline_year {
    color: var(--mts-tl-secondary, #b69324);
}

/* Hover */
.mts_timeline_item:hover .mts_timeline_marker {
    transform: scale(1.22);
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--mts-tl-primary, #1664c0) 18%, #ffffff);
}

.mts_timeline_item--accent:hover .mts_timeline_marker {
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--mts-tl-secondary, #b69324) 18%, #ffffff);
}

.mts_timeline_item:hover .mts_timeline_title {
    color: var(--mts-tl-primary, #1664c0);
}

.mts_timeline_item--accent:hover .mts_timeline_title {
    color: var(--mts-tl-secondary, #b69324);
}

.mts_timeline_item:hover .mts_timeline_content {
    color: #334155;
}

/* Effect switches (set on the parent) */
.mts_timeline--no-pulse .mts_timeline_pulse {
    animation: none;
    display: none;
}

.mts_timeline--no-flow .mts_timeline_seg::after {
    animation: none;
    display: none;
}

.mts_timeline--no-reveal .mts_timeline_item {
    opacity: 1;
    transform: none;
    transition: none;
}

@media (max-width: 640px) {
    .mts_timeline {
        padding: 0 4px;
    }

    .mts_timeline_rail {
        width: 32px;
        margin-right: 16px;
    }

    .mts_timeline_node {
        width: 26px;
        height: 26px;
    }

    .mts_timeline_marker {
        width: 18px;
        height: 18px;
        border-width: 3.5px;
        box-shadow: 0 0 0 2.5px color-mix(in srgb, var(--mts-tl-primary, #1664c0) 18%, #ffffff);
    }

    .mts_timeline_item--accent .mts_timeline_marker {
        box-shadow: 0 0 0 2.5px color-mix(in srgb, var(--mts-tl-secondary, #b69324) 18%, #ffffff);
    }

    .mts_timeline_body {
        padding-bottom: 36px;
    }

    .mts_timeline_year {
        font-size: 15px;
    }

    .mts_timeline_title {
        font-size: 17px;
    }

    .mts_timeline_content {
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mts_timeline_item {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .mts_timeline_pulse {
        animation: none;
        display: none;
    }

    .mts_timeline_seg::after {
        animation: none;
        display: none;
    }

    .mts_timeline_marker,
    .mts_timeline_body,
    .mts_timeline_year,
    .mts_timeline_title,
    .mts_timeline_content {
        transition: none;
    }
}

/* Defensive specificity: keep the rail layout even if a theme styles .et_pb_module. */
.mts_timeline .mts_timeline_track {
    position: relative;
    width: 100%;
    max-width: var(--mts-tl-width, 100%);
    margin-left: auto;
    margin-right: auto;
}

.mts_timeline .mts_timeline_item {
    display: flex;
}

.mts_timeline .mts_timeline_item > .mts_inner {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.mts_timeline .mts_timeline_rail {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mts_timeline .mts_timeline_body {
    display: flex;
    flex-direction: column;
}

/* Fallback for browsers without color-mix(): rings/pulses use solid colours. */
@supports not (color: color-mix(in srgb, red, blue)) {
    .mts_timeline .mts_timeline_marker {
        box-shadow: 0 0 0 3px var(--mts-tl-primary, #1664c0);
    }

    .mts_timeline .mts_timeline_item--accent .mts_timeline_marker {
        box-shadow: 0 0 0 3px var(--mts-tl-secondary, #b69324);
    }

    .mts_timeline .mts_timeline_pulse {
        background-color: var(--mts-tl-primary, #1664c0);
    }

    .mts_timeline .mts_timeline_item--accent .mts_timeline_pulse {
        background-color: var(--mts-tl-secondary, #b69324);
    }

    .mts_timeline .mts_timeline_item:hover .mts_timeline_marker {
        box-shadow: 0 0 0 6px var(--mts-tl-primary, #1664c0);
    }

    .mts_timeline .mts_timeline_item--accent:hover .mts_timeline_marker {
        box-shadow: 0 0 0 6px var(--mts-tl-secondary, #b69324);
    }

    @media (max-width: 640px) {
        .mts_timeline .mts_timeline_marker {
            box-shadow: 0 0 0 2.5px var(--mts-tl-primary, #1664c0);
        }

        .mts_timeline .mts_timeline_item--accent .mts_timeline_marker {
            box-shadow: 0 0 0 2.5px var(--mts-tl-secondary, #b69324);
        }
    }
}

/* ==========================================================================
   MTS Video Directory — mts/video-directory (parent) + mts/video-item (child)
   Ported from the standalone "video directory" demo. Scoped under .mts_vdir.
   ========================================================================== */
.mts_vdir {
    --mts-vdir-accent: #4f46e5;
    --mts-vdir-surface: #ffffff;
    --mts-vdir-text: #10131a;
    --mts-vdir-muted: #667085;
    --mts-vdir-border: #e6e8ec;
    --mts-vdir-border-strong: #d3d7de;
    --mts-vdir-cols: 3;
    --mts-vdir-radius-lg: 16px;
    --mts-vdir-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
    --mts-vdir-shadow-md: 0 12px 30px rgba(16, 24, 40, 0.1);
    --mts-vdir-focus: 0 0 0 3px color-mix(in srgb, var(--mts-vdir-accent) 30%, transparent);
    color: var(--mts-vdir-text);
}

.mts_vdir *,
.mts_vdir *::before,
.mts_vdir *::after {
    box-sizing: border-box;
}

/* display rules below otherwise beat the UA [hidden] rule (e.g. the empty
   state and the modal), so make [hidden] authoritative within the module. */
.mts_vdir [hidden] {
    display: none !important;
}

/* Toolbar */
.mts_vdir_toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.mts_vdir_search {
    position: relative;
    flex: 1 1 280px;
    max-width: 380px;
}

.mts_vdir_search_icon {
    position: absolute;
    top: 50%;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--mts-vdir-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.mts_vdir_search input {
    width: 100%;
    height: 44px;
    padding: 0 42px;
    color: inherit;
    font: inherit;
    background: var(--mts-vdir-surface);
    border: 1px solid var(--mts-vdir-border);
    border-radius: 999px;
    outline: none;
    box-shadow: var(--mts-vdir-shadow-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mts_vdir_search input::placeholder { color: #98a2b3; }

.mts_vdir_search input:focus {
    border-color: var(--mts-vdir-accent);
    box-shadow: var(--mts-vdir-focus);
}

.mts_vdir_search_clear {
    position: absolute;
    top: 50%;
    right: 8px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: var(--mts-vdir-muted);
    background: transparent;
    border: 0;
    border-radius: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.mts_vdir_search_clear:hover { background: #f1f3f6; color: var(--mts-vdir-text); }
.mts_vdir_search_clear svg { width: 16px; height: 16px; }

.mts_vdir_view_toggle {
    display: inline-flex;
    gap: 2px;
    padding: 4px;
    background: var(--mts-vdir-surface);
    border: 1px solid var(--mts-vdir-border);
    border-radius: 999px;
    box-shadow: var(--mts-vdir-shadow-sm);
}

.mts_vdir_view_toggle button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 36px;
    color: var(--mts-vdir-muted);
    background: transparent;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.mts_vdir_view_toggle button:hover { color: var(--mts-vdir-text); background: #f1f3f6; }
.mts_vdir_view_toggle button[aria-pressed="true"] { color: #fff; background: var(--mts-vdir-accent); }
.mts_vdir_view_toggle svg { width: 18px; height: 18px; }

.mts_vdir_count { margin: 16px 2px 18px; color: var(--mts-vdir-muted); font-size: 13px; }

/* Grid / list */
.mts_vdir_grid {
    display: grid;
    grid-template-columns: repeat(var(--mts-vdir-cols, 3), minmax(0, 1fr));
    gap: 24px 22px;
}

.mts_vdir_grid > * {
    min-width: 0;
}

.mts_vdir_grid.mts_vdir_is_list { display: flex; flex-direction: column; gap: 14px; }

/* Item */
.mts_vdir_item {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--mts-vdir-surface);
    border: 1px solid var(--mts-vdir-border);
    border-radius: var(--mts-vdir-radius-lg);
    box-shadow: var(--mts-vdir-shadow-sm);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.mts_vdir_item:hover {
    transform: translateY(-3px);
    border-color: var(--mts-vdir-border-strong);
    box-shadow: var(--mts-vdir-shadow-md);
}

.mts_vdir_item:focus-visible { outline: none; box-shadow: var(--mts-vdir-focus); }
.mts_vdir_item[hidden] { display: none !important; }

.mts_vdir_thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #eceef2; }
.mts_vdir_thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.mts_vdir_item:hover .mts_vdir_thumb img { transform: scale(1.05); }

.mts_vdir_thumb_placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #c3c8d1;
    background: linear-gradient(135deg, #eef0f4, #e3e7ee);
}

.mts_vdir_thumb_placeholder svg { width: 44px; height: 44px; }

.mts_vdir_duration {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 2px 7px;
    font-size: 12px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: #fff;
    background: rgba(17, 19, 26, 0.82);
    border-radius: 6px;
}

.mts_vdir_play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(16, 19, 26, 0) 40%, rgba(16, 19, 26, 0.3));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.mts_vdir_item:hover .mts_vdir_play,
.mts_vdir_item:focus-visible .mts_vdir_play { opacity: 1; }

.mts_vdir_play > span {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    color: var(--mts-vdir-accent);
    background: rgba(255, 255, 255, 0.94);
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.2s ease;
}

.mts_vdir_item:hover .mts_vdir_play > span { transform: scale(1); }
.mts_vdir_play svg { width: 22px; height: 22px; margin-left: 2px; }

.mts_vdir_body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }

.mts_vdir_title {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.005em;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.mts_vdir_meta {
    margin: 0;
    overflow: hidden;
    color: var(--mts-vdir-muted);
    font-size: 12.5px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.mts_vdir_is_list .mts_vdir_item { flex-direction: row; gap: 14px; padding: 10px; border-radius: 14px; }
.mts_vdir_is_list .mts_vdir_item:hover { transform: translateY(-1px); }
.mts_vdir_is_list .mts_vdir_thumb { flex: 0 0 168px; width: 168px; border-radius: 10px; }
.mts_vdir_is_list .mts_vdir_body { min-width: 0; justify-content: center; gap: 7px; padding: 4px 8px 4px 0; }
.mts_vdir_is_list .mts_vdir_title { font-size: 16px; }

/* Visual Builder parity: the preview wraps the card parts in .mts_inner. */
.mts_vdir_item > .mts_inner { display: flex; flex-direction: column; width: 100%; }
.mts_vdir_is_list .mts_vdir_item > .mts_inner { flex-direction: row; gap: 14px; align-items: center; }

/* Empty state */
.mts_vdir_empty {
    display: flex;
    flex-direction: column;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 72px 20px;
    color: var(--mts-vdir-muted);
    text-align: center;
}

.mts_vdir_empty svg { width: 46px; height: 46px; color: #c3c8d1; }
.mts_vdir_empty h3 { margin: 0; color: var(--mts-vdir-text); font-size: 17px; }
.mts_vdir_empty p { max-width: 360px; margin: 0; font-size: 14px; }

.mts_vdir_empty_btn {
    margin-top: 6px;
    padding: 9px 18px;
    color: var(--mts-vdir-accent);
    font-size: 14px;
    font-weight: 600;
    background: color-mix(in srgb, var(--mts-vdir-accent) 10%, #fff);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.mts_vdir_empty_btn:hover { background: color-mix(in srgb, var(--mts-vdir-accent) 18%, #fff); }

/* Pagination */
.mts_vdir_pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
}

.mts_vdir_pagination button {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    color: var(--mts-vdir-text);
    font: inherit;
    font-weight: 500;
    background: var(--mts-vdir-surface);
    border: 1px solid var(--mts-vdir-border);
    border-radius: 10px;
    box-shadow: var(--mts-vdir-shadow-sm);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.mts_vdir_pagination button:hover:not(:disabled):not([aria-current="page"]) {
    background: #fafbfc;
    border-color: var(--mts-vdir-border-strong);
}

.mts_vdir_pagination button[aria-current="page"] {
    color: #fff;
    background: var(--mts-vdir-accent);
    border-color: var(--mts-vdir-accent);
}

.mts_vdir_pagination button:disabled { cursor: not-allowed; opacity: 0.45; box-shadow: none; }
.mts_vdir_pagination button svg { width: 18px; height: 18px; vertical-align: middle; }
.mts_vdir_ellipsis { min-width: 24px; color: var(--mts-vdir-muted); text-align: center; }

/* Modal */
.mts_vdir_modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; }
.mts_vdir_modal[hidden] { display: none; }

.mts_vdir_modal_backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 19, 26, 0.62);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    animation: mts-vdir-fade 0.2s forwards;
}

.mts_vdir_modal_dialog {
    position: relative;
    width: min(960px, 100%);
    overflow: hidden;
    background: var(--mts-vdir-surface);
    border-radius: 18px;
    box-shadow: 0 30px 70px rgba(16, 24, 40, 0.35);
    opacity: 0;
    transform: translateY(8px) scale(0.98);
    animation: mts-vdir-pop 0.22s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.mts_vdir_modal_player { position: relative; aspect-ratio: 16 / 9; background: #000; }

.mts_vdir_modal_player iframe,
.mts_vdir_modal_player video {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.mts_vdir_modal_close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #fff;
    background: rgba(17, 19, 26, 0.6);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s ease;
}

.mts_vdir_modal_close:hover { background: rgba(17, 19, 26, 0.85); }
.mts_vdir_modal_close svg { width: 20px; height: 20px; }
.mts_vdir_modal_info { padding: 16px 20px 20px; }
.mts_vdir_modal_info h2 { margin: 0 0 4px; font-size: 17px; font-weight: 600; line-height: 1.35; }
.mts_vdir_modal_info p { margin: 0; color: var(--mts-vdir-muted); font-size: 13px; }
.mts_vdir_modal_info a { color: var(--mts-vdir-accent); }

body.mts_vdir_modal_open { overflow: hidden; }

@keyframes mts-vdir-fade { to { opacity: 1; } }
@keyframes mts-vdir-pop { to { opacity: 1; transform: none; } }

.mts_vdir_no_search .mts_vdir_search { display: none; }
.mts_vdir_no_toggle .mts_vdir_view_toggle { display: none; }
.mts_vdir_no_meta .mts_vdir_meta,
.mts_vdir_no_meta .mts_vdir_duration { display: none; }

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

@media (max-width: 600px) {
    .mts_vdir_toolbar { gap: 12px; }
    .mts_vdir_search { flex: 1 1 100%; max-width: none; }
    .mts_vdir_view_toggle { margin-left: auto; }
    .mts_vdir_grid { grid-template-columns: 1fr; }
    .mts_vdir_is_list .mts_vdir_thumb { flex: 0 0 128px; width: 128px; }
    .mts_vdir_is_list .mts_vdir_title { font-size: 14.5px; }
    .mts_vdir_modal { padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .mts_vdir *,
    .mts_vdir *::before,
    .mts_vdir *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

