/* ===== CUSTOM PROPERTIES ===== */
:root {
    --primary-color: #FF6B35;
    --secondary-color: #2E86AB;
    --accent-color: #F18F01;
    --success-color: #06A77D;
    --warning-color: #FFC107;
    --dark-color: #2D3748;
    --light-color: #F8F9FA;
    --white: #FFFFFF;
    --text-muted: #6C757D;

    --gradient-primary: linear-gradient(135deg, #FF6B35 0%, #F18F01 100%);
    --gradient-secondary: linear-gradient(135deg, #2E86AB 0%, #06A77D 100%);
    --gradient-hero: linear-gradient(135deg, rgba(255, 107, 53, 0.9) 0%, rgba(241, 143, 1, 0.9) 100%);

    --font-family: 'Poppins', sans-serif;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);

    --border-radius: 0.75rem;
    --border-radius-lg: 1.5rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.7;
    color: var(--dark-color);
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* ===== UTILITY CLASSES ===== */
.fw-500 {
    font-weight: 500;
}

.fw-600 {
    font-weight: 600;
}

/* ===== CUSTOM BOOTSTRAP OVERRIDES ===== */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: var(--gradient-primary);
    filter: brightness(1.1);
}

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

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

.rounded-pill {
    border-radius: 50rem !important;
}

/* ===== NAVIGATION ===== */
.navbar {
    padding: 1rem 0;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95) !important;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    background-color: rgba(255, 255, 255, 0.98) !important;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: var(--gradient-hero), url('https://images.unsplash.com/photo-1497486751825-1233686d5d80?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    padding-top: 80px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-hero);
    z-index: 1;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out;
}

.hero-img {
    animation: fadeInRight 1s ease-out 0.3s both;
    transition: var(--transition);
}

.hero-img:hover {
    transform: scale(1.05);
}

.hero-stats {
    margin-top: 3rem;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.stat-item {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

/* ===== FLOATING SHAPES ===== */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 0;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 100px;
    height: 100px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.shape-3 {
    width: 80px;
    height: 80px;
    bottom: 20%;
    left: 60%;
    animation-delay: 4s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* ===== FEATURE CARDS ===== */
.feature-card {
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 107, 53, 0.1),
            transparent);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
    left: 100%;
}

.feature-icon {
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover .feature-icon i {
    transform: scale(1.2);
}

/* ===== TESTIMONIALS ===== */
.testimonial-card {
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.testimonial-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.testimonial-card:hover::after {
    transform: scaleX(1);
}

.avatar {
    font-size: 1.2rem;
    font-weight: 700;
}

/* ===== COUNTER ANIMATION ===== */
.counter {
    font-size: 2.5rem;
    font-weight: 800;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== SCROLL ANIMATIONS ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ===== HOVER EFFECTS ===== */
.btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3rem;
    }
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-section {
        background-attachment: scroll;
    }

    .display-4 {
        font-size: 2.2rem;
    }

    .display-5 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
        text-align: center;
    }

    .hero-content {
        text-align: center;
    }

    .hero-stats {
        margin-top: 2rem;
    }

    .counter {
        font-size: 2rem;
    }

    .feature-card {
        margin-bottom: 2rem;
    }

    .navbar-brand {
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .lead {
        font-size: 1rem;
    }

    .btn-lg {
        padding: 0.75rem 2rem;
        font-size: 1rem;
    }

    .display-5 {
        font-size: 1.5rem;
    }

    .py-5 {
        padding: 3rem 0 !important;
    }
}

/* ===== LOADING ANIMATION ===== */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loading.fade-out {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* ===== SELECTION STYLES ===== */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}

/* ===== ACCESSIBILITY ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== FOCUS STYLES ===== */
button:focus,
.btn:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== PRINT STYLES ===== */
@media print {

    .navbar,
    .floating-shapes,
    .btn {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    .hero-section {
        background: none !important;
        color: black !important;
    }
}

/* ===== DONATION PAGE SPECIFIC STYLES ===== */

/* Donation Form Enhancements */
.donation-form {
    position: relative;
}

.donation-form::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius-lg);
    z-index: -1;
    opacity: 0.1;
}

/* Amount Selection Buttons */
.btn-check:checked+.btn-outline-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

/* Impact Cards */
.impact-card {
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.impact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.impact-card .icon-wrapper {
    transition: var(--transition);
}

.impact-card:hover .icon-wrapper {
    transform: scale(1.1);
}

/* Payment Methods */
.payment-method {
    transition: var(--transition);
    cursor: pointer;
    padding: 1rem;
    border-radius: var(--border-radius);
}

.payment-method:hover {
    background-color: var(--light-color);
    transform: translateY(-2px);
}

/* Help Cards */
.help-card {
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.help-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.help-card .help-icon i {
    transition: var(--transition);
}

.help-card:hover .help-icon i {
    transform: scale(1.2);
}

/* Donor Tiers */
.donor-tier {
    transition: var(--transition);
    cursor: pointer;
}

.donor-tier:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

/* Transparency Chart */
.progress-stack .progress {
    height: 30px;
    border-radius: 15px;
    background-color: rgba(0, 0, 0, 0.1);
}

.progress-stack .progress-bar {
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    padding-left: 1rem;
    transition: width 2s ease-in-out;
}

/* FAQ Section */
.accordion-button {
    background: transparent;
    border: none;
    box-shadow: none;
}

.accordion-button:not(.collapsed) {
    background: var(--gradient-primary);
    color: white;
}

.accordion-button:focus {
    box-shadow: none;
}

.accordion-item {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Form Enhancements */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.25);
}

/* Alert Customization */
.alert-info {
    background: linear-gradient(45deg, rgba(46, 134, 171, 0.1), rgba(6, 167, 125, 0.1));
    border: 1px solid rgba(46, 134, 171, 0.2);
    border-left: 4px solid var(--secondary-color);
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .donation-form {
        padding: 2rem !important;
    }

    .payment-methods {
        padding: 2rem !important;
    }

    .impact-card,
    .help-card,
    .donor-tier {
        margin-bottom: 1.5rem;
    }
}

/* Loading States */
.btn[disabled] {
    position: relative;
    color: transparent;
}

.btn[disabled]::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}