/* Rich HTML content (Trix editor output) — pages, news, etc. */
.page-rich-content {
    line-height: 1.8;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.page-rich-content::after {
    content: "";
    display: table;
    clear: both;
}

.page-rich-content img,
.page-rich-content figure img,
.page-rich-content .attachment img {
    display: block;
    max-width: 100%;
    width: auto !important;
    height: auto !important;
    margin: 1.25rem auto;
    border-radius: 8px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.1);
}

.page-rich-content figure,
.page-rich-content .attachment {
    display: block;
    max-width: 100%;
    margin: 1.25rem auto;
    padding: 0;
    text-align: center;
    border: 0;
    background: transparent;
}

.page-rich-content figure.attachment--preview,
.page-rich-content .attachment--preview {
    width: auto !important;
    max-width: 100%;
}

.page-rich-content a img {
    transition: opacity 0.2s ease;
}

.page-rich-content a:hover img {
    opacity: 0.92;
}

.page-rich-content p {
    margin-bottom: 1rem;
}

.page-rich-content p:last-child {
    margin-bottom: 0;
}

.page-rich-content iframe,
.page-rich-content video {
    display: block;
    max-width: 100%;
    margin: 1.25rem auto;
    border-radius: 8px;
}

/* Inner page header (breadcrumb) */
.inner-header .inner-header-text {
    text-align: start;
}

.inner-header .inner-header-title {
    margin: 0;
    padding: 0;
}

.inner-header .inner-header-breadcrumb {
    background: transparent;
    margin: 10px 0 0;
    padding: 0;
    text-align: start;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
}

.inner-header .inner-header-breadcrumb > li {
    display: inline-flex;
    align-items: center;
    float: none;
}

.inner-header .inner-header-breadcrumb > li + li::before {
    margin-inline: 6px;
}

html[dir="rtl"] .inner-header .inner-header-breadcrumb > li + li::before {
    margin-left: 0;
}

/* Header middle layout */
.header-middle .header-middle-inner {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 100px;
    padding: 14px 0;
    gap: 24px;
}

.header-middle .header-logo-col {
    flex-shrink: 0;
    float: none !important;
}

.header-middle .header-logo-link {
    display: inline-block;
    line-height: 0;
    float: none !important;
}

.header-middle .header-logo-img {
    display: block;
    height: 80px;
    width: auto;
    object-fit: contain;
}

.header-middle .header-end-col {
    flex: 1;
    min-width: 0;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    float: none !important;
}

html[dir="rtl"] .header-middle .header-end-col {
    justify-content: flex-start !important;
}

/* Header banner area */
.header-banner-area {
    display: flex;
    align-items: center;
}

.header-banner-link {
    display: inline-block;
    line-height: 0;
    border-radius: 6px;
    overflow: hidden;
    transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.header-banner-link:hover {
    opacity: 0.92;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.header-banner-img {
    display: block;
    max-width: 100%;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
}

@media (max-width: 767px) {
    .header-middle .header-middle-inner {
        flex-direction: column !important;
        min-height: auto;
        padding: 10px 0;
        gap: 10px;
    }

    .header-middle .header-logo-img {
        height: 60px;
    }

    .header-middle .header-end-col {
        justify-content: center !important;
        width: 100%;
    }

    .header-banner-area {
        justify-content: center;
    }

    .header-banner-img {
        max-height: 60px;
        max-width: 90%;
    }

    .header-widget-contact-info-box {
        justify-content: center;
    }
}

/* Homepage news cards — equal height & uniform images */
.nmsf-news-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.nmsf-news-thumb {
    height: 200px;
    overflow: hidden;
}

.nmsf-news-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.nmsf-news-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.nmsf-news-body .news-excerpt-two-lines {
    flex: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    line-height: 1.6;
    max-height: 3.2em;
}

.nmsf-news-body .btn {
    align-self: flex-start;
    margin-top: auto !important;
}

.news-title-one-line {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ── Announcement Cards ── */
.nmsf-announcement-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    transition: box-shadow .25s ease, transform .25s ease;
}
.nmsf-announcement-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,.10);
    transform: translateY(-3px);
}
.nmsf-announcement-thumb {
    display: block;
    height: 180px;
    overflow: hidden;
}
.nmsf-announcement-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.nmsf-announcement-body {
    padding: 18px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.nmsf-announcement-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.4;
}
.nmsf-announcement-title a {
    color: #111;
    text-decoration: none;
}
.nmsf-announcement-title a:hover {
    color: #49B75C;
}
.nmsf-announcement-date {
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
    display: block;
}
.nmsf-announcement-excerpt {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    flex: 1;
}
.nmsf-announcement-body .btn {
    align-self: flex-start;
    margin-top: auto !important;
}

/* ── Feature Cards (after slider) ── */
.nmsf-features-section {
    position: relative;
    z-index: 10;
    margin-top: -60px;
    padding-bottom: 30px;
}
.nmsf-features-row {
    display: flex;
    flex-wrap: wrap;
}
.nmsf-feature-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff;
    border-radius: 14px;
    padding: 32px 20px 24px;
    margin-bottom: 20px;
    text-decoration: none !important;
    color: #333 !important;
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
    transition: transform .3s ease, box-shadow .3s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
}
.nmsf-feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--fc-color, #49B75C);
    border-radius: 14px 14px 0 0;
    transition: height .3s ease;
}
.nmsf-feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 36px rgba(0,0,0,.14);
}
.nmsf-feature-card:hover::before {
    height: 6px;
}
.nmsf-feature-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    transition: transform .3s ease;
}
.nmsf-feature-card:hover .nmsf-feature-icon {
    transform: scale(1.1);
}
.nmsf-feature-icon i {
    font-size: 36px;
    color: #fff;
}
.nmsf-feature-title {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 8px;
    color: #111;
    line-height: 1.4;
}
.nmsf-feature-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 14px;
    flex: 1;
}
.nmsf-feature-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f4f4f4;
    color: #888;
    transition: background .3s ease, color .3s ease;
}
.nmsf-feature-card:hover .nmsf-feature-arrow {
    background: var(--fc-color, #49B75C);
    color: #fff;
}
@media (max-width: 767px) {
    .nmsf-features-section {
        margin-top: -30px;
    }
    .nmsf-features-row > [class*="col-"] {
        width: 50%;
    }
    .nmsf-feature-card {
        padding: 22px 14px 18px;
    }
    .nmsf-feature-icon {
        width: 56px;
        height: 56px;
    }
    .nmsf-feature-icon i {
        font-size: 28px;
    }
    .nmsf-feature-title {
        font-size: 13px;
    }
    .nmsf-feature-desc {
        font-size: 12px;
    }
}

/* ── Home Banners ── */
.nmsf-banners-row {
    display: flex;
    flex-wrap: wrap;
}
.nmsf-home-banner {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 3px 16px rgba(0,0,0,.08);
    transition: transform .3s ease, box-shadow .3s ease;
}
.nmsf-home-banner:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 28px rgba(0,0,0,.15);
}
.nmsf-home-banner img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.nmsf-home-banner:hover img {
    transform: scale(1.04);
}
@media (max-width: 767px) {
    .nmsf-banners-row > [class*="col-"] {
        width: 50%;
    }
    .nmsf-home-banner img {
        height: 120px;
    }
}
