/* ===== GLOBAL RESET & BODY ===== */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
body { background: #f0f9ff; background-image: radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.03) 0%, transparent 20%), radial-gradient(circle at 90% 50%, rgba(37, 99, 235, 0.03) 0%, transparent 25%), linear-gradient(135deg, #f0f9ff 0%, #f8fafc 100%); color: #1e293b; line-height: 1.4; padding-bottom: 85px; min-height: 100vh; }

/* ===== REDUCED WHITESPACE ===== */
.pin-section { padding: 6px 16px 2px; }
.pin-input { padding: 8px 14px; font-size: 13px; }
.pin-label { font-size: 11px; }
.pin-message { font-size: 10px; margin-top: 3px; }
.search-section { padding: 4px 16px 8px; }
.search-input { padding: 8px 16px 8px 40px; font-size: 13px; }
.search-icon { left: 14px; font-size: 14px; }
.search-submit-integrated { padding: 4px 12px; font-size: 11px; }
.categories-section { margin-top: 0; }
.section-title { font-size: 14px; margin: 2px 16px 4px 16px; }
.categories-container { gap: 10px; padding: 4px 16px 10px 16px; }
.category-card { width: 100px; padding: 10px 4px; }
.category-icon { width: 60px; height: 60px; margin-bottom: 6px; }
.category-name { font-size: 10px; }

/* ===== REQUIREMENTS SECTION ===== */
.requirements-section { margin-top: 6px; }
.requirements-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 16px 10px 16px;
    flex-wrap: wrap;
    gap: 8px;
}
.submit-req-btn {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: white;
    padding: 5px 14px;
    border-radius: 40px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: 0.2s;
    cursor: pointer;
    border: none;
}
.submit-req-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(37,99,235,0.3); }

.register-helper-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 5px 14px;
    border-radius: 40px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: 0.2s;
    border: none;
    cursor: pointer;
}
.register-helper-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(16,185,129,0.3); }

.requirements-container {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding: 0 16px 16px 16px;
    scrollbar-width: thin;
    scroll-behavior: smooth;
}
.requirements-container::-webkit-scrollbar { height: 4px; }
.requirements-container::-webkit-scrollbar-track { background: #e2e8f0; border-radius: 10px; }
.requirements-container::-webkit-scrollbar-thumb { background: #2563eb; border-radius: 10px; }

.req-card {
    flex: 0 0 300px;
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #eef2f8;
    transition: transform 0.2s;
    cursor: pointer;
}
.req-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0,0,0,0.12); }
@media (max-width: 550px) { .req-card { flex: 0 0 260px; } }

