/* TRUBA Site Core 1.3.0 - safe non-CA presentation layer. */

body.truba-core-non-ca {
    --truba-core-text: #333333;
    --truba-core-muted: #777777;
    --truba-core-border: #e6e6e6;
    --truba-core-blue: #455b72;
}

body.truba-core-non-ca .elementor-widget-text-editor,
body.truba-core-non-ca .elementor-widget-text-editor p,
body.truba-core-non-ca .elementor-widget-text-editor li,
body.truba-core-non-ca .elementor-widget-html {
    color: var(--truba-core-text);
    line-height: 1.7;
}

body.truba-core-non-ca .elementor-widget-text-editor table,
body.truba-core-non-ca .elementor-widget-html table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.5em;
    font-size: 0.95em;
}

body.truba-core-non-ca .elementor-widget-text-editor th,
body.truba-core-non-ca .elementor-widget-text-editor td,
body.truba-core-non-ca .elementor-widget-html th,
body.truba-core-non-ca .elementor-widget-html td {
    padding: 9px 11px;
    border: 1px solid var(--truba-core-border);
    vertical-align: top;
}

body.truba-core-non-ca .elementor-widget-text-editor th,
body.truba-core-non-ca .elementor-widget-html th {
    font-weight: 600;
    background: #f7f7f7;
}

body.truba-core-non-ca .elementor-widget-text-editor a {
    color: var(--truba-core-blue);
    text-decoration: none;
}

body.truba-core-non-ca .elementor-widget-text-editor a:hover {
    text-decoration: underline;
}

body.truba-core-non-ca .elementor-widget-heading h1,
body.truba-core-non-ca .elementor-widget-heading h2,
body.truba-core-non-ca .elementor-widget-heading h3,
body.truba-core-non-ca .elementor-widget-heading h4 {
    color: var(--truba-core-text);
    font-weight: 400;
}

body.truba-core-non-ca .elementor-widget-heading h1 { font-size: 30px; line-height: 1.25; }
body.truba-core-non-ca .elementor-widget-heading h2 { font-size: 24px; line-height: 1.3; }
body.truba-core-non-ca .elementor-widget-heading h3 { font-size: 20px; line-height: 1.35; }
body.truba-core-non-ca .elementor-widget-heading h4 { font-size: 17px; line-height: 1.4; }

.truba-core-news-list {
    display: grid;
    gap: 18px;
}

.truba-core-news-item {
    padding: 0 0 18px;
    border-bottom: 1px solid #e7e7e7;
}

.truba-core-news-item:last-child { border-bottom: 0; }

.truba-core-news-title {
    margin: 0 0 5px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 400;
}

.truba-core-news-title a {
    color: #455b72;
    text-decoration: none;
}

.truba-core-news-title a:hover { color: #222222; }

.truba-core-news-date {
    margin-bottom: 6px;
    color: #888888;
    font-size: 12px;
}

.truba-core-news-excerpt {
    color: #555555;
    font-size: 14px;
    line-height: 1.6;
}

.truba-core-page-list {
    display: grid;
    border-top: 1px solid #e7e7e7;
}

.truba-core-page-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 11px 0;
    color: #555555;
    text-decoration: none;
    border-bottom: 1px solid #e7e7e7;
}

.truba-core-page-link:hover { color: #455b72; }

.truba-core-page-link-title { flex: 1 1 auto; }
.truba-core-page-link-arrow { flex: 0 0 auto; font-size: 20px; line-height: 1; }


/* Homepage baseline matching the legacy Total/WPBakery rendering. */
body.truba-page-home .truba-migration-icon-box a,
body.truba-page-home .truba-migration-icon-box {
    color: #455b72;
}

body.truba-page-home .truba-migration-icon-box {
    text-align: center;
}

body.truba-page-home .truba-migration-icon-box .fa,
body.truba-page-home .truba-migration-icon-box svg {
    color: #455b72;
}


/* Homepage slider. */
.truba-homepage-slider {
    position: relative;
    width: 100%;
    max-width: 980px;
    margin: 0 auto 28px;
    overflow: hidden;
    background: #1f2d3a;
    border-top: 2px solid #f3cb20;
    border-bottom: 2px solid #f3cb20;
}

.truba-slider-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 2048 / 957;
    overflow: hidden;
}

.truba-slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.55s ease;
}

.truba-slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.truba-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.truba-slider-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 42px;
    height: 42px;
    margin-top: -21px;
    border: 0;
    border-radius: 50%;
    background: rgba(38, 57, 73, 0.62);
    color: #ffffff;
    cursor: pointer;
    font-size: 22px;
    line-height: 42px;
    text-align: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.truba-slider-control:hover,
.truba-slider-control:focus-visible {
    background: rgba(38, 57, 73, 0.88);
    transform: scale(1.04);
}

.truba-slider-prev { left: 16px; }
.truba-slider-next { right: 16px; }

.truba-slider-dots {
    position: absolute;
    left: 50%;
    bottom: 14px;
    z-index: 3;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}

.truba-slider-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 1px solid #ffffff;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    cursor: pointer;
}

.truba-slider-dot.is-active {
    background: #f3cb20;
}

/* Homepage fallback matching the legacy Total/WPBakery landing page. */
.truba-homepage-fallback {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    color: #666666;
}

.truba-homepage-separator {
    width: 100%;
    height: 2px;
    margin: 0;
    background: #f3cb20;
}

.truba-homepage-intro {
    padding: 28px 0 24px;
    text-align: justify;
    font-size: 18px;
    line-height: 1.55;
}

.truba-homepage-intro p,
.truba-homepage-contact p {
    margin: 0;
}

.truba-homepage-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 18px 0 12px;
}

.truba-home-link {
    display: flex;
    min-height: 128px;
    padding: 12px 8px;
    box-sizing: border-box;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #455b72;
    text-decoration: none;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

.truba-home-link:hover,
.truba-home-link:focus-visible {
    color: #283b4e;
    text-decoration: none;
}

.truba-home-link-icon {
    display: block;
    width: 62px;
    height: 62px;
    margin-bottom: 9px;
    color: #455b72;
}

.truba-home-link-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.truba-homepage-contact {
    padding: 18px 0 22px;
    text-align: center;
    color: #777777;
    font-size: 12px;
    line-height: 1.55;
}

.truba-homepage-contact p + p {
    margin-top: 8px;
}

.truba-homepage-contact a {
    color: #0081cc;
    text-decoration: none;
}

.truba-homepage-contact a:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .truba-homepage-fallback {
        width: 90%;
    }

    .truba-homepage-intro {
        font-size: 16px;
    }

    .truba-homepage-links {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

@media (max-width: 900px) {
    .truba-homepage-slider {
        width: 90%;
    }

    .truba-slider-control {
        width: 36px;
        height: 36px;
        margin-top: -18px;
        line-height: 36px;
        font-size: 18px;
    }

    .truba-slider-prev { left: 10px; }
    .truba-slider-next { right: 10px; }
}

@media (max-width: 640px) {
    .truba-homepage-slider {
        width: calc(100% - 28px);
        margin-bottom: 20px;
    }

    .truba-slider-control {
        width: 32px;
        height: 32px;
        margin-top: -16px;
        line-height: 32px;
        font-size: 16px;
    }

    .truba-slider-prev { left: 8px; }
    .truba-slider-next { right: 8px; }

    .truba-slider-dots { bottom: 9px; gap: 6px; }
    .truba-slider-dot { width: 8px; height: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .truba-slide,
    .truba-slider-control {
        transition: none;
    }
}
