/*
Theme Name: Phoenicia Theme
Author: Your Name
Version: 1.0.2
Text Domain: phoeniciatheme
*/

/* ================== TABLE OF CONTENTS ================== */
/* 1. General & Reset */
/* 2. Header & Navigation */
/* 3. Sliders (Hero, Partners) */
/* 4. Cards (Services, Blog) */
/* 5. Portfolio Grid */
/* 6. Footer */
/* 7. Pages Template & Contact */
/* 8. WooCommerce - Shop/Archive */
/* 9. WooCommerce - Single Product */
/* 10. Product Page Header & Gallery */
/* 11. Utility Classes */
/* 12. Header Specific Styles (منقول من header.php) */
/* 13. Isotope Filters Fix */
/* 14. 404 Page Styles */
/* 15. Sidebar & Blog Styles (Updated) */
/* 16. Responsive Design */
/* ======================================================= */

/* 1. General & Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: #333333;
    background-color: #ffffff;
}
.site-main {
    padding-top: 100px;
    min-height: 70vh;
}
body.single-product .site-main {
    padding-top: 40px;
}
.admin-bar .site-main {
    padding-top: 132px;
}

/* 2. Header & Navigation - مصحح */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background-color: transparent !important;
    transition: all 0.4s ease;
}
.site-header.scrolled {
    background-color: #ffffff !important;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}
.site-header .navbar {
    padding: 1rem 0;
    transition: all 0.4s ease;
}

/* النافبار شفاف في البداية */
.site-header:not(.scrolled) .navbar {
    background-color: transparent !important;
}
.site-header:not(.scrolled) .navbar-brand,
.site-header:not(.scrolled) .nav-link {
    color: #ffffff !important;
}
.site-header:not(.scrolled) .btn-outline-primary {
    border-color: rgba(255,255,255,0.6) !important;
    color: #ffffff !important;
    background-color: transparent !important;
}
.site-header:not(.scrolled) .btn-outline-primary:hover {
    background-color: #ffffff !important;
    color: #0d6efd !important;
}

/* النافبار أبيض بعد التمرير */
.site-header.scrolled .navbar-brand,
.site-header.scrolled .nav-link {
    color: #333333 !important;
}
.site-header.scrolled .btn-outline-primary {
    border-color: #0d6efd !important;
    color: #0d6efd !important;
}
.site-header.scrolled .btn-outline-primary:hover {
    background-color: #0d6efd !important;
    color: #ffffff !important;
}

.navbar-brand {
    font-size: 1.75rem;
    font-weight: 700;
    text-decoration: none;
}
.navbar-brand-wrapper img {
    height: 40px;
    width: auto;
}

/* زر السلة بجانب الشعار */
.navbar .btn-outline-primary {
    border-radius: 20px;
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}
.navbar .badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.4rem;
}

/* القائمة في المنتصف */
.navbar-nav {
    display: flex;
    align-items: center;
}
.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-decoration: none;
}
.site-header:not(.scrolled) .nav-link:hover {
    background-color: rgba(255,255,255,0.1) !important;
}
.site-header.scrolled .nav-link:hover {
    background-color: rgba(13, 110, 253, 0.1) !important;
    color: #0d6efd !important;
}

/* العناصر الإضافية */
.navbar-extra {
    display: flex;
    align-items: center;
}

/* 3. Sliders (Hero, Partners) */
.hero-slider .swiper-slide {
    height: 100vh;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #333;
    background-size: cover;
    background-position: center;
}
.hero-slider .swiper-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}
.hero-slider .slider-caption {
    position: relative;
    z-index: 2;
    color: #fff;
    text-align: center;
    width: 100%;
    padding: 20px;
}
.hero-slider .slider-caption h2 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
}
.hero-slider .slider-caption .entry-content p {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
}
.hero-slider .slide-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}
.hero-slider .slide-background-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.partners-section {
    background-color: #f8f9fa;
    padding: 4rem 0;
}
.partners-slider .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
}
.partners-slider .swiper-slide img {
    max-height: 80px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}
