html, body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    color: #1e293b;
    background-color: #ffffff;
}

/* Causes Section */
.causes-sect {
    display: flex;
    flex-direction: column;
    padding: 50px 20px 60px;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.heading {
    font-weight: 800;
    color: #0f172a; 
    font-size: 2.5rem; 
    line-height: 1.25;
    width: 100%;
    text-align: center;
    margin-bottom: 18px;
    letter-spacing: -0.5px;
    animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#upper-sect {
    margin-bottom: 45px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.causes-para {
    font-size: 1.1rem;
    line-height: 1.8;
    width: 60vw;
    max-width: 860px;
    color: #475569;
    text-align: center;
    animation: fadeIn 0.8s ease-in-out;
}

/* Section Tag / Badge */
.section-tag-wrapper {
    margin-bottom: 12px;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 16px;
    background: rgba(0, 123, 255, 0.08);
    color: #007bff;
    border: 1px solid rgba(0, 123, 255, 0.2);
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* Featured Causes Section */
.featured {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.featured-causes-div {
    padding: 10px 0;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    box-sizing: border-box;
}

/* Modern Cause Box Styling */
.cause-box {
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.04), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
    text-align: left;
    height: 100%;
    box-sizing: border-box;
}

.cause-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.12), 0 10px 15px -5px rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 123, 255, 0.3);
}

/* Image Wrapper & Badges */
.cause-image-wrapper {
    position: relative;
    width: 100%;
    height: 210px;
    overflow: hidden;
    background-color: #f1f5f9;
}

.cause-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.cause-box:hover .cause-image {
    transform: scale(1.06);
}

.cause-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 0.74rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    z-index: 2;
}

.badge-animal {
    background: rgba(254, 243, 199, 0.95);
    color: #b45309;
    border: 1px solid rgba(217, 119, 6, 0.25);
}

.badge-edu {
    background: rgba(219, 234, 254, 0.95);
    color: #1d4ed8;
    border: 1px solid rgba(37, 99, 235, 0.25);
}

.badge-hunger {
    background: rgba(254, 226, 226, 0.95);
    color: #b91c1c;
    border: 1px solid rgba(220, 38, 38, 0.25);
}

.badge-senior {
    background: rgba(243, 232, 255, 0.95);
    color: #7e22ce;
    border: 1px solid rgba(147, 51, 234, 0.25);
}

.tax-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.95);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2;
}

/* Card Content Area */
.cause-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    box-sizing: border-box;
}

.cause-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8rem;
}

.cause-description {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.55;
    margin: 0 0 18px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

/* Progress Section */
.cause-progress-wrapper {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 18px;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.stat-group {
    display: flex;
    flex-direction: column;
}

.stat-group.text-right {
    text-align: right;
}

.stat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 0.95rem;
    font-weight: 700;
}

.raised-val {
    color: #059669;
}

.goal-val {
    color: #334155;
}

.percent-badge {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid rgba(5, 150, 105, 0.2);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
}

.progress-bar {
    width: 100%;
    background-color: #e2e8f0;
    height: 8px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin: 0;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #06b6d4 100%);
    border-radius: 10px;
    transition: width 0.8s ease-in-out;
}

/* Action Area */
.cause-action {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
}

.direct-donate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 16px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 10px;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.22);
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.direct-donate-btn:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.35);
    color: #ffffff !important;
}

.direct-donate-btn i {
    color: #ff4757;
    transition: transform 0.25s ease;
}

.direct-donate-btn:hover i {
    transform: scale(1.2);
}

.donate-form {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .featured-causes-div {
        grid-template-columns: repeat(2, 1fr);
        max-width: 800px;
        gap: 20px;
    }

    .causes-para {
        width: 75vw;
    }
}

@media (max-width: 768px) {
    .causes-sect {
        padding: 35px 15px 45px;
    }

    .featured-causes-div {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 440px;
        gap: 18px;
    }

    .heading {
        font-size: 2rem;
        line-height: 1.25;
        margin-bottom: 14px;
    }

    .causes-para {
        width: 100%;
        font-size: 0.95rem;
        line-height: 1.6;
    }

    #upper-sect {
        margin-bottom: 30px;
    }

    .cause-image-wrapper {
        height: 200px;
    }

    .cause-title {
        font-size: 1.1rem;
        min-height: auto;
    }
}

@media (max-width: 480px) {
    .heading {
        font-size: 1.7rem;
    }

    .causes-para {
        font-size: 0.9rem;
    }

    .cause-content {
        padding: 16px;
    }
}

/* scroll to top button */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000; /* Ensure the button is above other elements */
    overflow: hidden; /* Prevent overflow from causing extra space */
}

.scroll-btn {
    background-color: #007bff; /* Blue background */
    color: white;
    border: none;
    padding: 15px;
    border-radius: 50%; /* Makes the button circular */
    cursor: pointer;
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.scroll-btn:hover {
    background-color: #0056b3; /* Darker blue on hover */
}

.scroll-btn i {
    font-size: 16px;
}

/* Responsive Scroll Button for smaller screens */
@media (max-width: 400px) {
    .scroll-to-top {
        bottom: 15px;
        left: 15px;
    }

    .scroll-btn {
        padding: 12px;
        font-size: 18px;
    }

    .scroll-btn i {
        font-size: 14px;
    }
}

/* Whatsapp widget responsiveness */
.elfsight-app-8eef5ff3-8280-4b10-a0cd-810ec58eb551 {
    position: fixed;
    bottom: 60px;
    right: 20px;
    z-index: 999;
    max-width: 100%; /* Ensure widget doesn't exceed screen width */
    overflow: hidden; /* Prevent any overflow */
}

/* Responsive adjustment for WhatsApp widget */
@media (max-width: 400px) {
    .elfsight-app-8eef5ff3-8280-4b10-a0cd-810ec58eb551 {
        bottom: 50px;
        right: 15px;
        max-width: 95%; /* Adjust for smaller screens */
    }
}

/* Prevent horizontal overflow caused by any elements */
body {
    overflow-x: hidden; /* Disable horizontal scrolling to fix extra space */
}
