/* =======================
   Font Sizes
======================= */
.fs-16 {
    font-size: clamp(12px, 1.2vw, 16px) !important;
}

.fs-20 {
    font-size: clamp(16px, 1.5vw, 20px) !important;
}

.fs-26 {
    font-size: clamp(15px, 1.8vw, 26px) !important;
}

.fs-14 {
    font-size: clamp(12px, 1.2vw, 14px) !important;
}


/* =======================
   Width & Colors
======================= */
.w-md-50 {
    width: 50% !important;
}

.custom-color {
    color: var(--custom-color) !important;
}

.form-check-input:checked {
    background-color: var(--custom-color) !important;
    border-color: var(--custom-color) !important;
}

.bg-color {
    background-color: var(--bg-color) !important;
}

.text-custom-shadow {
    text-shadow: var(--text-shadow);
}

.bg-color-gradient {
    background: var(--bg-color-gradient) !important;
}

.custom-bg {
    background-color: var(--custom-color) !important;
}

a.nav-link {
    color: var(--black-color) !important;
}

.text-white {
    color: var(--bg-color) !important;
}

.bg-icon-cart {
    background-color: var(--icon-cart) !important;
}

/* =======================
   Shadows
======================= */
.bg-shadow {
    box-shadow: var(--bg-shadow) !important;
}

.bg-shadow-2 {
    box-shadow: var(--bg-shadow-2) !important;
}

.bg-shadow-3 {
    box-shadow: var(--bg-shadow-3) !important;
}

.bg-shadow-4 {
    box-shadow: var(--bg-shadow-4) !important;
}

.bg-shadow-5 {
    box-shadow: var(--bg-shadow-5) !important;
}

.bg-shadow-6 {
    box-shadow: var(--bg-shadow-6) !important;
}

.bg-shadow-auth {
    box-shadow: var(--bg-shadow-auth) !important;
}

.cart-shadow {
    box-shadow: var(--cart-shadow) !important;
}

.table-shadow {
    box-shadow: var(--hma-table-shadow) !important;
}

/* =======================
   Links & Navbar
======================= */

.custom-chart-card {
    box-shadow: var(--bg-shadow-6) !important;
    border-radius: 16px !important;
    background-color: var(--bg-color) !important;
}

.chart-dot {
    color: var(--icon-cart) !important;
}

.bg-cart {
    background-color: var(--footer-color) !important;
}

.price-table {
    background-color: var(--price-table) !important;
    border-radius: 16px !important;
    color: var(--price-table-color) !important;
}

.stat-table {
    background-color: var(--price-table) !important;
    border-radius: 16px !important;
    color: var(--stat-table-color) !important;
}

.btn-charities {
    background-color: var(--btn-charities) !important;
    color: var(--bg-color) !important;
}

.btn-charities-color {
    color: var(--btn-charities-color) !important;
}

.hma-filter-icon-charities {
    border-left: 1px solid var(--btn-charities-color) !important;
}

.custom-charities {
    border: 1px solid var(--btn-charities-color) !important;
    border-radius: 15px !important;
    height: 44px !important;
    padding-right: 45px !important;
    padding-left: 35px !important;
    font-size: 14px !important;
    color: var(--btn-charities-color) !important;
    width: 100%;
}

@media (max-width: 668px) {
    .w-md-50 {
        width: 100% !important;
    }
}

footer * {
    color: var(--footer-color) !important;
    font-size: clamp(14px, 1.2vw, 16px) !important;
}


.footer-section {
    color: var(--footer-color) !important;
}

.small-color {
    color: var(--small-color) !important;
}

footer .social-icons i {
    background: var(--bg-color) !important;
    color: var(--icon-cart) !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(14px, 1.2vw, 16px) !important;
}

.auth-section {
    background: var(--img-auth) center/cover no-repeat;
    min-height: 90vh;
    padding: 3rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    background-color: var(--bg-color);
    padding: 2.5rem;
    border-radius: 2rem;
    box-shadow: var(--bg-shadow-4) !important;
    width: 100%;
}

@media (max-width: 576px) {
    .auth-card {
        padding: 1.5rem;
        border-radius: 1.5rem;
    }
}

.auth-input {
    border-radius: 15px !important;
    border: 1px solid var(--black-color) !important;
    height: 40px !important;
    padding: 0.5rem 1rem !important;
    font-size: 14px !important;
    background-color: transparent !important;
}

select.auth-input {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23735FBA' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: left 15px center !important;
    background-size: 12px !important;
    padding-left: 35px !important;
}

.auth-input:focus {
    border-color: var(--custom-color) !important;
    box-shadow: none !important;
}