.partners-slider .swiper-slide:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* 4. Cards (Services, Blog) */
.service-card-grid .card,
.blog .card {
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    height: 100%;
}
.service-card-grid .card:hover,
.blog .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.service-card-grid .card-img-top-wrapper {
    height: 180px;
    overflow: hidden;
}
.service-card-grid .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.service-card-grid .card-title {
    font-weight: bold;
    color: #333;
}

/* 5. Portfolio Grid */
.project-card {
    position: relative;
    overflow: hidden;
    border-radius: 0.25rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.project-card-image img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}
.project-card .project-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.project-card:hover .project-card-overlay {
    opacity: 1;
}
.project-card:hover .project-card-image img {
    transform: scale(1.1);
}
.project-card-title {
    font-weight: bold;
    font-size: 1.25rem;
}

/* 6. Footer */
.site-footer {
    background-color: #212529;
    color: #ffffff;
}
.site-footer .footer-widgets-wrapper {
    padding: 3rem 0;
}
.site-footer .site-info-wrapper {
    padding: 2rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.site-footer .widget-title {
    margin-bottom: 1.5rem;
    color: #ffffff;
}
.site-footer a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease;
}
.site-footer a:hover {
    color: #ffffff;
}

.footer-social .social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}
.footer-social .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* 7. Pages Template & Contact */
.page-template-default .entry-header {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}
.page-template-default .entry-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 0;
    color: #333;
}
.page-template-default .entry-content {
    line-height: 1.7;
    font-size: 1.1rem;
    color: #555;
}
.entry-content h2 {
    font-size: 2rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}
.entry-content h3 {
    font-size: 1.75rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #333;
}
.entry-content p {
    margin-bottom: 1.5rem;
}
.entry-content ul,
.entry-content ol {
    margin-bottom: 1.5rem;
    padding-right: 20px;
}
.entry-content blockquote {
    padding: 1rem 1.5rem;
    margin: 0 0 1.5rem;
    border-right: 4px solid #0d6efd;
    background-color: #f8f9fa;
    font-style: italic;
}
.contact-info-item h5 {
    border-bottom: 2px solid #0d6efd;
    padding-bottom: 0.5rem;
    display: inline-block;
    color: #333;
}
.contact-info a {
    text-decoration: none;
    color: #212529;
    transition: color 0.2s ease;
}
.contact-info a:hover {
    color: #0d6efd;
}
.social-links-contact .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #495057;
    font-size: 1.2rem;
    margin: 0 5px;
    text-decoration: none;
    transition: all 0.3s ease;
}
.social-links-contact .social-icon:hover {
    background-color: #0d6efd;
    color: #fff;
    transform: translateY(-3px);
}

/* 8. WooCommerce - Shop/Archive */
.woocommerce ul.products {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
    clear: none;
    list-style: none;
}
.woocommerce ul.products li.product {
    float: none;
    width: auto;
    margin: 0;
    padding: 0 15px;
    margin-bottom: 30px;
    display: flex;
}
.woocommerce ul.products li.product .product-card {
    width: 100%;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    background: #fff;
}
.woocommerce ul.products li.product .product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.woocommerce ul.products li.product .card-img-top-wrapper {
    height: 250px;
    overflow: hidden;
}
.woocommerce ul.products li.product .card-img-top-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 1.1rem;
    font-weight: bold;
    padding: 0.5rem 1rem 0;
    color: #333;
    text-decoration: none;
}
.woocommerce ul.products li.product .price {
    font-size: 1.2rem;
    font-weight: bold;
    padding: 0 1rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}
.woocommerce ul.products li.product .add_to_cart_button {
    margin-left: auto;
    margin-right: auto;
    display: block;
    max-width: 200px;
}

