:root {
    --primary: #003F5B;
    --hover: #c84644;
    --blue: #287889;
    --lblue: #CCF8EC;
    --mplum: #ECDAFF;
}

a {
    -webkit-box-shadow: none;
    box-shadow: none;
    text-decoration: none
}

body {
    background-color: #fff
}

.search-layout {
    display: flex;
    flex-wrap: wrap;
    display: -webkit-flex;
    padding: 12px 30px
}

.s-result {
    padding: 0 8px;
    min-height: 88vh;
    position: relative;
    width: 75%
}

.s-result h1 {
    color: var(--primary)
}

.heslay {
    flex-basis: 100%
}

.heslay h1 {
    font-size: 25px;
    color: var(--primary);
    background: #eee;
    margin: 0;
    padding: 8px;
    margin-bottom: 8px;
    border-right: 3px solid;
    text-align: center;
    font-weight: 400
}

.ftitle {
    padding: 12px 0;
    border-right: 3px solid var(--primary);
    background: #eee;
    text-align: center;
    font-size: 18px;
    color: var(--primary)
}

.filters {
    width: 20%;
    border: 0.5px solid #eee;
    min-width: 258px
}

.filter-item {
    background: #eee;
    margin: 12px
}

.myicon {
    position: relative;
    width: 14px;
    float: left;
    display: inline-block
}

.myicon::after, .myicon::before {
    content: "";
    position: absolute;
    width: 12px;
    height: 2px;
    background: var(--primary);
    top: 11px
}

.myicon::after {
    transform: rotate(-90deg);
    transition: 0.3s linear
}

.sf-item {
    max-height: 0;
    transition: all 0.3s;
    padding: 0 8px;
    overflow: hidden
}

.ititle {
    display: inline-block;
    padding: 8px;
    cursor: pointer;
    width: 100%
}

.tricon::after {
    transform: rotate(0)
}

.fopt {
    padding: 4px 0;
}

.fopt input, .fopt select {
    border-radius: 3px;
    border: 1px solid var(--blue);
    padding: 4px;
    text-align: center;
    outline: none;
}

.fopt select {
    min-width: 100px
}

.fopt label {
    user-select: none;
    cursor: pointer
}

.rang-con {
    padding: 28px;
    margin-bottom: 12px;
    position: relative
}

.rang-con input {
    -webkit-appearance: none;
    direction: ltr;
    width: 50%;
    padding: 0;
    height: 3px;
    margin: 0;
    position: absolute;
    left: 1px;
    bottom: 0;
    background: var(--primary);
    border: none;
    outline: none
}

.rang-con input:nth-child(1) {
    right: 0;
    bottom: 0;
    left: unset
}

.rang-con input::-webkit-slider-thumb {
    -webkit-appearance: none;
    cursor: pointer;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--mplum);
    border: 8px solid var(--primary)
}

.outmax, .outmin {
    display: block;
    position: absolute;
    bottom: 24px;
    z-index: 2;
    text-align: center
}

.outmax::after, .outmin::after {
    content: "";
    position: absolute;
    display: block;
    background: #fff;
    border: 2px solid var(--primary);
    width: 27px;
    height: 27px;
    bottom: -4px;
    z-index: -1;
    border-radius: 16px;
    border-bottom-right-radius: 0;
    transform: rotate(45deg);
}

.outmin::after {
    left: -5px
}

.outmax::after {
    left: -7px
}

.outmin {
    left: 2%
}

.outmax {
    right: 1%
}

.btn_clean, .btn_save {
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    border: none;
    font-size: 15px;
    transition: all 0.3s;
    margin: 0 4px 32px 4px
}

.btn_save {
    background: var(--primary);
    color: #fff
}

.btn_clean {
    color: var(--primary);
    padding: 6.5px 17px;
    border: 1px solid var(--primary);
    background: #fff
}

.btn_clean:hover, .btn_save:hover {
    background: var(--mplum);
    color: var(--primary)
}

