@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --dark: #0f172a;
    --light: #f8fafc;
    --gray: #64748b;
    --white: #ffffff;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --glass: rgba(255, 255, 255, 0.8);
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 10px;
    width: 100%;
    margin-top: 15px;
}

/* Header */
header {
    background: var(--white);
    padding: 20px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Hero Section */
.hero {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--dark);
}

.hero p {
    font-size: 18px;
    color: var(--gray);
    margin-bottom: 40px;
}

.search-box {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    padding: 8px;
    border-radius: 50px;
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.search-item {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-right: 1px solid #f1f5f9;
}

.search-item i {
    color: var(--primary);
    margin-right: 12px;
    font-size: 16px;
}

.search-box input,
.search-box select {
    width: 100%;
    padding: 15px 0;
    border: none;
    outline: none;
    font-size: 15px;
    background: transparent;
    color: var(--dark);
}

.search-box .btn-primary {
    border-radius: 40px;
    padding: 15px 35px;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 24px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Sections */
section {
    padding: 80px 0;
}

.section-title {
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.section-title h2 {
    font-size: 32px;
    font-weight: 700;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* Categories Scroll */
.categories-container {
    overflow-x: auto;
    padding: 10px 5px 25px;
    margin: 0 -15px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.categories-container::-webkit-scrollbar {
    display: none;
}

.categories-grid {
    display: flex;
    gap: 15px;
    padding: 0 15px;
}

.category-card {
    flex: 0 0 130px;
    text-align: center;
    padding: 20px 10px !important;
    border-radius: 20px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.category-card i {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 12px;
    transition: var(--transition);
}

.category-card h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.category-card:hover i {
    transform: scale(1.1);
}

/* Worker Grid & Cards */
.worker-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.worker-card {
    padding: 20px;
}

.worker-city {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 5px;
}

/* Worker Card */
.worker-card {
    text-align: center;
}

.worker-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
}

.worker-name {
    font-size: 20px;
    font-weight: 600;
}

.worker-category {
    color: var(--primary);
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 10px;
}

.worker-rating {
    color: var(--warning);
    margin-bottom: 15px;
}

/* Footer */
footer {
    background: var(--dark);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-links h4 {
    margin-bottom: 20px;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #cbd5e1;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #1e293b;
    padding-top: 20px;
    color: #94a3b8;
}

/* Auth Pages */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--white) 0%, #e2e8f0 100%);
}

.auth-card {
    width: 100%;
    max-width: 450px;
    background: var(--white);
    padding: 40px;
    border-radius: 30px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Dashboard Sidebar */
.dashboard-container {
    display: flex;
    min-height: calc(100vh - 84px);
}

.sidebar {
    width: 280px;
    background: var(--white);
    border-right: 1px solid #e2e8f0;
    padding: 40px 20px;
}

.main-content {
    flex: 1;
    padding: 40px;
    background: var(--light);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-radius: 15px;
    margin-bottom: 5px;
    font-weight: 500;
}

.sidebar-link.active {
    background: var(--primary);
    color: var(--white);
}

.sidebar-link:not(.active):hover {
    background: #f1f5f9;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        box-shadow: var(--shadow);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: block !important;
        font-size: 24px;
        cursor: pointer;
    }

    .hero h1 {
        font-size: 32px;
    }

    .search-box {
        flex-direction: column;
        padding: 20px;
        border-radius: 24px;
        gap: 15px;
    }

    .search-item {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #f1f5f9;
        padding: 0 10px 10px;
    }

    .search-box .btn-primary {
        width: 100%;
        margin-top: 10px;
    }

    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding: 20px;
    }

    .main-content {
        padding: 20px;
    }

    /* Stack grid layouts on mobile */
    .dashboard-container main form,
    .dashboard-container main .grid,
    .dashboard-container .projects-layout {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .worker-profile-header {
        flex-direction: column;
        text-align: center;
        align-items: center !important;
    }

    .worker-profile-header img {
        margin-bottom: 20px;
    }

    .profile-grid,
    .dashboard-grid,
    .search-layout {
        grid-template-columns: 1fr !important;
    }

    .dashboard-header,
    .projects-dashboard-header {
        flex-direction: column;
        align-items: flex-start !important;
    }

    /* Mobile Compact Fixes */
    .worker-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
        gap: 12px !important;
    }

    .worker-card {
        padding: 15px !important;
    }

    .worker-image {
        width: 60px !important;
        height: 60px !important;
    }

    .worker-name {
        font-size: 16px !important;
    }

    .worker-category {
        font-size: 12px !important;
    }

    .worker-city {
        font-size: 13px !important;
    }

    .btn-sm {
        padding: 6px 12px !important;
        font-size: 12px !important;
        border-radius: 8px !important;
    }

    .section-title h2 {
        font-size: 24px;
    }
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 10px 20px;
    gap: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.whatsapp-float span {
    font-size: 16px;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #128c7e;
    color: #FFF;
}

@media (max-width: 768px) {
    .whatsapp-float span {
        display: none;
    }

    .whatsapp-float {
        padding: 15px;
        bottom: 20px;
        right: 20px;
    }
}