{"id":283,"date":"2025-12-07T12:33:16","date_gmt":"2025-12-07T12:33:16","guid":{"rendered":"https:\/\/altaiecenter.com\/staging\/?page_id=283"},"modified":"2025-12-17T12:55:22","modified_gmt":"2025-12-17T12:55:22","slug":"medical-calculator","status":"publish","type":"page","link":"https:\/\/altaiecenter.com\/staging\/medical-calculator\/","title":{"rendered":"Calculator\u200b"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"283\" class=\"elementor elementor-283\">\n\t\t\t\t<div class=\"elementor-element elementor-element-c1b1792 e-flex e-con-boxed e-con e-parent\" data-id=\"c1b1792\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-284012c elementor-widget elementor-widget-html\" data-id=\"284012c\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<div class=\"bmi-box\">\r\n    <h2 class=\"bmi-title\">Body Mass Index (BMI) Calculator<\/h2>\r\n    <p class=\"bmi-desc\">BMI is a measure used to determine whether your weight is healthy for your height.<\/p>\r\n\r\n    <div class=\"bmi-inputs\">\r\n        <div class=\"input-group\">\r\n            <label>Height (cm) *<\/label>\r\n            <input type=\"number\" id=\"height\" placeholder=\"170\">\r\n        <\/div>\r\n\r\n        <div class=\"input-group\">\r\n            <label>Weight (kg) *<\/label>\r\n            <input type=\"number\" id=\"weight\" placeholder=\"70\">\r\n        <\/div>\r\n    <\/div>\r\n\r\n    <button class=\"bmi-btn\" onclick=\"calculateBMI()\">Calculate BMI<\/button>\r\n\r\n    <h3 class=\"bmi-scale-title\">BMI Classification<\/h3>\r\n\r\n    <div class=\"bmi-result\" id=\"bmiResult\"><\/div>\r\n\r\n    <div class=\"bmi-scale\">\r\n        <div class=\"scale-row yellow\">Less than 18.5 \u2014 Underweight<\/div>\r\n        <div class=\"scale-row green\">18.5 - 24.9 \u2014 Normal weight<\/div>\r\n        <div class=\"scale-row orange\">25.0 - 29.9 \u2014 Overweight<\/div>\r\n        <div class=\"scale-row light-red\">30.0 - 34.9 \u2014 Obesity Class I<\/div>\r\n        <div class=\"scale-row red\">35.0 - 39.9 \u2014 Obesity Class II<\/div>\r\n        <div class=\"scale-row dark-red\">40.0 or more \u2014 Obesity Class III<\/div>\r\n    <\/div>\r\n<\/div>\r\n\r\n<style>\r\n.bmi-box {\r\n    background: #fff;\r\n    padding: 30px;\r\n    border-radius: 20px;\r\n    box-shadow: 0 8px 25px rgba(0,0,0,0.1);\r\n    text-align: center;\r\n    font-family: \"Tajawal\", sans-serif;\r\n}\r\n\r\n.bmi-title {\r\n    color: #152F7A;\r\n    margin-bottom: 5px;\r\n    font-size: 28px;\r\n    font-weight: 700;\r\n}\r\n\r\n.bmi-desc {\r\n    color: #555;\r\n    margin-bottom: 25px;\r\n    font-size: 15px;\r\n}\r\n\r\n.bmi-inputs {\r\n    display: flex;\r\n    gap: 20px;\r\n    justify-content: center;\r\n    margin-bottom: 20px;\r\n    flex-wrap: wrap;\r\n}\r\n\r\n.input-group {\r\n    width: 250px;\r\n    text-align: left;\r\n}\r\n\r\n.input-group label {\r\n    display: block;\r\n    margin-bottom: 5px;\r\n    color: #152F7A;\r\n    font-weight: 600;\r\n}\r\n\r\n.input-group input {\r\n    width: 100%;\r\n    padding: 12px;\r\n    border: 1px solid #ddd;\r\n    border-radius: 12px;\r\n    background: #f8f8f8;\r\n    font-size: 16px;\r\n    text-align: center;\r\n}\r\n\r\n.bmi-btn {\r\n    width: 100%;\r\n    max-width: 350px;\r\n    padding: 12px;\r\n    border: none;\r\n    border-radius: 12px;\r\n    background: #152F7A;\r\n    color: #fff;\r\n    font-size: 18px;\r\n    cursor: pointer;\r\n    margin-bottom: 20px;\r\n    font-weight: 700;\r\n    transition: 0.3s;\r\n}\r\n\r\n.bmi-btn:hover {\r\n    opacity: 0.8;\r\n}\r\n\r\n.bmi-scale-title {\r\n    color: #152F7A;\r\n    margin-bottom: 15px;\r\n    font-size: 22px;\r\n    font-weight: 700;\r\n}\r\n\r\n.bmi-scale {\r\n    margin-top: 10px;\r\n}\r\n\r\n.scale-row {\r\n    padding: 12px;\r\n    border-radius: 10px;\r\n    margin-bottom: 10px;\r\n    font-weight: 600;\r\n}\r\n\r\n\/* Colors *\/\r\n.yellow     { background: #FFF8CC; }\r\n.green      { background: #E6FFEA; }\r\n.orange     { background: #FFE8CC; }\r\n.light-red  { background: #FFE0E0; }\r\n.red        { background: #FFCCCC; }\r\n.dark-red   { background: #FFB3B3; }\r\n\r\n#bmiResult {\r\n    font-size: 20px;\r\n    font-weight: 700;\r\n    margin-bottom: 15px;\r\n    color: #152F7A;\r\n}\r\n<\/style>\r\n\r\n<script>\r\nfunction calculateBMI() {\r\n    let height = document.getElementById(\"height\").value;\r\n    let weight = document.getElementById(\"weight\").value;\r\n\r\n    if (!height || !weight) {\r\n        document.getElementById(\"bmiResult\").innerHTML = \"Please enter height and weight\";\r\n        return;\r\n    }\r\n\r\n    let h = height \/ 100;\r\n    let bmi = (weight \/ (h * h)).toFixed(1);\r\n\r\n    let status = \"\";\r\n\r\n    if (bmi < 18.5) status = \"Underweight\";\r\n    else if (bmi < 25) status = \"Normal weight\";\r\n    else if (bmi < 30) status = \"Overweight\";\r\n    else if (bmi < 35) status = \"Obesity Class I\";\r\n    else if (bmi < 40) status = \"Obesity Class II\";\r\n    else status = \"Obesity Class III\";\r\n\r\n    document.getElementById(\"bmiResult\").innerHTML = `BMI = ${bmi} \u2014 ${status}`;\r\n}\r\n<\/script>\r\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Body Mass Index (BMI) Calculator BMI is a measure used to determine whether your weight is healthy for your height. Height (cm) * Weight (kg) * Calculate BMI BMI Classification Less than 18.5 \u2014 Underweight 18.5 &#8211; 24.9 \u2014 Normal weight 25.0 &#8211; 29.9 \u2014 Overweight 30.0 &#8211; 34.9 \u2014 Obesity Class I 35.0 &#8211; 39.9 \u2014 Obesity Class II [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_header_footer","meta":{"footnotes":""},"class_list":["post-283","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/altaiecenter.com\/staging\/wp-json\/wp\/v2\/pages\/283","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/altaiecenter.com\/staging\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/altaiecenter.com\/staging\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/altaiecenter.com\/staging\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/altaiecenter.com\/staging\/wp-json\/wp\/v2\/comments?post=283"}],"version-history":[{"count":10,"href":"https:\/\/altaiecenter.com\/staging\/wp-json\/wp\/v2\/pages\/283\/revisions"}],"predecessor-version":[{"id":830,"href":"https:\/\/altaiecenter.com\/staging\/wp-json\/wp\/v2\/pages\/283\/revisions\/830"}],"wp:attachment":[{"href":"https:\/\/altaiecenter.com\/staging\/wp-json\/wp\/v2\/media?parent=283"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}