.auth-btn {
    background-color: var(--custom-color) !important;
    color: var(--bg-color) !important;
    border-radius: 12px !important;
    height: 50px !important;
    font-weight: 600 !important;
    font-size: clamp(14px, 1.2vw, 16px) !important;
    border: none !important;
    transition: all 0.3s ease !important;
}

.auth-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.auth-label {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--label-color) !important;
    margin-bottom: 0.5rem !important;
}

.auth-link {
    color: var(--custom-color) !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

.auth-link-secondary {
    color: var(--link-secondary) !important;
    font-size: 12px !important;
    text-decoration: none !important;
}

a.nav-link.active {
    background-color: var(--custom-color) !important;
    color: var(--bg-color) !important;
    border-radius: 30px;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

.offcanvas a.nav-link.active {
    padding: 5px !important;
}

.hero-section {
    background-image: var(--img-hero);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 680px;
    position: relative;
    color: var(--black-color) !important;
}

.hero-section-2 {
    background-image: var(--img-hero-2);
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    position: relative;
    color: var(--black-color) !important;
}

.span-color {
    color: var(--text-color) !important;
}

.btn-custom {
    background-color: var(--text-color);
    color: var(--bg-color);
    border-radius: 16px;
}

.btn-custom-tow {
    color: var(--black-color);
    border: 1px solid var(--custom-color);
    border-radius: 16px;
}


.hero-section .container {
    position: relative;
    z-index: 2;
}

.navbar-icon {
    border-radius: 30px !important;
    border: 1px solid var(--custom-color) !important;
    width: 26px !important;
    height: 26px !important;
    font-size: 12px !important;
    color: var(--text-color) !important;
    padding: 0 5px !important;
}

/* Stats Bar Design */
.stats-bar {
    background: var(--bg-color) !important;
    border: 1px solid var(--shadow-color);
    border-radius: 20px;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: -2px 4px 4px 0px var(--shadow-color);
    border: 2px solid var(--custom-color) !important;
    margin-top: 5rem;
    flex-wrap: wrap;
    max-width: 868px !important;
    width: 100%;
}

.stats-item {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    justify-content: center;
    padding: 10px 0;
}

.stats-info {
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stats-number {
    font-size: clamp(14px, 1.5vw, 24px);
    font-weight: 800;
    line-height: 1.1;
}

.stats-label {
    font-size: clamp(10px, 1.5vw, 16px);
    font-weight: 500;
    line-height: 1.1;
    margin-top: 2px;
}

.stats-icon-wrapper {
    background: var(--text-color);
    width: 46px;
    height: 46px;

    color: var(--bg-color);
    font-size: 1.3rem;
    box-shadow: 0 4px 12px var(--shadow-color);
    flex-shrink: 0;
}

.stats-divider {
    width: 1px;
    height: 45px;
    background: var(--shadow-color);
    margin: 0 5px;
}

.form-control,
.form-select {
    background-color: transparent !important;
}

.form-control::placeholder,
.form-select::placeholder {
    color: var(--shadow-color) !important;
}

.navbar {
    transition: all 0.3s ease;
}



/* Global Section Titles */
.hma-section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.hma-section-title {
    color: var(--text-color) !important;
    font-weight: 800;
    font-size: 2.2rem;
    text-shadow: var(--bg-shadow);
    margin-bottom: 0.5rem;
}

.hma-section-subtitle {
    color: var(--black-color);
    font-size: 0.9rem;
    font-weight: 600;
}

/* Common Card Style */
.hma-card {
    background: var(--bg-cart);
    /* Light grey-blue */
    border: none !important;
    border-radius: 16px;
    padding: 18px;
    position: relative;
    height: 100%;
}

/*--------------------------------------------------------------
# Premium Filter Design
--------------------------------------------------------------*/
.hma-select-wrapper {
    position: relative;
    width: 100%;
}

.hma-filter-select {
    border: 1.5px solid var(--custom-color) !important;
    border-radius: 16px !important;
    padding: 6px 40px !important;
    font-size: 0.95rem !important;
    color: var(--black-color) !important;
    background-color: var(--bg-color) !important;
    cursor: pointer !important;

    /* Force hide default arrow for all browsers */
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: none !important;
    /* Remove Bootstrap default background arrow */

    transition: all 0.3s ease !important;
}

.hma-filter-select::-ms-expand {
    display: none !important;
    /* Hide for IE/Edge */
}

.hma-filter-select:focus {
    border-color: var(--custom-color) !important;
    box-shadow: var(--bg-shadow) !important;
    outline: none !important;
}

.hma-select-icon-right {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    color: var(--custom-color) !important;
    font-size: 1.1rem;
    pointer-events: none;
    z-index: 5;
}

.hma-select-icon-left {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: var(--custom-color) !important;
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 5;
}

.hma-btn-primary {
    background-color: var(--custom-color) !important;
    color: var(--bg-color) !important;
    border-radius: 10px !important;
    padding: 8px 25px !important;
    font-weight: 600 !important;
    border: none !important;
    box-shadow: var(--bg-shadow) !important;
}



.hma-card-sh {
    background-color: var(--bg-color);
}

.hma-icon-wrapper {
    background: var(--icon-cart);
    width: 44px !important;
    height: 44px !important;
    border-radius: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--bg-color) !important;
    font-size: 1.3rem !important;
    flex-shrink: 0 !important;
    box-shadow: var(--bg-shadow) !important;
}

.hma-content {
    flex-grow: 1;
    text-align: right;
    padding: 20px 0 !important;
}

/* How It Works Specifics */
.hma-step-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    /* RTL perspective */
    background: var(--icon-cart);
    color: var(--bg-color);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    border: 2px solid var(--bg-color);
}

.hma-card-title {
    font-weight: 400 !important;
    font-size: 1rem;
    color: var(--black-color);
    margin-bottom: 4px;
}

.hma-card-desc {
    font-size: clamp(14px, 1.2vw, 16px) !important;
    color: var(--title-cart) !important;
    line-height: 1.4 !important;
}

/* Featured Charities Button */
.btn-hma-browse {
    background: var(--bg-color);
    color: var(--text-color);
    border: none;
    border-radius: 12px;
    padding: 8px 30px;
    font-weight: 600;
    font-size: 0.9rem;
    width: 100%;
    margin-top: 15px;
    box-shadow: var(--bg-shadow);
    transition: all 0.3s ease;
}

.btn-hma {
    border: 1px solid var(--text-color);
    border-radius: 16px;
    color: var(--text-color);
    background-color: var(--bg-cart);

}

.btn-hma-browse:hover {
    background: var(--custom-color);
    color: var(--bg-color);
}

.bg-custom-section {
    background-color: var(--bg-cart);
}

.project-price {
    color: var(--custom-color);
    font-weight: 800;
    font-size: 1.1rem;
}

.btn-view-all {
    border: 1px solid var(--custom-color);
    border-radius: 30px;
    padding: 6px 20px;
    color: var(--custom-color);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-view-all:hover {
    background: var(--custom-color);
    color: var(--bg-color) !important;
}

/* Pagination Styling */
.pagination {
    gap: 8px;
    margin-top: 2rem;
}

.pagination .page-item .page-link {
    border: none;
    background: transparent;
    color: var(--title-cart);
    font-size: 16px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px !important;
    transition: all 0.3s ease;
}

.auth-card [class*="col-"] {
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
}

.pagination .page-item.active .page-link {
    background-color: var(--icon-cart) !important;
    color: var(--bg-color) !important;
    border-radius: 12px;
}

.pagination .page-item:not(.active) .page-link:hover {
    background-color: var(--bg-cart);
    color: var(--custom-color);
}

.pagination .page-item[rel="prev"] .page-link,
.pagination .page-item[rel="next"] .page-link,
.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
    border: 1px solid var(--icon-cart) !important;
    border-radius: 12px;
    display: flex;
    align-items: center;
    padding: 8px 20px;
}

.btn-check:checked+.btn {
    background-color: var(--custom-color) !important;
    color: var(--bg-color) !important;
    border-radius: 30px !important;
    color: var(--bg-color) !important;
}

.btn-group>.btn-group:not(:first-child),
.btn-group> :not(.btn-check:first-child)+.btn,
.btn-group>.btn-group:not(:last-child),
.btn-group> :not(.btn-check:last-child)+.btn {
    border: none !important;
    margin: 0 6px !important;
    font-size: clamp(11px, 1vw, 14px) !important;
    font-weight: normal !important;
    color: var(--custom-color);
}

.btn-group,
.btn-group-vertical {
    border: 1px solid var(--custom-color) !important;
    padding: 7px 0 !important;
    border-radius: 30px !important;
    box-shadow: var(--bg-shadow) !important;
    background-color: var(--bg-color) !important;
}

.btn-check:checked+.btn .pagination .page-item.disabled .page-link {
    opacity: 0.5;
    background: transparent;
    border: 1px solid var(--icon-cart) !important;
}

@media (max-width: 576px) {
    .stats-bar {
        padding: 20px 10px;
        margin-top: 3rem;
        gap: 10px 0;
    }

    .stats-item {
        flex: 0 0 50%;
        justify-content: flex-start;
        padding: 8px 12px;
        gap: 10px;
    }

    .stats-info {
        text-align: right;
    }

    .stats-divider {
        display: none;
    }

    .hero-section {
        background-position: right !important;
        min-height: 480px;
    }

    .stats-icon-wrapper {
        width: 36px !important;
        height: 36px !important;
        font-size: 1rem !important;
    }

    .stats-number {
        font-size: 16px !important;
    }

    .stats-label {
        font-size: 12px !important;
    }
}

/*--------------------------------------------------------------
# Unified Table & Filter Design System
--------------------------------------------------------------*/

.hma-table-section {
    background: var(--img-auth) center/cover no-repeat;
    min-height: 100vh;
    padding: 2rem 0;
}

.hma-filter-card {
    background: var(--bg-color);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--hma-filter-shadow) !important;
    margin-bottom: 2rem;
    border: none;
}

