/* ========================================
   Pro Mtaani - Design System
   ======================================== */

/* CSS Variables */
:root {
    /* Primary Colors */
    --primary: #E65615;
    --primary-light: #ff7640;
    --primary-dark: #cc4d12;

    /* Accent Colors */
    --accent: #1CBD87;
    --accent-hover: #16966b;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #E65615 0%, #ff7640 100%);
    --gradient-accent: linear-gradient(135deg, #1CBD87 0%, #2be0a5 100%);
    --gradient-dark: linear-gradient(180deg, #FFF8F0 0%, #FFFFFF 100%);

    /* Background Colors */
    --bg-dark: #FFF8F0;
    --bg-surface: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-overlay: rgba(255, 248, 240, 0.95);

    /* Text Colors */
    --text-primary: #1a237e;
    --text-secondary: #666666;
    --text-muted: #888888;

    /* Status Colors */
    --success: #00c853;
    --warning: #ffc107;
    --error: #ff5252;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.3);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Font */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

ul,
ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
}

input,
select,
textarea {
    font-family: inherit;
    outline: none;
}

/* ========================================
   Typography
   ======================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
}

h4 {
    font-size: 1.25rem;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.premium-badge {
    color: #ffd700;
    font-size: 1.2rem;
    vertical-align: middle;
}

.install-app-btn.hidden {
    display: none;
}

/* ========================================
   Layout
   ======================================== */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section {
    padding: var(--space-3xl) 0;
}

.grid {
    display: grid;
    gap: var(--space-lg);
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.5);
}

.btn-accent {
    background: var(--gradient-accent);
    color: var(--text-primary);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--text-primary);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* ========================================
   Forms
   ======================================== */

.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-surface);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23a0a0b0' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
}

.form-select:focus {
    border-color: var(--primary-light);
}

/* ========================================
   Cards
   ======================================== */

.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-base);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========================================
   Header / Navigation
   ======================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-overlay);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav {
    height: 70px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-dark);
    padding: var(--space-xl);
    z-index: 999;
}

.mobile-menu.active {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.mobile-menu .nav-link {
    font-size: 1.25rem;
    padding: var(--space-md) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 70px;
    background: var(--gradient-dark);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    margin-bottom: var(--space-lg);
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
}

/* ========================================
   Search Box
   ======================================== */

.search-box {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    display: flex;
    gap: var(--space-md);
    max-width: 600px;
    margin: var(--space-xl) auto 0;
    box-shadow: var(--shadow-lg);
}

.search-box .form-input,
.search-box .form-select {
    background: var(--bg-card);
}

.search-box .btn {
    flex-shrink: 0;
}

/* ========================================
   Services Grid
   ======================================== */

.services-section {
    background: var(--bg-dark);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.section-header p {
    color: var(--text-secondary);
    margin-top: var(--space-sm);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-md);
}

.service-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    border: 1px solid transparent;
}

.service-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-sm);
}

.service-card h4 {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* ========================================
   How It Works
   ======================================== */

.how-it-works {
    background: var(--bg-surface);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
}

.step-card {
    text-align: center;
    padding: var(--space-xl);
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto var(--space-lg);
}

.step-card h3 {
    margin-bottom: var(--space-md);
}

.step-card p {
    color: var(--text-secondary);
}

/* ========================================
   Pro Cards
   ======================================== */

.pro-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
}

.pro-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.pro-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: var(--space-lg) auto var(--space-md);
}

.pro-info {
    padding: 0 var(--space-lg) var(--space-lg);
    text-align: center;
}

.pro-name {
    font-size: 1.125rem;
    margin-bottom: var(--space-xs);
}

.pro-service {
    color: var(--accent);
    font-size: 0.875rem;
    margin-bottom: var(--space-sm);
}

.pro-location {
    color: var(--text-muted);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
}

/* Dashboard Tabs */
.tab-btn {
    background: none;
    border: none;
    padding: 0.5rem 0;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    color: var(--primary);
    border-color: var(--primary);
}

.dashboard-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
    align-items: flex-start;
}

.dashboard-grid>div:first-child {
    flex: 1;
    min-width: 280px;
}


.footer {
    background: #f8f9fa;
    padding: var(--space-3xl) 0 var(--space-xl);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.footer-brand {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.footer-brand span {
    color: var(--accent);
}

.footer-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-link {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ========================================
   Modals
   ======================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: var(--space-md);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-surface);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform var(--transition-base);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--text-primary);
}

/* ========================================
   Auth Pages
   ======================================== */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    background: var(--gradient-dark);
}

.auth-container {
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background: var(--bg-surface);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.auth-header h2 {
    margin-bottom: var(--space-sm);
}

.auth-header p {
    color: var(--text-secondary);
}

.auth-footer {
    text-align: center;
    margin-top: var(--space-lg);
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--accent);
    font-weight: 500;
}

/* ========================================
   Dashboard
   ======================================== */

.dashboard {
    padding-top: 90px;
    min-height: 100vh;
}

.dashboard-header {
    background: var(--bg-surface);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    border-radius: var(--radius-lg);
}

.dashboard-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
}

.dashboard-subtitle {
    color: var(--text-secondary);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.stat-card {
    background: var(--bg-card);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ========================================
   Map
   ======================================== */

.map-container {
    height: 500px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
}

.map-filter {
    background: var(--bg-surface);
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-lg);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

/* ========================================
   Loading States
   ======================================== */

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--bg-card);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   Utilities
   ======================================== */

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.text-center {
    text-align: center;
}

.text-accent {
    color: var(--accent);
}

.mb-sm {
    margin-bottom: var(--space-sm);
}

.mb-md {
    margin-bottom: var(--space-md);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

.mt-lg {
    margin-top: var(--space-lg);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {

    .nav-links,
    .nav-actions .btn:not(.menu-toggle) {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .search-box {
        flex-direction: column;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .service-card {
        padding: var(--space-md);
    }

    .service-icon {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-sm);
    }

    .section {
        padding: var(--space-2xl) 0;
    }

    .btn-lg {
        width: 100%;
    }
}