/* ===== ROOT BRAND COLORS ===== */
:root {
    --purple: #7b2cbf;
    --purple-light: #9d4edd;
    --purple-dark: #5a189a;
    --orange: #f77f00;
    --orange-light: #ff9e00;
    --orange-dark: #e76f00;
    --yellow: #fcbf49;
    --yellow-light: #ffd166;
    --yellow-dark: #f4a261;
    --gradient: linear-gradient(135deg, #7b2cbf, #f77f00);
    --gradient-purple: linear-gradient(135deg, #7b2cbf, #9d4edd);
    --gradient-orange: linear-gradient(135deg, #f77f00, #ff9e00);
    --dark: #1a1a2e;
    --light: #ffffff;
    --gray: #6c757d;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #343a40;
    --success-green: #10b981;
    --warning-red: #ef4444;
    --info-blue: #3b82f6;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--light-gray);
    color: var(--dark);
    line-height: 1.5;
    padding-bottom: 70px; /* Space for bottom nav */
}

/* ===== HEADER ===== */
.mobile-header {
    position: sticky;
    top: 0;
    background: var(--light);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--medium-gray);
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-btn {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--purple);
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.menu-btn:active {
    background: var(--light-gray);
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    color: white;
}

.logo span {
    font-weight: 700;
    font-size: 18px;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.profile-icon {
    width: 40px;
    height: 40px;
    background: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--purple);
    text-decoration: none;
    font-size: 18px;
    transition: background 0.2s;
}

.profile-icon:active {
    background: var(--medium-gray);
}

/* ===== SIDEBAR ===== */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    backdrop-filter: blur(4px);
}

.sidebar-overlay.active {
    display: block;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 85%;
    max-width: 320px;
    background: var(--light);
    z-index: 1001;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-overlay.active .sidebar {
    transform: translateX(0);
}

.sidebar-header {
    padding: 20px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--medium-gray);
}

.close-sidebar {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray);
    padding: 8px;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
}

.close-sidebar:active {
    background: var(--light-gray);
}

.sidebar-user {
    padding: 20px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--gradient-purple);
    margin: 16px;
    border-radius: var(--radius-lg);
    color: white;
}

.user-avatar {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px;
}

.user-email {
    font-size: 12px;
    opacity: 0.8;
}

.sidebar-nav {
    flex: 1;
    padding: 0 16px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    color: var(--dark);
    text-decoration: none;
    border-radius: var(--radius-md);
    margin-bottom: 4px;
    transition: background 0.2s;
}

.sidebar-nav a:active {
    background: var(--light-gray);
}

.sidebar-nav a.active {
    background: var(--gradient);
    color: white;
}

.sidebar-nav a i {
    width: 24px;
    font-size: 18px;
}

.sidebar-auth {
    padding: 16px;
    display: flex;
    gap: 12px;
    border-top: 1px solid var(--medium-gray);
    margin-top: auto;
}