.hma-chart-container {
    height: 280px;
}

.hma-table-card {
    background: var(--bg-color);
    border-radius: 24px;
    box-shadow: var(--hma-table-shadow) !important;
    border: none;
    overflow: hidden;
}


/* Filter Input Styling */
.hma-filter-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--black-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: flex-start;
    /* Ensures all inputs align despite label length */
}

.hma-filter-group {
    position: relative;
    width: 100%;
}

.hma-filter-input {
    border: 1px solid var(--custom-color) !important;
    border-radius: 15px !important;
    height: 44px !important;
    padding-right: 45px !important;
    /* For the icon */
    padding-left: 35px !important;
    /* For the select arrow */
    font-size: 14px !important;
    background-color: var(--bg-color) !important;
    color: var(--black-color) !important;
    width: 100%;
}

select.hma-filter-input {
    background-position: left 12px center !important;
    /* Move arrow to left */
    background-size: 16px 12px !important;
}

.hma-filter-icon-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid var(--custom-color);
    color: var(--custom-color);
    pointer-events: none;
}

.hma-filter-icon {
    font-size: 18px;
}

/* Table Styling */
.hma-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

table> :not(caption)>*>th {
    color: var(--black-color);
    font-weight: 600;
    font-size: 13px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--icon-cart);
    background-color: var(--bg-table) !important;
    text-align: right;
}

