/*
Theme Name: Phoenicia Theme
Author: Your Name
Version: 1.0.1
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. 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: 0px;
}

/* 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;
    margin-top: 4rem;
}

.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;
}

/* 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: #0d6efd !important;
}

.bg-light {
    background-color: #f8f9fa !important;
}

/* 12. 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;
    }
}

@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;
    }
}

@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%;
    }
}

@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;
}

/* تأكد أن النافبار شفاف ثم أبيض */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background-color: transparent;
    transition: all 0.4s ease;
}

.site-header.scrolled {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.site-header:not(.scrolled) .navbar-brand,
.site-header:not(.scrolled) .nav-link {
    color: #ffffff !important;
}

.site-header.scrolled .navbar-brand,
.site-header.scrolled .nav-link {
    color: #333333 !important;
}

/* تحسينات للجوال */
@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;
    }
}



/* ================== 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);
}

/* إضافة هذه التنسيقات في نهاية ملف style.css */

/* تنسيقات صفحة 404 المخصصة */
.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);
    }
}

/* التجاوب مع الأجهزة المختلفة */
@media (max-width: 768px) {
    .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;
    }
}


.masonry-gallery {
    /* عدد الأعمدة للشاشات الكبيرة */
    column-count: 4; 
    column-gap: 1rem;
    padding: 1rem;
    max-width: 1600px;
    margin: 0 auto;
}

.video-item {
    /* يمنع الفيديو من الانقسام بين عمودين */
    break-inside: avoid;
    margin-bottom: 1rem;
    border-radius: 12px;
    overflow: hidden; /* لإخفاء الزوايا الحادة للإطار */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.video-item iframe {
    display: block; /* يزيل أي مسافات إضافية */
    width: 100%;
    height: auto;
    border: none;
    /* الأبعاد الافتراضية للفيديو العادي 16:9 */
    aspect-ratio: 16 / 9;
}

/* تعديل أبعاد الشورتس لتبدو طولية */
.video-item.is-short iframe {
    aspect-ratio: 9 / 16;
}

/* --- تصميم متجاوب (Responsive) --- */

/* للشاشات المتوسطة (تابلت) */
@media (max-width: 1200px) {
    .masonry-gallery {
        column-count: 3;
    }
}

/* للشاشات الصغيرة */
@media (max-width: 800px) {
    .masonry-gallery {
        column-count: 2;
    }
}

/* لشاشات الجوال */
@media (max-width: 500px) {
    .masonry-gallery {
        column-count: 1;
    }
}

/* ========================================================= */
/* ==   KHALED'S MASONRY GALLERY - FINAL OVERRIDE CODE    == */
/* ========================================================= */

/* الخطوة 1: عزل المعرض بالكامل عن تأثيرات الثيم */
.final-gallery-container {
    display: block !important; /* أهم قاعدة: تلغي أي flex أو grid من الثيم */
    width: 100% !important;
    float: none !important;
    clear: both !important;
    margin: 2rem auto !important; /* توسيط المعرض */
    padding: 1rem !important;
    max-width: 1600px;
    box-sizing: border-box;
}

/* الخطوة 2: تطبيق تصميم الأعمدة على المعرض */
.final-gallery-container .masonry-grid {
    column-count: 4;
    column-gap: 1rem;
}

/* الخطوة 3: ضمان سلامة كل فيديو داخل الأعمدة */
.final-gallery-container .masonry-grid .video-box {
    break-inside: avoid; /* منع انقسام الفيديو بين عمودين */
    margin: 0 0 1rem 0 !important; /* إلغاء أي هوامش خارجية من الثيم */
    padding: 0 !important; /* إلغاء أي حشوات داخلية من الثيم */
    width: 100% !important;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* الخطوة 4: تنسيق إطار الفيديو نفسه */
.final-gallery-container .masonry-grid .video-box iframe {
    display: block;
    width: 100%;
    height: auto;
    border: none;
    aspect-ratio: 16 / 9; /* الأبعاد الافتراضية */
}

/* الخطوة 5: تعديل أبعاد فيديوهات الشورتس */
.final-gallery-container .masonry-grid .video-box.is-short iframe {
    aspect-ratio: 9 / 16;
}

/* الخطوة 6: التجاوب مع الشاشات المختلفة */
@media (max-width: 1200px) { .final-gallery-container .masonry-grid { column-count: 3; } }
@media (max-width: 800px)  { .final-gallery-container .masonry-grid { column-count: 2; } }
@media (max-width: 500px)  { .final-gallery-container .masonry-grid { column-count: 1; } }

.catalog-section {
        text-align: center;
        margin-bottom: 40px;
        padding: 20px;
        border: 1px solid #eee;
        border-radius: 8px;
    }
    .catalog-section img {
        max-width: 100%;
        height: auto;
        border-radius: 5px;
        margin-bottom: 15px;
    }
    .catalog-section h2 {
        font-size: 24px;
        color: #333;
    }
    .catalog-section p {
        font-size: 16px;
        color: #666;
    }
    .catalog-btn {
        display: inline-block;
        padding: 10px 25px;
        background-color: #0073aa; /* يمكنك تغيير هذا اللون */
        color: #fff;
        text-decoration: none;
        border-radius: 5px;
        font-size: 16px;
        margin-top: 15px;
    }
    .catalog-btn:hover {
        background-color: #005a87;
    }

