/* =========================================
   1. CORE PHYSICS & VARIABLES
   ========================================= */
:root {
    /* The "Apple" Glass Formula */
    --glass-surface: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-highlight: rgba(255, 255, 255, 0.9);
    
    /* Brand Colors */
    --primary-blue: #4A6C9B;
    --primary-accent: #6f8ec3;
    --deep-blue: #1E3057;
    
    /* Cinematic Physics */
    --spring-bounce: cubic-bezier(0.34, 1.56, 0.64, 1); /* High energy pop */
    --smooth-flow: cubic-bezier(0.33, 1, 0.68, 1);      /* Elegant slide */
}

/* [FIX] Prevent Layout Shift */
html {
    overflow-y: scroll;
}

/* Premium Selection Color */
::selection {
    background: var(--primary-blue);
    color: white;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased; /* Crisp text rendering */
}

/* =========================================
   2. CINEMATIC AURORA BACKGROUND
   ========================================= */
body {
    background-color: #f0f4f8;
    /* A deep, moving light show */
    background-image: 
        radial-gradient(at 0% 0%, hsla(210,80%,85%,1) 0, transparent 50%), 
        radial-gradient(at 100% 0%, hsla(230,80%,90%,1) 0, transparent 50%), 
        radial-gradient(at 50% 100%, hsla(200,80%,92%,1) 0, transparent 60%);
    background-size: 180% 180%;
    min-height: 100vh;
    animation: auroraDrift 15s ease-in-out infinite alternate;
    overflow-x: hidden;
}

@keyframes auroraDrift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 50% 100%; }
}

/* =========================================
   3. MASTER LAYOUT SYSTEM
   ========================================= */
.hidden {
    display: none !important;
}

.main-container {
    padding-top: 140px;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center; /* Ensures perfect centering */
    padding-bottom: 100px;
    perspective: 1000px; /* Enables 3D depth */
}

/* Section Centering */
#section-about,
#section-get-supplies,
#section-donate,
#section-support {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* [NEW FIX] This makes your new container center its children */
.get-supplies-cards-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center; 
}

.donate-cards-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center; /* Locks donate cards to center */
    gap: 50px;
}

/* =========================================
   4. THE "DIAMOND" GLASS SYSTEM
   ========================================= */
/* Applying the premium texture to all cards */
.navbar, .about-card, .form, .donate-wheelchair-card, 
.donate-shower-chair-card, .donate-crutches-card, 
.donate-total-card, .get-supplies-selection-card, .get-supplies-form-card,
.schedule-pickup-card, .donate-confirmation-card, .get-supplies-confirmation-card {
    background: var(--glass-surface);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-highlight); /* Top highlight simulates light source */
    border-radius: 40px;
    
    /* The "Floating" Shadow - Soft & Deep */
    box-shadow: 
        0 20px 40px -10px rgba(31, 38, 135, 0.1),
        0 1px 2px rgba(255, 255, 255, 0.5) inset;
        
    transition: all 0.6s var(--spring-bounce);
    transform-style: preserve-3d;
}

/* --- THE "SOFT GLOW" INTERACTION --- */
.about-card:hover, .form:hover, .donate-wheelchair-card:hover, 
.donate-shower-chair-card:hover, .donate-crutches-card:hover, 
.get-supplies-selection-card:hover, .get-supplies-form-card:hover, .schedule-pickup-card:hover, 
.donate-confirmation-card:hover, .get-supplies-confirmation-card:hover {
    transform: translateY(-12px) scale(1.02);
    background: rgba(255, 255, 255, 0.75); /* Brightens up */
    border-color: #fff;
    
    /* The Soft Aura */
    box-shadow: 
        0 30px 60px -12px rgba(74, 108, 155, 0.25), /* Blue glow */
        0 0 0 1px rgba(255, 255, 255, 0.9) inset;    /* Inner Rim */
}

/* =========================================
   5. FLOATING NAVBAR
   ========================================= */