/* 9. WooCommerce - Single Product */
.single-product div.product .woocommerce-product-gallery,
.single-product div.product div.summary {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
}
.single-product-layout {
    margin-bottom: 3rem;
}
.single-product div.product .woocommerce-product-gallery__wrapper {
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
}
.single-product div.product .woocommerce-product-gallery__image:hover img {
    transform: scale(1.15);
}
.single-product div.product .woocommerce-product-gallery__image img {
    width: 100% !important;
    height: auto !important;
    display: block;
    transition: transform 0.4s ease;
}
.single-product div.product .flex-control-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 1rem 0 0 0;
    padding: 0;
    list-style: none;
}
.single-product div.product .flex-control-thumbs li {
    flex: 0 0 calc(25% - 8px);
    margin: 0;
    border: 1px solid #ddd;
    cursor: pointer;
}
.single-product div.product .flex-control-thumbs li.flex-active-slide {
    border-color: #333;
}
.single-product .product_title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #333;
}
.single-product .woocommerce-product-rating {
    margin-bottom: 1rem;
}
.single-product p.price {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}
.single-product .woocommerce-product-details__short-description {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
}
.single-product form.cart {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.25rem;
}
.single-product .product_meta {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #6c757d;
}

/* 10. Product Page Header & Gallery */
.site-header.product-header {
    background: #ffffff !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.site-header.product-header .navbar-brand,
.site-header.product-header .nav-link {
    color: #333333 !important;
}
.site-header.product-header .nav-link:hover {
    color: #0d6efd !important;
    background-color: rgba(13, 110, 253, 0.1);
}
.site-header.product-header .btn-outline-primary {
    border-color: #0d6efd;
    color: #0d6efd;
}
.site-header.product-header .btn-outline-primary:hover {
    background-color: #0d6efd;
    color: #ffffff;
}

.product-secondary-header {
    background: rgba(248, 249, 250, 0.95);
    border-bottom: 1px solid #e9ecef;
    margin-top: 0;
    backdrop-filter: blur(10px);
}
.product-breadcrumb .woocommerce-breadcrumb {
    margin: 0;
    font-size: 0.85rem;
    color: #6c757d;
}
.product-breadcrumb .woocommerce-breadcrumb a {
    color: #495057;
    text-decoration: none;
    transition: color 0.2s ease;
}
.product-breadcrumb .woocommerce-breadcrumb a:hover {
    color: #0d6efd;
}
.woocommerce-product-gallery .flex-control-thumbs {
    display: flex !important;
    flex-wrap: wrap !important;
    margin: 15px -5px 0 -5px !important;
    padding: 0 !important;
    list-style: none !important;
}
.woocommerce-product-gallery .flex-control-thumbs li {
    flex: 0 0 23% !important;
    margin: 5px !important;
    padding: 0 !important;
    cursor: pointer !important;
    border: 2px solid transparent !important;
    border-radius: 4px !important;
    transition: all 0.3s ease !important;
}
.woocommerce-product-gallery .flex-control-thumbs li img {
    width: 100% !important;
    height: 80px !important;
    object-fit: cover !important;
    border-radius: 2px !important;
    display: block !important;
}
.woocommerce-product-gallery .flex-control-thumbs li:hover {
    border-color: #0d6efd !important;
    transform: scale(1.05);
}
.woocommerce-product-gallery .flex-control-thumbs li.flex-active-slide {
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

/* 11. Utility Classes */
.bg-color {
    background-color: #5f863b;
}
.bg-color2 {
    background-color: #bdd4a8;
}
.text-primary {
    color: #8a449b !important;
}
.bg-light {
    background-color: #f8f9fa !important;
}

/* 12. Header Specific Styles */
/* Header Social Icons */
.navbar-extra-section .social-icons-header {
    display: flex;
    gap: 8px;
    align-items: center;
}
.navbar-extra-section .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}
.site-header:not(.scrolled) .navbar-extra-section .social-icon {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}
.navbar-extra-section .social-icon:hover {
    background-color: #0d6efd;
    color: #fff;
    transform: scale(1.1);
}

/* Cart Button Styling */
.navbar-cart-item .btn {
    min-width: 42px;
    position: relative;
}
.navbar-cart-item .cart-count {
    font-size: 0.7rem;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.35rem;
    line-height: 1;
}

/* Cart count animation when updated */
@keyframes cartBounce {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
}
.navbar-cart-item .cart-count {
    animation: cartBounce 0.3s ease;
}

/* Transparent Header */
.site-header[data-transparent="true"]:not(.scrolled) {
    background-color: transparent !important;
}
.site-header[data-transparent="true"]:not(.scrolled) .navbar-toggler-icon {
    filter: brightness(0) invert(1);
}

/* Navbar extra section alignment */
.navbar-extra-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Responsive adjustments for header */
@media (max-width: 991.98px) {
    .navbar-extra-section {
        justify-content: center;
        margin-top: 1rem;
        width: 100%;
    }
    
    .navbar-extra-section > * {
        margin: 0 0.25rem !important;
    }
}

/* 13. Isotope Filters Fix */
/* ================== ISOTOPE FILTERS FIX ================== */
.project-filters,
.wc-filters,
.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 2rem 0;
    padding: 1rem;
}
.project-filters button,
.wc-filters button,
.filter-btn,
[data-filter] {
    padding: 10px 20px;
    border: 2px solid #0d6efd;
    background: white;
    color: #0d6efd;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
}
.project-filters button:hover,
.wc-filters button:hover,
.filter-btn:hover,
[data-filter]:hover {
    background: #0d6efd;
    color: white;
    transform: translateY(-2px);
}
.project-filters button.active,
.wc-filters button.active,
.filter-btn.active,
[data-filter].active {
    background: #0d6efd;
    color: white;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.isotope-item {
    transition: all 0.6s ease;
}
.isotope-item.isotope-hidden {
    opacity: 0;
    transform: scale(0.8);
}

/* 14. 404 Page Styles */
.page-404 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    color: white;
}
.error-404-icon {
    font-size: 8rem;
    animation: bounce 2s infinite;
}
.error-404-buttons .btn {
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
}
.error-404-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.quick-links-404 .btn {
    border-radius: 25px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
}
.quick-links-404 .btn:hover {
    background: white;
    color: #667eea !important;
    transform: scale(1.05);
}
.search-form-404 .form-control {
    border-radius: 8px 0 0 8px;
    border: none;
}
.search-form-404 .btn {
    border-radius: 0 8px 8px 0;
    border: none;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* 15. Sidebar & Blog Styles (UPDATED) */
/* ================== SIDEBAR STYLES ================== */
/* تثبيت السايدبار (Sticky Wrapper) */
.sidebar-sticky-wrapper {
    position: -webkit-sticky;
    position: sticky;
    top: 100px; /* المسافة من الأعلى */
    z-index: 10;
}

/* تصميم البطاقة للودجت */
.widget {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}
.widget:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    transform: translateY(-3px);
}

