/* ========================================
   خدمة عدن - نمط CSS رئيسي
   ======================================== */

:root {
    --primary-color: #0066cc;
    --secondary-color: #004499;
    --accent-color: #ffc107;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #6c757d;
    --text-color: #333;
    --text-light: #666;
    --border-color: #ddd;
    --white: #fff;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
    /* Added to prevent mobile instability */
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* منع أي عنصر من تجاوز عرض الشاشة */
* {
    max-width: 100%;
    box-sizing: border-box;
}

img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

/* ========== Typography ========== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 15px;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.1rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 15px;
    color: var(--text-light);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

ul,
ol {
    list-style: none;
}

/* ========== Header & Navigation ========== */
header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: right;
    gap: 8px;
}

.logo i {
    font-size: 2rem;
}

header nav ul {
    display: flex;
    gap: 30px;
    align-items: center;
}

header nav a {
    color: var(--text-color);
    font-weight: 600;
    transition: var(--transition);
    position: relative;
}

header nav a:hover {
    color: var(--primary-color);
}

header nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

header nav a:hover::after {
    width: 100%;
}

.header-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn {
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

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

.btn-login:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

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

.btn-secondary {
    background: var(--accent-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background: #ffb300;
}

.btn-success {
    background: var(--success-color);
    color: var(--white);
}

.btn-success:hover {
    background: #218838;
}

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

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* ========== Hero Section ========== */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--white);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-box {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
}

.search-box form {
    display: grid;
    grid-template-columns: 1fr 1fr 150px;
    gap: 15px;
    align-items: center;
}

.search-box input,
.search-box select {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
}

.search-box input:focus,
.search-box select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.search-box button {
    padding: 12px 20px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.search-box button:hover {
    background: var(--secondary-color);
}

/* ========== Sections ========== */
section {
    padding: 60px 0;
}

.page-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 40px 0;
    text-align: center;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.page-hero h1 {
    color: var(--white);
    margin-bottom: 10px;
}

.page-hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

/* ========== How It Works ========== */
.how-it-works {
    background: var(--light-gray);
}

.how-it-works .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    text-align: center;
}

.step {
    padding: 30px;
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.step:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.step i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.step h3 {
    color: var(--text-color);
    margin-bottom: 15px;
}

.step p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ========== Services Grid ========== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.service-card {
    background: var(--white);
    border: 2px solid var(--border-color);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.service-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.service-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.service-card span {
    font-weight: 600;
    color: var(--text-color);
}

/* ========== Technician Cards ========== */
.technician-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 20px;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.technician-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.tech-card-image {
    flex-shrink: 0;
}

.tech-card-image img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

.tech-card-info {
    flex: 1;
}

.tech-card-info h3 {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.verified-badge {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.tech-card-location {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--dark-gray);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.tech-card-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.stars {
    color: var(--accent-color);
}

.tech-card-bio {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0;
}

.tech-card-action {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-profile,
.btn-chat {
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-profile {
    background: var(--light-gray);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-profile:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.btn-chat {
    background: var(--primary-color);
    color: var(--white);
}

.btn-chat:hover {
    background: var(--secondary-color);
}

/* ========== Profile Page ========== */
.profile-page-section {
    padding: 40px 0;
}

.profile-chat-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    align-items: start;
}

.profile-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.profile-header-card {
    text-align: center;
}

.profile-image {
    margin-bottom: 20px;
}

.profile-image img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
}

.profile-name {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.profile-specialty {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 8px;
}

.profile-location {
    color: var(--dark-gray);
    margin-bottom: 15px;
}

.rating-summary {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 !important;
}

.action-buttons .btn {
    padding: 12px 20px;
    width: 100%;
    justify-content: center;
}

.portfolio-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.portfolio-gallery img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.portfolio-gallery img:hover {
    transform: scale(1.05);
}

/* ========== Reviews ========== */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.review-card {
    background: var(--light-gray);
    padding: 15px;
    border-radius: 8px;
    border-right: 4px solid var(--primary-color);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.review-header h4 {
    margin: 0;
    font-size: 1rem;
}

.review-stars {
    color: var(--accent-color);
    font-size: 0.9rem;
}

.review-comment {
    margin: 0;
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ========== Chat Container ========== */
.chat-container {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    height: 600px;
}

.chat-sidebar {
    width: 280px;
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    background: var(--light-gray);
}

.chat-sidebar-header {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    background: var(--white);
}

.chat-sidebar-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.contact-list {
    flex: 1;
    overflow-y: auto;
}

.contact-item {
    display: flex;
    gap: 12px;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    align-items: flex-start;
}

.contact-item:hover {
    background: var(--white);
}

.contact-item.active {
    background: var(--white);
    border-right: 4px solid var(--primary-color);
}

.contact-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

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

.contact-name {
    display: block;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
}

.last-message {
    display: block;
    color: var(--text-light);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-window {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--white);
}

.chat-header h5 {
    margin: 0;
    font-size: 1rem;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    display: flex;
    margin-bottom: 10px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.sent {
    justify-content: flex-end;
}

.message.received {
    justify-content: flex-start;
}

.message span {
    max-width: 70%;
    padding: 12px 15px;
    border-radius: 10px;
    word-wrap: break-word;
    font-size: 0.95rem;
    line-height: 1.4;
}

.message.sent span {
    background: var(--primary-color);
    color: var(--white);
    border-bottom-right-radius: 3px;
}

.message.received span {
    background: var(--light-gray);
    color: var(--text-color);
    border-bottom-left-radius: 3px;
}

.chat-input-box {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

.chat-input-box input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    font-size: 0.95rem;
}

.chat-input-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.chat-input-box button {
    padding: 12px 20px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.chat-input-box button:hover {
    background: var(--secondary-color);
}

/* ========== User Profile Page ========== */
.user-profile-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
}

.profile-sidebar {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    height: fit-content;
    box-shadow: var(--shadow);
}

.profile-sidebar-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.profile-sidebar-header img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid var(--primary-color);
}

.profile-sidebar-header h4 {
    margin-bottom: 5px;
}

.profile-sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-sidebar-menu a {
    padding: 12px 15px;
    border-radius: 5px;
    color: var(--text-color);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.profile-sidebar-menu a:hover,
.profile-sidebar-menu a.active {
    background: var(--primary-color);
    color: var(--white);
}

.profile-content {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.profile-content h2 {
    text-align: left;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

/* ========== Conversations List ========== */
.conversations-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.conversation-item {
    background: var(--light-gray);
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    border-left: 4px solid transparent;
}

.conversation-item:hover {
    background: var(--white);
    border-left-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.conversation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.conversation-name {
    font-weight: 600;
    color: var(--text-color);
}

.conversation-time {
    font-size: 0.85rem;
    color: var(--dark-gray);
}

.conversation-preview {
    color: var(--text-light);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== Favorites & Follows ========== */
.favorites-grid,
.follows-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.favorite-card,
.follow-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.favorite-card:hover,
.follow-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.favorite-card img,
.follow-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 15px;
    border: 3px solid var(--primary-color);
}

.favorite-card h4,
.follow-card h4 {
    margin-bottom: 8px;
}

.favorite-card .specialty,
.follow-card .specialty {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.favorite-card .location,
.follow-card .location {
    color: var(--dark-gray);
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.favorite-card .btn,
.follow-card .btn {
    width: 100%;
    justify-content: center;
    padding: 10px;
}

/* ========== Footer ========== */
footer {
    background: #1a3a5a;
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: 60px;
}

footer .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-col h3,
.footer-col h4 {
    color: var(--white);
    margin-bottom: 15px;
}

.footer-col p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

/* ========== CTA Section ========== */
.cta-pro {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 60px 0;
}

.cta-pro .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.cta-content h2 {
    color: var(--white);
    text-align: left;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
}

.cta-content ul {
    margin-bottom: 30px;
}

.cta-content li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.cta-content i {
    color: var(--accent-color);
    font-size: 1.2rem;
}

.cta-button {
    display: inline-block;
    background: var(--accent-color);
    color: var(--text-color);
    padding: 15px 30px;
    border-radius: 5px;
    font-weight: 700;
    transition: var(--transition);
}

.cta-button:hover {
    background: #ffb300;
    transform: translateY(-2px);
}

.cta-image {
    text-align: center;
}

.cta-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

/* ========== Testimonials ========== */
.testimonials {
    background: var(--light-gray);
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background: var(--white);
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary-color);
}

.testimonial-card p {
    margin-bottom: 15px;
    font-style: italic;
    color: var(--text-light);
}

.testimonial-card h4 {
    margin-bottom: 5px;
    color: var(--text-color);
}

.testimonial-card span {
    color: var(--dark-gray);
    font-size: 0.9rem;
}

/* ========== Responsive Design ========== */
@media (max-width: 768px) {

    html,
    body {
        overflow-x: hidden !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .container {
        padding: 0 15px !important;
        max-width: 100% !important;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    header .container {
        flex-direction: column;
        height: auto;
        gap: 15px;
    }

    header nav ul {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .search-box form {
        grid-template-columns: 1fr;
    }

    .profile-chat-container {
        grid-template-columns: 1fr;
    }

    .chat-container {
        height: 500px;
    }

    .chat-sidebar {
        width: 100%;
        max-height: 200px;
    }

    .cta-pro .container {
        grid-template-columns: 1fr;
    }

    .user-profile-container {
        grid-template-columns: 1fr;
    }

    .profile-sidebar {
        height: auto;
    }

    .tech-card-action {
        flex-direction: row;
        width: 100%;
    }

    .btn-profile,
    .btn-chat {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    .hero {
        padding: 40px 0;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .search-box {
        padding: 15px;
    }

    .technician-card {
        flex-direction: column;
        text-align: center;
    }

    .tech-card-action {
        width: 100%;
        flex-direction: column;
    }

    .chat-container {
        height: 400px;
    }

    .chat-sidebar {
        width: 100%;
        max-height: 150px;
    }

    .message span {
        max-width: 90%;
    }

    .profile-image img {
        width: 80px;
        height: 80px;
    }
}

/* ========== Utilities ========== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-40 {
    margin-top: 40px;
}

.mb-40 {
    margin-bottom: 40px;
}

.hidden {
    display: none;
}

.online-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--success-color);
    display: inline-block;
    margin-right: 5px;
}

.offline-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--dark-gray);
    display: inline-block;
    margin-right: 5px;
}

/* ========================================
   Custom Styles for New Pages (Jobs, All Services, Technician Profile)
   ======================================== */

/* --- All Services Page --- */
.services-grid-full {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.service-card-full {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-color);
}

.service-card-full:hover {
    box-shadow: var(--shadow);
    transform: translateY(-3px);
    text-decoration: none;
    color: var(--primary-color);
}

.service-card-full i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Technician Tabs (Index and All Services) */
.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--medium-gray);
}

.tab-link {
    background: none;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-light);
    transition: var(--transition);
    border-bottom: 3px solid transparent;
    margin: 0 10px;
}

.tab-link:hover {
    color: var(--primary-color);
}

.tab-link.active {
    color: var(--primary-color);
    font-weight: bold;
    border-bottom: 3px solid var(--primary-color);
}

.tab-content {
    display: none;
    padding: 20px 0;
}

.tab-content.active {
    display: block;
}

/* Technician Card in Tabs */
.technician-card-tab {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
    transition: var(--transition);
}

.technician-card-tab:hover {
    box-shadow: var(--shadow);
}

.technician-card-tab img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-left: 15px;
}

.technician-card-tab h5 {
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.technician-card-tab p {
    margin-bottom: 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* --- Technician Profile Page --- */
.profile-chat-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    /* Profile details and Chat container */
    gap: 30px;
}

.profile-details {
    flex: 1;
    /* Minimum content to avoid empty ruleset */
}

.chat-container {
    /* Takes 1/3 of the space */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 80vh;
    /* Adjust as needed */
}

.hide-chat {
    display: none !important;
}

/* Adjust layout when chat is hidden (for public view) */
.profile-page-section .container #profileContainer[style*="grid-template-columns: 1fr"] {
    grid-template-columns: 1fr !important;
}

/* --- Search Page Form --- */
.search-form-full {
    background-color: var(--light-gray);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.search-form-full .form-row {
    display: flex;
    flex-wrap: wrap;
    margin: -10px;
}

.search-form-full .col-md-5,
.search-form-full .col-md-3,
.search-form-full .col-md-1 {
    padding: 10px;
}

.search-form-full .form-control {
    height: 45px;
}

.search-form-full .btn-block {
    height: 45px;
}

@media (max-width: 992px) {
    .profile-chat-container {
        grid-template-columns: 1fr;
    }

    .chat-container {
        height: 60vh;
    }
}

@media (max-width: 768px) {

    .search-form-full .col-md-5,
    .search-form-full .col-md-3,
    .search-form-full .col-md-1 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ========================================
   تنسيقات صفحة تسجيل الدخول (AUTH)
   ======================================== */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* استخدام تدرج لوني يتوافق مع ألوان الموقع الرئيسية */
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 20px;
}

.auth-card {
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    padding: 40px;
    max-width: 400px;
    width: 100%;
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-color);
    font-size: 1.8rem;
}

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

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

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.remember-me {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.remember-me input {
    width: auto;
    margin: 0;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.forgot-password:hover {
    text-decoration: underline;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.submit-btn:hover {
    background: var(--secondary-color);
}

.divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    background: var(--white);
    padding: 0 10px;
    position: relative;
    color: var(--dark-gray);
}

.signup-link {
    text-align: center;
    margin-top: 20px;
}

.signup-link a {
    text-decoration: none;
}

/* حسابات تجريبية */
.demo-accounts {
    background: var(--light-gray);
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    font-size: 0.85rem;
    text-align: right;
}

.demo-accounts p {
    margin: 0 0 10px 0;
    font-weight: 600;
    color: var(--text-color);
}

.demo-accounts div {
    margin-bottom: 8px;
}

.demo-accounts code {
    background: var(--white);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    color: var(--primary-color);
    direction: ltr;
    display: inline-block;
}

/* =================================================================== */
/* 0. المتغيرات والألوان الأساسية (Variables)                           */
/* =================================================================== */
:root {
    --primary-color: #0066cc;
    /* أزرق أساسي */
    --secondary-color: #f0ad4e;
    /* برتقالي ثانوي */
    --color-text: #333333;
    /* لون النص الأساسي */
    --color-gray-dark: #6c757d;
    /* رمادي داكن للنصوص الثانوية */
    --color-gray-light: #f8f9fa;
    /* رمادي فاتح للخلفيات */
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* =================================================================== */
/* 1. التنسيقات العامة والخطوط (General & Typography)                    */
/* =================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Cairo', sans-serif;
    color: var(--color-text);
    background-color: var(--white);
    line-height: 1.6;
    direction: rtl;
    text-align: right;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 30px;
    text-align: center;
}

.py-5 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

/* الأزرار الأساسية (لزر عرض الملف الشخصي) */
.btn-view-profile:hover {
    background-color: var(--secondary-color);
    color: var(--white) !important;
}

/* =================================================================== */
/* 2. تنسيقات شريط البحث وصفحة البحث (Search Page V4)                  */
/* *هذه التنسيقات هي مفتاح الشكل الأفقي والأنيق* */
/* =================================================================== */

.search-page-container {
    padding: 40px 0 20px 0;
    background-color: #f0f4f8;
}

/* شريط التصفية المدمج والأنيق V4 */
.filter-form-v4 {
    background-color: var(--white);
    padding: 15px 20px;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    max-width: 1200px;
    margin: 0 auto;
    border: 1px solid #dcdcdc;
}

.filter-form-v4 .filter-group-v4 {
    display: flex;
    gap: 15px;
    align-items: stretch;
    /* لضمان تساوي ارتفاع جميع عناصر الإدخال */
    flex-wrap: wrap;
}

.filter-form-v4 .form-input-wrapper,
.filter-form-v4 .form-select-wrapper {
    position: relative;
    flex: 1 1 200px;
    /* كل عنصر يأخذ 200px على الأقل */
}

.filter-form-v4 input[type="text"],
.filter-form-v4 select {
    width: 100%;
    padding: 13px 15px 13px 45px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background: #fcfcfc;
    height: 100%;
    /* مهم لضمان تساوي الارتفاع مع الأزرار */
    color: #333;
    /* لإزالة سهم المتصفح الافتراضي في بعض المتصفحات */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.filter-form-v4 .form-input-wrapper i,
.filter-form-v4 .form-select-wrapper i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 1rem;
    z-index: 10;
}

/* زر البحث الرئيسي */
.btn-filter-submit-v4 {
    flex-shrink: 0;
    /* لمنع تقلص الزر */
    padding: 12px 25px;
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    font-weight: 700;
    height: 50px;
    /* تحديد ارتفاع الزر لمطابقة حقول الإدخال */
    margin-top: auto;
    /* مهم للمحاذاة الرأسية */
}

.btn-filter-submit-v4:hover {
    background-color: #eea236;
    transform: translateY(-2px);
}

/* زر مسح التصفية */
.btn-clear-filter-v4 {
    flex-shrink: 0;
    padding: 12px 15px;
    background-color: #dc3545;
    color: var(--white) !important;
    /* !important لضمان تجاوز لون الرابط الافتراضي */
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    /* تحديد ارتفاع الزر لمطابقة حقول الإدخال */
    margin-top: auto;
    /* مهم للمحاذاة الرأسية */
}

.btn-clear-filter-v4:hover {
    background-color: #c82333;
}

/* =================================================================== */
/* 3. تنسيق شبكة وبطاقات الفنيين (Technician Grid & Card V2)           */
/* =================================================================== */

.technician-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.technician-card-v2 {
    background: #fdfdfd;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

.technician-card-v2:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

/* تنسيق النجوم */
.card-rating i.filled {
    color: #ffc107;
}

.card-rating .rating-number {
    margin-right: 5px;
    font-weight: 600;
    color: #555;
}

/* =================================================================== */
/* 4. التجاوب (Responsive) */
/* =================================================================== */
@media (max-width: 992px) {
    .filter-form-v4 .filter-group-v4 {
        flex-direction: column;
    }

    .filter-form-v4 .form-input-wrapper,
    .filter-form-v4 .form-select-wrapper,
    .btn-filter-submit-v4,
    .btn-clear-filter-v4 {
        flex: 1 1 100%;
        height: auto;
        /* إلغاء الارتفاع الثابت للأزرار في الجوال */
    }

    .btn-filter-submit-v4,
    .btn-clear-filter-v4 {
        padding: 15px 25px;
    }
}

.filter-form-v4 .filter-group-v4 {
    display: flex;
    /* يجعل العناصر جنباً إلى جنب */
    gap: 15px;
    align-items: stretch;
    /* مهم لتساوي ارتفاع الحقول والأزرار */
    flex-wrap: wrap;
}

.technician-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    /* يضمن شبكة ثلاثية */
    gap: 30px;
}

/* ======================================= */
/* 3. تنسيقات جدول الفنيين (Technician Table) */
/* ======================================= */

/* 1. توسيط نص البحث في حقل الإدخال */
.filter-form-v4 .form-input-wrapper input[type="text"] {
    text-align: center;
}

.technician-table-wrapper {
    overflow-x: auto;
    /* يضيف شريط تمرير أفقي للجوال */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    /* ظل احترافي */
    background: #ffffff;
}

.technician-list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: right;
    /* محاذاة النص الافتراضية للغة العربية */
}

/* تنسيق رؤوس الجدول */
.technician-list-table thead th {
    background-color: var(--color-primary-blue, #0066cc);
    color: #ffffff;
    padding: 15px 10px;
    text-align: center;
    /* توسيط نصوص الرؤوس */
    font-weight: 700;
    white-space: nowrap;
}

/* تنسيق الصفوف */
.technician-list-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s;
}

.technician-list-table tbody tr:hover {
    background-color: #f7f9fc;
}

/* تنسيق خلايا الجدول ومحتواها */
.technician-list-table tbody td {
    padding: 12px 10px;
    vertical-align: middle;
    text-align: center;
    /* توسيط محتوى الأعمدة المطلوب */
}

/* استثناء عمود الفني ليبقى محاذياً لليمين لقراءة الاسم والصورة */
.technician-list-table tbody td:first-child {
    text-align: right;
}

/* تنسيق عمود الفني (الصورة والاسم) */
.technician-name-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-text-dark, #333);
    text-decoration: none;
    font-weight: 600;
}

.technician-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ddd;
}

/* تنسيق التقييم */
.rating-display {
    display: flex;
    align-items: center;
    justify-content: center;
    /* توسيط مجموعة النجوم داخل الخلية */
    white-space: nowrap;
}

.rating-display .fas.filled,
.rating-display .fas.fa-star-half-alt.filled {
    color: var(--color-secondary-orange, #f0ad4e);
    font-size: 14px;
}

.rating-display .far.fa-star {
    color: #ccc;
    font-size: 14px;
}

.rating-display .rating-number {
    margin-right: 5px;
    font-weight: 600;
    color: var(--color-text-dark, #333);
}

/* تنسيق زر الإجراء (عرض الملف) - اللون البرتقالي المطلوب */
.btn-view-profile-table {
    display: inline-block;
    padding: 8px 15px;
    background-color: var(--color-secondary-orange, #f0ad4e);
    /* اللون البرتقالي */
    color: #ffffff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-view-profile-table:hover {
    background-color: #eea236;
    /* لون أغمق عند المرور */
}


/* ======================================= */
/* 4. تنسيقات التجاوب (Mobile Responsiveness) */
/* ======================================= */
@media (max-width: 768px) {

    /* إخفاء رؤوس الجدول في شاشات الجوال */
    .technician-list-table thead {
        display: none;
    }

    /* جعل كل صف يبدو كبطاقة */
    .technician-list-table tbody tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid #ddd;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    /* عرض الخلايا كعناصر مكدسة */
    .technician-list-table tbody td {
        display: flex;
        justify-content: space-between;
        text-align: right;
        padding: 10px;
        border-bottom: 1px dashed #eee;
    }

    /* عرض عنوان البيانات (Data Labels) */
    .technician-list-table tbody td:before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--color-gray-dark, #555);
        text-align: right;
        flex-shrink: 0;
        margin-right: 10px;
    }

    /* تخصيص العمود الأول (الفني) في الجوال */
    .technician-list-table tbody td:first-child {
        text-align: right;
        justify-content: flex-end;
        /* لضمان ظهور الصورة والاسم معاً */
    }

    /* تخصيص عمود الإجراء في الجوال */
    .technician-list-table tbody td:last-child {
        border-bottom: none;
        justify-content: center;
        /* توسيط زر الإجراء في الأسفل */
    }

    .btn-view-profile-table {
        width: 100%;
        text-align: center;
    }
}

/* ======================================= */
/* تعديلات حقول القوائم المنسدلة (التخصص والمنطقة) */
/* ======================================= */

/* 1. تنسيق الحاوية الأساسية للقائمة المنسدلة */
.filter-form-v4 .form-select-wrapper {
    /* (إذا لم تكن موجودة بالفعل) تجعل الأيقونة وحقل الاختيار في سطر واحد */
    position: relative;
    display: flex;
    align-items: center;
    /* مساحة للحقل والأيقونة والزر */
}

/* 2. تنسيق الأيقونة داخل الحقل */
.filter-form-v4 .form-select-wrapper i {
    position: absolute;
    right: 15px;
    /* ضع الأيقونة على اليمين */
    color: var(--color-gray-dark, #555);
    z-index: 10;
}

/* 3. تطبيق التوسيط على حقل SELECT */
.filter-form-v4 .form-select-wrapper select {
    /* يجب أن يكون `select` هو العنصر الأساسي الذي يحتل كامل المساحة */
    width: 100%;
    padding: 10px 40px 10px 15px;
    /* زيادة التباعد على اليمين لتفادي الأيقونة، وعلى اليسار لزر المؤشر */
    border: 1px solid #ddd;
    border-radius: 6px;
    appearance: none;
    /* إزالة مظهر القائمة المنسدلة الافتراضي للمتصفح */
    -webkit-appearance: none;
    -moz-appearance: none;
    text-align: center;
    /* توسيط النص المدخل/المختار داخل القائمة */
    text-align-last: center;
    /* مهم لتوسيط النص في Firefox */
    direction: rtl;
    /* لضمان صحة التوسيط في بعض المتصفحات مع اللغة العربية */
}

/* 4. إضافة مؤشر القائمة المنسدلة (السهم) */
.filter-form-v4 .form-select-wrapper:after {
    content: "\f0d7";
    /* كود أيقونة السهم للأسفل من Font Awesome */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 10px;
    /* مكان السهم على اليسار */
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    /* حتى لا يحظر النقر على القائمة */
    color: var(--color-primary-blue, #0066cc);
    font-size: 14px;
    z-index: 10;
}