.sidebar-auth .btn-outline,
.sidebar-auth .btn-primary {
    flex: 1;
    text-align: center;
    padding: 12px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.sidebar-auth .btn-outline {
    border: 2px solid var(--purple);
    color: var(--purple);
}

.sidebar-auth .btn-primary {
    background: var(--gradient);
    color: white;
    border: none;
}

.sidebar-footer {
    padding: 16px;
    text-align: center;
    font-size: 12px;
    color: var(--gray);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    padding: 16px;
    padding-bottom: 80px;
}

/* Search Section */
.search-section {
    margin-bottom: 16px;
}

.search-container {
    background: var(--light);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
    border: 1px solid var(--medium-gray);
    transition: all 0.2s;
    box-shadow: var(--card-shadow);
}

.search-container:focus-within {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(123, 44, 191, 0.1);
}

.search-icon {
    color: var(--gray);
    font-size: 18px;
}

.search-container input {
    flex: 1;
    border: none;
    background: none;
    font-size: 16px;
    outline: none;
    font-family: inherit;
}

.clear-search {
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 4px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-search:active {
    background: var(--light-gray);
}

/* Search Info */
.search-info {
    background: var(--yellow-light);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.search-info-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 14px;
}

.search-info-content i {
    color: var(--orange);
}

#clearSearchResults {
    background: none;
    border: none;
    color: var(--warning-red);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

/* Categories Scroll */
.categories-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
    scrollbar-width: none;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

.categories-wrapper {
    display: flex;
    gap: 10px;
    padding: 4px 0;
    min-width: min-content;
}

.category-chip {
    flex-shrink: 0;
    padding: 10px 16px;
    background: var(--light);
    border: 1px solid var(--medium-gray);
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.category-chip:active {
    transform: scale(0.96);
}

.category-chip.active {
    background: var(--gradient);
    color: white;
    border-color: transparent;
}

.category-chip i {
    font-size: 14px;
}

/* FAQ Container */
.faq-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.faq-section {
    background: var(--light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.section-title {
    padding: 16px;
    background: var(--light-gray);
    border-bottom: 1px solid var(--medium-gray);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    font-size: 20px;
}

.section-title h2 {
    font-size: 18px;
    font-weight: 600;
}

/* FAQ Items */
.faq-item {
    border-bottom: 1px solid var(--medium-gray);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    font-size: 15px;
    transition: background 0.2s;
}

.faq-question:active {
    background: var(--light-gray);
}

.faq-question i {
    color: var(--purple);
    font-size: 16px;
    transition: transform 0.3s;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 16px;
    color: var(--gray);
    font-size: 14px;
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding: 0 16px 16px;
}

.faq-answer p {
    margin-bottom: 8px;
}

.safety-box {
    background: var(--light-gray);
    padding: 12px;
    border-radius: var(--radius-md);
    font-size: 13px;
}

.safety-box p {
    margin-bottom: 6px;
}

.warning-box {
    background: #fee2e2;
    padding: 12px;
    border-radius: var(--radius-md);
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.warning-box i {
    color: var(--warning-red);
    margin-top: 2px;
}

/* Help Card */
.help-card {
    background: var(--gradient);
    color: white;
    padding: 24px 20px;
    border-radius: var(--radius-xl);
    text-align: center;
    margin-top: 20px;
}

.help-card i {
    font-size: 40px;
    margin-bottom: 12px;
}

.help-card h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.help-card p {
    margin-bottom: 20px;
    opacity: 0.9;
}

.help-buttons {
    display: flex;
    justify-content: center;
}

.btn-primary {
    background: white;
    color: var(--purple);
    border: none;
    padding: 14px 28px;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:active {
    transform: scale(0.96);
}

.response-time {
    margin-top: 16px;
    font-size: 12px;
    opacity: 0.8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--light);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 16px 12px;
    border-top: 1px solid var(--medium-gray);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--gray);
    font-size: 12px;
    transition: color 0.2s;
    padding: 4px 12px;
    border-radius: var(--radius-md);
}

.nav-item:active {
    background: var(--light-gray);
}

.nav-item i {
    font-size: 22px;
}

.nav-item.active {
    color: var(--purple);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-container {
    background: var(--light);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 16px;
    background: var(--gradient);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-header h3 {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:active {
    background: rgba(255, 255, 255, 0.3);
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--medium-gray);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--purple);
}

.submit-btn {
    width: 100%;
    justify-content: center;
    background: var(--gradient);
    color: white;
    border: none;
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 80px;
    left: 16px;
    right: 16px;
    z-index: 1100;
}

.toast {
    background: var(--dark);
    color: white;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideUp 0.3s ease;
    font-size: 14px;
}

.toast.success { background: var(--success-green); }
.toast.error { background: var(--warning-red); }
.toast.info { background: var(--info-blue); }

/* Hidden Sections */
.faq-section[style*="display: none"] {
    display: none !important;
}

/* Responsive Adjustments */
@media (min-width: 768px) {
    body {
        padding-bottom: 0;
    }
    
    .bottom-nav {
        display: none;
    }
    
    .main-content {
        max-width: 800px;
        margin: 0 auto;
        padding-bottom: 40px;
    }
    
    .sidebar {
        max-width: 320px;
    }
}

@media (max-width: 414px) {
    .section-title {
        padding: 14px;
    }
    
    .section-title h2 {
        font-size: 16px;
    }
    
    .faq-question {
        padding: 14px;
        font-size: 14px;
    }
    
    .faq-answer {
        font-size: 13px;
    }
    
    .help-card {
        padding: 20px;
    }
    
    .help-card h3 {
        font-size: 18px;
    }
    
    .btn-primary {
        padding: 12px 24px;
        font-size: 15px;
    }
}

/* Hero Section with PayStack */
.hero-section {
    background: var(--gradient);
    border-radius: var(--radius-xl);
    padding: 32px 20px;
    margin-bottom: 24px;
    text-align: center;
    color: white;
}

.escrow-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.hero-section h1 {
    font-size: 24px;
    margin-bottom: 12px;
    line-height: 1.3;
}

.hero-section .highlight {
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-decoration-color: var(--yellow);
}

.hero-section p {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 20px;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: 30px;
}

.trust-badge i {
    font-size: 12px;
}