/* --- RESET & DESIGN SYSTEM VARIABLES --- */
:root {
    --primary-color: #064e3b; 
    --primary-hover: #043e2f;
    --accent-color: #15803d; 
    --bg-light: #fbfbf8; 
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-muted: #4b5563;
    --font-heading: 'Instrument Serif', Georgia, serif;
    --font-body: 'Inter', sans-serif;
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden; /* Complete horizontal overflow lock structural catch */
    font-family: var(--font-body);
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- HEADER STYLES --- */
.site-header {
    background-color: var(--bg-light);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 16px 0;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.logo-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-main);
    z-index: 10001; /* Keep visible above mobile slides */
}

.logo-icon {
    background-color: var(--primary-color);
    color: white;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
}

.logo-text strong {
    font-size: 16px;
    display: block;
}

.logo-sub {
    font-size: 8px;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    display: block;
}

/* ❌ DETECTING VIEWPORTS: HIDE ALL INTERNAL SLIDE CONTAINER ASSETS ON DESKTOP DEFAULTS */
.mobile-menu-header,
.mobile-only-actions {
    display: none !important;
}

.main-nav {
    display: flex;
    align-items: center;
}

.desktop-nav-links-wrapper {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.link-signin {
    text-decoration: none;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 500;
}

.btn-dark-pill {
    background-color: var(--primary-color);
    color: white;
    border-radius: 20px;
    padding: 8px 18px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-main);
    cursor: pointer;
    z-index: 10001; /* Layer button above slide transitions */
    padding: 4px;
}

/* --- FOOTER STYLES --- */
.site-footer {
    background-color: var(--bg-light);
    border-top: 1px solid #f0f0eb;
    padding: 60px 0 20px 0;
    font-size: 14px;
}

.footer-container {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 11px;
    letter-spacing: 1px;
    color: #9ca3af;
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    text-decoration: none;
    color: var(--text-muted);
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: var(--primary-color);
}

.footer-tagline {
    color: var(--text-muted);
    margin-top: 12px;
    max-width: 240px;
}

.footer-bottom {
    border-top: 1px solid #f0f0eb;
    padding-top: 20px;
    color: #9ca3af;
    font-size: 12px;
    text-align: center;
}

/* --- UTILITIES --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}
.btn-primary { background-color: var(--primary-color); color: white; }
.btn-secondary { background-color: transparent; color: var(--text-main); border: 1px solid #e5e7eb; }
.btn-light { background-color: white; color: var(--primary-color); }
.btn-outline-light { background-color: transparent; color: white; border: 1px solid rgba(255,255,255,0.3); }

.badge {
    background-color: #f0f7f4;
    color: var(--accent-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
}

/* --- HERO SECTION --- */
.hero-section {
    padding: 80px 0;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 64px;
    line-height: 1.1;
    margin-bottom: 24px;
    font-weight: 400;
}
.hero-content h1 em { color: var(--accent-color); font-style: italic; }
.hero-content p { font-size: 16px; color: var(--text-muted); margin-bottom: 32px; max-width: 480px; }

.hero-cta { display: flex; gap: 16px; margin-bottom: 32px; }
.hero-trust-indicators { display: flex; gap: 24px; font-size: 13px; color: var(--text-muted); }
.hero-trust-indicators i { color: var(--accent-color); }

/* --- HERO VISUAL & CARDS --- */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: flex-end;
}

.live-request-card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 32px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.03);
    position: relative;
}