/* عناوين الودجات */
.widget-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f3f5;
    position: relative;
}
.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0; /* للمواقع العربية RTL */
    width: 40px;
    height: 2px;
    background-color: #0d6efd; /* اللون الأساسي */
}

/* قوائم الودجات */
.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.widget ul li {
    padding: 10px 0;
    border-bottom: 1px dashed #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.widget ul li:last-child {
    border-bottom: none;
}
.widget ul li a {
    text-decoration: none;
    color: #495057;
    font-weight: 500;
    transition: 0.2s;
    width: 100%;
    display: block;
}
.widget ul li a:hover {
    color: #0d6efd;
    padding-right: 5px;
}

/* ودجت البحث */
.widget_search .wp-block-search__input,
.widget_search input[type="search"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 50px;
    background: #f8f9fa;
    margin-bottom: 10px;
}
.widget_search .wp-block-search__button,
.widget_search button[type="submit"] {
    width: 100%;
    border-radius: 50px;
    background: #0d6efd;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    transition: 0.3s;
}
.widget_search .wp-block-search__button:hover,
.widget_search button[type="submit"]:hover {
    background: #0b5ed7;
}

/* ================== BLOG STYLES ================== */
/* فلتر التصنيفات */
.archive-filter-section {
    margin-bottom: 2rem;
}
.blog-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* (الألوان تأتي من Customizer، هنا التنسيق الهيكلي فقط) */
.cat-filter-btn {
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    border: 1px solid transparent; /* لضمان تناسق الحجم */
}

