/* =========================================
   1. THEME VARIABLES (Purple & Cyan)
   ========================================= */
:root {
    /* Brand Colors */
    --primary-color: #3A1096;       /* Uotta Purple (Darker) */
    --primary-dark: #5D2CDB;        /* Uotta Purple (Lighter/Hover) */
    --secondary-color: #00DDEB;     /* Electric Cyan */
    --secondary-hover: #00BCC9;
    
    /* Functional */
    --success-color: #00DDEB;       
    --danger-color: #ff5252;        
    --warning-color: #ffc107;       
    
    /* Neutrals */
    --bg-body: #f4f4f4;
    --bg-card: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --border-color: #dddddd;

    /* Fonts */
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    
    /* Layout */
    --container-width: 1200px;
    --border-radius: 6px;
    --header-height: 80px;
}

/* =========================================
   2. RESET & BASE
   ========================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { 
    scroll-behavior: smooth; 
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

a { text-decoration: none; color: var(--primary-color); transition: 0.3s; }
a:hover { color: var(--secondary-color); }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* =========================================
   3. LAYOUT UTILITIES
   ========================================= */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}
.section-padding { padding: 60px 0; }

/* =========================================
   4. HEADER & LOGO
   ========================================= */
header {
    background: var(--primary-color);
    height: auto;
    min-height: var(--header-height);
    border-bottom: 4px solid var(--secondary-color);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    width: 100%;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    width: 100%;
}

.logo {
    display: block;
    width: 180px;
    height: 60px;
    background-image: url('/assets/images/logo.png'); 
    background-repeat: no-repeat;
    background-position: left center;
    background-size: contain;
    text-indent: -9999px; 
    overflow: hidden;
}

.logo img {
    height: 100%;
    width: auto;
    display: block;
    object-fit: contain;
}

.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a { color: rgba(255,255,255,0.9); font-weight: 600; text-transform: uppercase; font-size: 0.9rem; }
.nav-links a:hover { color: var(--secondary-color); }

.mobile-menu-btn { display: none; background: none; border: none; color: var(--secondary-color); font-size: 2.2rem; cursor: pointer; padding: 0 10px; line-height: 1; }

/* =========================================
   5. BUTTONS & FORMS
   ========================================= */
.btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: var(--border-radius);
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
    text-transform: uppercase;
    color: #fff;
    white-space: nowrap;
}
.btn-primary { background: var(--primary-color); } 
.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary { background: var(--secondary-color); color: var(--primary-color) !important; } 
.btn-secondary:hover { background: var(--secondary-hover); }