.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.live-tag { font-size: 11px; letter-spacing: 1px; color: #9ca3af; font-weight: 600; }
.status-tag.open { background: #d1fae5; color: #065f46; padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }

.live-request-card h3 { font-size: 20px; margin-bottom: 8px; font-weight: 600; }
.request-desc { font-size: 14px; color: var(--text-muted); font-style: italic; margin-bottom: 24px; }

.budget-row {
    display: flex;
    justify-content: space-between;
    background: #f9fafb;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
}
.budget-row .amount { font-weight: 600; color: var(--primary-color); }

.providers-list { display: flex; flex-direction: column; gap: 12px; }
.provider-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}
.provider-item:last-child { border-bottom: none; }

.provider-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #eff6ff;
    color: #1e40af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}
.provider-avatar.color-2 { background: #fef3c7; color: #92400e; }
.provider-avatar.color-3 { background: #f3e8ff; color: #6b21a8; }

.provider-info { flex-grow: 1; }
.provider-info h4 { font-size: 14px; font-weight: 500; }
.provider-info p { font-size: 12px; color: #9ca3af; }

.badge-premium { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.badge-verified { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; font-size: 11px; padding: 2px 8px; border-radius: 10px; }

.escrow-badge-floating {
    position: absolute;
    bottom: -20px;
    left: -30px;
    background: white;
    padding: 12px 20px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border: 1px solid #f0f0eb;
    display: flex;
    flex-direction: column;
}
.escrow-badge-floating .eb-title { font-size: 10px; color: #9ca3af; text-transform: uppercase; }
.escrow-badge-floating .eb-amount { font-size: 16px; font-weight: 700; color: var(--primary-color); }

/* --- SERVICES GRID --- */
.services-section { padding: 80px 0; }
.section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 40px; }
.section-header h2 { font-family: var(--font-heading); font-size: 40px; font-weight: 400; }
.browse-link { color: var(--primary-color); text-decoration: none; font-size: 14px; font-weight: 500; }

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.service-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: var(--border-radius);
    border: 1px solid #f0f0eb;
    display: flex;
    align-items: center;
    gap: 16px;
}
.service-card i { color: var(--primary-color); font-size: 18px; }
.service-card h3 { font-size: 15px; font-weight: 500; }

/* --- STEPS SECTION --- */
.steps-section { padding: 80px 0; background: #fcfcf9; }
.steps-section h2 { font-family: var(--font-heading); font-size: 40px; font-weight: 400; margin-bottom: 40px; }
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.step-card { background: white; padding: 32px 24px; border-radius: var(--border-radius); border: 1px solid #f5f5f0; }
.step-num { font-family: var(--font-heading); font-size: 28px; color: var(--accent-color); display: block; margin-bottom: 16px; }
.step-card h3 { font-size: 16px; margin-bottom: 8px; font-weight: 600; }
.step-card p { font-size: 14px; color: var(--text-muted); }

/* --- CTA SECTION --- */
.cta-section { padding: 60px 0; }
.cta-banner {
    background-color: var(--primary-color);
    color: white;
    padding: 60px;
    border-radius: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cta-text h2 { font-family: var(--font-heading); font-size: 44px; font-weight: 400; margin-bottom: 12px; }
.cta-text p { color: rgba(255,255,255,0.8); max-width: 460px; font-size: 15px; }
.cta-buttons { display: flex; gap: 16px; }

/* --- RESPONSIVE NAVIGATION MOBILE MODES --- */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .header-actions {
        display: none !important;
    }

    /* 📱 Force the links to shift vertically within the slide out panel context */
    .desktop-nav-links-wrapper {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    .mobile-menu-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding-bottom: 16px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        margin-bottom: 8px;
    }

    .mobile-only-actions {
        display: flex !important;
        flex-direction: column;
        gap: 16px;
        width: 100%;
        margin-top: auto; /* Solid alignment layout lock down to the bottom */
        padding-top: 24px;
    }

    /* 🧳 Master Slider Container */
    .main-nav {
        display: flex !important;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        
        position: fixed;
        top: 0;
        right: 0; /* Base axis anchor point */
        
        width: 85%;
        max-width: 320px;
        height: 100vh;
        height: -webkit-fill-available;
        background-color: #ffffff;
        
        padding: 24px;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.12);
        gap: 20px;
        
        /* Slide hidden off-canvas cleanly to the right using positive transform values */
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 100000;
        overflow-y: auto;
    }

    /* Pull drawer back into view smoothly */
    .main-nav.active {
        transform: translateX(0);
    }

    .close-menu-x {
        background: none;
        border: none;
        font-size: 24px;
        color: var(--text-main);
        cursor: pointer;
        padding: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .main-nav .nav-link {
        font-size: 16px;
        font-weight: 500;
        color: var(--text-main);
        padding: 12px 0;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    }

    .mobile-only-actions .link-signin {
        text-align: center;
        font-size: 15px;
        font-weight: 500;
        color: var(--text-main);
        padding: 10px 0;
        text-decoration: none;
    }

    .mobile-only-actions .btn-dark-pill {
        width: 100%;
        justify-content: center;
        padding: 12px;
        font-size: 15px;
        border-radius: 30px;
    }
}

/* --- SYSTEM-WIDE CORE RESPONSIVE SCALE ADJUSTMENTS --- */
@media (max-width: 992px) {
    .hero-container { grid-template-columns: 1fr; gap: 60px; text-align: center; }
    .hero-content p { margin-left: auto; margin-right: auto; }
    .hero-cta, .hero-trust-indicators { justify-content: center; }
    .hero-visual { justify-content: center; }
    .escrow-badge-floating { left: 0; }
    
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .steps-grid { grid-template-columns: repeat(2, 1fr); }
    .cta-banner { flex-direction: column; text-align: center; gap: 32px; padding: 40px; }
    .footer-container { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 576px) {
    .services-grid { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr; }
    .hero-content h1 { font-size: 40px; }
    .cta-text h2 { font-size: 32px; }
    .live-request-card { padding: 24px; }
    .escrow-badge-floating { bottom: -15px; left: 10px; padding: 8px 14px; }
}


@media (max-width: 576px) {
    /* ... your existing 576px rules ... */

    /* 🎯 Fixes homepage CTA buttons looking bloated on mobile */
    .hero-cta {
        flex-direction: row; /* Keep them side-by-side if they fit, or stack cleanly */
        justify-content: center;
        gap: 10px;
        width: 100%;
    }

    .hero-cta .btn {
        padding: 10px 20px !important; /* Shaves off the excess bulk */
        font-size: 13px !important;    /* Makes text crisp and compact */
        border-radius: 24px !important;
        white-space: nowrap;            /* Prevents awkward text-wrapping inside the button */
    }
}

@media (max-width: 576px) {
    .services-grid { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr; }
    .hero-content h1 { font-size: 40px; }
    
    /* 📱 Adds comfortable safe breathing room on small screens */
    .hero-content p { 
        padding-left: 16px; 
        padding-right: 16px; 
    }
    
    .cta-text h2 { font-size: 32px; }
    .live-request-card { padding: 24px; }
    .escrow-badge-floating { bottom: -15px; left: 10px; padding: 8px 14px; }

    /* 🎯 FIX: Scales down the bottom banner buttons to look neat and elegant */
    .cta-buttons {
        display: flex;
        justify-content: center;
        gap: 12px;
        width: 100%;
    }

    .cta-buttons .btn {
        padding: 10px 20px !important;   /* Trims down the bulky height and width */
        font-size: 13px !important;       /* Clean, compact text size matching Screen 1 */
        border-radius: 24px !important;   /* Sleek pill shape */
        white-space: nowrap;               /* Stops text from breaking into two lines */
        flex: 1;                          /* Lets them balance equally */
        max-width: 140px;                 /* Restricts them from ballooning out too wide */
        justify-content: center;
    }
}