.req-name-region {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 6px;
    gap: 6px;
}
.patient-name {
    font-size: 14px;
    font-weight: 800;
    color: #1e293b;
    background: #eef4ff;
    padding: 2px 10px;
    border-radius: 30px;
    display: inline-block;
}
.region-name {
    font-size: 11px;
    color: #2563eb;
    background: #dbeafe;
    padding: 2px 8px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.requirement-text {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 8px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.help-now {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #dc2626;
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 30px;
    margin-left: 8px;
    animation: pulse 1.2s infinite;
    box-shadow: 0 0 5px rgba(220,38,38,0.5);
}
.help-now i { font-size: 8px; }
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; background: #dc2626; }
    50% { transform: scale(1.05); opacity: 0.9; background: #ef4444; box-shadow: 0 0 8px rgba(220,38,38,0.8); }
    100% { transform: scale(1); opacity: 1; background: #dc2626; }
}

.contact-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.contact-link, .whatsapp-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s;
}
.contact-link { color: #1e293b; }
.contact-link i { color: #2563eb; }
.whatsapp-link { background: #25D366; color: white; }
.whatsapp-link i { color: white; }
.whatsapp-link:hover { background: #128C7E; transform: scale(1.02); }
.contact-link:hover { background: #e2e8f0; }

.expiry-bar {
    background: #e2e8f0;
    border-radius: 20px;
    height: 3px;
    overflow: hidden;
    margin-top: 6px;
}
.expiry-progress { height: 100%; border-radius: 20px; }
.expiry-info {
    font-size: 9px;
    color: #64748b;
    margin-top: 4px;
    display: flex;
    justify-content: space-between;
}

/* MODAL STYLES */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.2s, opacity 0.2s;
}
.modal-overlay.show {
    visibility: visible;
    opacity: 1;
}
.modal-content {
    background: white;
    border-radius: 32px;
    max-width: 550px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 24px 20px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.4);
}
.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 40px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}
.modal-close:hover { background: #e2e8f0; }
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #1e293b;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 24px;
    font-size: 14px;
    transition: 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.2);
}
.submit-btn {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: white;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 40px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: 0.2s;
}
.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(37,99,235,0.3); }

.modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.modal-btn {
    flex: 1;
    text-align: center;
    padding: 12px;
    border-radius: 40px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.2s;
}
.modal-btn-call {
    background: #2563eb;
    color: white;
}
.modal-btn-call:hover { background: #1e40af; transform: translateY(-2px); }
.modal-btn-wa {
    background: #25D366;
    color: white;
}
.modal-btn-wa:hover { background: #128C7E; transform: translateY(-2px); }

.modal-title { font-size: 22px; font-weight: 800; margin-bottom: 12px; color: #0f172a; padding-right: 30px; }
.modal-emergency-badge { margin-bottom: 12px; }
.modal-requirement-text { font-size: 18px; font-weight: 600; background: #f8fafc; padding: 14px; border-radius: 24px; margin: 16px 0; line-height: 1.5; color: #0f172a; }
.modal-detail-row { margin: 12px 0; display: flex; gap: 8px; font-size: 14px; color: #334155; }
.modal-detail-row i { width: 22px; color: #2563eb; }
.modal-expiry { margin-top: 16px; background: #f1f5f9; border-radius: 20px; padding: 12px; }

.pin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.pin-label { font-weight: 700; color: #2563eb; display: flex; align-items: center; gap: 5px; }
.pin-input-group { display: flex; gap: 8px; position: relative; }
.pin-input { width: 100%; border: 2px solid #e2e8f0; border-radius: 30px; background: white; transition: all 0.3s; }
.pin-input:focus { border-color: #2563eb; outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.region-hint-container { display: none; position: absolute; top: 100%; left: 0; right: 0; background: white; border-radius: 20px; margin-top: 4px; max-height: 250px; overflow-y: auto; z-index: 2000; box-shadow: 0 15px 30px -10px rgba(0,0,0,0.15); border: 1px solid #e2e8f0; }
.region-hint-item { padding: 12px 16px; cursor: pointer; border-bottom: 1px solid #f1f5f9; transition: background 0.2s; font-size: 13px; font-weight: 500; }
.region-hint-item:hover { background: #dbeafe; }
.pin-message { color: #64748b; display: flex; align-items: center; gap: 5px; padding-left: 4px; }
.pin-message i { font-size: 11px; }
.pin-message.success { color: #065f46; }
.pin-message.success i { color: #10b981; }
.search-box { position: relative; width: 100%; }
.search-input { width: 100%; border: 2px solid #e2e8f0; border-radius: 40px; background: white; outline: none; transition: all 0.3s; }
.search-input:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #2563eb; }
.search-submit-integrated { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: linear-gradient(135deg, #2563eb, #1e40af); color: white; border: none; border-radius: 30px; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 4px; opacity: 0; pointer-events: none; transition: all 0.3s; }
.search-input:focus ~ .search-submit-integrated, .search-box:hover .search-submit-integrated { opacity: 1; pointer-events: auto; }
.categories-section { overflow: hidden; }
.section-title { font-weight: 800; color: #1e293b; display: flex; align-items: center; gap: 8px; }
.section-title i { color: #2563eb; background: #dbeafe; padding: 6px; border-radius: 50%; font-size: 12px; }
.categories-container { display: flex; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #2563eb #e2e8f0; }
.categories-container::-webkit-scrollbar { height: 4px; }
.categories-container::-webkit-scrollbar-track { background: #e2e8f0; border-radius: 10px; }
.categories-container::-webkit-scrollbar-thumb { background: #2563eb; border-radius: 10px; }
.category-card { flex: 0 0 auto; background: white; border-radius: 25px; text-align: center; cursor: pointer; transition: all 0.3s ease; border: 2px solid transparent; box-shadow: 0 4px 12px -6px rgba(0,0,0,0.15); }
.category-card.selected-highlight { border-color: #dc2626; background: #fee2e2; }
.category-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -6px rgba(37,99,235,0.3); }
.category-icon img { width: 100%; height: 100%; object-fit: contain; }
.hint-container { display: none; position: absolute; top: 100%; left: 16px; right: 16px; background: white; border-radius: 20px; margin-top: 4px; max-height: 250px; overflow-y: auto; z-index: 2000; box-shadow: 0 15px 30px -10px rgba(0,0,0,0.15); border: 1px solid #e2e8f0; }
.hint-item { padding: 12px 16px; cursor: pointer; border-bottom: 1px solid #f1f5f9; display: flex; align-items: center; gap: 14px; transition: all 0.2s; font-size: 13px; }
.hint-item:hover { background: #dbeafe; }
.hint-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; }
.hint-icon img { width: 100%; height: 100%; object-fit: contain; }
.policies-section { margin: 8px 12px 4px; gap: 6px; display: flex; flex-wrap: wrap; justify-content: center; }
.policy-link { background: white; color: #4b5563; border: 1px solid #e2e8f0; padding: 4px 10px; border-radius: 25px; font-size: 9px; font-weight: 600; text-decoration: none; transition: all 0.2s; }
.policy-link:hover { background: #2563eb; color: white; }
.social-section { margin: 2px 12px 8px; gap: 6px; display: flex; flex-wrap: wrap; justify-content: center; }
.social-link { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 14px; transition: all 0.3s; text-decoration: none; }
.social-link:hover { transform: translateY(-2px) scale(1.05); }
.social-link.whatsapp { background: #25D366; }
.social-link.instagram { background: linear-gradient(45deg, #f09433, #d62976, #962fbf, #4f5bd5); }
.social-link.facebook { background: #1877f2; }
.social-link.app { background: linear-gradient(135deg, #2563eb, #1e40af); }
.footer-legal { text-align: center; padding: 6px 12px 12px; font-size: 9px; color: #64748b; }
.region-popup { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(5px); z-index: 10000; display: flex; align-items: center; justify-content: center; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.region-popup-content { background: white; border-radius: 25px; max-width: 340px; width: 85%; padding: 20px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); animation: slideUp 0.3s ease; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.region-popup-title { font-size: 16px; font-weight: 800; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.region-popup-options { max-height: 280px; overflow-y: auto; margin-bottom: 16px; }
.region-popup-option { padding: 12px; margin: 5px 0; background: #f8fafc; border-radius: 12px; cursor: pointer; border: 1px solid #e2e8f0; }
.region-popup-option:hover { background: #dbeafe; border-color: #2563eb; }
.region-popup-option-name { font-weight: 700; font-size: 14px; }
.region-popup-option-details { font-size: 11px; color: #64748b; margin-top: 4px; }
.region-popup-close { width: 100%; padding: 10px; background: #e2e8f0; border: none; border-radius: 30px; font-weight: 600; cursor: pointer; }
mark { background: #fbbf24; padding: 0 2px; border-radius: 4px; }
.loading { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #ffffff; z-index: 99999; justify-content: center; align-items: center; }
.loading.active { display: flex; }
.spinner { width: 30px; height: 30px; border: 3px solid #2563eb; border-top: 3px solid transparent; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ===== HOMEPAGE SLIDER ===== */
.homepage-slider{
    margin:16px;
    border-radius:28px;
    overflow:hidden;
    background:linear-gradient(135deg,#2563eb,#1e40af);
    box-shadow:0 8px 20px rgba(37,99,235,.25);
    padding:8px;
}
.slider-track{
    display:flex;
    overflow-x:auto;
    scroll-snap-type:x mandatory;
    scrollbar-width:none;
    scroll-behavior:smooth;
}
.slider-track::-webkit-scrollbar{
    display:none;
}
.slider-track img{
    width:100%;
    flex:0 0 100%;
    display:block;
    border-radius:20px;
    scroll-snap-align:start;
}
.slider-dots{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:6px;
    padding:10px 0 6px;
}
.dot{
    width:8px;
    height:8px;
    border-radius:50%;
    background:rgba(255,255,255,.45);
    transition:all .3s ease;
}
.dot.active{
    width:24px;
    height:8px;
    border-radius:20px;
    background:#ffffff;
}
@media (max-width:480px){
    .homepage-slider{
        margin:12px;
        border-radius:24px;
        padding:6px;
    }
    .slider-track img{
        border-radius:16px;
    }
    .app-inline-banner { margin: 6px 12px; padding: 6px 10px; }
    .app-inline-banner .banner-title { font-size: 0.7rem; }
    .req-card { flex: 0 0 260px; }
    .requirement-text { font-size: 16px; }
    .patient-name { font-size: 13px; }
    #detectLocationBtn { padding: 6px 12px; font-size: 11px; min-width: 75px; }
}

.message { position: fixed; bottom: 85px; left: 50%; transform: translateX(-50%) translateY(20px); min-width: 200px; max-width: 90%; padding: 10px 14px; border-radius: 25px; font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 8px; z-index: 9999; opacity: 0; animation: toastIn 0.3s ease forwards; box-shadow: 0 8px 20px rgba(0,0,0,0.15); }
@keyframes toastIn { to { opacity: 1; transform: translateX(-50%) translateY(0); } }
.message.hide { animation: toastOut 0.3s ease forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateX(-50%) translateY(20px); } }
.message.error { background: #fee2e2; color: #dc2626; border-left: 3px solid #dc2626; }
.message.success { background: #d1fae5; color: #065f46; border-left: 3px solid #10b981; }
.search-form { display: none; }
.app-inline-banner {
    background: linear-gradient(105deg, #ffffff 0%, #fef9e3 100%);
    border-radius: 28px;
    margin: 8px 16px 6px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    border: 1px solid #ffe4b5;
    cursor: pointer;
}
.app-inline-banner .banner-title { font-weight: 800; font-size: 0.8rem; display: flex; align-items: center; gap: 6px; }
.app-inline-banner .banner-title i { color: #2563eb; }
.app-inline-banner .arrow-icon { transition: transform 0.2s; margin-left: 2px; }
.app-inline-banner:hover .arrow-icon { transform: translateX(3px); }
.app-inline-banner .banner-tagline { font-size: 0.6rem; color: #475569; }
.app-inline-banner .close-banner { background: #f1f5f9; border: none; width: 24px; height: 24px; border-radius: 40px; cursor: pointer; color: #64748b; font-size: 10px; pointer-events: auto; }
.app-inline-banner .close-banner:hover { background: #e2e8f0; }

#detectLocationBtn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: #111;
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 8px 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
    transition: all 0.2s;
    min-width: 95px;
    justify-content: center;
}
#detectLocationBtn:hover {
    background: #333;
}
#detectLocationBtn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}
#detectLocationBtn .btn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btnSpin 0.6s linear infinite;
}
#detectLocationBtn.loading .btn-spinner {
    display: inline-block;
}
#detectLocationBtn.loading .btn-text {
    display: none;
}
#detectLocationBtn.loading i {
    display: none;
}
@keyframes btnSpin {
    to { transform: rotate(360deg); }
}

/* ===== MODAL AREA HINTS FIX - ADDED ===== */
.form-group {
    position: relative;
}

#reqAreaHints,
#helperAreaHints {
    z-index: 99999;
}

@media (max-width: 640px) {
    .region-hint-item {
        padding: 10px 14px;
        font-size: 12px;
    }
} 