/* Punjab Floods Donation Page - Main Styles */

/* ==================== HSL Color System ==================== */
:root {
    /* Saffron variations - Warm CTA color */
    --saffron-dark: hsl(20, 100%, 45%);
    --saffron-base: hsl(20, 100%, 61%);
    --saffron-light: hsl(20, 100%, 75%);

    /* Brand blue variations - Structural/trust elements */
    --brand-blue-dark: hsl(200, 90%, 35%);
    --brand-blue-base: hsl(200, 90%, 47%);
    --brand-blue-light: hsl(200, 90%, 65%);

    /* Trust blue - Deep blue for authority */
    --trust-blue-dark: hsl(224, 64%, 25%);
    --trust-blue-base: hsl(224, 64%, 33%);
    --trust-blue-light: hsl(224, 64%, 45%);

    /* Hope green - Success/positive indicators */
    --hope-green-dark: hsl(160, 84%, 30%);
    --hope-green-base: hsl(160, 84%, 39%);
    --hope-green-light: hsl(160, 84%, 50%);

    /* Warm sand - Background neutrals */
    --warm-sand-base: hsl(60, 9%, 98%);
    --warm-sand-dark: hsl(60, 9%, 95%);

    /* Text hierarchy using HSL lightness control */
    --text-primary: hsl(0, 0%, 15%);      /* Titles - darkest */
    --text-secondary: hsl(0, 0%, 40%);    /* Body text */
    --text-tertiary: hsl(0, 0%, 60%);     /* De-emphasized text */

    /* Shadow colors */
    --shadow-light: hsla(0, 0%, 0%, 0.06);
    --shadow-medium: hsla(0, 0%, 0%, 0.1);
    --shadow-dark: hsla(0, 0%, 0%, 0.15);
}

/* Base Typography */
* {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Text Hierarchy Utility Classes */
.text-primary {
    color: var(--text-primary) !important;
}

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

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

.font-display {
    font-family: 'Playfair Display', serif;
}

/* Hide scrollbar but keep functionality */
::-webkit-scrollbar { display: none; }
html, body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* ==================== Animations ==================== */

/* Pulse animation for CTA */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 hsla(20, 100%, 61%, 0.7); }
    50% { box-shadow: 0 0 0 10px hsla(20, 100%, 61%, 0); }
}

.pulse-cta {
    animation: pulse-glow 2s infinite;
}

/* Badge glow animation for Popular badge */
@keyframes badge-glow {
    0%, 100% {
        box-shadow: 0 0 8px hsla(20, 100%, 61%, 0.4),
                    0 0 16px hsla(20, 100%, 61%, 0.2);
    }
    50% {
        box-shadow: 0 0 12px hsla(20, 100%, 61%, 0.6),
                    0 0 24px hsla(20, 100%, 61%, 0.3);
    }
}

.badge-glow {
    animation: badge-glow 2.5s ease-in-out infinite;
}

/* Counter animation */
@keyframes count-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.count-animate {
    animation: count-up 0.6s ease-out;
}

/* Fade-in animation for scroll-triggered elements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Staggered delay for sequential fade-ins */
.animate-on-scroll:nth-child(1) { animation-delay: 0s; }
.animate-on-scroll:nth-child(2) { animation-delay: 0.1s; }
.animate-on-scroll:nth-child(3) { animation-delay: 0.2s; }
.animate-on-scroll:nth-child(4) { animation-delay: 0.3s; }
.animate-on-scroll:nth-child(5) { animation-delay: 0.4s; }
.animate-on-scroll:nth-child(6) { animation-delay: 0.5s; }

/* Modal fade-in */
@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-fade-in {
    animation: modalFadeIn 0.2s ease-out;
}

/* Sticky CTA slide-up */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

/* Loading spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid hsla(0, 0%, 100%, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

/* ==================== FAQ Accordion ==================== */

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
    opacity: 0;
}

.faq-content.open {
    opacity: 1;
}

.faq-content p {
    padding-top: 0.5rem;
    padding-bottom: 1.5rem;
}

/* ==================== Image Carousel ==================== */

.image-carousel {
    position: relative;
    overflow: hidden;
}

.carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.carousel-image.active {
    opacity: 1;
    position: relative;
}