.navbar {
    width: auto;
    min-width: 550px;
    height: 70px;
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5000;
    
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border-radius: 100px;
    
    /* Slide in from top */
    animation: navDrop 1.2s var(--spring-bounce) forwards;
}

@keyframes navDrop {
    from { transform: translate(-50%, -150%); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

.nav-btn {
    background: transparent;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    color: var(--deep-blue);
    cursor: pointer;
    transition: all 0.3s var(--smooth-flow);
    position: relative;
    overflow: hidden;
}

/* Nav Hover: A soft pill background appears */
.nav-btn:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    color: var(--primary-blue);
}

/* =========================================
   6. CARD & FORM GEOMETRY
   ========================================= */
.about-card, .form, .donate-wheelchair-card, 
.donate-shower-chair-card, .donate-crutches-card, .donate-total-card, 
.get-supplies-selection-card, .get-supplies-form-card, .schedule-pickup-card, 
.donate-confirmation-card, .get-supplies-confirmation-card {
    width: 90%; 
    max-width: 900px;
    padding: 60px;
    text-align: center;
    margin-bottom: 40px;
    
    /* Important for the corner controls: */
    position: relative; 
    
    /* Staggered Entrance Animation */
    opacity: 0;
    animation: revealCard 1s var(--spring-bounce) forwards 0.3s;
}

@keyframes revealCard {
    from { opacity: 0; transform: scale(0.9) translateY(60px); filter: blur(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

.form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    text-align: left;
}

/* Get Supplies form grid (3 rows x 2 columns) */
.form.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* two columns */
    gap: 20px 24px; /* row-gap column-gap */
    align-items: start;
    width: 100%;
    box-sizing: border-box;
}

.form.form-grid .form-row {
    display: flex;
    flex-direction: column;
    width: 100%; /* Ensures the row takes full cell width */
}

/* Special Case: Make the heading row span both columns */
#donate-supplies-schedule-pickup-heading,
#get-supplies-schedule-pickup-heading {
    grid-column: 1 / -1;
    text-align: center;
}

.form.form-grid .form-row label {
    font-size: 14px;
    font-weight: 700;
    color: var(--deep-blue);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

/* Input Overflow Fix */
.form.form-grid .form-row .input {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.06);
    background: rgba(255,255,255,0.9);
    font-size: 16px;
    width: 100%; /* Forces input to fit in the grid cell */
}

/* Make the actions span both columns and center the button */
.form.form-grid .form-actions {
    grid-column: 1 / -1; /* span all columns */
    display: flex;
    justify-content: center;
    margin-top: 6px;
}

/* Slightly smaller submit button variant for the form */
.form.form-grid .submit-btn {
    padding: 12px 36px;
    font-size: 18px;
    border-radius: 12px;
}

/* Responsive: collapse to single column on small screens */
@media (max-width: 760px) {
    .form.form-grid { grid-template-columns: 1fr; }

    .donate-wheelchair-card, .donate-shower-chair-card, .donate-crutches-card,
    .about-card, .get-supplies-selection-card, .get-supplies-form-card, 
    .donate-total-card, .schedule-pickup-card { padding: 30px; }
}

/* =========================================
   7. TYPOGRAPHY (Polished & Animated)
   ========================================= */
.section-heading {
    font-size: 72px;
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.1;
    
    /* Deep Gradient */
    background: linear-gradient(135deg, #1E3057 20%, #4A6C9B 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    
    text-align: center;
    margin-bottom: 50px;
    
    /* Animation */
    opacity: 0;
    animation: revealText 1s var(--smooth-flow) forwards 0.2s;
}

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

.get-supplies-heading, .get-supplies-confirmation-heading {
    font-size: 36px;
    color: var(--deep-blue);
    margin-bottom: 30px; 
    font-weight: 800;
    letter-spacing: -0.5px;
    text-align: center;

    /* Animation */
    opacity: 0;
    animation: revealText 1s var(--smooth-flow) forwards 0.25s;
}

.about-text, .donate-wheelchair-text, 
.donate-shower-chair-text, .donate-crutches-text, .support-text, 
.donate-confirmation-text, .get-supplies-confirmation-text,
.get-supplies-text, .supplies-needed-text {
    font-size: 21px;
    color: #4a5a6a; 
    line-height: 1.6;
    font-weight: 400;
    max-width: 80ch;
    margin: 0 auto 30px auto;

    /* Animation */
    opacity: 0;
    animation: revealText 1s var(--smooth-flow) forwards 0.3s;
}

/* Support text centering specific fix */
.support-text {
    text-align: center;
    font-weight: 500;
}

.donate-heading, .donate-total-heading, .donate-confirmation-heading {
    font-size: 36px;
    color: var(--deep-blue);
    margin-bottom: 15px;
    font-weight: 800;
    letter-spacing: -0.5px;
    
    /* Animation */
    opacity: 0;
    animation: revealText 1s var(--smooth-flow) forwards 0.3s;
}

/* =========================================
   8. INTERACTIVE INPUTS
   ========================================= */
.form-label {
    font-size: 16px;
    color: var(--deep-blue);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 15px;
    margin-bottom: -10px;
    opacity: 0.7;
}

.input {
    border: 2px solid transparent;
    border-radius: 25px;
    padding: 20px 25px;
    background: rgba(255, 255, 255, 0.5); /* Semi-transparent */
    font-size: 18px;
    color: var(--deep-blue);
    outline: none;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.input:focus {
    background: #fff;
    border-color: var(--primary-blue);
    transform: scale(1.02);
    box-shadow: 0 15px 30px rgba(74, 108, 155, 0.15);
}

.small { height: 65px; }
.big { height: 180px; resize: none; }

/* =========================================
   9. "PULSE" ACTION BUTTONS
   ========================================= */
.submit-btn, .donate-wheelchair-button,
.donate-shower-chair-button, .donate-crutches-button,
.donate-total-button {
    background: linear-gradient(135deg, #4A6C9B, #7aa3d9);
    color: white;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 18px 50px;
    border-radius: 100px;
    border: 1px solid rgba(255,255,255,0.2);
    cursor: pointer;
    
    /* Shadow setup */
    box-shadow: 0 10px 20px rgba(74, 108, 155, 0.3);
    transition: all 0.4s var(--spring-bounce);
    
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

/* The Pulse & Lift Effect */
@keyframes softPulse {
    0% { box-shadow: 0 0 0 0 rgba(74, 108, 155, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(74, 108, 155, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 108, 155, 0); }
}

.submit-btn:hover, .donate-wheelchair-button:hover,
.donate-shower-chair-button:hover, .donate-crutches-button:hover,
.donate-total-button:hover {
    transform: translateY(-5px) scale(1.05);
    background: linear-gradient(135deg, #5678a9, #8bb1e3);
    box-shadow: 0 20px 40px rgba(74, 108, 155, 0.4);
    animation: softPulse 2s infinite;
}

.submit-btn:active, .donate-wheelchair-button:active,
.donate-shower-chair-button:active, .donate-crutches-button:active,
.donate-total-button:active {
    transform: scale(0.95);
    animation: none;
}

/* =========================================
   10. DONATION LIST ITEMS (Clean Capsules)
   ========================================= */
.wheelchair-donated-text,
.shower-chair-donated-text,
.crutches-donated-text {
    background: #fff;
    padding: 18px 30px;
    border-radius: 20px;
    margin-bottom: 12px;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.03);
    font-weight: 500;
    color: var(--deep-blue);
    
    /* Pop in animation */
    animation: popInItem 0.4s var(--spring-bounce) forwards;
}

@keyframes popInItem {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.remove-wheelchair-button,
.remove-shower-chair-button,
.remove-crutches-button {
    background: #fff5f5;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s var(--spring-bounce);
}

.remove-wheelchair-button:hover,
.remove-shower-chair-button:hover,
.remove-crutches-button:hover {
    background: #ffcccc;
    transform: rotate(90deg) scale(1.1);
}

.trash-can-image { width: 16px; opacity: 0.6; }

/* =========================================
   11. SHATTER EXIT
   ========================================= */
.fading-out {
    animation: smoothExit 0.4s cubic-bezier(0.4, 0.0, 0.2, 1) forwards !important;
    pointer-events: none;
}

@keyframes smoothExit {
    from { 
        opacity: 1; 
        transform: scale(1); 
        filter: blur(0); 
    }
    to { 
        opacity: 0; 
        transform: scale(0.98); 
        filter: blur(12px);
    }
}

/* =========================================
   12. QUANTITY CONTROLS (CORNER LAYOUT)
   ========================================= */

/* The Container that moves to the corner */
.quantity-wrapper {
    position: absolute; /* Detaches from the center flow */
    bottom: 30px;       /* Stick to bottom */
    right: 30px;        /* Stick to right */
    
    display: flex;       
    align-items: center; 
    gap: 5px;            
    
    /* Optional: A small glass pill shape behind the buttons */
    background: rgba(255, 255, 255, 0.4); 
    padding: 5px 10px;
    border-radius: 50px;
}

/* On Mobile: Move them back to center so they fit */
@media (max-width: 760px) {
    .quantity-wrapper {
        position: relative;
        bottom: auto;
        right: auto;
        justify-content: center;
        margin-top: 20px;
    }
}

/* The Buttons */
.donate-wheelchair-increase-button, 
.donate-wheelchair-decrease-button,
.donate-shower-chair-increase-button,
.donate-shower-chair-decrease-button,
.donate-crutches-increase-button,
.donate-crutches-decrease-button {
    background: #e5f6ff;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    transition: all 0.3s var(--spring-bounce);
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.donate-wheelchair-increase-button:hover, 
.donate-wheelchair-decrease-button:hover,
.donate-shower-chair-increase-button:hover, 
.donate-shower-chair-decrease-button:hover,
.donate-crutches-increase-button:hover, 
.donate-crutches-decrease-button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.donate-wheelchair-increase-button:active, 
.donate-wheelchair-decrease-button:active,
.donate-shower-chair-increase-button:active, 
.donate-shower-chair-decrease-button:active,
.donate-crutches-increase-button:active, 
.donate-crutches-decrease-button:active {
    transform: scale(0.95);
}

.up-arrow-image, .down-arrow-image {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.donate-quantity {
    display: inline-block;
    font-size: 24px;
    font-weight: 800;
    color: var(--deep-blue);
    min-width: 30px;
    margin: 0 5px;
}

/* =========================================
   13. GET SUPPLIES SELECTION (VERTICAL FULL WIDTH)
   ========================================= */

/* The container for the buttons inside Card 1 */
.get-supplies-button-container {
    display: flex;
    flex-direction: column; /* Stack them vertically */
    gap: 15px; /* Space between buttons */
    width: 100%;
    margin: 30px 0 10px 0;
}

/* The Selection Buttons (Full Width Pill Shape) */
.get-wheelchair-button, 
.get-shower-chair-button, 
.get-crutches-button {
    background: white;
    border: 2px solid transparent;
    border-radius: 20px;
    padding: 18px 25px;
    
    font-size: 18px;
    font-weight: 600;
    color: var(--deep-blue);
    
    /* Layout to stretch and space items */
    width: 100%;
    display: flex;
    justify-content: space-between; /* Text Left, Image Right */
    align-items: center;
    
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: all 0.3s var(--spring-bounce);
}

/* Hover Effect for Selection Buttons */
.get-wheelchair-button:hover, 
.get-shower-chair-button:hover, 
.get-crutches-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(74, 108, 155, 0.15);
    border-color: rgba(74, 108, 155, 0.2);
}

/* Click Effect */
.get-wheelchair-button:active, 
.get-shower-chair-button:active, 
.get-crutches-button:active {
    transform: scale(0.98);
}

/* The Checkbox Icon */
.check-box-image {
    width: 24px;
    height: 24px;
    opacity: 0.8;
}

/* Text above the buttons */
.supplies-needed-text {
    font-weight: 700;
    color: var(--deep-blue);
    margin-bottom: 0px;
    text-align: left;
    margin-left: 5px;
}