.sort {
    display: flex;
    flex-wrap: wrap;
    padding: 8px
}

.slitem {
    margin: 8px 0
}

.sort select {
    border-radius: 3px;
    border: 1px solid var(--blue);
    padding: 4px 8px;
    text-align: center;
    outline: none;
    margin-left: 12px
}

.shdesk {
    display: inline-block
}

.result {
    display: flex;
    display: -webkit-flex;
    flex-wrap: wrap;
    justify-content: start;
    position: relative;
    padding: 8px 12px
}

.loading {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    text-align: center;
    border-radius: 3px;
    padding-top: 25%;
    background: rgba(0, 0, 0, 0.4)
}

.loading i {
    color: #fff;
    font-size: 62px
}

.doner-item {
    width: 23.5%;
    min-width: 220px;
    border-radius: 3px;
    margin: 12px 6px;
    font-size: 15px;
    transition: all 0.2s;
    background: #fff;
    position: relative;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.2)
}

.doner-item:hover {
    background: #ECF0F1
}

.available {
    position: absolute;
    top: 0;
    background-color: #ffffffee;
    border-bottom-left-radius: 13px;
    border-top-left-radius: 13px;
    border-top-right-radius: 3px;
    padding-inline-end: 8px
}

.available i {
    font-size: 10px;
    color: #0f0;
    margin: 8px
}

.orgst, .orgst i {
    color: #ffa500
}

.redst, .redst i {
    color: #fd3550
}

.doner-item .img {
    display: flex;
    display: -webkit-flex;
    overflow: hidden;
    background: #ECF0F1
}

.doner-item .img img {
    width: 100%;
    height: 200px;
    object-fit: scale-down
}

.heart {
    cursor: pointer;
    float: left
}

.heart i {
    color: var(--primary);
    font-size: 20px
}

.donor-info {
    padding: 12px
}

.donor-field {
    margin: 8px 0
}

.donor-field span:nth-child(1) {
    display: inline-block;
    font-weight: 600;
    width: 80px
}

.moreinfo {
    display: inline-block;
    text-align: center;
    width: 100%;
    background: #be89e7;
    color: #fff;
    border: none;
    border-radius: 3px;
    transition: all 0.2s;
    margin-top: 8px;
    padding: 8px 0
}

.moreinfo:hover {
    background: var(--mplum);
    color: var(--primary)
}

.filter_btn {
    display: none;
    cursor: pointer
}

.profile-layout {
    display: flex;
    display: -webkit-flex;
    flex-wrap: wrap;
    padding: 30px 7%;
    justify-content: space-between
}

.profile-side {
    width: 28%;
    background: #f7f7f7;
    text-align: center;
    max-width: 270px;
    border-radius: 3px;
    padding: 30px 0
}

.profile-side img {
    width: 75%;
    border-radius: 3px
}

.btnpro {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 6px 16px;
    margin-top: 16px;
    margin-bottom: 32px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s
}

.btnpro:hover {
    background: var(--mplum);
    color: var(--primary)
}

.psitem, .ptitem {
    padding: 8px;
    background: lightgray;
    margin-top: 2px;
    cursor: pointer
}

.psitem:hover, .ptitem:hover {
    color: var(--primary)
}

.psb {
    background: var(--mplum)
}

.profile-tabs {
    width: 72%;
    border-radius: 3px;
    padding: 24px;
    box-shadow: -1px 1px 5px rgba(0, 0, 0, 0.1)
}

#tab2, #tab3, #tab4 {
    display: none
}

.tab-title {
    font-size: 18px;
    margin-bottom: 18px
}

.fgroup {
    margin: 12px 0
}

.fgroup>label {
    width: 120px;
    background: #f7f7f7;
    padding: 8px;
    border-bottom: 1.5px solid #f7f7f7;
    display: inline-block
}

.fgroup>input, .fgroup>select {
    border: none;
    border-bottom: 1.5px solid #eee;
    min-width: 50%;
    padding: 10px;
    background: #fff;
    outline: none
}

