/* ========== Badge Colors ========== */
.nutr-media-tv .nutr-badge-light .elementor-heading-title      { background: #DBEAFE !important; color: #1e3a5f !important; border-color: #93c5fd !important; }
.nutr-media-podcast .nutr-badge-light .elementor-heading-title { background: #EDE9FE !important; color: #3b1f6e !important; border-color: #c4b5fd !important; }
.nutr-media-radio .nutr-badge-light .elementor-heading-title   { background: #FEF3C7 !important; color: #78350f !important; border-color: #fcd34d !important; }
.nutr-media-article .nutr-badge-light .elementor-heading-title { background: #F3F4F6 !important; color: #374151 !important; border-color: #d1d5db !important; }
.nutr-conf-international .nutr-badge-light .elementor-heading-title { background: #DBEAFE !important; color: #1e3a5f !important; border-color: #93c5fd !important; }
.nutr-conf-local .nutr-badge-light .elementor-heading-title         { background: #D8F3DC !important; color: #1B4332 !important; border-color: #74C69D !important; }
.nutr-conf-role-keynote .nutr-badge-role .elementor-heading-title     { background: #EDE9FE !important; color: #3b1f6e !important; border-color: #c4b5fd !important; }
.nutr-conf-role-speaker .nutr-badge-role .elementor-heading-title     { background: #F3E8FF !important; color: #5b21b6 !important; border-color: #d8b4fe !important; }
.nutr-conf-role-lecturer .nutr-badge-role .elementor-heading-title    { background: #FEF3C7 !important; color: #78350f !important; border-color: #fcd34d !important; }
.nutr-conf-role-participant .nutr-badge-role .elementor-heading-title { background: #F3F4F6 !important; color: #374151 !important; border-color: #d1d5db !important; }
.nutr-res-peer .nutr-badge-light .elementor-heading-title      { background: #FEF3C7 !important; color: #78350f !important; border-color: #fcd34d !important; }
.nutr-res-published .nutr-badge-light .elementor-heading-title { background: #EDE9FE !important; color: #3b1f6e !important; border-color: #c4b5fd !important; }
.nutr-res-book .nutr-badge-light .elementor-heading-title      { background: #F3F4F6 !important; color: #374151 !important; border-color: #d1d5db !important; }
.nutr-cert-practical .nutr-badge-light .elementor-heading-title   { background: #DBEAFE !important; color: #1e3a5f !important; border-color: #93c5fd !important; }
.nutr-cert-academic .nutr-badge-light .elementor-heading-title    { background: #EDE9FE !important; color: #3b1f6e !important; border-color: #c4b5fd !important; }
.nutr-cert-therapeutic .nutr-badge-light .elementor-heading-title { background: #DBEAFE !important; color: #1e3a5f !important; border-color: #93c5fd !important; }
.nutr-cert-safety .nutr-badge-light .elementor-heading-title      { background: #D8F3DC !important; color: #1B4332 !important; border-color: #74C69D !important; }
.nutr-cert-quality .nutr-badge-light .elementor-heading-title     { background: #EDE9FE !important; color: #3b1f6e !important; border-color: #c4b5fd !important; }
.nutr-badge-type, .nutr-badge-type .elementor-widget-container { display: flex !important; justify-content: center !important; background: transparent !important; border: none !important; padding: 0 !important; }
.nutr-badge-type .elementor-heading-title { background: #D8F3DC !important; border: 1px solid #74C69D !important; color: #1B4332 !important; padding: 3px 12px !important; border-radius: 999px !important; font-size: 12px !important; font-weight: 700 !important; display: inline-block !important; width: auto !important; }
.nutr-conf-type-international .nutr-badge-type .elementor-heading-title { background: #DBEAFE !important; color: #1e3a5f !important; border-color: #93c5fd !important; }
.nutr-conf-type-local .nutr-badge-type .elementor-heading-title         { background: #D8F3DC !important; color: #1B4332 !important; border-color: #74C69D !important; }

/* ========== Blog Category Colors — AR ========== */
.category-diabetes-nutrition .nutr-badge-light .elementor-heading-title,
.category-heart-health .nutr-badge-light .elementor-heading-title,
.category-thyroid-hormones .nutr-badge-light .elementor-heading-title,
.category-liver-kidney-health .nutr-badge-light .elementor-heading-title,
.category-liver-kidney-health-ar .nutr-badge-light .elementor-heading-title,
.category-cancer-nutrition .nutr-badge-light .elementor-heading-title,
.category-pcos-nutrition .nutr-badge-light .elementor-heading-title { background: #FEE2E2 !important; color: #991b1b !important; border-color: #fca5a5 !important; }
.category-sports-nutrition .nutr-badge-light .elementor-heading-title,
.category-pregnancy-nutrition .nutr-badge-light .elementor-heading-title,
.category-children-nutrition .nutr-badge-light .elementor-heading-title,
.category-elderly-nutrition .nutr-badge-light .elementor-heading-title { background: #D8F3DC !important; color: #1B4332 !important; border-color: #74C69D !important; }
.category-weight-loss .nutr-badge-light .elementor-heading-title,
.category-digestive-health .nutr-badge-light .elementor-heading-title,
.category-bones-anemia .nutr-badge-light .elementor-heading-title,
.category-mental-health-nutrition .nutr-badge-light .elementor-heading-title,
.category-intermittent-fasting .nutr-badge-light .elementor-heading-title { background: #DBEAFE !important; color: #1e3a5f !important; border-color: #93c5fd !important; }
.category-food-safety-supplements .nutr-badge-light .elementor-heading-title,
.category-food-allergy-celiac .nutr-badge-light .elementor-heading-title { background: #EDE9FE !important; color: #3b1f6e !important; border-color: #c4b5fd !important; }
.category-healthy-recipes .nutr-badge-light .elementor-heading-title { background: #FED7AA !important; color: #92400e !important; border-color: #fdba74 !important; }

/* ========== Blog Category Colors — EN ========== */
.elementor-page-1170 .category-diabetes-nutrition .nutr-badge-light .elementor-heading-title,
.elementor-page-1170 .category-heart-health .nutr-badge-light .elementor-heading-title,
.elementor-page-1170 .category-thyroid-hormones .nutr-badge-light .elementor-heading-title,
.elementor-page-1170 .category-liver-kidney-health .nutr-badge-light .elementor-heading-title,
.elementor-page-1170 .category-cancer-nutrition .nutr-badge-light .elementor-heading-title,
.elementor-page-1170 .category-pcos-nutrition .nutr-badge-light .elementor-heading-title { background: #FEE2E2 !important; color: #991b1b !important; border-color: #fca5a5 !important; }
.elementor-page-1170 .category-sports-nutrition .nutr-badge-light .elementor-heading-title,
.elementor-page-1170 .category-pregnancy-nutrition .nutr-badge-light .elementor-heading-title,
.elementor-page-1170 .category-children-nutrition .nutr-badge-light .elementor-heading-title,
.elementor-page-1170 .category-elderly-nutrition .nutr-badge-light .elementor-heading-title { background: #D8F3DC !important; color: #1B4332 !important; border-color: #74C69D !important; }
.elementor-page-1170 .category-weight-loss .nutr-badge-light .elementor-heading-title,
.elementor-page-1170 .category-digestive-health .nutr-badge-light .elementor-heading-title,
.elementor-page-1170 .category-bones-anemia .nutr-badge-light .elementor-heading-title,
.elementor-page-1170 .category-intermittent-fasting .nutr-badge-light .elementor-heading-title { background: #DBEAFE !important; color: #1e3a5f !important; border-color: #93c5fd !important; }
.elementor-page-1170 .category-food-safety-supplements .nutr-badge-light .elementor-heading-title,
.elementor-page-1170 .category-food-allergy-celiac .nutr-badge-light .elementor-heading-title { background: #EDE9FE !important; color: #3b1f6e !important; border-color: #c4b5fd !important; }
.elementor-page-1170 .category-healthy-recipes .nutr-badge-light .elementor-heading-title { background: #FED7AA !important; color: #92400e !important; border-color: #fdba74 !important; }

/* ========== Filter Buttons ========== */
.nutr-filter-wrapper { margin-bottom: 32px; display: flex; flex-direction: column; gap: 16px; }
.nutr-filter-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #fff; padding: 12px 20px; border-radius: 50px; border: 1.5px solid #74C69D; }
.nutr-filter-label { font-family: 'Tajawal', sans-serif; font-size: 14px; font-weight: 600; color: #1B4332; min-width: 80px; white-space: nowrap; text-align: start; }
.nutr-filter-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.nutr-filter-btn { font-family: 'Tajawal', sans-serif; font-size: 13px; font-weight: 600; padding: 8px 18px; border-radius: 50px; border: 1.5px solid transparent; background: #fff; color: #2D6A4F; cursor: pointer; transition: all 0.22s; }
.nutr-filter-btn:hover { background: #F0F7F4 !important; color: #2D6A4F !important; border-color: #74C69D !important; }
.nutr-filter-btn.active { background: #2D6A4F !important; color: #fff !important; border-color: #2D6A4F !important; }
.nutr-filter-btn.active:hover { background: #1B4332 !important; }

/* ========== Certificates Filter ========== */
.nutr-cert-filter { background: #fff; border: 1.5px solid #74C69D; border-radius: 999px; padding: 8px 16px; margin-bottom: 24px; }
.nutr-cert-filter .e-filter { justify-content: center !important; flex-wrap: wrap !important; gap: 4px !important; border: none !important; background: none !important; padding: 0 !important; }
.nutr-cert-filter .e-filter-item { font-family: 'Tajawal', 'DM Sans', sans-serif !important; font-size: 13px !important; padding: 6px 16px !important; border-radius: 999px !important; border: none !important; background: transparent !important; color: #2D6A4F !important; cursor: pointer !important; transition: all 0.2s !important; font-weight: 600 !important; }
.nutr-cert-filter .e-filter-item:hover { background: #F0F7F4 !important; }
.nutr-cert-filter .e-filter-item.e-filter-item-active { background: #2D6A4F !important; color: #fff !important; }
.nutr-filter-select { display: none; }
.nutr-cert-select { display: none; }

/* ========== Calculators Grid ========== */
.nutr-calcs { grid-template-columns: repeat(3, 1fr) !important; }
@media (max-width: 1024px) { .nutr-calcs { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 640px)  { .nutr-calcs { grid-template-columns: 1fr !important; } }

/* ========== Contact Form 7 ========== */
.wpcf7 { direction: rtl !important; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 textarea, .wpcf7 select { direction: rtl !important; text-align: right !important; width: 100% !important; box-sizing: border-box !important; margin-bottom: 12px !important; display: block !important; }
.wpcf7 .wpcf7-acceptance { display: block !important; text-align: right !important; margin-bottom: 12px !important; }
.wpcf7 .wpcf7-acceptance .wpcf7-list-item label { display: inline-flex !important; flex-direction: row !important; align-items: center !important; gap: 8px !important; cursor: pointer !important; }
.wpcf7 .wpcf7-acceptance input[type="checkbox"] { width: 16px !important; height: 16px !important; margin: 0 !important; flex-shrink: 0 !important; }
.wpcf7 input[type="submit"] { display: inline-block !important; width: auto !important; float: right !important; cursor: pointer !important; }
.page-id-1160 .wpcf7 { direction: ltr !important; }
.page-id-1160 .wpcf7 input[type="text"], .page-id-1160 .wpcf7 input[type="email"], .page-id-1160 .wpcf7 input[type="tel"], .page-id-1160 .wpcf7 textarea, .page-id-1160 .wpcf7 select { direction: ltr !important; text-align: left !important; }
.page-id-1160 .wpcf7 .wpcf7-acceptance { text-align: left !important; }
.page-id-1160 .wpcf7 .wpcf7-acceptance .wpcf7-list-item label { flex-direction: row !important; }
.page-id-1160 .wpcf7 input[type="submit"] { float: left !important; }

/* ========== Blog Pages ========== */
.elementor-page-1170 .e-loop-item { direction: ltr !important; text-align: left !important; }
.elementor-page-1170 .e-loop-item .elementor-heading-title { text-align: left !important; }
.elementor-page-1170 .e-loop-item .elementor-button { float: left !important; }
.elementor-page-1170 .e-filter { display: none !important; }
.elementor-page-759 .e-filter { display: none !important; }
.elementor-page-759 .nutr-en-filter { direction: rtl !important; font-family: 'Tajawal', sans-serif !important; }
.elementor-page-759 .nutr-en-filter-btn, .elementor-page-759 .nutr-en-more-btn, .elementor-page-759 .nutr-en-drop-item { font-family: 'Tajawal', sans-serif !important; }
.elementor-page-759 .nutr-en-drop-item { text-align: right !important; }
.nutr-en-filter-btn:hover { background: #F0F7F4 !important; color: #2D6A4F !important; border-color: #74C69D !important; }
.nutr-en-filter-btn.active:hover { background: #1B4332 !important; color: #fff !important; }

/* ========== Cards ========== */
.e-loop-item > .elementor-element { transition: all 0.22s ease !important; }
.e-loop-item:hover > .elementor-element { border-color: #2D6A4F !important; transform: translateY(-5px) !important; box-shadow: 0 12px 32px rgba(45,106,79,0.16) !important; }
.e-loop-item .nutr-badge-light, .e-loop-item .nutr-badge-role,
.e-loop-item .nutr-badge-type, .e-loop-item [class*="nutr-badge"] { display: inline-flex !important; width: auto !important; max-width: 100% !important; }
.e-loop-item [class*="nutr-badge"] .elementor-heading-title { white-space: normal !important; word-break: break-word !important; width: auto !important; }
html:not([dir="rtl"]) .e-loop-item,
html:not([dir="rtl"]) .e-loop-item .elementor-widget-container,
html:not([dir="rtl"]) .e-loop-item .elementor-heading-title,
html:not([dir="rtl"]) .e-loop-item .elementor-widget-text-editor { direction: ltr !important; text-align: left !important; }
.elementor-loop-container.elementor-grid { grid-template-columns: repeat(var(--grid-columns, 3), minmax(0, 1fr)) !important; }

/* ========== Single Post ========== */
.elementor-location-single .elementor-post-info,
.elementor-location-single .elementor-post-info a,
.elementor-location-single .elementor-post-info .elementor-icon-list-icon { color: #40916C !important; fill: #40916C !important; }
html:not([dir="rtl"]) .elementor-widget-theme-post-content,
html:not([dir="rtl"]) .elementor-widget-theme-post-content p,
html:not([dir="rtl"]) .elementor-widget-theme-post-content h1,
html:not([dir="rtl"]) .elementor-widget-theme-post-content h2,
html:not([dir="rtl"]) .elementor-widget-theme-post-content h3,
html:not([dir="rtl"]) .elementor-widget-theme-post-content h4,
html:not([dir="rtl"]) .elementor-widget-theme-post-content li,
html:not([dir="rtl"]) .elementor-widget-theme-post-content strong { font-family: 'DM Sans', sans-serif !important; line-height: 1.8 !important; }
html:not([dir="rtl"]) .elementor-widget-theme-post-content h2 { font-size: 22px !important; font-weight: 600 !important; margin-top: 32px !important; margin-bottom: 12px !important; color: #1B4332 !important; }
html:not([dir="rtl"]) .elementor-widget-theme-post-content h3 { font-size: 18px !important; font-weight: 600 !important; margin-top: 24px !important; color: #2D6A4F !important; }
html:not([dir="rtl"]) .elementor-widget-theme-post-content p { font-size: 16px !important; color: #444 !important; margin-bottom: 16px !important; }
html:not([dir="rtl"]) .elementor-widget-theme-post-content li { font-size: 15px !important; margin-bottom: 6px !important; }
.elementor-widget-theme-post-featured-image img { width: 100% !important; height: auto !important; max-width: 100% !important; max-height: 400px !important; object-fit: cover !important; display: block !important; border-radius: 12px !important; }

/* ========== iOS Bounce Fix ========== */
html { background-color: #1B4332 !important; }
body { background-color: #F0F7F4 !important; }

/* ========== Responsive ========== */
@media (max-width: 1300px) {
    body.nutr-menu-open { overflow: hidden !important; }
}

@media (max-width: 1024px) {
    [data-id="6b115ca"] { flex-direction: column !important; }
    [data-id="4654c70"], [data-id="d4463d2"] { flex: 1 1 100% !important; width: 100% !important; max-width: 100% !important; }
}

@media (max-width: 767px) {
    /* Headings */
    .elementor-widget-heading h1.elementor-heading-title { font-size: clamp(24px, 7vw, 36px) !important; line-height: 1.25 !important; }
    .elementor-widget-heading h2.elementor-heading-title { font-size: clamp(20px, 6vw, 30px) !important; line-height: 1.3 !important; }
    .elementor-widget-heading h3.elementor-heading-title { font-size: clamp(17px, 5vw, 24px) !important; line-height: 1.35 !important; }

    /* Loop cards */
    .e-loop-item .elementor-heading-title { font-size: clamp(16px, 4.5vw, 22px) !important; line-height: 1.3 !important; }
    .e-loop-item .elementor-widget-text-editor p,
    .e-loop-item .elementor-widget-text-editor { font-size: 13px !important; line-height: 1.6 !important; display: -webkit-box !important; -webkit-line-clamp: 3 !important; -webkit-box-orient: vertical !important; overflow: hidden !important; }
    .e-loop-item .elementor-widget-heading .elementor-heading-title { display: inline-block !important; width: auto !important; max-width: 100% !important; }
    .e-loop-item .elementor-widget-image { display: none !important; }

    /* Filter selects */
    .nutr-filter-btns { display: none !important; }
    .nutr-filter-select {
        display: block; width: 100%; padding: 10px 16px;
        border: 1.5px solid #74C69D; border-radius: 20px;
        background: #fff; color: #2D6A4F;
        font-family: 'Tajawal', 'DM Sans', sans-serif;
        font-size: 14px; font-weight: 600; cursor: pointer;
        appearance: none; -webkit-appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232D6A4F' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
        background-repeat: no-repeat; background-position: left 14px center;
    }
    html:not([dir="rtl"]) .nutr-filter-select { background-position: right 14px center; }
    .nutr-filter-select:focus { outline: none; border-color: #2D6A4F; }
    .nutr-blog-filter { flex-wrap: wrap !important; justify-content: center !important; gap: 8px 6px !important; padding: 4px 0 !important; }
    .nutr-blog-filter-btn { flex: 0 0 auto !important; max-width: none !important; white-space: nowrap !important; font-size: 12px !important; padding: 6px 12px !important; }

    /* Section padding */
    .e-con.e-parent:not(.e-con .e-con) { padding-left: 16px !important; padding-right: 16px !important; }

    /* Contact page */
    [data-id="152aa05"] { flex-direction: column !important; }
    [data-id="ce53d7c"], [data-id="5d73936"] { flex: 1 1 100% !important; width: 100% !important; max-width: 100% !important; }

    /* Footer */
    [data-id="footer-main"] { flex-direction: column !important; gap: 28px !important; }
    [data-id="fcol-logo"], [data-id="fcol-links"], [data-id="fcol-contact"] { flex: 1 1 100% !important; width: 100% !important; max-width: 100% !important; }

    /* Blog section padding */
    .elementor-element-7702dd1.e-con { padding: 24px 16px !important; }
}

/* ========== Blog EN Category Badge Colors ========== */
.category-diabetes-nutrition-en .nutr-badge-light .elementor-heading-title,
.category-heart-health-en .nutr-badge-light .elementor-heading-title,
.category-thyroid-hormones-en .nutr-badge-light .elementor-heading-title,
.category-liver-kidney-health-en .nutr-badge-light .elementor-heading-title,
.category-cancer-nutrition-en .nutr-badge-light .elementor-heading-title,
.category-pcos-nutrition-en .nutr-badge-light .elementor-heading-title { background: #FEE2E2 !important; color: #991b1b !important; border-color: #fca5a5 !important; }

.category-sports-nutrition-en .nutr-badge-light .elementor-heading-title,
.category-pregnancy-nutrition-en .nutr-badge-light .elementor-heading-title,
.category-children-nutrition-en .nutr-badge-light .elementor-heading-title,
.category-elderly-nutrition-en .nutr-badge-light .elementor-heading-title { background: #D8F3DC !important; color: #1B4332 !important; border-color: #74C69D !important; }

.category-weight-loss-en .nutr-badge-light .elementor-heading-title,
.category-digestive-health-en .nutr-badge-light .elementor-heading-title,
.category-bones-anemia-en .nutr-badge-light .elementor-heading-title,
.category-mental-health-nutrition-en .nutr-badge-light .elementor-heading-title,
.category-intermittent-fasting-en .nutr-badge-light .elementor-heading-title { background: #DBEAFE !important; color: #1e3a5f !important; border-color: #93c5fd !important; }

.category-food-safety-supplements-en .nutr-badge-light .elementor-heading-title,
.category-food-allergy-celiac-en .nutr-badge-light .elementor-heading-title { background: #EDE9FE !important; color: #3b1f6e !important; border-color: #c4b5fd !important; }

.category-healthy-recipes-en .nutr-badge-light .elementor-heading-title { background: #FED7AA !important; color: #92400e !important; border-color: #fdba74 !important; }

/* ===== Single Post — stack sidebar on mobile ===== */
@media (max-width: 1024px) {
    [data-id="6b115ca"] { flex-direction: column !important; flex-wrap: wrap !important; }
    [data-id="4654c70"], [data-id="d4463d2"] {
        flex: 1 1 100% !important;
        flex-basis: 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        --container-widget-width: 100% !important;
        --container-widget-flex-grow: 1 !important;
    }
}

/* ===== Single Post sidebar — full width on mobile ===== */
@media (max-width: 1024px) {
    [data-id="d4463d2"] {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 100% !important;
        flex-basis: 100% !important;
        --container-widget-width: 100% !important;
        --container-widget-flex-grow: 1 !important;
    }
}
