/* ===== FIND PAGE - MAP-CENTRIC FULL-SCREEN LAYOUT ===== */
/* Complete redesign with floating glass search panel */

/* ===== BASE LAYOUT ===== */
.find-dashboard {
    min-height: 100vh;
    width: 100%;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

/* ===== FULL-SCREEN MAP CONTAINER ===== */
.map-fullscreen-container {
    position: relative;
    width: 100%;
    height: 100dvh;
    overflow: hidden;
}

.map-canvas {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.map-placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Map Grid Animation */
.map-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 245, 212, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 245, 212, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.grid-pulse {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%,
        rgba(0, 245, 212, 0.1) 0%,
        transparent 50%
    );
    animation: gridPulse 4s ease-in-out infinite;
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

/* Map Markers */
.map-markers {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.map-marker {
    position: absolute;
    z-index: 10;
    cursor: pointer;
    pointer-events: auto;
}

.marker-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.map-marker:hover .marker-icon {
    transform: scale(1.2);
    box-shadow: 0 8px 30px rgba(230, 57, 70, 0.4);
}

.marker-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 48px;
    height: 48px;
    border: 2px solid rgba(230, 57, 70, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: markerPulse 2s ease-out infinite;
}

@keyframes markerPulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}

/* Center Pin */
.map-center-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
}

.center-pin {
    display: block;
    font-size: 3rem;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
    animation: pinBounce 2s ease-in-out infinite;
}

@keyframes pinBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.center-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80px;
    height: 80px;
    border: 2px solid rgba(0, 245, 212, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ringExpand 3s ease-out infinite;
}

.center-ring.delay-1 { animation-delay: 1s; }
.center-ring.delay-2 { animation-delay: 2s; }

@keyframes ringExpand {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(3); opacity: 0; }
}

/* ===== FLOATING GLASS SEARCH PANEL ===== */
.floating-search-panel {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    width: 360px;
    max-height: calc(100vh - 3rem);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.2),
        0 8px 20px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 100;
    overflow-y: auto;
    scrollbar-width: thin;
}

.search-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.panel-branding {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-icon {
    font-size: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.1), rgba(0, 245, 212, 0.1));
    border-radius: 12px;
}

.brand-text h1 {
    font-family: var(--font-display, 'Space Grotesk', sans-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
    margin: 0;
}

.brand-text p {
    font-size: 0.8rem;
    color: var(--text-muted, #666);
    margin: 0;
}

.theme-toggle-compact {
    display: flex;
    gap: 0.25rem;
}

.theme-toggle-compact .theme-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.03);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.theme-toggle-compact .theme-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    transform: scale(1.1);
}

/* Filter Sections */
.filter-section {
    margin-bottom: 1.25rem;
}

.filter-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary, #333);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

/* Blood Type Chips */
.blood-type-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-width: 100%;
}

