/* Orphan mobile usability pass: public project accordions, family visual, join cards, modals and fixed actions. */
.mobile-project-open-hint{display:none}

@media (max-width:767.98px){
  body.orphan-site-shell{padding-bottom:76px!important}
  body.modal-open .donation-bow-fixed{display:none!important}

  /* Public orphan projects: make it obvious that each card opens. */
  .contribute-section .accordion-button{position:relative;display:flex!important;align-items:center!important;gap:10px!important;padding:10px 42px 10px 10px!important;min-height:86px;border-radius:14px!important}
  [dir="ltr"] .contribute-section .accordion-button{padding:10px 10px 10px 42px!important}
  .contribute-section .accordion-button::after{display:none!important}
  .mobile-project-open-hint{display:flex;position:absolute;inset-inline-end:10px;top:50%;transform:translateY(-50%);width:30px;height:30px;border-radius:50%;background:#fff;color:#203f81;align-items:center;justify-content:center;box-shadow:0 4px 14px rgba(10,38,80,.16)}
  .mobile-project-open-hint span{display:none}
  .accordion-button:not(.collapsed) .mobile-project-open-hint i{transform:rotate(180deg)}
  .mobile-project-open-hint i{transition:transform .2s ease}

  /* Family sponsorship circles overlap instead of creating a very tall block. */
  .contribute-good .help-card-content{display:block!important}
  .contribute-good .help-card-content>.content{width:100%!important;margin-bottom:12px!important}
  .contribute-good .help-card-content .pic{position:relative!important;width:min(330px,100%)!important;height:350px!important;margin:8px auto 0!important;min-height:0!important}
  .contribute-good .help-card-content .pic span.img{position:absolute!important;width:270px!important;height:270px!important;top:0!important;inset-inline-start:0!important;border-radius:50%!important;overflow:hidden!important}
  .contribute-good .help-card-content .pic span.img img{width:100%!important;height:100%!important;object-fit:cover!important}
  .contribute-good .help-card-content .pic span.info{position:absolute!important;width:205px!important;height:205px!important;right:auto!important;bottom:0!important;inset-inline-end:0!important;margin:0!important;padding:24px 20px!important;border-radius:50%!important;z-index:2!important;display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:center!important;text-align:center!important;font-size:13px!important;line-height:1.6!important}
  .contribute-good .help-card-content .pic span.info a{margin-top:8px!important;font-size:12px!important}

  /* Gift / volunteer cards remain compact and readable. */
  .join-us{padding:20px 10px!important}
  .join-us-container{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;width:100%!important;padding:0!important}
  .join-us-container .join-us-card{position:relative!important;width:100%!important;min-width:0!important;height:220px!important;margin:0!important;border-radius:18px!important;overflow:hidden!important}
  .join-us-container .join-us-card:nth-child(3){grid-column:1/-1;height:auto!important;min-height:150px!important}
  .join-us-container .join-us-card .main-pic{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:cover!important}
  .join-us-container .join-us-card:not(:nth-child(3))::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(5,31,65,.05),rgba(5,31,65,.78));z-index:1}
  .join-us-container .join-us-card .content{position:relative!important;z-index:2!important;height:100%!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:flex-end!important;padding:16px 8px!important;text-align:center!important}
  .join-us-container .join-us-card .content>.icon{width:42px!important;height:42px!important;margin-bottom:7px!important}
  .join-us-container .join-us-card .title{font-size:17px!important;line-height:1.45!important;margin:0 0 8px!important;color:#fff!important}
  .join-us-container .join-us-card:nth-child(3) .title{font-size:17px!important;padding:18px!important;margin:0!important}
  .join-us-container .join-us-card .btn-more{width:34px!important;height:34px!important;display:flex!important;align-items:center!important;justify-content:center!important}

  /* Bootstrap donation and volunteer modals: fit the mobile viewport. */
  #joinUs-modal .modal-dialog,#send-gift-modal .modal-dialog,#dounation-modal .modal-dialog{margin:8px!important;max-width:calc(100% - 16px)!important;width:auto!important}
  #joinUs-modal .modal-content,#send-gift-modal .modal-content,#dounation-modal .modal-content{max-height:calc(100dvh - 16px)!important;border-radius:20px!important;overflow:hidden!important}
  #joinUs-modal .modal-body,#send-gift-modal .modal-body,#dounation-modal .modal-body{overflow-y:auto!important;overscroll-behavior:contain;padding:18px 12px!important;margin:0!important;width:100%!important}
  #joinUs-modal .container-fluid,#send-gift-modal .container-fluid,#dounation-modal .container-fluid{padding:0!important}
  #joinUs-modal .dontation-main-box,#send-gift-modal .dontation-main-box,#dounation-modal .dontation-main-box{width:100%!important;margin:0!important;padding:14px!important;border-radius:16px!important}
  #joinUs-modal .dontation-main-box>.row,#send-gift-modal .dontation-main-box>.row,#dounation-modal .dontation-main-box>.row{display:block!important;margin:0!important}
  #joinUs-modal .dontation-main-box>.row>.col,#send-gift-modal .dontation-main-box>.row>.col,#dounation-modal .dontation-main-box>.row>.col{width:100%!important;max-width:none!important;padding:0!important}
  #joinUs-modal input,#joinUs-modal textarea,#send-gift-modal input,#send-gift-modal textarea{max-width:none!important;width:100%!important}
  #joinUs-modal .submit_volunteer{width:100%!important;margin-top:12px!important}
  #send-gift-modal .d-flex.gap-lg-3{flex-wrap:wrap!important;align-items:center!important}
  #send-gift-modal .gift_fast_donation{flex:1 1 140px!important}
  #joinUs-modal .section-header,#send-gift-modal .section-header,#dounation-modal .section-header{padding:0 34px 10px!important}
  #joinUs-modal .section-header .sub-title,#send-gift-modal .section-header .sub-title,#dounation-modal .section-header .sub-title{font-size:23px!important}

  /* Elegant fixed mobile action bar with reliable FA5 icons. */
  .donation-bow-fixed{position:fixed!important;z-index:1040!important;bottom:0!important;left:0!important;right:0!important;height:70px!important;padding:7px 8px calc(7px + env(safe-area-inset-bottom))!important;background:#173d82!important;display:grid!important;grid-template-columns:1fr 1.12fr 1fr .75fr!important;align-items:center!important;gap:4px!important;box-shadow:0 -8px 24px rgba(4,29,64,.22)!important;border-radius:18px 18px 0 0!important}
  .donation-bow-fixed .mobile-bottom-action{appearance:none;border:0;background:transparent;color:#fff!important;text-decoration:none!important;min-width:0;height:56px;padding:4px 2px;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:3px!important;font-size:10.5px!important;font-weight:800!important;line-height:1.2!important;white-space:nowrap!important}
  .donation-bow-fixed .mobile-bottom-icon{position:relative;display:flex;width:29px;height:29px;align-items:center;justify-content:center;font-size:19px;color:#fff}
  .donation-bow-fixed .mobile-bottom-donate{height:64px!important;margin-top:-21px!important;border-radius:18px!important;background:#ffd814!important;color:#0b2b55!important;box-shadow:0 7px 20px rgba(0,0,0,.22)!important}
  .donation-bow-fixed .mobile-bottom-donate .mobile-bottom-icon{width:36px;height:32px;font-size:25px;color:#0b2b55!important}
  .donation-bow-fixed .mobile-bottom-donate span{color:#0b2b55!important}
  .mobile-cart-count{position:absolute;top:-5px;inset-inline-end:-7px;display:flex;min-width:17px;height:17px;padding:0 4px;border-radius:10px;align-items:center;justify-content:center;background:#e63e45;color:#fff;font-size:9px;font-weight:900}
  .mobile-bottom-more{height:100%}
  .mobile-bottom-more>.mobile-bottom-action{width:100%}
  .mobile-bottom-more .dropdown-menu{min-width:190px;margin-bottom:10px;border:0;border-radius:15px;padding:8px;box-shadow:0 16px 36px rgba(0,0,0,.22)}
  .mobile-bottom-more .dropdown-item{display:flex;align-items:center;gap:9px;border-radius:9px;padding:10px;font-size:13px}
}

@media (max-width:390px){
  .join-us-container .join-us-card{height:195px!important}
  .join-us-container .join-us-card .title{font-size:15px!important}
  .contribute-good .help-card-content .pic{height:325px!important}
  .contribute-good .help-card-content .pic span.img{width:245px!important;height:245px!important}
  .contribute-good .help-card-content .pic span.info{width:185px!important;height:185px!important;padding:20px 16px!important}
  .donation-bow-fixed .mobile-bottom-action{font-size:9.5px!important}
}

/* Mobile polish v5: stronger project affordance, compact family visual, stacked action cards and accessible gender radios. */
@media (max-width:767.98px){
  /* General orphan projects on the homepage: visible tap hint. */
  .orphan-home-page .contribute-section .accordion-button{
    min-height:122px!important;
    padding:12px 12px 48px!important;
    overflow:hidden!important;
  }
  .orphan-home-page .contribute-section .accordion-button .help-card{
    width:100%!important;
    min-width:0!important;
    display:flex!important;
    align-items:center!important;
    gap:14px!important;
  }
  .orphan-home-page .contribute-section .accordion-button .help-card .icon{
    flex:0 0 58px!important;
    width:58px!important;
    height:58px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
  }
  .orphan-home-page .contribute-section .accordion-button .help-card .icon img{
    width:54px!important;
    height:54px!important;
    object-fit:contain!important;
  }
  .orphan-home-page .contribute-section .accordion-button .help-card .name{
    flex:1 1 auto!important;
    min-width:0!important;
    margin:0!important;
    font-size:17px!important;
    line-height:1.45!important;
  }
  .orphan-home-page .mobile-project-open-hint{
    display:inline-flex!important;
    top:auto!important;
    bottom:9px!important;
    inset-inline-end:11px!important;
    width:auto!important;
    min-width:118px!important;
    height:32px!important;
    padding:0 11px!important;
    gap:7px!important;
    border:1px solid rgba(32,63,129,.14)!important;
    border-radius:999px!important;
    background:#fff!important;
    color:#203f81!important;
    font-size:11px!important;
    font-weight:900!important;
    box-shadow:0 5px 16px rgba(10,38,80,.15)!important;
  }
  .orphan-home-page .mobile-project-open-hint span{display:inline!important;white-space:nowrap!important}
  .orphan-home-page .mobile-project-open-hint i{font-size:12px!important}

  /* Orphan-family sponsorship visual: two clean overlapping circles without oversized whitespace. */
  .orphan-home-page .contribute-good .help-card-content{display:block!important;overflow:visible!important}
  .orphan-home-page .contribute-good .help-card-content>.content{width:100%!important;margin:0 0 14px!important}
  .orphan-home-page .contribute-good .family-visual{
    position:relative!important;
    width:min(310px,calc(100vw - 34px))!important;
    height:278px!important;
    min-height:278px!important;
    margin:8px auto 0!important;
    overflow:visible!important;
  }
  .orphan-home-page .contribute-good .family-visual .family-image{
    position:absolute!important;
    top:0!important;
    bottom:auto!important;
    inset-inline-start:auto!important;
    inset-inline-end:0!important;
    width:210px!important;
    height:210px!important;
    border-radius:50%!important;
    overflow:hidden!important;
    z-index:1!important;
  }
  .orphan-home-page .contribute-good .family-visual .family-image img{
    width:100%!important;
    height:100%!important;
    object-fit:cover!important;
    border-radius:50%!important;
  }
  .orphan-home-page .contribute-good .family-visual .family-info{
    position:absolute!important;
    top:auto!important;
    bottom:0!important;
    inset-inline-start:0!important;
    inset-inline-end:auto!important;
    width:170px!important;
    height:170px!important;
    margin:0!important;
    padding:20px 16px!important;
    border-radius:50%!important;
    z-index:2!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
    font-size:12px!important;
    line-height:1.5!important;
    overflow:hidden!important;
    box-shadow:0 12px 28px rgba(9,39,76,.16)!important;
  }
  .orphan-home-page .contribute-good .family-visual .family-info a{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:5px!important;
    margin-top:7px!important;
    padding:8px 12px!important;
    border-radius:11px!important;
    font-size:11px!important;
    white-space:nowrap!important;
  }

  /* Gift and volunteer cards: one full-width card per row on mobile. */
  .orphan-home-page .join-us{padding:18px 10px!important;overflow:hidden!important}
  .orphan-home-page .join-us-container{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:12px!important;
    width:100%!important;
    max-width:100%!important;
    padding:0!important;
  }
  .orphan-home-page .join-us-container .join-us-card{
    width:100%!important;
    min-width:0!important;
    height:158px!important;
    min-height:158px!important;
    margin:0!important;
    border-radius:18px!important;
    overflow:hidden!important;
    position:relative!important;
  }
  .orphan-home-page .join-us-container .join-us-card:not(.join-us-hadith-card){cursor:pointer!important}
  .orphan-home-page .join-us-container .join-us-card .main-pic{
    position:absolute!important;
    inset:0!important;
    width:100%!important;
    height:100%!important;
    object-fit:cover!important;
    object-position:center!important;
  }
  .orphan-home-page .join-us-container .join-us-card:not(.join-us-hadith-card)::after{
    content:""!important;
    position:absolute!important;
    inset:0!important;
    z-index:1!important;
    background:linear-gradient(90deg,rgba(5,31,65,.92),rgba(5,31,65,.42))!important;
  }
  [dir="rtl"] .orphan-home-page .join-us-container .join-us-card:not(.join-us-hadith-card)::after{
    background:linear-gradient(270deg,rgba(5,31,65,.92),rgba(5,31,65,.42))!important;
  }
  .orphan-home-page .join-us-container .join-us-card .content{
    position:relative!important;
    z-index:2!important;
    width:100%!important;
    height:100%!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    justify-content:center!important;
    padding:20px 24px!important;
    text-align:start!important;
  }
  .orphan-home-page .join-us-container .join-us-card .content>.icon{
    width:38px!important;
    height:38px!important;
    margin:0 0 8px!important;
    object-fit:contain!important;
  }
  .orphan-home-page .join-us-container .join-us-card .title{
    max-width:74%!important;
    margin:0!important;
    color:#fff!important;
    font-size:19px!important;
    line-height:1.35!important;
    overflow-wrap:anywhere!important;
  }
  .orphan-home-page .join-us-container .join-us-card .btn-more{
    position:absolute!important;
    inset-inline-end:18px!important;
    bottom:18px!important;
    width:38px!important;
    height:38px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    border-radius:50%!important;
  }
  .orphan-home-page .join-us-container .join-us-hadith-card{
    grid-column:auto!important;
    height:auto!important;
    min-height:138px!important;
  }
  .orphan-home-page .join-us-container .join-us-hadith-card .content{
    align-items:center!important;
    text-align:center!important;
    padding:20px!important;
  }
  .orphan-home-page .join-us-container .join-us-hadith-card .title{
    max-width:100%!important;
    font-size:17px!important;
    line-height:1.7!important;
  }

  /* Volunteer popup: compact inputs and proper Male/Female controls. */
  #joinUs-modal .modal-dialog{width:calc(100% - 16px)!important;max-width:560px!important;margin:8px auto!important}
  #joinUs-modal .modal-content{max-height:calc(100dvh - 16px)!important;overflow:hidden!important;border:0!important;border-radius:20px!important}
  #joinUs-modal .modal-body{max-height:calc(100dvh - 16px)!important;overflow-y:auto!important;padding:14px 12px 18px!important}
  #joinUs-modal .section-header{margin-bottom:8px!important}
  #joinUs-modal .section-header .title{font-size:15px!important}
  #joinUs-modal .section-header .sub-title{font-size:22px!important;line-height:1.35!important}
  #joinUs-modal .dontation-main-box{padding:14px!important;border-radius:16px!important}
  #joinUs-modal .volunteer_form .form-group{margin-bottom:12px!important}
  #joinUs-modal .volunteer_form .form-label{display:block!important;margin-bottom:6px!important;font-size:13px!important;font-weight:800!important}
  #joinUs-modal .volunteer_form .form-control,
  #joinUs-modal .volunteer_form .iti{width:100%!important;max-width:none!important}
  #joinUs-modal .volunteer_form input.form-control{height:48px!important;border-radius:11px!important}
  #joinUs-modal .volunteer_form textarea.form-control{min-height:112px!important;border-radius:11px!important}
  #joinUs-modal .count-hint{padding:0 0 12px!important;margin:0!important;font-size:12px!important;line-height:1.6!important}
  #joinUs-modal .volunteer-gender-options{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
    margin:0 0 14px!important;
  }
  #joinUs-modal .volunteer-gender-option{position:relative!important;margin:0!important;cursor:pointer!important}
  #joinUs-modal .volunteer-gender-option input{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    opacity:0!important;
    pointer-events:none!important;
  }
  #joinUs-modal .volunteer-gender-option span{
    width:100%!important;
    min-height:48px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:8px!important;
    padding:9px 12px!important;
    border:2px solid rgba(255,255,255,.52)!important;
    border-radius:12px!important;
    background:#fff!important;
    color:#173d82!important;
    font-size:14px!important;
    font-weight:900!important;
    transition:.2s ease!important;
  }
  #joinUs-modal .volunteer-gender-option input:checked + span{
    border-color:#ffd814!important;
    background:#ffd814!important;
    color:#0b2b55!important;
    box-shadow:0 6px 18px rgba(255,216,20,.22)!important;
  }
  #joinUs-modal .volunteer-gender-option input:focus-visible + span{outline:3px solid rgba(255,216,20,.34)!important;outline-offset:2px!important}
  #joinUs-modal .submit_volunteer{width:100%!important;min-height:48px!important;margin:6px 0 0!important;border-radius:12px!important}
}

@media (max-width:390px){
  .orphan-home-page .contribute-good .family-visual{width:min(286px,calc(100vw - 28px))!important;height:250px!important;min-height:250px!important}
  .orphan-home-page .contribute-good .family-visual .family-image{width:188px!important;height:188px!important}
  .orphan-home-page .contribute-good .family-visual .family-info{width:154px!important;height:154px!important;padding:16px 13px!important;font-size:11px!important}
  .orphan-home-page .join-us-container .join-us-card{height:146px!important;min-height:146px!important}
  .orphan-home-page .join-us-container .join-us-card .content{padding:18px!important}
  .orphan-home-page .join-us-container .join-us-card .title{font-size:17px!important}
}