/* تنسيق بطاقات المقالات */
.blog-card {
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}
.blog-image {
    height: 220px;
    overflow: hidden;
    position: relative;
}
.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.blog-card:hover .blog-image img {
    transform: scale(1.05);
}
.blog-content {
    padding: 1.5rem;
}
.blog-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #6c757d;
}
.blog-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.4;
}
.blog-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}
.blog-title a:hover {
    color: #0d6efd;
}
.blog-excerpt {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* 16. Responsive Design */
@media (max-width: 767px) {
    .hero-slider .slider-caption h2 {
        font-size: 2.25rem;
    }
    
    .hero-slider .slider-caption .entry-content p {
        font-size: 1.1rem;
    }
    
    .page-template-default .entry-title {
        font-size: 2rem;
    }
    
    .error-404-icon {
        font-size: 5rem;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .error-404-buttons {
        flex-direction: column;
    }
    
    .error-404-buttons .btn {
        margin-bottom: 10px;
    }
}

@media (max-width: 991.98px) {
    .navbar-nav {
        position: static !important;
        left: auto !important;
        transform: none !important;
        text-align: center;
        width: 100%;
        margin: 1rem 0;
    }
    
    .navbar-collapse {
        background: white;
        margin-top: 1rem;
        padding: 1rem;
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    }
    .site-header:not(.scrolled) .navbar-collapse {
        background: rgba(0,0,0,0.9);
    }
    .navbar-extra-right {
        justify-content: center;
        margin: 1rem 0;
        width: 100%;
    }
    .site-main {
        padding-top: 80px;
    }
    
    .navbar-brand {
        font-size: 1.4rem;
        margin-right: 1rem;
    }
    
    .widget-area {
        margin-top: 3rem;
    }
    
    .widget-area .card {
        margin-bottom: 1rem;
    }
    
    .blog-section {
        padding: 3rem 0;
    }
    
    .blog-section .section-title h2 {
        font-size: 2rem;
    }
    
    .blog-card {
        margin-bottom: 2rem;
    }
}

@media (min-width: 992px) {
    .woocommerce ul.products li.product {
        flex: 0 0 25%;
        max-width: 25%;
    }
}
@media (min-width: 768px) and (max-width: 991.98px) {
    .woocommerce ul.products li.product {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }
}
@media (max-width: 767.98px) {
    .woocommerce ul.products li.product {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .blog-section .section-title h2 {
        font-size: 1.75rem;
    }
    
    .blog-image {
        height: 180px;
    }
    
    .blog-content {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .woocommerce-product-gallery .flex-control-thumbs li {
        flex: 0 0 48% !important;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .site-main {
        padding-top: 70px;
    }
    
    body.single-product .site-main {
        padding-top: 20px;
    }
}

/* ================== NAVBAR 3 SECTIONS - SAFE STYLES ================== */
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.navbar-brand-section {
    flex-shrink: 0;
}
.navbar-menu-section {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}
.navbar-extra-section {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* تحسينات للجوال */
@media (max-width: 991.98px) {
    .navbar-menu-section {
        order: 2;
        width: 100%;
        margin: 1rem 0;
    }
    
    .navbar-extra-section {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
    }
    
    .navbar-collapse {
        display: flex;
        flex-direction: column;
    }
}

/* ================== SEARCH PAGE STYLES ================== */
.search-form-container .search-form {
    max-width: 500px;
    margin: 0 auto;
}
.search-result-meta a {
    word-break: break-all;
}

/* ========================== NEXT-BACK PROJECT, POSTS, PRODUCTS ==================== */
/* Hero Header */
.header-top {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    margin-top: 0;
    position: relative;
    overflow: hidden;
}
.header-top .container {
    min-height: 120px;     /* الحد الأدنى للارتفاع */
    position: relative;
    z-index: 1;
}
.header-top h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.2;
    padding-top: 40px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.quick-info {
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
}
.quick-info .info-item {
    padding: 0.5rem 0;
}
.quick-info i {
    opacity: 0.7;
}

/* Navigation */
.navigation {
    background-color: #f8f9fa;
    padding: 10px;
    flex: 1;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin: 10px;
}
.navigation:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* إصلاح تداخل الصور مع الشريط الجانبي */
.wp-block-image img, 
.entry-content img, 
figure.aligncenter {
    max-width: 100% !important;
    height: auto;
}

/* منع المحتوى من الخروج عن الإطار */
.entry-content, .site-main {
    overflow-x: hidden;
}
