/* ============================================
   خدمات المنزل - الأنماط الرئيسية
   ============================================ */

/* ─── المتغيرات ─── */
:root {
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
    --primary-light: #e7f1ff;
    --secondary: #198754;
    --secondary-dark: #157347;
    --accent: #ff6b35;
    --dark: #1a1d2e;
    --dark-light: #2d3250;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --white: #ffffff;
    --body-bg: #f5f7fa;
    --text-color: #333333;
    --text-muted: #6c757d;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s ease;
    --font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
}

/* ─── الأساسيات ─── */
* { box-sizing: border-box; }

body {
    font-family: var(--font-family);
    background: var(--body-bg);
    color: var(--text-color);
    direction: rtl;
    line-height: 1.7;
    overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--dark);
    line-height: 1.4;
}

/* ─── الخط العربي ─── */
@font-face {
    font-family: 'Cairo';
    src: url('../fonts/cairo-var.woff2') format('woff2');
    font-weight: 200 1000;
    font-display: swap;
}

/* ─── الشريط العلوي ─── */
.top-bar {
    background: var(--dark);
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    padding: 8px 0;
}

.top-bar a { color: rgba(255,255,255,0.8); }
.top-bar a:hover { color: #fff; }

.top-bar .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    margin: 0 2px;
    font-size: 13px;
    transition: var(--transition);
}

.top-bar .social-links a:hover {
    background: var(--primary);
    color: #fff;
}

/* ─── الهيدر الرئيسي ─── */
.main-header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: var(--transition);
}

.main-header.scrolled {
    box-shadow: var(--shadow-md);
}

.main-header .navbar {
    padding: 12px 0;
}

.main-header .navbar-brand {
    font-size: 22px;
    font-weight: 800;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.main-header .navbar-brand img {
    height: 42px;
    width: auto;
}

.main-header .navbar-brand .brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
}

.main-header .nav-link {
    color: var(--gray-700);
    font-weight: 600;
    font-size: 15px;
    padding: 8px 16px !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
}

.main-header .nav-link:hover,
.main-header .nav-link.active {
    color: var(--primary);
    background: var(--primary-light);
}

.main-header .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 16px;
    left: 16px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}

.main-header .btn-cta {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff !important;
    padding: 10px 24px !important;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    border: none;
    box-shadow: 0 4px 15px rgba(13,110,253,0.3);
    transition: var(--transition);
}

.main-header .btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13,110,253,0.4);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff !important;
}

/* ─── القائمة المنسدلة ─── */
.main-header .dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: 10px;
    min-width: 220px;
    animation: fadeInDown 0.2s ease;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.main-header .dropdown-item {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    transition: var(--transition);
}

.main-header .dropdown-item:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.main-header .dropdown-item i {
    width: 20px;
    text-align: center;
    margin-left: 8px;
    color: var(--gray-500);
}

/* ─── Hero Section ─── */
.hero-section {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 50%, var(--primary-dark) 100%);
    color: #fff;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(13,110,253,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(25,135,84,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-section .hero-title {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.3;
}

.hero-section .hero-subtitle {
    font-size: 20px;
    opacity: 0.85;
    margin-bottom: 32px;
    line-height: 1.6;
}

.hero-section .btn-hero {
    padding: 14px 36px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 50px;
    border: none;
    transition: var(--transition);
}

.hero-section .btn-hero-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 20px rgba(13,110,253,0.4);
}

.hero-section .btn-hero-primary:hover {
    background: #fff;
    color: var(--primary);
    transform: translateY(-3px);
}

.hero-section .btn-hero-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.4);
}

.hero-section .btn-hero-outline:hover {
    background: #fff;
    color: var(--dark);
    border-color: #fff;
}

/* ─── الأقسام ─── */
.section-padding { padding: 70px 0; }
.section-padding-sm { padding: 50px 0; }

.section-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
}

.section-subtitle.mx-auto { margin-left: auto; margin-right: auto; }

.section-bg { background: var(--white); }
.section-bg-gray { background: var(--gray-100); }

/* ─── بطاقات الخدمات ─── */
.service-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    border: 1px solid var(--gray-200);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.service-card .card-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.service-card .card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .card-img-wrapper img {
    transform: scale(1.08);
}

.service-card .card-img-wrapper .card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.service-card .card-body {
    padding: 20px;
}

.service-card .card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--dark);
}

.service-card .card-title a {
    color: inherit;
}

.service-card .card-title a:hover {
    color: var(--primary);
}

.service-card .card-text {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.7;
}

.service-card .card-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 12px;
}

.service-card .card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.service-card .card-link:hover {
    gap: 10px;
}

/* ─── بطاقات الأقسام ─── */
.category-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 2px solid transparent;
    height: 100%;
}

.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.category-card .cat-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 16px;
    transition: var(--transition);
}

.category-card:hover .cat-icon {
    background: var(--primary);
    color: #fff;
}

.category-card .cat-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
}

.category-card .cat-count {
    font-size: 13px;
    color: var(--text-muted);
}

/* ─── بطاقات المقالات ─── */
.article-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    border: 1px solid var(--gray-200);
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.article-card .article-img {
    height: 200px;
    overflow: hidden;
}

.article-card .article-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.article-card:hover .article-img img {
    transform: scale(1.05);
}

.article-card .article-body {
    padding: 20px;
}

.article-card .article-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.article-card .article-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.5;
}

.article-card .article-title a { color: var(--dark); }
.article-card .article-title a:hover { color: var(--primary); }

.article-card .article-excerpt {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ─── CTA Section ─── */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.cta-section h2 {
    color: #fff;
    font-size: 30px;
    margin-bottom: 12px;
}

.cta-section p {
    font-size: 17px;
    opacity: 0.9;
    margin-bottom: 28px;
}

.cta-section .btn-cta-white {
    background: #fff;
    color: var(--primary);
    padding: 14px 36px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transition: var(--transition);
}

.cta-section .btn-cta-white:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    color: var(--primary-dark);
}