.carousel-progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: hsla(0, 0%, 100%, 0.3);
    z-index: 10;
}

.carousel-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--saffron-base), var(--saffron-dark));
    width: 0%;
    transition: width 0.1s linear;
}

.carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: hsla(0, 0%, 100%, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: hsl(0, 0%, 100%);
    width: 24px;
    border-radius: 4px;
}

/* ==================== Custom Amount Section ==================== */

.custom-amount-collapsed {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease-out, opacity 0.3s ease-out, margin 0.3s ease-out;
    margin-bottom: 0 !important;
}

.custom-amount-expanded {
    max-height: 200px;
    opacity: 1;
    transition: max-height 0.4s ease-in, opacity 0.3s ease-in 0.1s, margin 0.3s ease-in;
}

.custom-amount-content {
    transform: translateY(-10px);
    transition: transform 0.3s ease-out 0.1s;
}

.custom-amount-expanded .custom-amount-content {
    transform: translateY(0);
}

/* ==================== Glassmorphic Effects ==================== */

/* Animated gradient backgrounds */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* True glassmorphism: semi-transparent gradients + backdrop blur */
.glass-gradient-amber {
    background: linear-gradient(-45deg,
        hsla(33, 95%, 44%, 0.75),
        hsla(20, 88%, 40%, 0.80),
        hsla(12, 67%, 34%, 0.85),
        hsla(16, 47%, 28%, 0.90));
    background-size: 400% 400%;
    animation: gradientShift 18s ease-in-out infinite;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-gradient-premium {
    background: linear-gradient(-45deg,
        hsla(268, 69%, 50%, 0.75),
        hsla(268, 69%, 42%, 0.80),
        hsla(268, 67%, 35%, 0.85),
        hsla(161, 88%, 20%, 0.80),
        hsla(161, 93%, 24%, 0.85));
    background-size: 400% 400%;
    animation: gradientShift 20s ease-in-out infinite;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Text shadows for better readability */
.glass-text-shadow {
    text-shadow: 0 1px 3px hsla(0, 0%, 0%, 0.25), 0 1px 1px hsla(0, 0%, 0%, 0.15);
}

.subtle-text-shadow {
    text-shadow: 0 1px 2px hsla(0, 0%, 0%, 0.08);
}

/* ==================== Depth & Layered Shadows ==================== */

/* Small shadow for regular stats and cards */
.stat-card-shadow-sm {
    box-shadow:
        0 2px 4px var(--shadow-medium),
        0 1px 2px var(--shadow-light),
        inset 0 1px 0 hsla(0, 0%, 100%, 0.1);
}

/* Medium shadow for important stats */
.stat-card-shadow-md {
    box-shadow:
        0 4px 6px hsla(0, 0%, 0%, 0.12),
        0 2px 4px hsla(0, 0%, 0%, 0.08),
        inset 0 1px 0 hsla(0, 0%, 100%, 0.15);
}

/* Large shadow for critical/urgent stats */
.stat-card-shadow-lg {
    box-shadow:
        0 10px 15px var(--shadow-dark),
        0 4px 6px var(--shadow-medium),
        inset 0 2px 0 hsla(0, 0%, 100%, 0.2);
}

/* Hover shadow for interactive elements */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow:
        0 12px 20px var(--shadow-dark),
        0 6px 8px var(--shadow-medium),
        inset 0 2px 0 hsla(0, 0%, 100%, 0.2);
}

/* ==================== Horizontal Scrolling Gallery ==================== */

.gallery-scroll-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
}

.gallery-scroll-container::-webkit-scrollbar {
    display: none;
}

.gallery-scroll-container:active {
    cursor: grabbing;
}

.gallery-scroll-inner {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    width: max-content;
}

.gallery-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

.gallery-group-row {
    display: flex;
    gap: 10px;
}

.gallery-item {
    border-radius: 15px;
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.3s ease, opacity 0.2s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Uniform gallery item size */
.gallery-item-uniform {
    width: 300px;
    height: 220px;
    border-radius: 15px;
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.gallery-item-uniform:hover {
    transform: scale(1.02);
}

.gallery-item-uniform img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .gallery-item-uniform {
        width: 240px;
        height: 180px;
    }
}