table> :not(caption)>*>td {
    font-size: clamp(10px, 1vw, 14px) !important;
}

.table-striped>tbody>tr:nth-of-type(odd)>* {
    background-color: var(--bg-color) !important;
    --bs-table-bg-type: var(--bg-color) !important;
}

.hma-table tbody td {
    padding: 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--icon-cart);
    color: var(--black-color);
    font-size: 12px;
    font-weight: 500;
}

/* Status Badges */
.hma-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    background-color: var(--bg-color);
    color: var(--custom-color);
}

.hma-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--custom-color);
}

/* Tag Pills */
.hma-tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 12px;
    border: 1px solid var(--border-muted);
    font-size: 12px;
    color: var(--custom-color);
    background-color: var(--bg-color);
}

/* Action Button */
.hma-icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--custom-color);
    background-color: transparent;
    border: none;
    transition: background-color 0.2s;
}

.hma-icon-btn:hover {
    background-color: var(--muted-bg);
}

/* Pagination Custom */
.hma-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--bg-table);
}

.hma-page-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-muted);
    background-color: var(--bg-color);
    color: var(--text-muted-dark);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.hma-page-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    color: var(--muted-text);
    text-decoration: none;
}

.hma-page-number.active {
    background-color: var(--bg-accent);
    color: var(--custom-color);
}

.hma-export-btn {
    border: 1px solid var(--custom-color) !important;
    border-radius: 20px !important;
    background-color: var(--bg-color) !important;
    color: var(--custom-color) !important;
    font-weight: 600 !important;
    padding: 6px 24px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: clamp(10px, 1vw, 14px) !important;
    border-width: 1.5px !important;
}

.hma-export-btn:hover {
    background-color: var(--custom-color) !important;
    color: var(--bg-color) !important;
}

.hma-export-btn i {
    font-size: 18px;
}

.responsive-filter-wrapper {
    position: relative;
    z-index: 20;
    margin-top: -10px;
}

.responsive-stats-section {
    margin-top: 0 !important;
}

@media (min-width: 768px) {
    .responsive-filter-wrapper {
        position: absolute !important;
        bottom: -130px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin-top: 0;
    }

    .responsive-stats-section {
        margin-top: 80px !important;
    }
}

@media (min-width: 992px) {
    .col-20 {
        width: 20%;
        flex: 0 0 20%;
        max-width: 20%;
    }
}