/* ─── آراء العملاء ─── */
.testimonial-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    height: 100%;
    position: relative;
}

.testimonial-card::before {
    content: '\F6B0';
    font-family: 'bootstrap-icons';
    position: absolute;
    top: 16px;
    left: 20px;
    font-size: 32px;
    color: var(--primary-light);
}

.testimonial-card .stars {
    color: #ffc107;
    font-size: 14px;
    margin-bottom: 12px;
}

.testimonial-card .testimonial-text {
    font-size: 15px;
    color: var(--gray-700);
    line-height: 1.8;
    margin-bottom: 16px;
}

.testimonial-card .client-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-card .client-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.testimonial-card .client-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--dark);
}

.testimonial-card .client-city {
    font-size: 13px;
    color: var(--text-muted);
}

/* ─── الأسئلة الشائعة ─── */
.faq-section .accordion-item {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md) !important;
    margin-bottom: 12px;
    overflow: hidden;
}

.faq-section .accordion-button {
    font-weight: 700;
    font-size: 16px;
    color: var(--dark);
    padding: 18px 20px;
    background: var(--white);
    box-shadow: none !important;
}

.faq-section .accordion-button:not(.collapsed) {
    background: var(--primary-light);
    color: var(--primary);
}

.faq-section .accordion-body {
    font-size: 15px;
    color: var(--gray-700);
    line-height: 1.8;
    padding: 0 20px 18px;
}

/* ─── الإحصائيات ─── */
.stats-section {
    background: var(--white);
    padding: 40px 0;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}

.stat-item {
    text-align: center;
    padding: 20px;
}

.stat-item .stat-number {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
}

.stat-item .stat-label {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
}

/* ─── الفوتر ─── */
.main-footer {
    background: var(--dark);
    color: rgba(255,255,255,0.75);
    padding-top: 60px;
}

.main-footer h5 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 700;
}

.main-footer p {
    font-size: 14px;
    line-height: 1.8;
}

.main-footer .footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-footer .footer-links li {
    margin-bottom: 10px;
}

.main-footer .footer-links a {
    color: rgba(255,255,255,0.65);
    font-size: 14px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.main-footer .footer-links a:hover {
    color: #fff;
    padding-right: 6px;
}

.main-footer .footer-links a i {
    font-size: 10px;
}

.main-footer .footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 14px;
}

.main-footer .footer-contact i {
    color: var(--primary);
    margin-top: 4px;
    width: 18px;
    text-align: center;
}

.main-footer .footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
    font-size: 16px;
    margin: 0 3px;
    transition: var(--transition);
}

.main-footer .footer-social a:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-3px);
}

.main-footer .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 20px 0;
    margin-top: 40px;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

/* ─── أزرار الاتصال الثابتة ─── */
.fixed-contact-btns {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fixed-contact-btns a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: var(--transition);
    text-decoration: none;
}

.fixed-contact-btns a:hover {
    transform: scale(1.1);
    color: #fff;
}

.fixed-contact-btns .btn-whatsapp {
    background: #25d366;
}

.fixed-contact-btns .btn-whatsapp:hover {
    background: #1fb855;
}

.fixed-contact-btns .btn-call {
    background: var(--primary);
}

.fixed-contact-btns .btn-call:hover {
    background: var(--primary-dark);
}

/* ─── Breadcrumb ─── */
.breadcrumb-section {
    background: var(--dark);
    padding: 30px 0;
    color: #fff;
}

.breadcrumb-section h1 {
    color: #fff;
    font-size: 28px;
    margin-bottom: 8px;
}

.breadcrumb-section .breadcrumb {
    margin: 0;
    background: none;
    padding: 0;
}

.breadcrumb-section .breadcrumb-item a {
    color: rgba(255,255,255,0.7);
}

.breadcrumb-section .breadcrumb-item a:hover {
    color: #fff;
}

.breadcrumb-section .breadcrumb-item.active {
    color: var(--primary);
}

.breadcrumb-section .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,0.4);
}

/* ─── صفحة 404 ─── */
.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
}

.error-page .error-code {
    font-size: 120px;
    font-weight: 900;
    color: var(--gray-200);
    line-height: 1;
    margin-bottom: 16px;
}

.error-page h2 {
    font-size: 28px;
    margin-bottom: 12px;
}

.error-page p {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 24px;
}

/* ─── نموذج الطلب ─── */
.request-form {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-md);
}

.request-form .form-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--dark);
}

.request-form .form-control,
.request-form .form-select {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    transition: var(--transition);
}

.request-form .form-control:focus,
.request-form .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13,110,253,0.1);
}

/* ─── التجاوب ─── */
@media (max-width: 991.98px) {
    .hero-section { padding: 50px 0; }
    .hero-section .hero-title { font-size: 30px; }
    .hero-section .hero-subtitle { font-size: 16px; }
    .section-title { font-size: 26px; }
    .section-padding { padding: 50px 0; }
    .top-bar { display: none; }

    .main-header .navbar-collapse {
        background: var(--white);
        padding: 16px;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-lg);
        margin-top: 10px;
    }

    .main-header .nav-link.active::after { display: none; }
}

@media (max-width: 575.98px) {
    .hero-section .hero-title { font-size: 26px; }
    .section-title { font-size: 22px; }
    .stat-item .stat-number { font-size: 28px; }
    .fixed-contact-btns { bottom: 16px; left: 16px; }
    .fixed-contact-btns a { width: 48px; height: 48px; font-size: 20px; }
    .request-form { padding: 20px; }
}

/* ─── أنيميشن ─── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}