/* =====================================================================
   IBTDI V43 — Responsive experience system
   Mobile-first corrections for 320–575px, tablets, and compact laptops.
   Loaded last intentionally to neutralise legacy component conflicts.
   ===================================================================== */
:root{
  --v43-gutter:clamp(16px,4vw,32px);
  --v43-touch:48px;
}
html{scroll-padding-top:92px;}
html,body{max-width:100%;overflow-x:clip;}
.body_wrapper{max-width:100%;overflow-x:clip;}
img,svg,video,iframe,canvas{max-width:100%;}
button,a,input,select,textarea{-webkit-tap-highlight-color:transparent;}
a,button{touch-action:manipulation;}

/* Keep general content in a readable column without breaking desktop layouts. */
@media (max-width:1199.98px){
  .sec_padding{padding-top:94px!important;padding-bottom:94px!important;}
  .ibtdi_header_v6 .container-fluid{padding-inline:var(--v43-gutter);}
  .ibtdi_header_v6 .navbar-collapse{z-index:1055;max-height:calc(100vh - 92px);overflow-y:auto;overscroll-behavior:contain;}
  .ibtdi_header_v6 .navbar-nav.menu{width:100%;}
  .ibtdi_header_v6 .navbar-nav.menu .nav-link{min-height:44px;display:flex;align-items:center;justify-content:center;}
  .ibtdi_header_v6 .nav_right a{min-height:var(--v43-touch);}

  /* The stacked services need to behave like regular cards on tablet. */
  .ibtdi_services_stack_wrap{padding-bottom:0!important;}
  .ibtdi_stack_card{
    position:relative!important;top:auto!important;
    margin-top:0!important;margin-bottom:22px!important;
    transform:none!important;will-change:auto!important;
  }
  .ibtdi_stack_card:nth-of-type(n+2){margin-top:0!important;}

  /* Wide comparison remains legible: intentionally scrollable rather than compressed. */
  .ibtdi_compare_wrap{overflow-x:auto!important;overscroll-behavior-inline:contain;padding:0 0 12px;-webkit-overflow-scrolling:touch;scrollbar-color:rgba(20,165,101,.6) rgba(15,38,60,.08);}
  .ibtdi_compare_wrap:after{content:"اسحب للمقارنة ←";display:block;width:max-content;margin:9px auto 0;color:#557087;font-size:12px;font-weight:800;}

  .testimonials_split_layout{gap:30px!important;}
  .testimonials_slider_panel{min-width:0;}
  .portfolio_cases_grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .ibtdi_lead_premium_shell{gap:30px!important;}
}

/* Tablet / portrait laptop tuning. */
@media (max-width:991.98px){
  .container,.container-fluid{padding-inline:var(--v43-gutter);}
  .ibtdi_top_strip{padding-block:8px;}
  .ibtdi_strip_inner{justify-content:flex-start;flex-wrap:nowrap;overflow-x:auto;padding-bottom:3px;scroll-snap-type:inline mandatory;-webkit-overflow-scrolling:touch;}
  .ibtdi_strip_inner span{flex:0 0 auto;scroll-snap-align:start;white-space:nowrap;}

  .ibtdi_ai_hero .container-fluid{padding-inline:var(--v43-gutter)!important;}
  .future_hero_shell{min-height:auto!important;}
  .future_browser_mockup{width:100%;min-width:0;}
  .future_hero_content{max-width:760px;}
  .future_hero_content h1{font-size:clamp(38px,6vw,54px)!important;line-height:1.23!important;}
  .future_hero_content p{font-size:17px!important;max-width:680px;}
  .future_trust_badges{justify-content:center;}

  .ibtdi_metric{min-height:120px;display:flex;flex-direction:column;justify-content:center;}
  .ibtdi_metric strong{font-size:clamp(28px,5vw,38px);}
  .ibtdi_metric span{font-size:14px;line-height:1.55;}

  /* Blueprint: preserve the interactive story without tiny touch targets. */
  .ai42_controlbar{gap:14px!important;}
  .ai42_project_picker{width:100%;}
  .ai42_tabs{overflow-x:auto;scroll-snap-type:inline mandatory;-webkit-overflow-scrolling:touch;}
  .ai42_tab{flex:0 0 auto;min-width:142px;min-height:48px;scroll-snap-align:start;}
  .ai42_run{min-height:68px;}
  .ai42_path{gap:18px!important;}
  .ai42_stage{min-height:100%;}
  .ai42_stage p{min-height:0!important;}
  .ai42_output{grid-template-columns:minmax(0,1fr) 205px!important;}
  .ai42_contact{min-height:48px;}

  .product_store_grid{gap:18px!important;}
  .store_product_card{min-width:0;}
  .portfolio_case{min-width:0;}
  .portfolio_case_meta{grid-template-columns:1fr!important;gap:11px!important;}
  .portfolio_tags{gap:7px!important;}
  .portfolio_tags span{font-size:11px!important;}

  .testimonials_content_panel{padding-left:0!important;}
  .testimonial_story_card_v34 .testimonial_video_frame{height:clamp(290px,50vw,390px)!important;}
  .ibtdi_lead_form .form_row.two_cols{grid-template-columns:1fr 1fr;}
}

/* Phone experience. */
@media (max-width:767.98px){
  html{scroll-padding-top:76px;}
  .sec_padding{padding-top:72px!important;padding-bottom:72px!important;}
  .container,.container-fluid{padding-inline:16px;}
  .ibtdi_header_v6 .container-fluid{padding-inline:16px;}
  .ibtdi_header_v6 .navbar-collapse{left:10px;right:10px;padding:14px;border-radius:18px;}
  .ibtdi_header_v6 .navbar-nav.menu{gap:7px!important;}
  .ibtdi_header_v6 .navbar-nav.menu .nav-link{font-size:14px!important;text-align:right!important;justify-content:flex-start!important;padding-inline:15px!important;}
  .ibtdi_header_v6 .nav_right{display:grid!important;grid-template-columns:1fr 1fr;width:100%;gap:8px!important;}
  .ibtdi_header_v6 .nav_right a{width:100%;padding-inline:8px!important;}
  .ibtdi_header_v6 .nav_right .btn_text span{font-size:13px!important;}

  .ibtdi_top_strip{padding-block:7px;}
  .ibtdi_strip_inner{gap:7px;font-size:12px;}
  .ibtdi_strip_inner span{padding:6px 10px;}

  .ibtdi_ai_hero .container-fluid{padding-inline:10px!important;}
  .ibtdi_hero_future{padding-top:8px!important;}
  .future_hero_shell{padding:70px 14px 0!important;border-radius:22px!important;}
  .future_hero_content h1{font-size:clamp(31px,9vw,39px)!important;line-height:1.28!important;letter-spacing:-.45px!important;}
  .future_hero_content p{font-size:16px!important;line-height:1.85!important;margin-bottom:24px!important;}
  .ibtdi_hero_actions{display:grid!important;grid-template-columns:1fr;width:100%;gap:10px!important;}
  .ibtdi_hero_actions>a{width:100%;min-height:54px;display:flex!important;align-items:center;justify-content:center;}
  .future_trust_badges{flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;padding:3px 1px 8px;scroll-snap-type:inline mandatory;-webkit-overflow-scrolling:touch;}
  .future_trust_badges span{flex:0 0 auto;scroll-snap-align:start;font-size:12px!important;}
  .future_browser_mockup{margin-top:35px!important;margin-bottom:-22px!important;border-radius:18px!important;}
  .browser_topbar{height:46px!important;}
  .mock_main{padding:16px!important;}
  .mock_greeting h3{font-size:20px!important;line-height:1.45;}
  .mock_cards_grid>div{padding:13px!important;}
  .mock_cards_grid>div strong{font-size:14px!important;}
  .mock_cards_grid>div p{font-size:12px!important;line-height:1.55;}

  .ibtdi_clients_after_hero{padding:52px 0 42px!important;}
  .ibtdi_clients_after_hero .section_title{margin-bottom:20px!important;}
  .ibtdi_clients_after_hero .section_title h2{font-size:30px!important;line-height:1.34!important;}
  .ibtdi_clients_after_hero .section_title p{font-size:15px!important;line-height:1.8;}
  .ibtdi_clients_after_hero .ibtdi_logo_item{height:74px!important;border-radius:18px!important;}

  .ibtdi_proof_v2{padding-block:22px!important;}
  .ibtdi_metric_row{row-gap:10px;}
  .ibtdi_metric{min-height:96px;padding:12px 8px!important;border-radius:16px!important;}
  .ibtdi_metric strong{font-size:28px!important;}
  .ibtdi_metric span{font-size:12px!important;line-height:1.45;}

  /* AI blueprint: content first, optics second on a narrow screen. */
  .ibtdi_ai_blueprint{padding:72px 0!important;}
  .ai42_heading{margin-bottom:24px!important;}
  .ai42_eyebrow{font-size:12px!important;padding:8px 12px!important;}
  .ai42_heading h2{font-size:clamp(30px,8vw,37px)!important;line-height:1.32!important;}
  .ai42_heading p{font-size:16px!important;line-height:1.86!important;}
  .ai42_controlbar{padding:11px!important;border-radius:17px!important;}
  .ai42_picker_title{font-size:15px!important;}
  .ai42_tabs{width:100%;padding:3px!important;}
  .ai42_tab{min-width:134px!important;padding:9px 11px!important;font-size:13px!important;}
  .ai42_run{width:100%;justify-content:flex-start!important;padding:10px 13px!important;border-radius:14px!important;}
  .ai42_run strong{font-size:16px!important;}
  .ai42_blueprint{padding:11px!important;border-radius:20px!important;}
  .ai42_blueprint_top{gap:10px!important;padding-bottom:12px!important;}
  .ai42_blueprint_title strong{font-size:14px!important;}
  .ai42_blueprint_title small{font-size:9px!important;}
  .ai42_status_badge{display:none!important;}
  .ai42_context{display:block!important;margin:13px 0 17px!important;padding:15px!important;border-radius:16px!important;}
  .ai42_context_icon{width:42px!important;height:42px!important;margin-bottom:11px;}
  .ai42_context strong{font-size:19px!important;line-height:1.55!important;}
  .ai42_context p{font-size:15px!important;line-height:1.75!important;margin-top:8px!important;}
  .ai42_path{gap:12px!important;padding:5px 0!important;}
  .ai42_track{display:none!important;}
  .ai42_stage{padding:18px 16px 15px!important;border-radius:17px!important;}
  .ai42_stage:before{display:none!important;}
  .ai42_stage_number{top:17px!important;left:16px!important;font-size:12px!important;}
  .ai42_stage_icon{width:46px!important;height:46px!important;margin-bottom:12px!important;border-radius:14px!important;font-size:19px!important;}
  .ai42_stage_kicker{font-size:12px!important;}
  .ai42_stage h3{font-size:21px!important;line-height:1.42!important;padding-left:34px;}
  .ai42_stage p{font-size:15px!important;line-height:1.8!important;}
  .ai42_stage_footer{margin-top:13px!important;padding-top:12px!important;}
  .ai42_stage_footer span,.ai42_stage_footer b{font-size:12px!important;}
  .ai42_output{display:flex!important;flex-direction:column;align-items:stretch!important;gap:14px!important;padding:18px!important;border-radius:18px!important;}
  .ai42_output_copy h3{font-size:23px!important;line-height:1.45!important;}
  .ai42_output_copy p{font-size:15px!important;line-height:1.78!important;}
  .ai42_output_visual{width:204px!important;height:101px!important;margin-inline:auto;order:2;}
  .ai42_contact{order:3;width:100%;min-height:52px;font-size:15px!important;}
  .ai42_promise{display:grid!important;grid-template-columns:1fr;gap:8px!important;margin-top:19px!important;font-size:14px!important;}
  .ai42_promise>b{display:none!important;}

  .ibtdi_services_stack .row{margin-bottom:25px!important;}
  .ibtdi_services_stack .section_title_two h2{font-size:31px!important;line-height:1.35!important;}
  .ibtdi_services_stack .section_title_two p{font-size:16px!important;line-height:1.8!important;}
  .services_premium_note{padding:14px!important;border-radius:15px!important;}
  .ibtdi_stack_card{padding:18px!important;border-radius:21px!important;gap:18px!important;}
  .stack_kicker{font-size:11px!important;line-height:1.5!important;}
  .stack_card_content h3{font-size:26px!important;line-height:1.38!important;}
  .stack_card_content p{font-size:15px!important;line-height:1.8!important;}
  .stack_meta_grid{gap:9px!important;}
  .stack_meta_grid>div{padding:12px!important;}
  .stack_media_visual{padding:12px!important;border-radius:18px!important;}
  .stack_media_visual img{height:auto!important;aspect-ratio:16/10;object-fit:cover;}
  .stack_media_note{gap:8px!important;}
  .stack_action{width:100%;min-height:52px;justify-content:center;}

  .ibtdi_comparison .section_title h2,.ibtdi_comparison .section_title_two h2{font-size:30px!important;line-height:1.35!important;}
  .ibtdi_compare_wrap{margin-inline:-16px;padding-inline:16px;}
  .ibtdi_compare_header,.ibtdi_compare_row{min-width:720px!important;}
  .ibtdi_compare_row{padding:18px 16px!important;}
  .ibtdi_compare_row>div{font-size:13px!important;line-height:1.55;}
  .ibtdi_compare_header>div{font-size:12px!important;}

  #ai-products.ibtdi_product_store_v35{padding-inline:0!important;}
  #ai-products .container{padding-inline:16px;}
  .product_store_intro h2{font-size:31px!important;line-height:1.35!important;}
  .product_store_intro p{font-size:16px!important;line-height:1.8!important;}
  .product_store_assurance{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;width:calc(100% + 2px);padding-bottom:5px!important;}
  .product_store_assurance span{flex:0 0 auto;}
  .product_store_toolbar{padding:10px!important;border-radius:16px!important;}
  .product_filters{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;width:100%;padding-bottom:2px;}
  .product_filters .product_filter,.product_filters .product_filter:first-child{flex:0 0 auto!important;width:auto!important;min-width:112px!important;grid-column:auto!important;}
  .product_selection_summary{gap:10px!important;align-items:flex-start!important;}
  .product_selection_summary a{min-height:44px!important;}
  .product_store_grid{grid-template-columns:1fr!important;gap:14px!important;}
  .store_product_card{border-radius:19px!important;}
  .store_product_media{height:172px!important;}
  .store_product_body{padding:17px!important;}
  .store_product_meta{gap:8px!important;}
  .store_product_body h3{font-size:22px!important;line-height:1.42!important;}
  .store_product_body>p{font-size:15px!important;line-height:1.72!important;}
  .store_product_footer{align-items:stretch!important;flex-direction:column!important;gap:12px!important;}
  .product_add_btn{width:100%;min-height:48px;justify-content:center;}
  .product_store_bottom{padding:17px!important;border-radius:18px!important;}
  .product_store_contact{min-height:50px;}

  .ibtdi_testimonials_v25{padding-top:72px!important;padding-bottom:72px!important;}
  .testimonials_split_layout{gap:24px!important;}
  .testimonials_content_panel .section_title h2{font-size:32px!important;line-height:1.35!important;}
  .testimonials_content_panel .section_title p{font-size:16px!important;line-height:1.8!important;}
  .testimonials_content_points{gap:10px!important;}
  .testimonial_story_card_v34{border-radius:20px!important;}
  .testimonial_story_card_v34 .testimonial_video_frame{height:250px!important;}
  .testimonials_slider_panel_head{align-items:flex-start!important;gap:10px!important;}
  .testimonials_slider_nav{margin-top:0!important;}
  .testimonial_slick_arrow{width:42px!important;height:42px!important;}

  .ibtdi_portfolio_showcase .section_title_two h2{font-size:31px!important;line-height:1.35!important;}
  .ibtdi_portfolio_showcase .section_title_two p{font-size:16px!important;line-height:1.8!important;}
  .portfolio_cases_grid{grid-template-columns:1fr!important;gap:13px!important;}
  .portfolio_case{padding:18px!important;border-radius:19px!important;}
  .portfolio_case h3{font-size:22px!important;line-height:1.4!important;}
  .portfolio_case>p{font-size:15px!important;line-height:1.75!important;}
  .portfolio_case_meta{display:grid!important;grid-template-columns:1fr!important;}
  .portfolio_note{padding:16px!important;border-radius:17px!important;}

  .ibtdi_lead_premium_shell{padding:20px!important;border-radius:23px!important;}
  .lead_premium_info h2{font-size:31px!important;line-height:1.35!important;}
  .lead_premium_info>p{font-size:16px!important;line-height:1.82!important;}
  .lead_advisor_card{padding:15px!important;border-radius:16px!important;}
  .ibtdi_lead_form{padding:17px!important;border-radius:18px!important;}
  .ibtdi_lead_form .form_row.two_cols{grid-template-columns:1fr!important;}
  .ibtdi_lead_form input,.ibtdi_lead_form textarea,.ibtdi_lead_form select{min-height:50px!important;font-size:16px!important;}
  .budget_options{grid-template-columns:1fr 1fr!important;gap:8px!important;}
  .budget_options span{min-height:45px!important;display:flex;align-items:center;justify-content:center;text-align:center;}
  .ibtdi_lead_form button[type="submit"]{min-height:54px!important;width:100%;}
  .lead_confidence_bar{padding:16px!important;border-radius:18px!important;}

  #faq.ibtdi_faq_premium{padding-inline:0!important;}
  #faq .container{padding-inline:16px;}
  #faq .faq_centered_header{margin-bottom:22px!important;}
  #faq .faq_centered_header h2{font-size:31px!important;line-height:1.35!important;}
  #faq .faq_centered_header>p{font-size:16px!important;line-height:1.85!important;}
  #faq .faq_centered_header .faq_confidence_list{max-width:none!important;display:flex!important;justify-content:center!important;gap:8px!important;}
  #faq .faq_centered_header .faq_confidence_list span{font-size:13px!important;}
  #faq .faq_centered_header .faq_cta{min-height:52px!important;width:100%;max-width:360px!important;}
  #faq .faq_centered_accordion .accordion-item{border-radius:15px!important;}
  #faq .faq_centered_accordion .accordion-button{min-height:68px!important;padding:15px!important;font-size:16px!important;line-height:1.65!important;text-align:right!important;}
  #faq .faq_centered_accordion .accordion-button span{flex:0 0 34px!important;min-width:34px!important;min-height:34px!important;font-size:11px!important;}
  #faq .faq_centered_accordion .accordion-body{padding:0 15px 18px!important;}
  #faq .faq_centered_accordion .accordion-body p{font-size:15.5px!important;line-height:1.9!important;}

  .ibtdi_final_cta{padding:68px 0!important;}
  .ibtdi_final_cta_inner h2{font-size:31px!important;line-height:1.35!important;}
  .ibtdi_final_cta_inner p{font-size:16px!important;line-height:1.8!important;}
  .ibtdi_footer_v25{padding-top:48px!important;}
  .footer_v25_main{gap:24px!important;}
  .footer_v25_brand h3{font-size:29px!important;line-height:1.4!important;}
  .footer_v25_brand p{font-size:15px!important;line-height:1.8!important;}
  .footer_v25_linksbar nav{grid-template-columns:1fr 1fr!important;gap:11px 16px!important;}
  .footer_v25_linksbar a{font-size:13px!important;}
  .footer_v25_trust{display:grid!important;grid-template-columns:1fr auto auto auto;align-items:center!important;}
  .footer_v25_trust .trust_text{grid-column:1/-1;width:auto!important;margin:0 0 6px!important;}
}

/* Narrow phones: remove cramped two-column leftovers. */
@media (max-width:479.98px){
  .future_hero_shell{padding-top:64px!important;}
  .future_hero_content h1{font-size:31px!important;}
  .future_hero_content p{font-size:15px!important;}
  .ibtdi_header_v6 .nav_right{grid-template-columns:1fr!important;}
  .ibtdi_header_v6 .nav_right a{min-height:46px!important;}
  .ibtdi_metric{min-height:88px!important;}
  .ibtdi_metric strong{font-size:25px!important;}
  .ibtdi_metric span{font-size:11px!important;}
  .ai42_heading h2{font-size:30px!important;}
  .ai42_context strong{font-size:18px!important;}
  .ai42_stage h3{font-size:20px!important;}
  .store_product_media{height:154px!important;}
  .store_product_body h3{font-size:20px!important;}
  .testimonial_story_card_v34 .testimonial_video_frame{height:222px!important;}
  .budget_options{grid-template-columns:1fr!important;}
  #faq .faq_centered_header .faq_confidence_list{align-items:stretch!important;display:grid!important;grid-template-columns:1fr!important;text-align:right!important;}
  #faq .faq_centered_header .faq_confidence_list span{justify-content:flex-start!important;}
  .footer_v25_trust{grid-template-columns:1fr 1fr!important;}
  .footer_v25_trust .trust_text{grid-column:1/-1;}
}

/* Users who prefer reduced motion still get a clean, stable interface. */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;}
}
