/* Frontend Styles */
* {
    font-family: 'Cairo', sans-serif;
    box-sizing: border-box;
}

body {
    direction: rtl;
    text-align: right;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top Banner - Moving Animation */
.top-banner {
    font-size: 0.9rem;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.top-banner .banner-content {
    display: inline-block;
    animation: scroll-left 30s linear infinite;
    padding: 0 50px;
}

.top-banner:hover .banner-content {
    animation-play-state: paused;
}

@keyframes scroll-left {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Middle Header */
.middle-header {
    border-bottom: 1px solid #dee2e6;
}

.middle-header .icon-link {
    font-size: 1.2rem;
    color: #333;
    transition: color 0.3s;
}

.middle-header .icon-link:hover {
    color: #007bff;
}

/* Main Header */
.main-header {
    z-index: 1000;
}

.navbar-nav {
    direction: rtl;
}

.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    transition: color 0.3s;
}

.navbar-nav .nav-link:hover {
    color: #007bff !important;
}

/* Hero Banner Section */
.hero-banner {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 500px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.hero-banner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2;
}

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

.hero-banner .hero-button {
    margin-top: 2rem;
    padding: 1rem 3rem;
    font-size: 1.2rem;
    border-radius: 50px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.hero-banner .hero-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* About Section */
.about-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.about-section .about-content {
    font-size: 1.1rem;
    line-height: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* Portfolio Slider Section */
.portfolio-slider-section {
    padding: 4rem 0;
    background: #f8f9fa;
}

.portfolio-card {
    transition: transform 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    overflow: hidden;
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.portfolio-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-height: 400px;
}

.portfolio-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.3), transparent);
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
    pointer-events: auto;
}

.swiper-slide {
    height: auto;
}

.swiper-wrapper {
    display: flex;
    align-items: stretch;
}

/* Color Visualizer Section */
.color-visualizer-section {
    padding: 4rem 0;
}

#colorPreview, #decorationPreview {
    min-height: 200px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

/* Quote Estimator Section */
.quote-estimator-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

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

.contact-form input,
.contact-form textarea {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.contact-form input:focus,
.contact-form textarea:focus {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    outline: none;
}

/* Floating Buttons */
.floating-buttons {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.floating-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.floating-button:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    color: white;
}

/* Swiper Customization */
.swiper {
    padding-bottom: 50px;
    overflow: hidden;  /* ✅ التعديل الأول */
}

.swiper-button-next,
.swiper-button-prev {
    color: #007bff;
}

.swiper-pagination-bullet-active {
    background: #007bff;
}

/* Modal Styles */
.modal-content {
    border-radius: 15px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    border-radius: 15px 15px 0 0;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 15px 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-banner {
        height: 50vh;
        min-height: 400px;
    }

    .floating-buttons {
        bottom: 20px;
        left: 20px;
    }

    .floating-button {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* Form Reset on Page Reload */
form {
    position: relative;
}

/* Clear form data on page reload */
body:not(.form-submitted) form input,
body:not(.form-submitted) form select,
body:not(.form-submitted) form textarea {
    /* This will be handled by JavaScript */
}

.middle-header .col-md-6:first-child .d-flex {
    justify-content: center;
    flex-direction: row-reverse;
}
/* الفئات أوضح */
.main-header .nav-link {
    font-weight: 600;
    padding: 10px 15px;
    margin: 0 3px;
    border-radius: 5px;
    transition: background 0.3s;
}

.main-header .nav-link:hover {
    background: rgba(0,123,255,0.1);
}

/* اتجاه عربي */
.main-header .navbar {
    direction: rtl;
}

/* ========================================
   إصلاح مشكلة Swiper على الجوال
   ======================================== */

/* التحكم في أحداث اللمس */
.portfolio-slider-section {
    overflow: hidden;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

.portfolioSwiper {
    overflow: hidden !important;
    touch-action: pan-y pinch-zoom;
}

.portfolioSwiper .swiper-wrapper {
    touch-action: pan-y;
}

.portfolioSwiper .swiper-slide {
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
}

/* منع سحب الصور */
.portfolio-card img {
    -webkit-user-drag: none;
    user-drag: none;
    -webkit-touch-callout: none;
    pointer-events: none;
}

/* تحسين الأداء */
.portfolio-card {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform;
}

/* ========================================
   ارتفاعات متجاوبة للجوال
   ======================================== */

/* الجوال الصغير */
@media (max-width: 480px) {
    .portfolioSwiper {
        height: 280px !important;
    }
    
    .portfolio-card img {
        min-height: 260px !important;
    }
    
    .portfolio-overlay h3 {
        font-size: 1rem !important;
    }
    
    .portfolio-overlay p {
        font-size: 0.8rem !important;
        display: none;
    }
    
    .portfolio-overlay .btn {
        padding: 0.4rem 1rem !important;
        font-size: 0.85rem !important;
    }
}

/* الجوال المتوسط */
@media (min-width: 481px) and (max-width: 767px) {
    .portfolioSwiper {
        height: 320px !important;
    }
    
    .portfolio-card img {
        min-height: 300px !important;
    }
}

/* التابلت */
@media (min-width: 768px) and (max-width: 991px) {
    .portfolioSwiper {
        height: 380px !important;
    }
    
    .portfolio-card img {
        min-height: 350px !important;
    }
}

/* ========================================
   إظهار overlay على الجوال (لأن hover لا يعمل)
   ======================================== */
@media (max-width: 991px) {
    .portfolio-overlay {
        opacity: 1 !important;
        pointer-events: auto !important;
        background: linear-gradient(
            to top, 
            rgba(0, 0, 0, 0.85) 0%, 
            rgba(0, 0, 0, 0.4) 50%, 
            transparent 100%
        ) !important;
    }
    
    /* إخفاء أزرار التنقل على الجوال */
    .swiper-button-next,
    .swiper-button-prev {
        display: none !important;
    }
}

