/* ====================================
   تطبيق مقاولات أبوظبي - تصميم حديث ومتجاوب
   ==================================== */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap');

:root {
    --primary: #1d4ed8;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --primary-gradient: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
    --secondary: #f59e0b;
    --secondary-gradient: linear-gradient(135deg, #f59e0b, #f97316);
    --bg-light: #f0f4f8;
    --bg-dark: #0f172a;
    --text-dark: #0f172a;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --white: #ffffff;
    --border: #e2e8f0;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --radius: 14px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 28px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.15);
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    font-family: 'Tajawal', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    direction: rtl;
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    padding-bottom: calc(70px + var(--safe-bottom));
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }

/* ==================== Status Bar ==================== */
.status-bar {
    height: calc(11px + var(--safe-top));
    width: 100%;
    background: var(--primary-dark);
}

/* ==================== Top Nav / Header (Compact) ==================== */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--primary-gradient);
    padding: 8px 16px;
    padding-top: calc(8px + var(--safe-top));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 2px 12px rgba(29,78,216,0.25);
    min-height: 48px;
    height: auto;
}

.top-nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-nav-center {
    flex: 1;
    text-align: center;
}

.top-nav-center span {
    color: white;
    font-size: 16px;
    font-weight: 700;
}

.nav-icon-btn {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.nav-icon-btn .material-icons-round {
    font-size: 20px;
}

.nav-icon-btn:active {
    transform: scale(0.9);
    background: rgba(255,255,255,0.25);
}

.nav-icon-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    background: var(--danger);
    color: white;
    font-size: 9px;
    font-weight: 700;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--primary);
    box-shadow: 0 2px 6px rgba(239,68,68,0.4);
}

/* Profile Icon Button in Header */
.profile-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.4);
    overflow: hidden;
    background: rgba(255,255,255,0.2);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.2s;
}

.profile-icon-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-icon-btn .material-icons-round {
    font-size: 20px;
}

.profile-icon-btn:active {
    transform: scale(0.9);
}

/* Legacy Logo Avatar in Header (for other pages) */
.header-logo-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.4);
    overflow: hidden;
    background: white;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-logo-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info {
    text-align: left;
}

.user-info .greeting {
    font-size: 10px;
    color: rgba(255,255,255,0.7);
    line-height: 1;
}

.user-info .username {
    font-size: 13px;
    font-weight: 700;
    color: white;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==================== Hero Section ==================== */
.hero-section {
    position: relative;
    background: var(--primary-gradient);
    padding: 20px 16px 48px;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 220px;
    height: 220px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-welcome {
    margin-bottom: 12px;
}

.hero-welcome .greeting-text {
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    font-weight: 500;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    padding: 5px 12px;
    border-radius: 20px;
    margin-bottom: 14px;
    border: 1px solid rgba(255,255,255,0.1);
}

.hero-badge span {
    font-size: 11px;
    color: white;
    font-weight: 500;
}

.hero-badge .material-icons-round {
    color: #fbbf24;
    font-size: 13px;
}

.hero-title {
    font-size: 24px;
    font-weight: 800;
    color: white;
    line-height: 1.4;
    margin-bottom: 8px;
}

.hero-subtitle {
    font-size: 13px;
    color: rgba(191,219,254,1);
    margin-bottom: 20px;
    max-width: 85%;
    line-height: 1.7;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.hero-stat {
    text-align: center;
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 10px 6px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.08);
}

.hero-stat .stat-number {
    font-size: 20px;
    font-weight: 800;
    color: white;
}

.hero-stat .stat-label {
    font-size: 10px;
    color: rgba(191,219,254,0.9);
    margin-top: 2px;
}

/* ==================== Slider Section ==================== */
.slider-section {
    padding: 0 16px;
    margin-top: -32px;
    position: relative;
    z-index: 20;
}

.slider-container {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    display: flex;
    gap: 14px;
    padding-bottom: 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.slider-container::-webkit-scrollbar { display: none; }

.slider-card {
    min-width: 85%;
    scroll-snap-align: start;
    background: white;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,0.04);
}

.slider-card-image {
    width: 100%;
    height: 150px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.slider-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-card-image .slider-icon {
    font-size: 48px;
    color: rgba(255,255,255,0.3);
}

.slider-card-content {
    padding: 14px;
}

.slider-card-content h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-dark);
}

.slider-card-content p {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.6;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    transition: all 0.3s;
}

.slider-dot.active {
    background: var(--primary);
    width: 24px;
    border-radius: 4px;
}

/* ==================== Quick Stats ==================== */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 16px;
    margin-top: 20px;
}

.stat-card {
    background: white;
    padding: 16px 12px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.04);
    transition: all 0.2s;
}