.donor-des img {
    float: left;
    max-width: 38%;
    margin-right: 8px
}

.ddt {
    font-size: 22px;
    font-weight: bold;
    color: var(--primary)
}

.stitle {
    font-size: 16px;
    font-weight: bold;
    color: var(--primary)
}

.donor-des {
    width: 100%;
    padding: 12px;
    border: 3px solid var(--mplum)
}

.dtable {
    border: 3px solid var(--primary);
    width: 100%
}

.rmerg {
    text-align: center;
    background: var(--primary) !important;
    font-weight: bold;
    font-size: 16px;
    color: #efefef
}

.dtable, .dtable th, .dtable td {
    padding: 10px;
    border-collapse: collapse
}

.dtable th {
    background: var(--mplum);
    text-align: start
}

.stable th {
    width: 75%;
    background: unset
}

.stable tr:nth-child(even) {
    background-color: var(--lblue)
}

.rdf {
    margin: 8px 0;
}

.rdf>label {
    display: inline-block;
    width: 120px;
    padding: 8px;
    border-radius: 3px;
    background: var(--lblue)
}

.rdf input, .rdf select, .rdfc {
    display: inline-block;
    width: 230px;
    border: none;
    outline: none;
    padding: 9px;
    border-radius: 3px;
    background: #f7f7f7
}

.btnproreg {
    /* width: 120px; */
    min-width: 100px;
    padding: 10px;
    border: none;
    outline: none;
    background: green;
    color: #fff;
    cursor: pointer;
    border-radius: 3px
}