.btn-danger { background: var(--danger-color); } 
.btn-danger:hover { background: #d32f2f; }

.btn-success { background: var(--secondary-color); color: var(--primary-color) !important; } 
.btn-success:hover { background: var(--secondary-hover); }

input, select, textarea {
    width: 100%; padding: 12px; border: 1px solid var(--border-color); border-radius: var(--border-radius);
    font-family: var(--font-body); font-size: 1rem; margin-bottom: 15px; background: #fff; max-width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(93, 44, 219, 0.2); }
label { font-weight: bold; display: block; margin-bottom: 8px; color: var(--primary-color); font-size: 0.9rem; }

/* =========================================
   6. ADMIN DASHBOARD
   ========================================= */
.admin-header { background: #1a1a1a; color: #fff; padding: 15px 30px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.dashboard-card { background: var(--bg-card); padding: 30px; border-radius: var(--border-radius); box-shadow: 0 2px 15px rgba(0,0,0,0.05); margin-bottom: 30px; border: 1px solid var(--border-color); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card { background: var(--bg-card); padding: 25px; border-radius: var(--border-radius); border-left: 5px solid var(--primary-color); box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.stat-card h3 { font-size: 1rem; color: var(--text-muted); margin: 0 0 5px 0; }
.stat-card .value { font-size: 2rem; font-weight: bold; color: var(--primary-color); }

.badge { padding: 5px 10px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; text-transform: uppercase; display: inline-block; white-space: nowrap; margin-right: 5px; margin-bottom: 5px;}
.badge-admin { background: #000; color: var(--secondary-color); }
.badge-contractor { background: #17a2b8; color: #fff; }
.badge-active { background: var(--secondary-color); color: var(--primary-color); } 
.badge-suspended { background: var(--danger-color); color: #fff; }

.admin-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 15px; }
.admin-search { flex-grow: 1; max-width: 400px; }
.admin-search input { margin-bottom: 0; }
.filter-group { display: flex; gap: 5px; }
.filter-btn { padding: 8px 15px; background: #ddd; border: none; cursor: pointer; border-radius: 4px; font-weight: bold; font-size: 0.85rem; }
.filter-btn.active { background: var(--primary-color); color: #fff; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { background: #f8f9fa; padding: 12px; text-align: left; border-bottom: 2px solid #ddd; color: #555; font-size: 0.9rem; text-transform: uppercase; }
.admin-table td { padding: 12px; border-bottom: 1px solid #eee; vertical-align: middle; }
.btn-icon { width: 32px; height: 32px; border-radius: 4px; border: none; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; }
.user-identity h4 { margin: 0 0 2px 0; font-size: 1rem; color: var(--text-main); }
.user-identity span { font-size: 0.85rem; color: var(--text-muted); display: block; }
.user-meta { margin-top: 5px; font-size: 0.8rem; color: #888; }
.quick-credit { display: flex; align-items: center; gap: 5px; margin-top: 5px; }
.credit-input { width: 60px; padding: 5px; font-size: 0.8rem; margin-bottom: 0; text-align: center; }

/* =========================================
   7. HERO & SEARCH
   ========================================= */
.hero {
    position: relative;
    color: #fff;
    padding: 80px 0;
    text-align: left;
    overflow: hidden;
    background: #000;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(93, 44, 219, 0.7) 0%, rgba(58, 16, 150, 0.85) 100%);
    z-index: 1;
}

/* ELASTIC TYPOGRAPHY (Left Aligned) */
.hero h1 { 
    color: #fff; 
    margin-top: 0;
    font-size: 13vw; /* Elastic Size */
    line-height: 0.9; 
    width: 100%;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: -0.03em;
    padding: 0 5%; 
    text-align: left; 
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

@media (min-width: 1200px) {
    .hero h1 {
        font-size: 6rem; /* Max Size */
        text-align: center; 
    }
    .hero { text-align: center; } 
}

.hero p { 
    color: rgba(255,255,255,0.9); 
    font-size: 1.2rem; 
    max-width: 600px; 
    margin: 0 0 30px 5%; 
    text-align: left;
    text-shadow: 0 1px 5px rgba(0,0,0,0.5);
}

@media (min-width: 1200px) {
    .hero p { margin: 0 auto 30px auto; text-align: center; }
}

.search-box {
    position: relative;
    background: linear-gradient(
        135deg,
        rgba(255,255,255,0.12),
        rgba(255,255,255,0.04)
    );
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);

    padding: 26px 28px;
    max-width: 820px;
    width: 90%;
    margin: 0 auto 24px auto;

    display: flex;
    gap: 16px;
    align-items: center;

    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.15);

    box-shadow:
        0 20px 50px rgba(0,0,0,0.75),
        inset 0 1px 0 rgba(255,255,255,0.15);

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease,
        border-color 0.35s ease;
}

/* Soft glow ring */
.search-box::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(0,180,255,0.35),
        transparent
    );
    opacity: 0;
    filter: blur(12px);
    transition: opacity 0.35s ease;
    pointer-events: none;
}

/* Hover / focus-within effect */
.search-box:hover,
.search-box:focus-within {
    transform: translateY(-4px) scale(1.01);
    box-shadow:
        0 30px 80px rgba(0,0,0,0.65),
        inset 0 1px 0 rgba(255,255,255,0.2);
    border-color: rgba(0,180,255,0.45);
}

.search-box:hover::before,
.search-box:focus-within::before {
    opacity: 1;
}


@media (min-width: 1200px) {
    .search-box { 
        margin-left: auto; 
        margin-right: auto; 
        margin-bottom: 20px;
    }
}

.search-box input, .search-box select { margin-bottom: 0; flex-grow: 1; }
.search-box button { width: auto; flex-shrink: 0; }

/* =========================================
   8. HOMEPAGE GRIDS & LISTS (FIXED FOR MOBILE)
   ========================================= */
.pros-section { background-color: #fff; padding: 80px 0; }
.pros-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }

/* Box Styles */
.pros-box {
    padding: 40px;
    border-radius: 12px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Light Grey Gradient (Customers) */
.pros-box-light {
    background: linear-gradient(180deg, #f9f9f9 0%, #eaeaea 100%);
    border: 1px solid #9575cd;
}

/* Darker Grey Gradient (Contractors) */
.pros-box-dark {
    background: linear-gradient(180deg, #f9f9f9 0%, #eaeaea 100%);
    border: 1px solid #9575cd;
}

.pros-col h3 { color: var(--primary-color); font-size: 1.8rem; border-bottom: 3px solid var(--secondary-color); display: inline-block; padding-bottom: 10px; margin-bottom: 25px; }

/* 
   FIXED LIST LAYOUT:
   Uses Absolute Positioning for the tick mark.
   This guarantees the text wraps normally under itself (Hanging Indent) 
   and never gets squashed or aligned under the tick.
*/
.pros-list { 
    flex-grow: 1; 
    padding-left: 0; 
    list-style: none; 
}

.pros-list li { 
    position: relative;
    padding-left: 35px; /* Creates space for the tick */
    margin-bottom: 15px;
    font-size: 1.1rem;
    text-align: left;
    line-height: 1.5;
    display: block; /* Ensure text flows as a block */
}

.pros-list li::before { 
    content: '✔'; 
    position: absolute;
    left: 0;
    top: 0; /* Aligns with the first line of text */
    color: var(--secondary-color); 
    font-weight: bold; 
    font-size: 1.2rem;
    width: 25px;
}

.trades-section { background-color: #f8f9fa; padding: 80px 0; }
.trades-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 30px; 
    margin-top: 40px; 
}

/* TRADE CARD WITH OVERLAY */
.trade-card { 
    background: #fff; 
    border-radius: var(--border-radius); 
    overflow: hidden; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); 
    transition: transform 0.3s ease; 
    display: flex; 
    flex-direction: column; 
    text-decoration: none; 
    color: inherit; 
    position: relative; 
}

.trade-img-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.trade-img-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color); 
    opacity: 0.4; 
    transition: opacity 0.3s ease;
    z-index: 1;
}

.trade-card:hover .trade-img-wrapper::after { opacity: 0.1; }

.trade-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); 
    border-bottom: 3px solid var(--secondary-color); 
}

.trade-img { 
    height: 100%; 
    width: 100%; 
    object-fit: cover; 
    background-color: #ddd; 
    display: block;
    transition: transform 0.5s ease;
}

.trade-card:hover .trade-img { transform: scale(1.05); }

.trade-content { padding: 20px; }
.trade-content h3 { margin: 0 0 10px 0; color: var(--primary-color); }

/* =========================================
   9. SEARCH RESULTS & PROFILE
   ========================================= */
.result-card {
    background: var(--bg-card); padding: 30px; margin-bottom: 25px;
    border-radius: var(--border-radius); border: 1px solid var(--border-color);
    border-left: 5px solid var(--secondary-color);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); transition: transform 0.2s;
    display: flex; flex-direction: column;
}
.result-card:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(93, 44, 219, 0.15); border-color: var(--primary-color); }

.card-header { display: flex; gap: 25px; align-items: flex-start; margin-bottom: 15px; }
.card-logo { width: 90px; height: 90px; flex-shrink: 0; object-fit: contain; border: 1px solid #eee; border-radius: var(--border-radius); background: #fff; padding: 5px; }
.placeholder-logo { width: 90px; height: 90px; flex-shrink: 0; background: #f8f9fa; color: #ccc; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; font-weight: bold; border-radius: var(--border-radius); border: 1px solid #eee; }
.card-info { flex-grow: 1; }
.result-card h3 { color: var(--primary-color); margin: 0 0 5px 0; font-size: 1.5rem; }
.distance-badge { float: right; background: #e9ecef; color: #555; padding: 4px 12px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; }
.card-desc { font-size: 0.95rem; color: var(--text-muted); margin: 10px 0; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; }
.thumb-grid { display: flex; gap: 10px; margin-top: 15px; flex-wrap: wrap; }
.thumb-img { width: 70px; height: 50px; object-fit: cover; border-radius: 4px; border: 1px solid #eee; cursor: pointer; transition: opacity 0.2s; }
.thumb-img:hover { opacity: 0.8; border-color: var(--secondary-color); }

/* =========================================
   10. LIGHTBOX
   ========================================= */
.lightbox { display: none; position: fixed; z-index: 9999; padding-top: 50px; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.9); align-items: center; justify-content: center; }
.lightbox-content { margin: auto; display: block; max-width: 90%; max-height: 85vh; border-radius: 4px; box-shadow: 0 0 20px rgba(255,255,255,0.1); }
.lightbox-close { position: absolute; top: 20px; right: 35px; color: #f1f1f1; font-size: 40px; font-weight: bold; cursor: pointer; line-height: 1; }

/* =========================================
   11. FOOTER
   ========================================= */
.site-footer { background-color: #222; color: #fff; padding: 60px 0 20px 0; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-col h4 { color: var(--secondary-color); margin-bottom: 20px; font-size: 1.2rem; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #bbb; font-size: 0.95rem; }
.footer-links a:hover { color: #fff; padding-left: 5px; }
.copyright { border-top: 1px solid #444; padding-top: 20px; text-align: center; color: #777; font-size: 0.9rem; }

/* =========================================
   12. FAQ ACCORDION
   ========================================= */
.accordion-item { background-color: #fff; border: 1px solid var(--border-color); margin-bottom: 10px; border-radius: var(--border-radius); overflow: hidden; }
.accordion-header { background-color: #fff; color: var(--text-main); cursor: pointer; padding: 18px; width: 100%; border: none; text-align: left; outline: none; font-size: 1.1rem; font-weight: bold; display: flex; justify-content: space-between; align-items: center; transition: background-color 0.2s; font-family: var(--font-heading); }
.accordion-header:hover { background-color: #f9f9f9; }
.accordion-header.active { background-color: #f0f2f5; color: var(--primary-color); }
.accordion-header i { transition: transform 0.3s ease; color: var(--secondary-color); }
.accordion-header.active i { transform: rotate(180deg); }
.accordion-content { padding: 0 18px; background-color: #fff; max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; border-top: 1px solid transparent; }
.accordion-header.active + .accordion-content { border-top: 1px solid #eee; padding-top: 15px; padding-bottom: 15px; }

/* =========================================
   13. MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 768px) {
    .container { padding: 0 15px; }
    .nav-container { padding: 10px 15px; position: relative; }
    header { height: auto; padding: 10px 0; }
    
    /* Ensure Menu Button is Clickable */
    .mobile-menu-btn { 
        display: block !important; 
        z-index: 1002; 
        position: relative;
    }
    
    .nav-links {
        display: none; 
        position: absolute; 
        top: 100%; 
        left: 0; 
        right: 0; 
        width: 100%;
        background-color: var(--primary-color); 
        flex-direction: column; 
        padding: 20px 0;
        text-align: center; 
        box-shadow: 0 10px 20px rgba(0,0,0,0.2); 
        border-top: 1px solid rgba(255,255,255,0.1); 
        z-index: 1001;
    }

    /* FORCE DISPLAY WHEN ACTIVE */
    .nav-links.active { 
        display: flex !important; 
    }

    .nav-links a { display: block; width: 100%; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.05); color: #fff; }
    .nav-links .btn { width: 80%; margin: 15px auto; display: block; }
    
    .search-box { flex-direction: column; }
    .search-box button { width: 100%; }
    
    /* Hero Override */
    .hero { padding: 50px 0; text-align: left; }
    .hero h1 { font-size: 13vw; text-align: left; padding: 0 5%; }
    
    .stats-grid, .pros-grid, .trades-grid, .footer-grid, .profile-container { grid-template-columns: 100% !important; gap: 30px; }
    
    /* === HOMEPAGE MOBILE FIXES === */
    .section-padding, .pros-section, .trades-section {
        padding: 40px 0 !important;
    }
    
    .pros-box {
        padding: 25px 20px !important;
    }
    
    /* Ensure lists behave correctly on mobile too */
    .pros-list li {
        font-size: 1rem; 
        padding-left: 35px; /* Keep strict indent */
    }

    .pros-box .btn {
        white-space: normal; 
        word-break: break-word; 
        width: 100%;
        padding: 12px 10px;
        font-size: 0.85rem;
        line-height: 1.3;
        height: auto;
    }

    .card-header { flex-direction: column; }
    .card-logo, .placeholder-logo { margin-bottom: 10px; width: 60px; height: 60px; font-size: 1.5rem; }
    .distance-badge { float: none; display: inline-block; margin-bottom: 5px; }
    .thumb-grid { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 10px; }
    .thumb-img { width: 90px; height: 60px; flex-shrink: 0; }
    .table-wrapper { width: 100%; overflow-x: auto; }
    table { min-width: 600px; }
    input, select, textarea { font-size: 16px; }
    
    .admin-toolbar { flex-direction: column; align-items: stretch; }
    .admin-search { max-width: 100%; margin-bottom: 10px; }
    .filter-group { overflow-x: auto; padding-bottom: 5px; }
}