/* Center images embedded in CMS-authored service descriptions. */
.service-content img,
.service-details-content img,
.ht-content img,
.hamrah-teb-article-wrap img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-left: auto !important;
    margin-right: auto !important;
    float: none !important;
}

/* -------------------------------------------------------------------------- */
/* Readable body typography (mobile-first) — services + articles              */
/* Beats legacy vw-based sizes that rendered ~10px on phones.                 */
/* -------------------------------------------------------------------------- */

.service-content,
.article-content,
.ht-content,
.hamrah-teb-article-wrap,
.category-intro,
.service-details-content {
    font-size: 1rem !important;
    line-height: 1.85 !important;
}

.service-content :is(p, li),
.article-content :is(p, li),
.ht-content :is(p, li),
.hamrah-teb-article-wrap :is(p, li),
.category-intro :is(p, li),
.service-details-content :is(p, li) {
    font-size: 1rem !important;
    line-height: 1.85 !important;
}

.service-content h2,
.article-content h2,
.ht-content h2,
.hamrah-teb-article-wrap h2,
.category-intro h2,
.service-details-content h2 {
    font-size: 1.35rem !important;
    line-height: 1.55 !important;
}

.service-content h3,
.article-content h3,
.ht-content h3,
.hamrah-teb-article-wrap h3,
.category-intro h3,
.service-details-content h3 {
    font-size: 1.2rem !important;
    line-height: 1.55 !important;
}

@media (min-width: 768px) {
    .service-content :is(p, li),
    .article-content :is(p, li),
    .ht-content :is(p, li),
    .hamrah-teb-article-wrap :is(p, li),
    .category-intro :is(p, li),
    .service-details-content :is(p, li) {
        font-size: 1.0625rem !important;
        line-height: 2 !important;
    }

    .service-content h2,
    .article-content h2,
    .ht-content h2,
    .hamrah-teb-article-wrap h2,
    .category-intro h2,
    .service-details-content h2 {
        font-size: 1.45rem !important;
    }
}

@media (min-width: 1024px) {
    .service-content :is(p, li),
    .article-content :is(p, li),
    .ht-content :is(p, li),
    .hamrah-teb-article-wrap :is(p, li),
    .category-intro :is(p, li),
    .service-details-content :is(p, li) {
        font-size: 1.0625rem !important;
        line-height: 2.15 !important;
    }
}

/* -------------------------------------------------------------------------- */
/* Modern CMS tables (services, articles, beauty/landing content)             */
/* Overrides typical Word/CMS inline borders with a soft brand look.          */
/* -------------------------------------------------------------------------- */

.service-content .cms-table-scroll,
.article-content .cms-table-scroll,
.ht-content .cms-table-scroll,
.hamrah-teb-article-wrap .cms-table-scroll,
.category-intro .cms-table-scroll,
.service-details-content .cms-table-scroll {
    margin: 1.75rem 0;
    border-radius: 14px;
    border: 1px solid #d7e3d8;
    background: #fff;
    box-shadow: 0 10px 28px rgba(27, 94, 32, 0.07);
    -webkit-overflow-scrolling: touch;
}

.service-content table,
.article-content table,
.ht-content table,
.hamrah-teb-article-wrap table,
.category-intro table,
.service-details-content table,
.cms-table-scroll table {
    width: 100%;
    max-width: 100%;
    height: auto !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: 0 !important;
    background: transparent !important;
    overflow: hidden;
}

.service-content :is(caption),
.article-content :is(caption),
.ht-content :is(caption),
.hamrah-teb-article-wrap :is(caption),
.category-intro :is(caption),
.service-details-content :is(caption) {
    caption-side: top;
    padding: 0.75rem 1rem 0.35rem;
    font-family: iransSansxFanumBold, sans-serif;
    font-size: 0.95rem;
    color: #1b5e20;
    text-align: right;
}

.service-content :is(th, td),
.article-content :is(th, td),
.ht-content :is(th, td),
.hamrah-teb-article-wrap :is(th, td),
.category-intro :is(th, td),
.service-details-content :is(th, td) {
    height: auto !important;
    padding: 0.85rem 1rem !important;
    vertical-align: middle !important;
    border: 0 !important;
    border-bottom: 1px solid #e6eee7 !important;
    border-left: 1px solid #eef3ef !important;
    color: #413c3d !important;
    background-color: #fff !important;
    line-height: 1.7 !important;
    font-size: 0.92rem;
}