.btnproreg:hover {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.mbtnupg {
    background: var(--primary);
    color: #fff;
    margin: auto;
    border-radius: 24px;
    padding: 4px 18px;
    margin-left: 8px
}

input[type="file"] {
    display: none;
}

.req-donor {
    margin-top: 16px;
    width: 100%
}

.req-donor form {
    width: 100%
}

.rdfg {
    width: 48%
}

.rdfg textarea, .rfsel {
    width: 100%;
    border: 2px solid var(--mplum);
    margin: 8px 0;
    height: 60%;
    outline: none;
    border-radius: 3px;
    padding: 8px
}

.rfsel {
    border: 2px solid var(--mplum) !important;
    background-color: #fff !important
}

.dfcon {
    display: flex;
    display: -webkit-flex;
    justify-content: space-between
}

.rdfg2 {
    width: 100%
}

.alert-danger {
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb
}

.rgroup, .rgs {
    width: 49%;
    padding: 8px
}

.rgs select, .rgs input {
    display: block;
    background: #fff;
    padding: 4px 8px;
    margin: 8px 0;
    min-width: 170px;
    border: 1px solid var(--blue);
    border-radius: 5px
}

.surfields {
    display: flex;
    display: -webkit-flex;
    flex-wrap: wrap;
}

.tblreq th, .tblreq td {
    padding: 8px;
    min-width: 125px;
    text-align: start
}

.tblreq {
    border: 2px solid var(--primary);
    margin-bottom: 8px;
    border-radius: 5px;
    width: 100%
}

.tblreq, .tblreq tr {
    border-collapse: collapse
}

.tblreq tr:nth-child(odd) {
    background: #f7f7f7
}

.user-msg {
    background: var(--mplum);
    padding: 1rem 3rem;
    border-radius: 12px;
    text-align: justify;
    margin: 16px auto 0;
    width: 100%
}

.message-box {
    background: #fff;
    padding: 1rem 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin: 16px auto 0;
    width: 100%
}

.message-box a {
    display: inline-block;
    padding: 0.6rem 2.2rem;
    background: #12A19A;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.3s ease
}

.message-box a:hover {
    background: #0d817bff
}

.empty-state {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px
}

.empty-state p {
    margin: 0;
    color: #3b3b3b;
    font-size: 16px;
    text-align: center;
    line-height: 1.8
}

.empty-state a, .btner {
    display: inline-block;
    background: #12A19A;
    color: #fff;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 16px;
    transition: all .2s ease;
    width: fit-content;
    margin: auto;
    border: 1px solid #0e7f79
}

.btner {
    border-radius: 3px;
    font-size: 16px;
    margin: 0 12px
}

.empty-state a:hover {
    background: #0e7f79;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(18, 161, 154, 0.25)
}

.empty-state a:active {
    transform: translateY(0);
    box-shadow: none
}

.edhcont {
    padding: 8px 8px
}

.edbcont {
    position: relative;
    padding: 1rem;
    background-color: #f4f4f4;
    max-width: 960px;
    margin: 8px auto;
    border-radius: 7px;
    overflow: hidden;
    transition: max-height 0.7s ease;
    max-height: 230px
}

/* حالت باز شده */
.edbcont.expanded {
    max-height: 6000px
}

/* افکت محو پایین */
.edbcont::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(to bottom, rgba(244, 244, 244, 0), rgba(244, 244, 244, 1));
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.edbcont.expanded::after {
    opacity: 0
}

.show-more-btn {
    display: block;
    margin: auto;
    margin-top: -7px;
    margin-bottom: 12px;
    padding: 0.5rem 1rem;
    background-color: #f4f4f4;
    border: none;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    cursor: pointer;
    font-size: 1rem
}

.mag-ol {
    counter-reset: custom-counter;
    list-style: none;
    padding: 0;
}

.mag-ol li {
    counter-increment: custom-counter;
    position: relative;
    padding-inline-start: 2.5rem;
}

.mag-ol li::before {
    content: counter(custom-counter);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0.2rem
}

/* LTR */
[dir="ltr"] .mag-ol li::before {
    left: 0
}

/* RTL */
[dir="rtl"] .mag-ol li {
    padding-inline-end: 0;
    padding-inline-end: 2.5rem
}

[dir="rtl"] .mag-ol li::before {
    right: 0;
    left: auto
}

.btn-reg-donor {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #ff6b6b, #f06595);
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    margin: 12px 0
}

.btn-reg-donor:hover {
    background: linear-gradient(135deg, #f06595, #ff6b6b);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25)
}

.btn-reg-donor:active {
    transform: scale(0.97)
}

@media (max-width:1000px) {

    .doner-item {
        width: 48%
    }

    .rdfg {
        width: 100%
    }

    .dfcon {
        flex-direction: column
    }

    .surfields {
        flex-direction: column
    }

    .rgroup, .rgs {
        width: 100%;
    }
}

@media (max-width:820px) {
    .search-layout {
        flex-direction: column;
    }

    .filters {
        margin-bottom: 16px;
        width: 100%
    }

    .outmin {
        left: 1%
    }

    .filter_btn {
        display: inline-block
    }

    .s-result {
        width: 100%
    }

    .shdesk {
        display: none
    }
        .doner-item {
        width: 47%
    }
}

@media (max-width:700px) {
    .profile-tabs, .profile-side {
        width: 100%;
        max-width: 100%;
    }

    .rdf input, .rdf select, .fgroup>input, .fgroup>select, .rdfc {
        width: 100%
    }
}

@media (max-width:560px) {
    .doner-item {
        margin-right: 8px;
        width: 100%
    }

    .doner-item .img {
        border-radius: 5px;
        float: left
    }

    .doner-item .img img {
        height: auto;
        width: 110px
    }

    .result {
        padding: 0
    }

    .mresult {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch
        /* اسکرول نرم روی iOS */
    }
        .mresult::-webkit-scrollbar {
        display: none
    }
        .doner-item {
        flex: 0 0 100%;/* هر کارت ~100٪ عرض صفحه */
        scroll-snap-align: start; 
        border-radius: 12px;
        background: #fff;
        padding: 12px
    }

    .donor-des img {
        max-width: 100%;
        width: 100%;
        margin: 12px 0
    }
    .doncon{
        padding: 30px 4.5%
    }
}