/*
Theme Name: الرائد للخدمات المنزلية
Description: قالب ووردبريس لشركة نسيم القصيم للخدمات المنزلية - محسن للهواتف المحمولة
Version: 1.1
Author: مطور القالب
Text Domain: alraed-theme
*/

/* ============================================= */
/* إصلاحات التجاوب الحرجة - CRITICAL RESPONSIVE FIXES */
/* هذه القواعد يجب أن تكون في أعلى الملف لضمان تطبيقها */
/* ============================================= */

/* إصلاح عرض الحاوية الرئيسية */
.article-layout {
    display: grid !important;
    grid-template-columns: 1fr 350px !important;
    gap: 40px !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* CRITICAL: Ensure all content is visible */
.main-content,
.sidebar-content,
.single-post,
.post-content,
.post-header,
.post-thumbnail,
article {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* إصلاح الصور والمحتوى */
.post-content img,
.post-content figure,
.post-content table,
.post-content iframe,
.post-content video {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
}

.post-content figure.wp-caption {
    width: auto !important;
    max-width: 100% !important;
}

/* منع الـ overflow الأفقي */
body,
html {
    overflow-x: hidden !important;
}

.container {
    width: 100% !important;
    max-width: 1200px !important;
    overflow: visible !important;
}

/* التجاوب للتابلت */
@media screen and (max-width: 992px) {
    .article-layout {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    .sidebar-content {
        position: static !important;
        order: 2 !important;
    }

    .main-content {
        order: 1 !important;
        display: block !important;
        visibility: visible !important;
        width: 100% !important;
    }

    .single-post,
    .post-content,
    .post-header,
    .post-thumbnail {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* التجاوب للموبايل */
@media screen and (max-width: 768px) {
    .single-content {
        padding: 100px 0 40px !important;
    }

    .single-post {
        padding: 25px 20px !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .post-title {
        font-size: 1.6rem !important;
    }

    /* CRITICAL: Ensure post content is visible on mobile */
    .post-content {
        font-size: 1rem !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: auto !important;
        overflow: visible !important;
    }

    .post-content * {
        max-width: 100% !important;
    }

    .post-content p,
    .post-content ul,
    .post-content ol,
    .post-content blockquote,
    .post-content table {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .post-content h1 {
        font-size: 1.4rem !important;
    }

    .post-content h2 {
        font-size: 1.3rem !important;
    }

    .post-content h3 {
        font-size: 1.2rem !important;
    }

    .post-content h4,
    .post-content h5,
    .post-content h6 {
        font-size: 1.1rem !important;
    }

    .post-content img {
        margin: 1rem 0 !important;
    }

    .post-content .alignright,
    .post-content .alignleft {
        float: none !important;
        margin: 1rem auto !important;
        display: block !important;
    }
}

/* شاشات صغيرة جداً */
@media screen and (max-width: 480px) {
    .single-post {
        padding: 20px 15px !important;
    }

    .post-title {
        font-size: 1.4rem !important;
    }

    .post-meta {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .share-buttons {
        flex-direction: column !important;
    }

    .nav-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================= */
/* نهاية الإصلاحات الحرجة */
/* ============================================= */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: #333;
    direction: rtl;
    text-align: right;
}

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

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h2 {
    color: #2c5aa0;
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-brand i {
    color: #f39c12;
    margin-left: 10px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: #2c5aa0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background: #2c5aa0;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.btn-call {
    background: linear-gradient(135deg, #2c5aa0, #3498db);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(44, 90, 160, 0.3);
}

.btn-call:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 90, 160, 0.4);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #2c5aa0;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('images/GD5l5O0bUEQ0.jpg') center/cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(44, 90, 160, 0.9), rgba(52, 152, 219, 0.8));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    padding: 2rem 0;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    animation: fadeInUp 1s ease;
}

.highlight {
    color: #f39c12;
    display: block;
    margin-top: 0.5rem;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease 0.4s both;
    flex-wrap: wrap;
}

.btn-primary {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    border: none;
    padding: 18px 36px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.3);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.4);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
    border: none;
    padding: 18px 36px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-whatsapp:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 3rem;
    animation: fadeInUp 1s ease 0.6s both;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.feature-item i {
    font-size: 1.5rem;
    color: #f39c12;
}

.feature-item span {
    font-weight: 600;
}

/* Services Section */
.services {
    padding: 6rem 0;
    background: #f8f9fa;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c5aa0;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #2c5aa0, #3498db);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #2c5aa0, #3498db);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

.service-icon i {
    font-size: 2rem;
    color: white;
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c5aa0;
    margin-bottom: 1rem;
}

.service-card p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.service-card ul {
    list-style: none;
    margin-bottom: 2rem;
    text-align: right;
}

.service-card li {
    padding: 0.5rem 0;
    color: #555;
    position: relative;
    padding-right: 1.5rem;
}

.service-card li::before {
    content: '✓';
    position: absolute;
    right: 0;
    color: #27ae60;
    font-weight: bold;
}

.service-btn {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.service-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.3);
}

/* Article Content Styles - Enhanced Headings */
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin: 2rem 0 1rem 0;
    font-weight: 700;
    line-height: 1.3;
    position: relative;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-right: 5px solid #2c5aa0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.post-content h1:hover,
.post-content h2:hover,
.post-content h3:hover,
.post-content h4:hover,
.post-content h5:hover,
.post-content h6:hover {
    transform: translateX(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.post-content h1 {
    font-size: 2.2rem;
    color: #2c5aa0;
    background: linear-gradient(135deg, #2c5aa0 0%, #3498db 100%);
    color: white;
    border-right: none;
    border-radius: 15px;
}

.post-content h1::before {
    content: '📌';
    margin-left: 10px;
    font-size: 1.5rem;
}

.post-content h2 {
    font-size: 1.8rem;
    color: #2c5aa0;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-right-color: #2196f3;
}

.post-content h2::before {
    content: '🔹';
    margin-left: 10px;
    font-size: 1.2rem;
}

.post-content h3 {
    font-size: 1.5rem;
    color: #1976d2;
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    border-right-color: #9c27b0;
}

.post-content h3::before {
    content: '▶️';
    margin-left: 10px;
    font-size: 1rem;
}

.post-content h4 {
    font-size: 1.3rem;
    color: #7b1fa2;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-right-color: #ff9800;
}

.post-content h4::before {
    content: '🔸';
    margin-left: 10px;
    font-size: 0.9rem;
}

.post-content h5 {
    font-size: 1.2rem;
    color: #f57c00;
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    border-right-color: #4caf50;
}

.post-content h6 {
    font-size: 1.1rem;
    color: #388e3c;
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
    border-right-color: #e91e63;
}

/* Enhanced paragraph and list styles */
.post-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.1rem;
    color: #444;
}

.post-content ul,
.post-content ol {
    margin: 1.5rem 0;
    padding-right: 2rem;
}

.post-content li {
    margin-bottom: 0.8rem;
    line-height: 1.7;
    color: #555;
}

.post-content blockquote {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-right: 4px solid #f39c12;
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    border-radius: 10px;
    font-style: italic;
    color: #666;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.post-content blockquote::before {
    content: '"';
    font-size: 3rem;
    color: #f39c12;
    position: absolute;
    margin-right: -1rem;
    margin-top: -1rem;
}

/* Why Choose Us Section */
.why-choose-us {
    padding: 6rem 0;
    background: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-icon i {
    font-size: 1.8rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c5aa0;
    margin-bottom: 1rem;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #2c5aa0, #3498db);
    color: white;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* About Section */
.about {
    padding: 6rem 0;
    background: #f8f9fa;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c5aa0;
    margin-bottom: 2rem;
}

.about-text p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.about-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #f39c12;
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: #666;
    font-weight: 600;
}

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

.about-image img {
    max-width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Contact Section */
.contact {
    padding: 6rem 0;
    background: white;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #2c5aa0, #3498db);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 1.5rem;
    color: white;
}

.contact-details h3 {
    color: #2c5aa0;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.contact-details p {
    color: #666;
    margin: 0;
}

.contact-form {
    background: #f8f9fa;
    padding: 2.5rem;
    border-radius: 20px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    transition: border-color 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2c5aa0;
}

.btn-submit {
    background: linear-gradient(135deg, #2c5aa0, #3498db);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 90, 160, 0.3);
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-section h3,
.footer-section h4 {
    color: #f39c12;
    margin-bottom: 1rem;
}

.footer-section p {
    line-height: 1.8;
    color: #bdc3c7;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #f39c12;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 1rem;
    text-align: center;
    color: #bdc3c7;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Enhanced Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .hero-title {
        font-size: 3rem;
    }

    .post-content h1 {
        font-size: 2rem;
    }

    .post-content h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        gap: 1rem;
    }

    .nav-links.active {
        display: flex;
    }

    .btn-call {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .hero {
        min-height: 80vh;
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .btn-primary,
    .btn-whatsapp {
        padding: 15px 30px;
        font-size: 1rem;
        width: 100%;
        max-width: 300px;
    }

    .hero-features {
        flex-direction: column;
        gap: 1rem;
    }

    .feature-item {
        justify-content: center;
        padding: 0.8rem 1.2rem;
    }

    .services {
        padding: 4rem 0;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-card {
        padding: 2rem;
    }

    .about-content,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Enhanced Article Heading Styles for Mobile */
    .post-content h1,
    .post-content h2,
    .post-content h3,
    .post-content h4,
    .post-content h5,
    .post-content h6 {
        padding: 0.8rem 1rem;
        margin: 1.5rem 0 0.8rem 0;
        font-size: 1.4rem;
    }

    .post-content h1 {
        font-size: 1.8rem;
    }

    .post-content h2 {
        font-size: 1.5rem;
    }

    .post-content h3 {
        font-size: 1.3rem;
    }

    .post-content h4,
    .post-content h5,
    .post-content h6 {
        font-size: 1.2rem;
    }

    .post-content p {
        font-size: 1rem;
        margin-bottom: 1.2rem;
    }

    .post-content blockquote {
        padding: 1rem 1.5rem;
        margin: 1.5rem 0;
    }

    /* Global responsive image rules for 768px */
    .post-content img {
        max-width: 100% !important;
        height: auto !important;
        margin: 1rem auto;
        display: block;
    }

    .post-content .alignright,
    .post-content .alignleft {
        float: none;
        margin: 1rem auto;
        max-width: 100%;
        display: block;
    }

    .post-content figure {
        margin: 1rem 0;
        max-width: 100%;
    }

    .post-content iframe,
    .post-content video {
        max-width: 100%;
        height: auto;
    }
}

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

    .navbar {
        padding: 0.8rem 0;
    }

    .nav-brand h2 {
        font-size: 1.3rem;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.1;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .section-header p {
        font-size: 1rem;
    }

    .service-card,
    .contact-form {
        padding: 1.5rem;
    }

    .service-card h3 {
        font-size: 1.3rem;
    }

    .feature-item {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .feature-item i {
        font-size: 1.2rem;
    }

    .cta-content h2 {
        font-size: 2rem;
    }

    .cta-content p {
        font-size: 1rem;
    }

    /* Ultra-compact article headings for very small screens */
    .post-content h1,
    .post-content h2,
    .post-content h3,
    .post-content h4,
    .post-content h5,
    .post-content h6 {
        padding: 0.6rem 0.8rem;
        margin: 1rem 0 0.6rem 0;
        border-radius: 8px;
    }

    .post-content h1 {
        font-size: 1.6rem;
    }

    .post-content h2 {
        font-size: 1.4rem;
    }

    .post-content h3 {
        font-size: 1.2rem;
    }

    .post-content h4,
    .post-content h5,
    .post-content h6 {
        font-size: 1.1rem;
    }

    .post-content p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .post-content ul,
    .post-content ol {
        padding-right: 1.5rem;
    }

    .post-content blockquote {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
}

/* Additional Mobile Optimizations */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .btn-primary,
    .btn-whatsapp {
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    .service-icon {
        width: 60px;
        height: 60px;
    }

    .service-icon i {
        font-size: 1.5rem;
    }

    .post-content h1 {
        font-size: 1.5rem;
    }

    .post-content h2 {
        font-size: 1.3rem;
    }

    .post-content h3,
    .post-content h4,
    .post-content h5,
    .post-content h6 {
        font-size: 1rem;
    }
}

/* Print Styles */
@media print {

    .header,
    .footer,
    .hero,
    .cta-section {
        display: none;
    }

    .post-content h1,
    .post-content h2,
    .post-content h3,
    .post-content h4,
    .post-content h5,
    .post-content h6 {
        background: none !important;
        color: #333 !important;
        box-shadow: none !important;
        border-right: 3px solid #333 !important;
        padding: 0.5rem 1rem !important;
    }

    .post-content {
        font-size: 12pt;
        line-height: 1.5;
    }
}


/* ============================================= */
/* قواعد التجاوب الشاملة - Comprehensive Responsive Styles */
/* ============================================= */

/* تخطيط المقالات والشريط الجانبي */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    align-items: start;
}

/* Sidebar sticky positioning */
.sidebar-content {
    position: sticky;
    top: 140px;
}

/* Widget base styles */
.widget {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    padding: 30px;
    position: relative;
    overflow: hidden;
}

/* Sidebar widgets container */
.sidebar-widgets {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Search widget top bar */
.search-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

/* قواعد القائمة الرئيسية */
.nav-links.active {
    display: flex !important;
}

.main-navigation-menu {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.main-navigation-menu li {
    margin: 0;
    width: 100%;
}

.main-navigation-menu li a {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    display: block;
}

/* ============================================= */
/* شاشات الديسكتوب الكبيرة - Large Desktop */
/* ============================================= */
@media (min-width: 1200px) {
    .article-layout {
        grid-template-columns: 1fr 380px;
    }
}

/* ============================================= */
/* شاشات الديسكتوب - Desktop */
/* ============================================= */
@media (min-width: 993px) {
    .nav-links {
        display: flex !important;
        position: static;
        background: none;
        box-shadow: none;
        padding: 0;
    }

    .nav-links a {
        border-bottom: none;
        padding: 0;
    }

    .mobile-menu-toggle {
        display: none !important;
    }

    .menu-toggle {
        display: none !important;
    }
}

/* ============================================= */
/* شاشات التابلت - Tablet (768px - 992px) */
/* ============================================= */
@media (max-width: 992px) {

    /* تخطيط المقال - عمود واحد */
    .article-layout {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    .sidebar-content {
        position: static !important;
        order: 2;
        margin-top: 20px;
    }

    .main-content {
        order: 1;
    }

    /* تحسين الـ hero section */
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    /* الـ widgets */
    .widget {
        padding: 25px !important;
    }

    /* القائمة للموبايل */
    .main-navigation ul {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
}

/* ============================================= */
/* شاشات الموبايل - Mobile (max-width: 768px) */
/* ============================================= */
@media (max-width: 768px) {

    /* الحاوية */
    .container {
        padding: 0 15px !important;
    }

    /* المحتوى الرئيسي */
    .single-content {
        padding: 100px 0 40px !important;
    }

    .single-post {
        padding: 25px 20px !important;
        margin-bottom: 20px !important;
    }

    /* عنوان المقال */
    .post-title {
        font-size: 1.8rem !important;
        line-height: 1.2 !important;
    }

    /* معلومات المقال */
    .post-meta {
        flex-direction: column !important;
        gap: 12px !important;
    }

    .post-meta span {
        justify-content: center !important;
    }

    /* التنقل بين المقالات */
    .post-navigation>div>div {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    /* أزرار المشاركة */
    .post-share>div {
        flex-direction: column !important;
        align-items: center !important;
        gap: 10px !important;
    }

    .post-share a,
    .post-share button {
        width: 100% !important;
        max-width: 280px !important;
        padding: 12px 20px !important;
        justify-content: center !important;
    }

    /* الـ Widgets */
    .widget {
        padding: 20px !important;
    }

    .widget h3 {
        font-size: 1.2rem !important;
    }

    /* الروابط السريعة - عمود واحد */
    .quick-links-widget div[style*="grid-template-columns: 1fr 1fr"] {
        display: flex !important;
        flex-direction: column !important;
    }

    /* Hero section */
    .hero {
        min-height: 80vh;
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 2rem !important;
    }

    .hero-cta {
        flex-direction: column !important;
        align-items: center !important;
    }

    .hero-cta .btn-primary,
    .hero-cta .btn-whatsapp {
        width: 100% !important;
        max-width: 300px !important;
        padding: 14px 24px !important;
    }

    .hero-features {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .feature-item {
        justify-content: center !important;
        width: 100% !important;
        max-width: 280px !important;
    }

    /* Services grid */
    .services-grid {
        grid-template-columns: 1fr !important;
    }

    /* Features grid */
    .features-grid {
        grid-template-columns: 1fr !important;
    }

    /* Contact grid */
    .contact-grid {
        grid-template-columns: 1fr !important;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================= */
/* شاشات الموبايل الصغيرة - Small Mobile (max-width: 480px) */
/* ============================================= */
@media (max-width: 480px) {
    .container {
        padding: 0 10px !important;
    }

    .single-post {
        padding: 20px 15px !important;
    }

    .post-title {
        font-size: 1.5rem !important;
    }

    .widget {
        padding: 15px !important;
    }

    .widget h3 {
        font-size: 1.1rem !important;
    }

    /* أحجام الخطوط في المحتوى */
    .post-content {
        font-size: 0.95rem !important;
    }

    .post-content h1 {
        font-size: 1.5rem !important;
        padding: 0.8rem 1rem !important;
    }

    .post-content h2 {
        font-size: 1.3rem !important;
        padding: 0.7rem 1rem !important;
    }

    .post-content h3,
    .post-content h4,
    .post-content h5,
    .post-content h6 {
        font-size: 1.1rem !important;
        padding: 0.6rem 0.8rem !important;
    }

    /* Hero */
    .hero-title {
        font-size: 1.7rem !important;
    }

    .hero-subtitle {
        font-size: 0.95rem !important;
    }

    /* CTA Section */
    .cta-content h2 {
        font-size: 1.6rem !important;
    }

    .cta-buttons {
        flex-direction: column !important;
        align-items: center !important;
    }

    .cta-buttons .btn-primary,
    .cta-buttons .btn-whatsapp {
        width: 100% !important;
        max-width: 280px !important;
    }

    /* Section headers */
    .section-header h2 {
        font-size: 1.5rem !important;
    }

    .section-header p {
        font-size: 0.95rem !important;
    }

    /* Service cards */
    .service-card {
        padding: 20px 15px !important;
    }

    .service-card h3 {
        font-size: 1.2rem !important;
    }
}

/* ============================================= */
/* شاشات صغيرة جداً - Extra Small (max-width: 360px) */
/* ============================================= */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.5rem !important;
    }

    .post-title {
        font-size: 1.3rem !important;
    }

    .widget {
        padding: 12px !important;
    }

    .btn-primary,
    .btn-whatsapp {
        padding: 10px 18px !important;
        font-size: 0.9rem !important;
    }
}

/* ============================================= */
/* تحسينات إضافية للتجاوب */
/* ============================================= */

/* Images responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Tables responsive */
.post-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Prevent text overflow */
.post-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Smooth transitions for responsive changes */
.container,
.article-layout,
.widget,
.hero-title,
.post-title {
    transition: all 0.3s ease;
}