.service-content :is(th, td):first-child,
.article-content :is(th, td):first-child,
.ht-content :is(th, td):first-child,
.hamrah-teb-article-wrap :is(th, td):first-child,
.category-intro :is(th, td):first-child,
.service-details-content :is(th, td):first-child {
    border-left: 0 !important;
}

.service-content th,
.article-content th,
.ht-content th,
.hamrah-teb-article-wrap th,
.category-intro th,
.service-details-content th {
    background: linear-gradient(180deg, #1f6b24 0%, #1b5e20 100%) !important;
    color: #fff !important;
    font-family: iransSansxFanumBold, sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0;
    border-bottom: 0 !important;
    border-left-color: rgba(255, 255, 255, 0.18) !important;
    white-space: normal;
}

.service-content thead th:first-child,
.article-content thead th:first-child,
.ht-content thead th:first-child,
.hamrah-teb-article-wrap thead th:first-child,
.category-intro thead th:first-child,
.service-details-content thead th:first-child,
.service-content tr:first-child th:first-child,
.article-content tr:first-child th:first-child,
.ht-content tr:first-child th:first-child,
.hamrah-teb-article-wrap tr:first-child th:first-child,
.category-intro tr:first-child th:first-child,
.service-details-content tr:first-child th:first-child {
    border-start-start-radius: 13px;
}

.service-content thead th:last-child,
.article-content thead th:last-child,
.ht-content thead th:last-child,
.hamrah-teb-article-wrap thead th:last-child,
.category-intro thead th:last-child,
.service-details-content thead th:last-child,
.service-content tr:first-child th:last-child,
.article-content tr:first-child th:last-child,
.ht-content tr:first-child th:last-child,
.hamrah-teb-article-wrap tr:first-child th:last-child,
.category-intro tr:first-child th:last-child,
.service-details-content tr:first-child th:last-child {
    border-start-end-radius: 13px;
}

.service-content tbody tr:nth-child(even) td,
.article-content tbody tr:nth-child(even) td,
.ht-content tbody tr:nth-child(even) td,
.hamrah-teb-article-wrap tbody tr:nth-child(even) td,
.category-intro tbody tr:nth-child(even) td,
.service-details-content tbody tr:nth-child(even) td,
.service-content tr:nth-child(even):not(:has(th)) td,
.article-content tr:nth-child(even):not(:has(th)) td,
.ht-content tr:nth-child(even):not(:has(th)) td,
.hamrah-teb-article-wrap tr:nth-child(even):not(:has(th)) td,
.category-intro tr:nth-child(even):not(:has(th)) td,
.service-details-content tr:nth-child(even):not(:has(th)) td {
    background-color: #f3f8f4 !important;
}

.service-content tbody tr:hover td,
.article-content tbody tr:hover td,
.ht-content tbody tr:hover td,
.hamrah-teb-article-wrap tbody tr:hover td,
.category-intro tbody tr:hover td,
.service-details-content tbody tr:hover td {
    background-color: #eaf4eb !important;
}

.service-content tr:last-child td,
.article-content tr:last-child td,
.ht-content tr:last-child td,
.hamrah-teb-article-wrap tr:last-child td,
.category-intro tr:last-child td,
.service-details-content tr:last-child td {
    border-bottom: 0 !important;
}

/* Keep editor highlights (e.g. yellow mark) readable inside cells. */
.service-content td :is(mark, span[style*="background"]),
.article-content td :is(mark, span[style*="background"]),
.ht-content td :is(mark, span[style*="background"]),
.hamrah-teb-article-wrap td :is(mark, span[style*="background"]),
.category-intro td :is(mark, span[style*="background"]),
.service-details-content td :is(mark, span[style*="background"]) {
    color: inherit;
    border-radius: 4px;
    padding: 0 0.2em;
}

@media (max-width: 767px) {
    .service-content :is(th, td),
    .article-content :is(th, td),
    .ht-content :is(th, td),
    .hamrah-teb-article-wrap :is(th, td),
    .category-intro :is(th, td),
    .service-details-content :is(th, td) {
        padding: 0.7rem 0.75rem !important;
        font-size: 0.85rem;
    }
}