.stat-card:active {
    transform: scale(0.97);
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.stat-card-icon.blue {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: var(--primary);
}

.stat-card-icon.orange {
    background: linear-gradient(135deg, #ffedd5, #fed7aa);
    color: var(--secondary);
}

.stat-card-icon.green {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: var(--success);
}

.stat-card-icon.purple {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    color: #7c3aed;
}

.stat-card .stat-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-dark);
}

.stat-card .stat-desc {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 2px;
}

/* ==================== Section Header ==================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    margin: 24px 0 12px;
}

.section-header h2 {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-dark);
}

.section-header .view-all {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ==================== Projects Cards ==================== */
.projects-grid {
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.project-card {
    background: white;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    transition: all 0.2s;
}

.project-card:active {
    transform: scale(0.98);
}

.project-card-image {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    position: relative;
    overflow: hidden;
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.project-card:active .project-card-image img {
    transform: scale(1.05);
}

.project-card-image .project-status {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    color: white;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.project-status.ongoing { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }
.project-status.completed { background: linear-gradient(135deg, #16a34a, #22c55e); }
.project-status.planning { background: linear-gradient(135deg, #d97706, #f59e0b); }
.project-status.suspended { background: linear-gradient(135deg, #dc2626, #ef4444); }

/* Project status badge inside news-card style */
.project-status-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 10px;
    border-radius: 16px;
    font-size: 10px;
    font-weight: 700;
    color: white;
    z-index: 2;
}
.project-status-badge.ongoing { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }
.project-status-badge.completed { background: linear-gradient(135deg, #16a34a, #22c55e); }
.project-status-badge.planning { background: linear-gradient(135deg, #d97706, #f59e0b); }
.project-status-badge.suspended { background: linear-gradient(135deg, #dc2626, #ef4444); }

.project-card-body {
    padding: 14px;
}

.project-card-body h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.5;
}

.project-card-body .project-company {
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.project-card-body .project-desc {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.project-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-light);
}

.project-meta-item .material-icons-round {
    font-size: 14px;
    color: var(--text-muted);
}

/* ==================== Services Section ==================== */
.services-section {
    background: linear-gradient(180deg, rgba(239,246,255,0.6) 0%, rgba(248,250,252,1) 100%);
    padding: 24px 16px;
    margin-top: 24px;
}

.services-section .section-badge {
    display: inline-block;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: var(--primary);
    font-size: 10px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.services-section .section-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 4px;
    text-align: center;
}

.services-section .section-subtitle {
    font-size: 12px;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 16px;
}

.service-card {
    background: white;
    padding: 14px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 8px;
    border: 1px solid rgba(0,0,0,0.04);
    transition: all 0.2s;
}

.service-card:active {
    transform: scale(0.98);
}

.service-card-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
}

.service-card h4 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 2px;
}

.service-card p {
    font-size: 11px;
    color: var(--text-light);
    line-height: 1.5;
}

/* ==================== News Cards (Unified Size) ==================== */
.news-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0 16px 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.news-scroll::-webkit-scrollbar { display: none; }

.news-card {
    min-width: 260px;
    max-width: 260px;
    width: 260px;
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
    flex-shrink: 0;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.news-card:active {
    transform: scale(0.97);
}

.news-card-image {
    width: 100%;
    height: 140px;
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-card-body .news-category {
    font-size: 10px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
    display: inline-block;
    background: #eff6ff;
    padding: 2px 8px;
    border-radius: 6px;
    align-self: flex-start;
}

.news-card-body h4 {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
    flex: 1;
}

.news-card-body .news-time {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-muted);
}

.news-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 6px;
    border-top: 1px solid rgba(0,0,0,0.04);
}

.news-card-footer .news-time {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    color: var(--text-muted);
}

.news-views-count {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    color: var(--text-muted);
}

/* ==================== CTA Section ==================== */
.cta-section {
    margin: 24px 16px;
    background: var(--primary-gradient);
    border-radius: var(--radius-2xl);
    padding: 24px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(29,78,216,0.3);
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -64px;
    right: -64px;
    width: 150px;
    height: 150px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.cta-section::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: -40px;
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}

.cta-section h3 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.cta-section p {
    font-size: 12px;
    color: rgba(191,219,254,1);
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
    line-height: 1.6;
}

.cta-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: white;
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    position: relative;
    z-index: 1;
    font-family: 'Tajawal', sans-serif;
    box-shadow: var(--shadow-lg);
    transition: all 0.2s;
}

.cta-btn:active {
    transform: scale(0.97);
}

/* ==================== Bottom Navigation (FIXED) ==================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0,0,0,0.06);
    padding: 4px 12px;
    padding-bottom: calc(4px + var(--safe-bottom));
    z-index: 1000;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.06);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
    padding: 4px 10px;
    border: none;
    background: none;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    position: relative;
    min-width: 50px;
}

.bottom-nav-item.active {
    color: var(--primary);
}

.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--primary);
    border-radius: 0 0 3px 3px;
}

.bottom-nav-item .material-icons-round {
    font-size: 22px;
    transition: all 0.2s;
}

.bottom-nav-item.active .material-icons-round {
    font-size: 24px;
}

.bottom-nav-item span:last-child {
    font-size: 9px;
    font-weight: 600;
}

/* ==================== Page Content ==================== */
.page-content {
    padding-bottom: 20px;
}

/* ==================== Auth Pages ==================== */
.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--primary-gradient);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: var(--radius-2xl);
    padding: 32px 24px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-xl);
}

.auth-card h1 {
    font-size: 24px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 8px;
    color: var(--primary);
}

.auth-card .auth-subtitle {
    text-align: center;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 13px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
    transition: all 0.3s;
    background: var(--bg-light);
    color: var(--text-dark);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(29,78,216,0.1);
    background: white;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 700;
    font-family: 'Tajawal', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    width: 100%;
    box-shadow: 0 4px 16px rgba(29,78,216,0.3);
}

.btn-primary:active {
    transform: scale(0.97);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 500;
}

.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* ==================== Contractors Page ==================== */
.contractors-list {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contractor-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 14px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
}

.contractor-card:active {
    transform: scale(0.98);
}

.contractor-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(29,78,216,0.2);
}

.contractor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contractor-info {
    flex: 1;
    min-width: 0;
}

.contractor-info h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contractor-info .contractor-type {
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 4px;
}

.contractor-info .contractor-desc {
    font-size: 11px;
    color: var(--text-light);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.contractor-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    color: #facc15;
    font-size: 12px;
}

.contractor-action {
    flex-shrink: 0;
}

.btn-chat {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: none;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-chat:active {
    transform: scale(0.9);
}

/* ==================== Search Bar ==================== */
.search-bar {
    padding: 10px 16px;
    position: sticky;
    top: 48px;
    z-index: 40;
    background: var(--bg-light);
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
    gap: 8px;
    transition: all 0.3s;
}

.search-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(29,78,216,0.1);
}

.search-input-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    font-family: 'Tajawal', sans-serif;
    background: transparent;
    color: var(--text-dark);
}

.search-input-wrapper .material-icons-round {
    color: var(--text-muted);
    font-size: 20px;
}

/* ==================== Empty State ==================== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-light);
}

.empty-state .material-icons-round {
    font-size: 64px;
    color: #cbd5e1;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 13px;
    line-height: 1.6;
}

/* ==================== Animations ==================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.animate-fadeInUp {
    animation: fadeInUp 0.5s ease-out;
}

.animate-slideInRight {
    animation: slideInRight 0.3s ease-out;
}

/* ==================== Responsive ==================== */
@media (min-width: 768px) {
    body {
        max-width: 480px;
        margin: 0 auto;
        box-shadow: 0 0 40px rgba(0,0,0,0.1);
    }
    .bottom-nav {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
    }
    .top-nav {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
    }
}

/* ==================== Filter Tabs ==================== */
.filter-tabs, .news-filter-tabs {
    display: flex;
    gap: 8px;
    padding: 0 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: 14px;
}

.filter-tabs::-webkit-scrollbar, .news-filter-tabs::-webkit-scrollbar { display: none; }

.filter-tab, .news-filter-tab {
    padding: 7px 16px;
    border-radius: 24px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    border: 2px solid var(--border);
    background: white;
    color: var(--text-light);
    text-decoration: none;
    font-family: 'Tajawal', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-tab.active, .news-filter-tab.active {
    background: var(--primary-gradient);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(29,78,216,0.25);
}

/* ==================== News Full Cards ==================== */
.news-full-card {
    background: white;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
    margin-bottom: 14px;
    transition: all 0.2s;
}

.news-full-card:active {
    transform: scale(0.98);
}

.news-full-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    overflow: hidden;
}

.news-full-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-full-body {
    padding: 14px;
}

.news-full-body .news-cat {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: var(--primary);
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 8px;
}

.news-full-body h3 {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.6;
    margin-bottom: 6px;
}

.news-full-body .news-excerpt {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}

.news-full-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.news-full-footer .news-date,
.news-full-footer .news-views {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-muted);
}

/* ==================== SweetAlert RTL ==================== */
.swal-rtl {
    direction: rtl;
    font-family: 'Tajawal', sans-serif;
}