.filter-chip {
    padding: 0.5rem 0.875rem;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.filter-chip:hover {
    background: linear-gradient(135deg, #E63946, #C62828);
    color: white;
    border-color: transparent;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

.filter-chip.active {
    background: linear-gradient(135deg, #E63946, #7B2CBF);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

.filter-chip.universal {
    background: linear-gradient(135deg, rgba(0, 245, 212, 0.1), rgba(123, 44, 191, 0.1));
    border-color: rgba(0, 245, 212, 0.3);
}

.filter-chip.universal:hover,
.filter-chip.universal.active {
    background: linear-gradient(135deg, #00F5D4, #7B2CBF);
}

/* Location Input */
.location-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.location-input-wrapper:focus-within {
    border-color: #E63946;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

.input-icon {
    padding: 0 0.75rem;
    font-size: 1.1rem;
}

.location-input {
    flex: 1;
    padding: 0.875rem 0;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    outline: none;
}

.locate-btn {
    padding: 0.75rem;
    background: linear-gradient(135deg, #E63946, #C62828);
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.locate-btn:hover {
    background: linear-gradient(135deg, #C62828, #E63946);
    transform: scale(1.1);
}

/* Radius Slider */
.radius-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.radius-value {
    font-weight: 700;
    color: #E63946;
    font-size: 0.9rem;
}

.radius-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg,
        rgba(230, 57, 70, 0.2) 0%,
        rgba(230, 57, 70, 0.4) 50%,
        rgba(230, 57, 70, 0.2) 100%
    );
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.radius-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E63946, #7B2CBF);
    box-shadow: 0 2px 10px rgba(230, 57, 70, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.radius-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.5);
}

.radius-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-muted, #666);
    margin-top: 0.25rem;
}

/* Urgency Toggle */
.urgency-toggle-group {
    display: flex;
    gap: 0.5rem;
}

.urgency-btn {
    flex: 1;
    padding: 0.625rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.03);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.urgency-btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

.urgency-btn.active {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
    border-color: transparent;
}

.urgency-btn.emergency-btn {
    background: rgba(230, 57, 70, 0.1);
    border-color: rgba(230, 57, 70, 0.2);
    color: #C62828;
}

.urgency-btn.emergency-btn:hover,
.urgency-btn.emergency-btn.active {
    background: linear-gradient(135deg, #E63946, #C62828);
    color: white;
    animation: emergencyPulse 1.5s ease-in-out infinite;
}

@keyframes emergencyPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(230, 57, 70, 0); }
}

/* Search Action Button */
.search-action-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #E63946, #7B2CBF);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.search-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(230, 57, 70, 0.4);
}

.btn-icon {
    font-size: 1.2rem;
}

/* Quick Stats */
.quick-stats {
    display: flex;
    gap: 0.75rem;
}

.stat-badge {
    flex: 1;
    text-align: center;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.05), rgba(0, 245, 212, 0.05));
    border-radius: 12px;
}

.stat-num {
    display: block;
    font-family: var(--font-display, 'Space Grotesk', sans-serif);
    font-size: 1.25rem;
    font-weight: 800;
    color: #E63946;
}

.stat-txt {
    font-size: 0.7rem;
    color: var(--text-muted, #666);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ===== RESULTS DRAWER ===== */
.results-drawer {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 420px;
    max-height: 85vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
    z-index: 100;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.drawer-handle {
    display: none;
    justify-content: center;
    padding: 0.75rem;
    cursor: grab;
}

.handle-bar {
    width: 40px;
    height: 4px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.drawer-header h2 {
    font-family: var(--font-display, 'Space Grotesk', sans-serif);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.result-count {
    font-size: 0.85rem;
    color: var(--text-muted, #666);
    background: rgba(230, 57, 70, 0.1);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
}

.results-scroll {
    padding: 1rem;
    max-height: calc(60vh - 80px);
    overflow-y: auto;
}

.results-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Enhanced Donor Cards */
.donor-card {
    background: white;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.donor-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-color: rgba(230, 57, 70, 0.2);
}

.donor-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.donor-avatar {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.1), rgba(0, 245, 212, 0.1));
    border-radius: 50%;
}

.donor-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
}

.donor-info p {
    font-size: 0.8rem;
    color: var(--text-muted, #666);
    margin: 0;
}

.donor-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.detail-item {
    font-size: 0.8rem;
}

.detail-label {
    color: var(--text-muted, #666);
}

.detail-value {
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
}

.contact-button {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #E63946, #7B2CBF);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.3);
}

/* Desktop Menu Positioning */
.desktop-menu {
    position: fixed;
    z-index: 200;
}

.desktop-menu.menu-container-left {
    top: 1rem;
    left: 1rem;
}

.desktop-menu.menu-container {
    top: 1rem;
    right: 1rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .floating-search-panel {
        width: 320px;
    }

    .results-drawer {
        width: 360px;
    }
}

@media (max-width: 768px) {
    .floating-search-panel {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 50vh;
        border-radius: 24px 24px 0 0;
        padding: 1rem;
    }

    .results-drawer {
        width: 100%;
        max-width: 420px;
    }

    .drawer-handle {
        display: flex;
    }

    .blood-type-chips {
        justify-content: center;
    }

    .desktop-menu {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .floating-search-panel {
        width: calc(100% - 32px);
    }

    .results-drawer {
        display: none;
    }
}

/* ===== DARK MODE ===== */
body.dark-mode .floating-search-panel,
body.dark-mode .results-drawer {
    background: rgba(30, 35, 45, 0.98);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .brand-text h1,
body.dark-mode .drawer-header h2,
body.dark-mode .donor-info h3,
body.dark-mode .detail-value {
    color: #f1f5f9;
}

body.dark-mode .filter-chip {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

body.dark-mode .location-input-wrapper {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .location-input {
    color: #f1f5f9;
}

body.dark-mode .donor-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

/* ===== LEGACY STYLES ===== */
/* Container styles are now in scrollable-container.css */

/* Floating Glass Search Panel */
.search-form {
    background: var(--glass-bg, rgba(255, 255, 255, 0.85)) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.3)) !important;
    box-shadow: var(--shadow-glass, 0 8px 32px rgba(0, 0, 0, 0.1)) !important;
    position: relative;
    overflow: hidden;
}

.search-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary, linear-gradient(135deg, #E63946, #00F5D4));
}

/* Filter Chips Animation */
.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(230, 57, 70, 0.1);
    border: 1px solid rgba(230, 57, 70, 0.2);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s var(--ease-out, ease-out);
    margin: 0.25rem;
}

.filter-chip:hover {
    background: var(--token-primary, #E63946);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

.filter-chip.active {
    background: var(--token-primary, #E63946);
    color: white;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
}

/* Donor Card Hover Reveal Enhancement */
.donor-card {
    position: relative;
    transition: all 0.4s var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1)) !important;
    transform-style: preserve-3d;
}

.donor-card::before {
    background: var(--gradient-primary, linear-gradient(135deg, #E63946, #00F5D4)) !important;
}

.donor-card:hover {
    transform: translateY(-8px) rotateX(2deg) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

/* Donor Avatar Glow Effect */
.donor-avatar {
    background: var(--gradient-primary, linear-gradient(135deg, #E63946, #00F5D4)) !important;
    position: relative;
}

.donor-avatar::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: var(--gradient-primary, linear-gradient(135deg, #E63946, #00F5D4));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.donor-card:hover .donor-avatar::after {
    opacity: 0.5;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.3; }
}

/* Blood Type Badge Enhancement */
.blood-type-badge {
    background: var(--token-primary, #E63946) !important;
    font-family: var(--font-display, 'Space Grotesk', sans-serif);
    position: relative;
    overflow: hidden;
}

.blood-type-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Search Button Enhancement */
.search-button {
    background: var(--gradient-primary, linear-gradient(135deg, #E63946, #00F5D4)) !important;
    position: relative;
    overflow: hidden;
}

.search-button::after {
    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.5s ease, height 0.5s ease;
}

.search-button:hover::after {
    width: 300%;
    height: 300%;
}

.search-button:hover {
    box-shadow: var(--shadow-glow-primary, 0 0 30px rgba(230, 57, 70, 0.5)) !important;
}

/* Contact Button Enhancement */
.contact-btn.primary,
.contact-button {
    background: var(--gradient-primary, linear-gradient(135deg, #E63946, #00F5D4)) !important;
    position: relative;
    overflow: hidden;
}

.contact-btn.primary:hover,
.contact-button:hover {
    box-shadow: var(--shadow-glow-primary, 0 0 25px rgba(230, 57, 70, 0.4)) !important;
}

/* Results Grid Stagger Animation */
.results-grid .donor-card,
.donor-cards .donor-card {
    opacity: 0;
    animation: cardFadeIn 0.5s ease forwards;
}

.results-grid .donor-card:nth-child(1),
.donor-cards .donor-card:nth-child(1) { animation-delay: 0ms; }
.results-grid .donor-card:nth-child(2),
.donor-cards .donor-card:nth-child(2) { animation-delay: 100ms; }
.results-grid .donor-card:nth-child(3),
.donor-cards .donor-card:nth-child(3) { animation-delay: 200ms; }
.results-grid .donor-card:nth-child(4),
.donor-cards .donor-card:nth-child(4) { animation-delay: 300ms; }
.results-grid .donor-card:nth-child(5),
.donor-cards .donor-card:nth-child(5) { animation-delay: 400ms; }
.results-grid .donor-card:nth-child(6),
.donor-cards .donor-card:nth-child(6) { animation-delay: 500ms; }

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

/* Loading Spinner Enhancement */
.loading-spinner {
    border-top-color: var(--token-primary, #E63946) !important;
    width: 50px;
    height: 50px;
}

/* Override scaling - keep everything normal size */
@media (max-height: 700px) {
    html {
        font-size: 16px !important;
    }
    .container {
        transform: none !important;
    }
}

@media (max-height: 600px) {
    html {
        font-size: 16px !important;
    }
    .container {
        transform: none !important;
    }
}

@media (max-height: 500px) {
    html {
        font-size: 16px !important;
    }
    .container {
        transform: none !important;
    }
}

/* Fix menu-toggle sizes - prevent scaling up */
.menu-toggle, .menu-toggle-left {
    width: 60px !important;
    height: 60px !important;
}

/* Specific fix for low resolution screens like 1280x720 */
@media (max-width: 1280px) and (max-height: 720px) {
    .menu-toggle, .menu-toggle-left {
        width: 50px !important;
        height: 50px !important;
    }
}

@media (max-width: 768px) {
    .menu-toggle, .menu-toggle-left {
        width: 44px !important;
        height: 44px !important;
    }
}

@media (max-width: 480px) {
    .menu-toggle, .menu-toggle-left {
        width: 40px !important;
        height: 40px !important;
    }
}

/* ===== HEADER POSITIONING ===== */
.header-section {
    position: static;
    flex-shrink: 0;
}

/* Override mobile-specific sticky positioning with higher specificity */
@media (max-width: 768px) {
    .header-section {
        position: static !important;
        top: auto !important;
        bottom: auto !important;
        z-index: auto !important;
        overflow-y: visible !important;
        margin-bottom: 0 !important;
        padding: clamp(0.2rem, 1vh, 0.6rem) clamp(0.2rem, 1.2vw, 0.6rem) !important;
    }
}

@media (max-width: 480px) {
    .container .header-section {
        position: static !important;
        top: auto !important;
        bottom: auto !important;
        z-index: auto !important;
        overflow-y: visible !important;
    }
    
    body .container .header-section {
        position: static !important;
        top: auto !important;
        bottom: auto !important;
        z-index: auto !important;
        overflow-y: visible !important;
    }
}

/* ===== RESPONSIVE TYPOGRAPHY ===== */
.page-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.page-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    padding: 20px 40px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

/* ===== SEARCH FORM ===== */
.search-form {
    background: rgba(255, 255, 255, 0.8);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-input, .form-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(229, 57, 53, 0.2);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.search-button,
button.search-button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    color: white !important;
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    width: 100%;
    text-decoration: none !important;
}

.search-button:hover,
button.search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    color: white !important;
    text-decoration: none !important;
}

/* ===== RESULTS GRID ===== */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.donor-card {
    background: rgba(255, 255, 255, 0.8);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.donor-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.donor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.donor-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.donor-avatar {
    width: 60px;
    height: 60px;
    min-width: 60px;
    min-height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-right: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.donor-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.donor-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.donor-details {
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 5px 0;
}

.detail-label {
    font-weight: 600;
    color: var(--text-primary);
}

.detail-value {
    color: var(--text-secondary);
}

.contact-button,
button.contact-button {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark)) !important;
    color: white !important;
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    width: 100%;
    text-decoration: none !important;
}

.contact-button:hover,
button.contact-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    color: white !important;
    text-decoration: none !important;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
    .main-content {
        padding: 15px 20px;
    }

    /* CRITICAL: Fix page subtitle contrast on mobile */
    .page-subtitle {
        color: var(--text-secondary) !important;
        background: transparent !important;
    }

    .search-form {
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .menu-container-left,
    .menu-container {
        display: none;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 10px 15px;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .page-subtitle {
        font-size: 1rem;
    }

    .donor-header {
        flex-direction: column;
        text-align: center;
    }

    .donor-avatar {
        margin-right: 0;
        margin-bottom: 15px;
    }
}

/* ===== FORCE WHITE TEXT ON BUTTONS ===== */
/* High specificity override to ensure white text */
.search-form .search-button,
.search-form button.search-button,
main .search-button,
main button.search-button {
    color: white !important;
    text-decoration: none !important;
}

.search-form .search-button:hover,
.search-form button.search-button:hover,
main .search-button:hover,
main button.search-button:hover {
    color: white !important;
    text-decoration: none !important;
}

.results-grid .contact-button,
.results-grid button.contact-button,
main .contact-button,
main button.contact-button {
    color: white !important;
    text-decoration: none !important;
}

.results-grid .contact-button:hover,
.results-grid button.contact-button:hover,
main .contact-button:hover,
main button.contact-button:hover {
    color: white !important;
    text-decoration: none !important;
}
/* === SEARCH RESULTS === */
.loading-results {
    text-align: center;
    padding: 3rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #C62828;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.results-header {
    margin-bottom: 2rem;
    text-align: center;
}

.results-header h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.donor-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.donor-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(198, 40, 40, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.donor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.donor-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.donor-info h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.blood-type-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    display: inline-block;
    margin-right: 0.5rem;
}

.verified-badge {
    background: #4CAF50;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.donor-rating {
    font-size: 0.9rem;
    color: #FF9800;
}

.donor-details {
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.detail-item .icon {
    margin-right: 0.5rem;
    width: 20px;
}

.donor-actions {
    display: flex;
    gap: 0.75rem;
}

.contact-btn, .view-profile-btn {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.contact-btn.primary {
    background: var(--primary-color);
    color: white;
}

.contact-btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.view-profile-btn {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.view-profile-btn:hover {
    background: var(--primary-color);
    color: white;
}

.no-results {
    text-align: center;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    margin-top: 2rem;
}

.no-results h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.expand-search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.expand-search-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .donor-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .donor-actions {
        flex-direction: column;
    }
}
