/* ================ Reset & Base ================ */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&family=Poppins:wght@400;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* Loader Styles */
:root {
    --primary: #FF6B35;
    --primary-dark: #E05A2A;
    --primary-light: #FFF5F0;
    --secondary: #1a1a1a;
    --accent: #F7931E;
    --text: #2d2d2d;
    --text-light: #666;
    --text-muted: #999;
    --bg: #fafafa;
    --bg-white: #ffffff;
    --border: #e5e5e5;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: 'Tajawal', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ================ Loader ================ */
#loader {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loader.hidden { opacity: 0; visibility: hidden; }

.spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
    position: relative;
}

.spinner::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--accent);
    animation: spin 2s linear infinite reverse;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loader-text {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 2px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }

/* ================ Header ================ */
.header {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled { box-shadow: var(--shadow-md); }

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--secondary);
    text-decoration: none;
}

.logo img {
    height: 42px;
    width: auto;
    border-radius: 10px;
    transition: var(--transition);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 18px;
    border-radius: var(--radius-xl);
    color: var(--text);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary-light);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
    z-index: -1;
    border-radius: var(--radius-xl);
}

.nav-link:hover { color: var(--primary); }
.nav-link:hover::before { transform: scaleX(1); }

/* Mobile Menu */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    cursor: pointer;
    z-index: 1001;
    background: none;
    border: none;
}

.mobile-toggle span {
    width: 25px;
    height: 2px;
    background: var(--secondary);
    transition: var(--transition);
    transform-origin: center;
}

.mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Menu Overlay */
.nav-menu.mobile-open {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 20px;
    box-shadow: var(--shadow-lg);
    gap: 15px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================ Hero Section ================ */
.main-container {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 100px 40px 60px;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    position: relative;
    overflow: hidden;
}

.main-container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255,107,53,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.content-section { animation: slideInRight 1s ease-out; z-index: 1; }

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-light);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: var(--radius-xl);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(255,107,53,0.2);
}

.content-section h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.content-section h2 {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 24px;
}

.content-section p {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 32px;
    max-width: 90%;
}

/* Hero Actions */
.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    border-radius: var(--radius-xl);
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(255,107,53,0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255,107,53,0.4);
}

.btn-secondary {
    background: white;
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-3px);
}

/* Media Section */
.media-section {
    position: relative;
    animation: slideInLeft 1s ease-out 0.2s both;
    z-index: 1;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

.video-container {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: #000;
    aspect-ratio: 16/9;
}

.video-container::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
    pointer-events: none;
}


/* Media Section */
.media-section {
    background: #000;
    border-radius: 15px;
    width: 100%;
    
    max-width: 800px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    aspect-ratio: 16 / 9;
}
.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.video-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
}
.w-ui-container {
    height: 56% !important;
}
.w-video-wrapper {
    height: 56% !important;
}

/* ================ Process Section ================ */
.process-section {
    padding: 80px 20px;
    background: white;
    margin-bottom: 20px;
}

.process-wrapper {
    margin-top: 40px;
}

.stats-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    direction: rtl;
}

.stat-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e9ecef;
    border-radius: var(--radius-md);
    padding: 24px 20px;
    min-width: 180px;
    max-width: 200px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
}

.stat-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.stat-description {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-light);
    line-height: 1.5;
}

.arrow {
    font-size: 2rem;
    color: var(--primary);
    font-weight: bold;
    margin: 0 10px;
    animation: arrowPulse 2s ease-in-out infinite;
}

@keyframes arrowPulse {
    0%, 100% { opacity: 0.5; transform: translateX(0); }
    50% { opacity: 1; transform: translateX(-5px); }
}

/* ================ Services ================ */
.services-section {
    padding: 80px 20px;
    background: #f9f9f9;
}
.services-container {
    max-width: 1200px;
    margin: 0 auto;
}
.services-header {
    text-align: center;
    margin-bottom: 3rem;
}
.services-header h1 {
    color: #FF6B35;
    font-weight: 600;
    font-size: 2.7rem;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.services-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 10px 0;
    color: #333;
}

.services-header p {
    font-size: 1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: #2d2d2d;
    font-weight: 600;
}

.service-card p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.6;
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.service-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.service-icon {
    font-size: 40px;
    margin-bottom: 15px;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}
.service-card h3 {
    font-size: 25px;
    margin-bottom: 15px;
}
.service-card p {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.5;
}
.service-link {
    color: #FF6B35;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 4px;
}

.service-link:hover {
    background: #fff8f0;
    color: #e05a2a;
}

.our-work-section {
    position: relative;
    overflow: hidden;
    padding-bottom: 40px;
}
.section-badge {
    display: inline-block;
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 107, 53, 0.2);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.05);
}
/* ================ Enhanced Portfolio Swiper & Innovations ================ */
.our-work-section {
    position: relative;
    overflow: hidden;
    padding-bottom: 40px;
}

.section-badge {
    display: inline-block;
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 107, 53, 0.2);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.05);
}

.portfolio-container-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 30px auto;
}

.portfolio-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(255,107,53,0.15) 0%, rgba(255,255,255,0) 70%);
    filter: blur(40px);
    z-index: 0;
    pointer-events: none;
}

.modern-portfolio-swiper {
    z-index: 1;
    padding: 20px 15px 60px !important;
}

.portfolio-slide {
    height: 380px; 
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.portfolio-card {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    position: relative;
    background: #fff;
    transform: translateY(0);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    text-decoration: none;
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(255, 107, 53, 0.2);
}

.portfolio-img-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.portfolio-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.7s ease;
}

.portfolio-card:hover .portfolio-img-wrapper img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
    opacity: 0;
    transition: all 0.4s ease;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 40px;
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

.overlay-content {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 12px 28px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.portfolio-card:hover .overlay-content {
    transform: translateY(0);
}

.overlay-icon {
    font-size: 1.3rem;
}

.overlay-text {
    font-weight: 700;
    font-size: 1.1rem;
    font-family: 'Tajawal', sans-serif;
    letter-spacing: 0.5px;
}

.custom-nav-btn {
    background: white;
    width: 50px !important;
    height: 50px !important;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    color: var(--primary) !important;
    transition: all 0.3s ease;
    top: 45% !important;
}

.custom-nav-btn::after {
    font-size: 1.4rem !important;
    font-weight: 900;
}

.custom-nav-btn:hover {
    background: var(--primary);
    color: white !important;
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.35);
}

.custom-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #c4c4c4;
    opacity: 0.6;
    transition: all 0.4s ease;
    border-radius: 10px;
    margin: 0 6px !important;
}

.custom-pagination .swiper-pagination-bullet-active {
    width: 30px;
    background: var(--primary);
    opacity: 1;
}

.innovative-hint {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: white;
    padding: 14px 28px;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
    border: 1px solid var(--border);
    margin: 10px auto 0;
    color: var(--text);
    font-weight: 700;
    font-size: 1rem;
    z-index: 10;
    max-width: fit-content;
}

.hint-pulse-ring {
    position: absolute;
    right: 22px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: rgba(255, 107, 53, 0.4);
    animation: ringPulse 2s infinite ease-out;
    z-index: 0;
}

@keyframes ringPulse {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; }
}

.innovative-hint .hint-icon,
.innovative-hint span:last-child {
    z-index: 1;
    position: relative;
}

@media (max-width: 768px) {
    .portfolio-slide { 
        height: 320px; 
    }
    .overlay-content { 
        padding: 10px 22px; 
    }
    .overlay-text {
        font-size: 0.95rem;
    }
    .custom-nav-btn { 
        display: none !important; 
    }
    .innovative-hint { 
        font-size: 0.9rem; 
        padding: 12px 20px;
    }
}

/* ================ Swiper ================ */
.swiper {
    width: 90%;
    margin: 30px auto;
    border-radius: 10px;
}
/* ================ Uniform Swiper Slides ================ */
.swiper-slide {
    height: 280px;        /* fixed height for all slides */
    overflow: hidden;
    border-radius: 10px;
}
.swiper-slide a {
    display: block;
    width: 100%;
    height: 100%;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;      /* ← this is the key — crops to fill without stretching */
    object-position: center;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}
.swiper-slide img:hover {
    transform: scale(1.05);
}
.swiper-button-next,
.swiper-button-prev {
    color: #dbd7d5;
    font-weight: bold;
    transition: color 0.3s ease;
}
.swiper-button-next:hover,
.swiper-button-prev:hover {
    color: #ffffff;
}
.swiper-pagination-bullet {
    background: #e9e0db;
    opacity: 0.6;
}
.swiper-pagination-bullet-active {
    background: #5e5d5c;
    opacity: 1;
}



/* ================ FAQ Section ================ */
.faq-section {
    padding: 100px 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    box-shadow: var(--shadow-sm);
}

.faq-question {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}

.faq-question h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary);
    padding-left: 20px;
}

.faq-icon {
    width: 30px;
    height: 30px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    transition: var(--transition);
    flex-shrink: 0;
}

.faq-item.active .faq-icon {
    background: var(--primary);
    color: white;
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding: 0 24px 24px;
}

.faq-answer p {
    color: var(--text-light);
    line-height: 1.8;
}





/* ================ AI Section ================ */
.ai-section {
    margin-top: 80px;
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}
.ai-section .services-header h1 {
    color: #FF6B35;
    font-weight: 600;
    font-size: 2.7rem;
    letter-spacing: -0.5px;
}

.ai-section .services-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 10px 0;
    color: #333;
}

.ai-section .services-header p {
    font-size: 1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

.ai-feature h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: #2d2d2d;
    font-weight: 600;
}

.ai-feature p {
    color: #666;
    line-height: 1.6;
    font-size: 0.95rem;
}

.ai-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}
.ai-feature {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}
.ai-feature div:first-child {
    font-size: 40px;
    margin-bottom: 15px;
}
.ai-feature h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #333;
}
.ai-feature p {
    color: #666;
    line-height: 1.6;
}
.ai-generate-btn {
    display: inline-block;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
    padding: 16px 36px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.25);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    letter-spacing: 0.5px;
}

/* ================ Footer ================ */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 60px 20px 30px;
    margin-top: 80px;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}
.footer-section h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    color: white;
}
.footer-section a {
    display: block;
    margin-bottom: 10px;
    color: #ccc;
    transition: color 0.2s;
    text-decoration: none;
}
.footer-section a:hover {
    color: white;
}
.footer-section p {
    color: #aaa;
    margin-bottom: 8px;
}
.logo-icon {
    width: 40px;
    height: 40px;
    background: #FF6B35;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 10px;
    font-weight: bold;
}
.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid #333;
    text-align: center;
    color: #777;
}

/* ================ Modals ================ */
.modal {
    display: none;
    position: fixed;
    z-index: 10000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    margin: 3% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
    position: relative;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 25px 30px;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    position: relative;
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.3) 0%, 
        rgba(255, 255, 255, 0.8) 50%, 
        rgba(255, 255, 255, 0.3) 100%
    );
}

.modal-header h2 {
    color: white;
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.close {
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

.modal-body > p {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 25px;
    padding: 15px;
    background: var(--primary-light);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary);
    font-size: 0.95rem;
}

.form-group h3 {
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 22px;
}

input, select, textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Tajawal', sans-serif;
    transition: var(--transition);
    background: white;
    color: var(--text);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
    transform: translateY(-2px);
}

input::placeholder, textarea::placeholder {
    color: #aaa;
}

textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    padding: 16px 32px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: var(--transition);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.5px;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.4);
}

.submit-btn:active {
    transform: translateY(-1px);
}

.file-upload-area {
    border: 2px dashed #ddd;
    border-radius: 15px;
    padding: 35px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: #fafafa;
}

.file-upload-area:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 12px;
    color: var(--primary);
}

.file-upload-area p {
    color: var(--text);
    font-weight: 500;
    margin-bottom: 8px;
}

.file-upload-area small {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.color-selection-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ai-input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

.art-style-scroll {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) #f0f0f0;
    /* Enable smooth touch scrolling */
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    /* Prevent wrapping */
    flex-wrap: nowrap;
    /* Allow horizontal touch pan */
    touch-action: pan-x pinch-zoom;
    /* Contain scroll behavior */
    overscroll-behavior-x: contain;
}

/* Desktop scrollbar */
.art-style-scroll::-webkit-scrollbar {
    height: 6px;
}

.art-style-scroll::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.art-style-scroll::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.art-style-card {
    flex: 0 0 auto;
    flex-shrink: 0; /* Prevent shrinking */
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

/* Mobile specific fixes - ENABLE SCROLLING */
@media (max-width: 768px) {
    .art-style-scroll {
        /* Force enable horizontal scrolling on mobile */
        overflow-x: scroll !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        /* Ensure proper touch behavior */
        touch-action: pan-x !important;
        /* Hide scrollbar on mobile but keep functionality */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .art-style-scroll::-webkit-scrollbar {
        display: none; /* Hide scrollbar on mobile */
    }
    
    /* Ensure cards don't shrink on mobile */
    .art-style-card {
        flex: 0 0 auto !important;
        min-width: 140px;
        flex-shrink: 0 !important;
    }
    
    .art-style-card img {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .art-style-card {
        min-width: 120px;
    }
    
    .art-style-card img {
        width: 100px;
        height: 100px;
    }
}

.art-style-card input[type="radio"]:checked + .art-style-image-wrapper img {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.2);
}

.style-name {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

/* Custom scrollbar for modal content */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Mobile Modal Responsive */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
        border-radius: 15px;
        max-height: 85vh;
    }
    
    .modal-header {
        padding: 20px 20px;
        border-radius: 15px 15px 0 0;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .close {
        font-size: 28px;
        width: 35px;
        height: 35px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-body > p {
        font-size: 0.9rem;
        padding: 12px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .submit-btn {
        padding: 14px 24px;
        font-size: 1rem;
    }
    
    .file-upload-area {
        padding: 25px 15px;
    }
    
    .upload-icon {
        font-size: 40px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 98%;
        margin: 2% auto;
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 18px 15px;
    }
    
    .modal-header h2 {
        font-size: 1.1rem;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    input, select, textarea {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    .submit-btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

.action-buttons {
        display: flex;
        gap: 1rem;
        margin-bottom: 2rem;
    }

.modern-nav a {
  color: #333;
  text-decoration: none;
  margin: 0 15px;
  font-weight: 500;
  transition: color 0.3s, transform 0.2s;
}

.modern-nav a:hover {
  color: #b47bff;
  transform: scale(1.05);
}


/* ========== Brands / Collaborations Section ========== */
/* ========== Brands / Collaborations Section (Udemy Style) ========== */
.brands-section {
    padding: 80px 0;
    text-align: center;
    background: #fafafa;
}

.brands-section .services-header h1 {
    font-size: 2rem;
    color: #222;
    margin-bottom: 10px;
}

.brands-section .services-header h2 {
    font-size: 1.4rem;
    color: #666;
    margin-bottom: 15px;
}

.brands-section .services-header p {
    color: #555;
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

/* Brand Logos Container */
.brand-logos-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Udemy-style list styling */
.ud-unstyled-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px; /* Space between logos */
}

.brand-logos-item {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    filter: grayscale(1);
    opacity: 0.8;
}

.brand-logos-item:hover {
    filter: grayscale(0);
    opacity: 1;
    transform: scale(1.05);
}

.brand-logos-item img {
    max-height: 50px;
    max-width: 150px;
    object-fit: contain;
    transition: all 0.3s ease;
    padding: 10px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* CTA Styling */
.brands-cta {
    margin-top: 30px;
}

.brands-cta p {
    font-size: 1rem;
    color: #333;
    margin-bottom: 10px;
}

.brand-collab-btn {
    display: inline-block;
    background: #111;
    color: #fff;
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.brand-collab-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* ================ product Section Enhancements ================ */

/* Product Container */

#productDetails {
  display: flex !important;
}
.product-container {
    display: flex;
    flex-direction: row; /* left info, right image */
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    direction: rtl; /* optional: keeps Arabic text natural */
}

/* Product Info (LEFT) */
.product-info {
    flex: 1;
    text-align: right;
}

/* Product Image (RIGHT) */
.product-image {
    flex: 1;
    text-align: center;
}

.product-image img {
    max-width: 70%;
    height: auto;
    border: 1px solid #fffbfb;
    padding: 3px;
    background: #e5e2e2;
    border-radius: 8px;
}

/* Thumbnails */
.thumbnails {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.thumbnails img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 1px solid #444;
    cursor: pointer;
    border-radius: 5px;
    transition: transform 0.2s;
}

.thumbnails img:hover {
    transform: scale(1.05);
}

/* Optional: Highlight currently active thumbnail */
.thumbnails img.active {
    border-color: #FF6B35;
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.3);
}

/* Text & Buttons */
.product-title {
    font-size: 28px;
    margin-bottom: 10px;
}

.section {
    margin-bottom: 20px;
}

.section-title {
    font-weight: bold;
    margin-bottom: 5px;
    color: #e05a2a;
    font-size: 22px;
}

.spec-item {
    margin: 5px 0;
    font-size: 17px;
}

.price-section {
    font-size: 20px;
    font-weight: bold;
    margin: 20px 0;
}

.add-to-cart {
    padding: 10px 20px;
    background-color: #FFD700;
    color: #121212;
    border: none;
    cursor: pointer;
    font-weight: bold;
    border-radius: 5px;
}

.shipping-info {
    background-color: #f7f7f7;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
}


select {
  width: 100%;
  max-width: 300px;
  padding: 12px 16px;
  font-size: 16px;
  font-family: "Tajawal", sans-serif;
  color: #333;
  background-color: #fff;
  border: 2px solid #ccc;
  border-radius: 8px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #666 50%),
                    linear-gradient(135deg, #666 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% - 3px),
                       calc(100% - 15px) calc(50% - 3px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Hover & focus effects */
select:hover {
  border-color: #007bff;
}

select:focus {
  border-color: #007bff;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
  outline: none;
}

/* Option styling */
option {
  background-color: #fff;
  color: #333;
  padding: 10px;
}

/* Dark mode friendly (optional) */
@media (prefers-color-scheme: dark) {
  select {
    border-color: #555;
    background-image: linear-gradient(45deg, transparent 50%, #ccc 50%),
                      linear-gradient(135deg, #ccc 50%, transparent 50%);
  }
  option {
    background-color: #222;
    color: #eee;
  }
}

/* ================ Responsive Breakpoints ================ */

/* Tablet and below */
@media (max-width: 1024px) {
    .stats-container {
        gap: 15px;
    }
    
    .stat-item {
        min-width: 160px;
        max-width: 180px;
        padding: 20px 16px;
    }
    
    .arrow {
        font-size: 1.5rem;
        margin: 0 5px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .header-container {
        height: 60px;
    }
    
    .logo {
        font-size: 1.1rem;
    }
    
    .logo img {
        height: 35px;
    }
    
    .logo span {
        display: none; /* Hide "متجر Nazik Art" text on small screens */
    }
    
    .mobile-toggle {
        display: flex !important;
    }
    
    .nav-menu {
        display: none;
    }
    
    .nav-menu .nav-link {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 1rem;
        border-radius: var(--radius-md);
        background: var(--primary-light);
    }
    
    .main-container {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 80px 20px 40px;
        gap: 40px;
    }
    
    .content-section {
        max-width: 100%;
    }
    
    .content-section p {
        max-width: 100%;
        font-size: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
        font-size: 0.95rem;
    }
    
    .btn-primary span {
        margin-right: 8px;
    }
    
    .media-section {
        max-width: 100%;
    }
    
    .ai-input-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    #productDetails {
        flex-direction: column;
    }
    
    .process-section {
        padding: 60px 15px;
    }
    
    .stats-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .stat-item {
        min-width: 100%;
        max-width: 100%;
    }
    
    .arrow {
        transform: rotate(630deg);
        font-size: 2rem;
        margin: 10px 0;
    }
    
    @keyframes arrowPulse {
        0%, 100% { opacity: 0.5; transform: rotate(630deg) translateY(0); }
        50% { opacity: 1; transform: rotate(630deg) translateY(-5px); }
    }
    
    .services-header h1 {
        font-size: 2rem;
    }
    
    .services-header h2 {
        font-size: 1.4rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .faq-section {
        padding: 60px 15px;
    }
}

/* Small mobile */
@media screen and (max-width: 375px) {
    .header-container { 
        height: 55px; 
        padding: 0 12px; 
    }
    
    .logo { 
        font-size: 0.9rem; 
        gap: 6px; 
    }
    
    .logo img {
        height: 32px;
    }
    
    .mobile-toggle {
        padding: 8px;
    }
    
    .mobile-toggle span {
        width: 22px;
    }
    
    .nav-menu.mobile-open {
        top: 55px;
        padding: 15px;
    }
    
    .nav-link {
        font-size: 0.9rem !important;
        padding: 10px 16px !important;
    }
    
    .main-container { 
        padding: 70px 15px 30px;
        gap: 30px; 
    }
    
    .hero-badge {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .content-section h1 { 
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .content-section h2 { 
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    .content-section p {
        font-size: 0.95rem;
        margin-bottom: 25px;
        line-height: 1.7;
    }
    
    .hero-actions {
        gap: 10px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .btn-primary span {
        font-size: 1.2rem;
    }
    
    .stat-item { 
        padding: 18px 14px;
    }
    
    .stat-icon {
        font-size: 2rem;
        margin-bottom: 10px;
    }
    
    .stat-number {
        font-size: 1rem;
    }
    
    .stat-description {
        font-size: 0.8rem;
    }
    
    .services-section {
        padding: 50px 15px;
    }
    
    .services-header h1 {
        font-size: 1.8rem;
    }
    
    .services-header h2 {
        font-size: 1.2rem;
    }
    
    .services-header p {
        font-size: 0.9rem;
    }
    
    .service-card, .ai-feature { 
        padding: 20px 16px; 
    }
    
    .service-card h3, .ai-feature h3 { 
        font-size: 1.2rem; 
    }
    
    .service-card p, .ai-feature p {
        font-size: 0.9rem;
    }
    
    .product-title { 
        font-size: 1.4rem; 
    }
    
    .spec-item { 
        font-size: 0.9rem; 
    }
    
    .thumbnails img { 
        width: 60px; 
        height: 60px; 
    }
    
    .faq-section {
        padding: 50px 15px;
    }
    
    .faq-question {
        padding: 18px;
    }
    
    .faq-question h3 {
        font-size: 0.95rem;
        padding-left: 10px;
    }
    
    .faq-icon {
        width: 26px;
        height: 26px;
        font-size: 1rem;
    }
    
    .footer {
        padding: 40px 15px 20px;
    }
    
    .footer-section h3 { 
        font-size: 1.1rem; 
    }
    
    .footer-section p,
    .footer-section a {
        font-size: 0.9rem;
    }
    
    .brands-section { 
        padding: 40px 10px; 
    }
    
    .ud-unstyled-list { 
        gap: 15px; 
    }
    
    .brand-logos-item img { 
        max-height: 35px; 
        max-width: 100px; 
    }
    
    .brand-collab-btn { 
        font-size: 0.85rem; 
        padding: 10px 18px; 
    }
}

/* Landscape mode for small screens */
@media (max-height: 500px) and (orientation: landscape) {
    .main-container { 
        margin: 20px auto; 
        padding: 40px 20px 20px;
    }
    
    .content-section h1 { 
        font-size: 1.8rem; 
    }
    
    .content-section h2 { 
        font-size: 1.2rem; 
    }
}
/* Mobile scroll override - Add this at the end */
@media (max-width: 768px) {
    .art-style-scroll {
        overflow-x: scroll !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-x !important;
    }
    
    .art-style-card {
        flex-shrink: 0 !important;
        min-width: 140px;
    }
}


/* ================ Portfolio Filter Buttons ================ */
.portfolio-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 30px auto 10px;
    padding: 6px;
    max-width: 800px;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    position: relative;
}

.filter-btn {
    padding: 10px 22px;
    border: none;
    border-radius: var(--radius-xl);
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
    font-size: 0.9rem;
    font-family: 'Tajawal', sans-serif;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    position: relative;
    white-space: nowrap;
}

.filter-btn .filter-icon {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.filter-btn:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.filter-btn:hover .filter-icon {
    transform: scale(1.2) rotate(-5deg);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.35);
    transform: translateY(-1px);
}

.filter-btn.active .filter-icon {
    transform: scale(1.15);
}

/* Count badge on each button */
.filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.08);
    color: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 20px;
    transition: var(--transition);
}

.filter-btn.active .filter-count {
    background: rgba(255,255,255,0.25);
}

/* Mobile scroll on small screens */
@media (max-width: 600px) {
    .portfolio-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 8px 12px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        border-radius: var(--radius-lg);
        gap: 6px;
    }

    .portfolio-filters::-webkit-scrollbar {
        display: none;
    }

    .filter-btn {
        flex-shrink: 0;
        font-size: 0.82rem;
        padding: 8px 16px;
    }
}


.swiper-click-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 12px auto 0;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-family: 'Tajawal', sans-serif;
    animation: hintPulse 2.5s ease-in-out infinite;
}

.hint-icon {
    animation: hintBounce 2.5s ease-in-out infinite;
    display: inline-block;
    font-size: 1rem;
}

@keyframes hintBounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-4px); }
}

@keyframes hintPulse {
    0%, 100% { opacity: 0.5; }
    50%       { opacity: 1; }
}


/* ============================================================
   Showcase Section — paste into home.css
   Uses your existing CSS variables so no conflicts
   ============================================================ */

/* ── Section wrapper ── */
.showcase-section {
    padding: 80px 20px;
    background: linear-gradient(160deg, #fafafa 0%, #f2f2f2 100%);
    position: relative;
    overflow: hidden;
}

.showcase-section::before {
    content: '';
    position: absolute;
    top: -120px;
    left: -120px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,107,53,0.06) 0%, transparent 70%);
    pointer-events: none;
}

/* ── Stats bar ── */
.showcase-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 12px 24px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.stat-pill:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-pill .num {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--primary);
}

.stat-pill .lbl {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

/* ── Grid ── */
.showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    max-width: 1150px;
    margin: 0 auto;
}

.showcase-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    font-size: 1rem;
    padding: 40px 0;
}

/* ── Card ── */
.showcase-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;

    /* staggered fade-up on load */
    opacity: 0;
    transform: translateY(28px);
    animation: showcaseFadeUp 0.6s ease forwards;
}

.showcase-card:nth-child(1) { animation-delay: 0.10s; }
.showcase-card:nth-child(2) { animation-delay: 0.20s; }
.showcase-card:nth-child(3) { animation-delay: 0.30s; }
.showcase-card:nth-child(4) { animation-delay: 0.40s; }
.showcase-card:nth-child(5) { animation-delay: 0.50s; }
.showcase-card:nth-child(6) { animation-delay: 0.60s; }

@keyframes showcaseFadeUp {
    to { opacity: 1; transform: translateY(0); }
}

/* orange top-bar on hover — matches your service cards */
.showcase-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.35s ease;
    z-index: 2;
}

.showcase-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.showcase-card:hover::before {
    transform: scaleX(1);
}

/* ── Shoot photo (hero image top) ── */
.shoot-photo-wrapper {
    position: relative;
    width: 100%;
    height: 240px;        /* slightly taller */
    overflow: hidden;
    background: #1a1a1a;
    flex-shrink: 0;
}

.shoot-photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;      /* ← changed from cover to contain */
    object-position: center;
    display: block;
    transition: transform 0.5s ease;
    background: #f5f5f5;      /* ← light bg so contain doesn't show black bars */
}

.showcase-card:hover .shoot-photo-wrapper img {
    transform: scale(1.07);
}

.shoot-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 20px;
    letter-spacing: 0.4px;
    display: flex;
    align-items: center;
    gap: 5px;
    pointer-events: none;
}

.shoot-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: rgba(255,255,255,0.25);
    gap: 8px;
}

.shoot-placeholder span { font-size: 2.5rem; }
.shoot-placeholder p    { font-size: 0.82rem; }

/* ── Card body ── */
.card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
}

/* ── Profile row ── */
.showcase-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.showcase-avatar {
    position: relative;
    flex-shrink: 0;
}

/* Real profile image */
.avatar-img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    display: block;
}

/* Fallback letter avatar */
.avatar-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 800;
    color: white;
}

.avatar-color-1 { background: linear-gradient(135deg, var(--primary), var(--accent)); }
.avatar-color-2 { background: linear-gradient(135deg, #6C63FF, #a78bfa); }
.avatar-color-3 { background: linear-gradient(135deg, #10b981, #34d399); }

.instagram-badge {
    position: absolute;
    bottom: -3px;
    left: -3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.showcase-info h4 {
    font-size: 0.97rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 5px;
}

.instagram-link {
    font-size: 0.8rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 20px;
    background: var(--primary-light);
    transition: var(--transition);
}

.instagram-link:hover {
    background: rgba(255, 107, 53, 0.15);
}

/* ── Divider ── */
.showcase-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* ── Product used ── */
.showcase-product { display: flex; flex-direction: column; gap: 8px; }

.section-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
}

.showcase-product-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    background: var(--primary-light);
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 107, 53, 0.15);
    transition: var(--transition);
}

.showcase-product-link:hover {
    background: rgba(255, 107, 53, 0.12);
    border-color: var(--primary);
    transform: translateX(-3px);
}

.product-thumb {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    overflow: hidden;
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.product-details { flex: 1; min-width: 0; }

.product-details strong {
    display: block;
    font-size: 0.87rem;
    font-weight: 700;
    color: var(--secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-details small {
    display: block;
    font-size: 0.73rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.arrow-icon {
    color: var(--primary);
    font-size: 0.9rem;
    opacity: 0.45;
    transition: var(--transition);
    flex-shrink: 0;
}

.showcase-product-link:hover .arrow-icon {
    opacity: 1;
    transform: translateX(-3px);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .showcase-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .showcase-section { padding: 60px 15px; }

    .showcase-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .shoot-photo-wrapper { height: 200px; }

    .showcase-stats { gap: 12px; }

    .stat-pill {
        padding: 10px 16px;
    }

    .stat-pill .num { font-size: 1.1rem; }
}


/* ═══ Showcase Lightbox ═══ */
.showcase-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.showcase-lightbox.open {
    display: flex;
}

.lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: lbFadeIn 0.3s ease;
}

.lightbox-container {
    position: relative;
    background: white;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.4);
    animation: lbSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
    scrollbar-width: none;
}

.lightbox-container::-webkit-scrollbar { display: none; }

/* Close btn */
.lightbox-close {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(4px);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition);
}

.lightbox-close:hover {
    background: rgba(0,0,0,0.7);
    transform: rotate(90deg);
}

/* ① Shoot photo */
.lightbox-shoot-wrapper {
    position: relative;
    width: 100%;
    background: #111;
}

.lightbox-shoot-img {
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    background: #f5f5f5;
    display: block;
}

.lightbox-shoot-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(6px);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ② Info bar */
.lightbox-info-bar {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: white;
}

.lightbox-client {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lightbox-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    font-weight: 800;
    flex-shrink: 0;
}

.lightbox-client strong {
    display: block;
    font-size: 0.97rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 3px;
}

.lightbox-ig-link {
    font-size: 0.8rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    padding: 2px 8px;
    background: var(--primary-light);
    border-radius: 20px;
    transition: var(--transition);
}

.lightbox-ig-link:hover {
    background: rgba(255,107,53,0.15);
}

/* ③ Product section */
.lightbox-product-section {
    padding: 16px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fafafa;
}

.lightbox-product-card {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    background: white;
    border: 1px solid rgba(255,107,53,0.2);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.lightbox-product-card:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateX(-3px);
}

.lightbox-product-img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    background: #eee;
}

.lightbox-product-info { flex: 1; min-width: 0; }

.lightbox-product-info strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 4px;
}

.lightbox-product-info small {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Animations */
@keyframes lbFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes lbSlideUp {
    from { opacity: 0; transform: translateY(40px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

/* ═══ Lightbox Mobile Fixes ═══ */
@media (max-width: 768px) {

    .showcase-lightbox {
        padding: 0;
        align-items: flex-end;      /* slides up from bottom */
    }

    .lightbox-container {
        border-radius: 20px 20px 0 0;
        max-height: 92vh;
        width: 100%;
    }

    /* ① shoot photo — taller on mobile */
    .lightbox-shoot-img {
        max-height: 350px;
        width: 100%;
        object-fit: contain;
        background: #f5f5f5;
    }

    /* close btn — move it OUTSIDE the image, above the container */
    .lightbox-close {
        top: 12px;
        left: 12px;
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
        background: rgba(0, 0, 0, 0.6);
        z-index: 20;
    }

    /* ② info bar — fix avatar alignment */
    .lightbox-info-bar {
        padding: 14px 16px;
    }

    .lightbox-client {
        flex-direction: row;        /* keep row but fix gap */
        align-items: center;
        gap: 12px;
    }

    .lightbox-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        flex-shrink: 0;
        order: 2;                   /* avatar on LEFT in RTL = order 2 */
    }

    .lightbox-client > div:last-child {
        order: 1;                   /* text on RIGHT */
        text-align: right;
    }

    .lightbox-client strong {
        font-size: 0.95rem;
    }

    .lightbox-ig-link {
        font-size: 0.78rem;
    }

    /* ③ product section */
    .lightbox-product-section {
        padding: 14px 16px 30px;    /* extra bottom padding for safe area */
    }

    .lightbox-product-card {
        padding: 10px 12px;
        gap: 10px;
    }

    .lightbox-product-img {
        width: 52px;
        height: 52px;
    }

    .lightbox-product-info strong {
        font-size: 0.88rem;
    }

    .lightbox-product-info small {
        font-size: 0.73rem;
    }
}

/* Extra small phones */
@media (max-width: 380px) {
    .lightbox-shoot-img {
        max-height: 280px;
    }

    .lightbox-container {
        max-height: 95vh;
    }
}


/* ═══ Showcase Swiper ═══ */
.showcaseSwiper {
    width: 90%;
    margin: 30px auto;
    padding-bottom: 40px !important;
}

.showcase-next,
.showcase-prev {
    color: var(--primary) !important;
    background: white;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.showcase-next:hover,
.showcase-prev:hover {
    background: var(--primary);
    color: white !important;
    box-shadow: 0 4px 15px rgba(255,107,53,0.35);
}

.showcase-next::after,
.showcase-prev::after {
    font-size: 0.9rem !important;
    font-weight: 900;
}

.showcase-pagination-bullets .swiper-pagination-bullet {
    background: var(--primary);
    opacity: 0.3;
}

.showcase-pagination-bullets .swiper-pagination-bullet-active {
    background: var(--primary);
    opacity: 1;
}

/* ── fix: add width/height so zoom button covers the thumb correctly ── */
.product-thumb-wrapper {
    position: relative;
    flex-shrink: 0;
    width: 46px;      /* ← add this */
    height: 46px;     /* ← add this */
}

.product-zoom-btn {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    border-radius: var(--radius-sm);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.25s ease;
    padding: 0;
    width: 100%;
    height: 100%;
}

.product-zoom-btn svg {
    width: 18px;
    height: 18px;
    stroke: white;
    stroke-width: 2.5;
    flex-shrink: 0;
}

.product-thumb-wrapper:hover .product-zoom-btn {
    opacity: 1;
}

/* ═══ Product Image Preview Modal ═══ */
.product-preview-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.product-preview-modal.open {
    display: flex;
}

.product-preview-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.product-preview-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 90vw;
    max-height: 90vh;
    animation: lbSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.product-preview-content img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: block;
}

.product-preview-name {
    color: white;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Tajawal', sans-serif;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 20px;
    border-radius: 20px;
    backdrop-filter: blur(6px);
}

.product-preview-close {
    position: absolute;
    top: -14px;
    left: -14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: white;
    color: var(--secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    z-index: 2;
    padding: 0;
}

.product-preview-close:hover {
    background: var(--primary);
    color: white;
    transform: rotate(90deg);
}

.product-preview-close svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2.5;
}

/* Mobile */
@media (max-width: 768px) {
    .product-preview-content {
        max-width: 95vw;
    }

    .product-preview-content img {
        max-height: 65vh;
    }

    .product-preview-close {
        top: -10px;
        left: -10px;
        width: 32px;
        height: 32px;
    }
}

/* ═══ Zoom (shoot photo inside lightbox) ═══ */
.zoom-container {
    overflow: hidden;
    cursor: zoom-in;
    background: #f5f5f5;
}

.zoom-container.zoomed {
    cursor: zoom-out;
}

.lightbox-shoot-img {
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    background: #f5f5f5;
    display: block;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center center;
    user-select: none;
    -webkit-user-drag: none;
}

.zoom-container.zoomed .lightbox-shoot-img {
    max-height: none;
    transform: scale(2.2);
}

.zoom-hint {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    color: white;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 5px 11px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.zoom-hint.hidden { opacity: 0; }

/* mobile zoom */
@media (max-width: 768px) {
    .zoom-container.zoomed .lightbox-shoot-img {
        transform: scale(2.5);
    }
}

.lightbox-close svg {
    width: 16px;
    height: 16px;
    stroke: white;
    stroke-width: 2.5;
}

/* ── preview button next to product row ── */
.product-preview-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    border: 1.5px solid rgba(255,107,53,0.3);
    background: white;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition);
    padding: 0;
}

.product-preview-trigger svg {
    width: 16px;
    height: 16px;
    stroke: var(--primary);
    stroke-width: 2.5;
    flex-shrink: 0;
}

.product-preview-trigger:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.08);
}

.product-preview-trigger:hover svg {
    stroke: white;
}

/* ================================================================
   BGMAKER SECTION  —  اصنع خلفيتك  (inline home-page section)
   Append this block to:  static/css/public/home.css
   ================================================================ */
/* ── Section wrapper ── */
.bgmaker-section {
    padding: 80px 20px;
    background: linear-gradient(160deg, #fff 0%, #fff8f5 100%);
}

/* ── Two-column layout ── */
.bgmaker-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 28px;
    direction: rtl;
    align-items: start;
}

/* ── Controls card ── */
.bgmaker-controls {
    background: #fff;
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    border: 1px solid #f0ede9;
}

/* ── Aspect bar ── */
.bgmaker-aspect-bar {
    display: flex;
    gap: 6px;
    background: #f5f5f5;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 20px;
}
.bg-aspect-btn {
    flex: 1;
    padding: 8px 6px;
    border: none;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    color: #888;
    font-family: 'Tajawal', sans-serif;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.bg-aspect-btn.active,
.bg-aspect-btn:hover {
    background: #fff;
    color: #FF6B35;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ── Blocks ── */
.bgmaker-block { margin-bottom: 22px; }
.bgmaker-block-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    color: #2d2d2d;
    margin-bottom: 12px;
}

/* ── Thumb grids ── */
.bg-base-grid    { grid-template-columns: repeat(3, 1fr); }
.bg-texture-grid { grid-template-columns: repeat(2, 1fr); }
.bgmaker-thumb-grid {
    display: grid;
    gap: 8px;
}

/* ── Thumb cards ── */
.bgmaker-thumb-card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 1;
    cursor: pointer;
    border: 2.5px solid transparent;
    transition: all 0.25s;

    /* ✅ FIX: kills 300ms tap delay on mobile */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.bgmaker-thumb-card:hover   { transform: scale(1.04); box-shadow: 0 4px 14px rgba(0,0,0,0.12); }
.bgmaker-thumb-card.selected {
    border-color: #FF6B35;
    box-shadow: 0 0 0 3px rgba(255,107,53,0.22);
    transform: scale(1.06);
}
.bgmaker-thumb-card img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.bgmaker-thumb-hover {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.1) 55%, transparent 100%);
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 6px;
}
.bgmaker-thumb-card:hover .bgmaker-thumb-hover { opacity: 1; }
.bgmaker-thumb-zoom {
    align-self: flex-end;
    background: rgba(0,0,0,0.45);
    color: #fff;
    border: none;
    border-radius: 6px;
    width: 26px; height: 26px;
    font-size: 0.65rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
}
.bgmaker-thumb-name {
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Filter pills ── */
.bgmaker-pills {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 10px;
    scrollbar-width: none;
}
.bgmaker-pills::-webkit-scrollbar { display: none; }
.bgmaker-pill {
    padding: 5px 14px;
    border-radius: 50px;
    border: 1.5px solid #e0e0e0;
    background: #fff;
    color: #666;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    font-family: 'Tajawal', sans-serif;
}
.bgmaker-pill.active,
.bgmaker-pill:hover {
    background: #FF6B35;
    color: #fff;
    border-color: #FF6B35;
    box-shadow: 0 3px 10px rgba(255,107,53,0.25);
}

/* ── Show more button ── */
.bgmaker-more-btn {
    margin-top: 10px;
    width: 100%;
    padding: 9px;
    border-radius: 10px;
    border: 1.5px dashed #FF6B35;
    background: transparent;
    color: #FF6B35;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: 'Tajawal', sans-serif;
}
.bgmaker-more-btn:hover { background: #fff5f0; }

/* ── Generate button ── */
.bgmaker-generate-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #FF6B35, #F7931E);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(255,107,53,0.3);
    transition: all 0.3s;
    font-family: 'Tajawal', sans-serif;
}
.bgmaker-generate-btn:hover  { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,107,53,0.4); }
.bgmaker-generate-btn:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }

/* ── Preview panel ── */
.bgmaker-preview {
  position: relative;
  border-radius: 20px;
  border: 1px solid #e8e4df;
  overflow: hidden;
  min-height: 360px;
  background: #1a1a1a;
}


.bg-split-row {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 360px;
}

.bg-split-panel {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all 0.3s ease;
}

.bg-split-panel:hover { filter: brightness(1.05); }

.bg-split-divider {
  width: 2px;
  background: rgba(255,255,255,0.12);
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

/* Empty state per panel */
.bg-split-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #888;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  padding: 20px;
  pointer-events: none;
}
.bg-split-icon {
  font-size: 2.2rem;
  opacity: 0.5;
  filter: grayscale(1);
}

/* Label badge at bottom of each panel */
.bg-split-label {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
  backdrop-filter: blur(4px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.bg-split-panel:hover .bg-split-label { opacity: 1; }

/* When image is loaded — show label always */
.bg-split-panel.has-image .bg-split-label { opacity: 0.8; }
.bg-split-panel.has-image:hover .bg-split-label { opacity: 1; }

/* Result overlay */
#bg-preview-result {
  display: none;
  position: absolute;
  inset: 0;
  background: #000;
  border-radius: inherit;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  animation: bgResultIn .35s cubic-bezier(0.16,1,0.3,1);
}

@keyframes bgResultIn {
  from { opacity: 0; transform: scale(.97); }
  to   { opacity: 1; transform: scale(1);  }
}

@media (max-width: 768px) {
  .bg-split-row    { flex-direction: column; min-height: 280px; }
  .bg-split-divider { width: 100%; height: 2px; }
  .bg-split-panel  { min-height: 140px; }
}




/* Empty */
.bgmaker-preview-empty {
    text-align: center;
    color: #bbb;
    padding: 40px 20px;
}
.bgmaker-empty-icon  { font-size: 3.5rem; margin-bottom: 14px; }
.bgmaker-empty-title { font-size: 1rem; font-weight: 600; color: #777; margin-bottom: 6px; }
.bgmaker-empty-sub   { font-size: 0.88rem; color: #bbb; max-width: 220px; margin: 0 auto; }

/* Loading */
.bgmaker-loading {
    text-align: center;
    padding: 40px 20px;
    flex-direction: column;
    align-items: center;
}
@keyframes bgSpin { to { transform: rotate(360deg); } }
.bgmaker-spinner {
    width: 52px; height: 52px;
    border: 4px solid rgba(255,107,53,0.15);
    border-top-color: #FF6B35;
    border-radius: 50%;
    animation: bgSpin 0.9s linear infinite;
    margin: 0 auto 16px;
}
.bgmaker-loading-title { font-size: 1rem; font-weight: 700; color: #333; }
.bgmaker-loading-sub   { font-size: 0.85rem; color: #999; margin-top: 6px; }

/* ── Result & Aspect Ratios ── */
.bgmaker-result {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.bgmaker-result-img {
    width: 100%;
    height: auto;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 8px 28px rgba(0,0,0,0.1);
    transition: all 0.4s ease-in-out;
    aspect-ratio: 16 / 9;
    max-height: 400px;
}

/* أبعاد الجوال (الوضع الافتراضي للشاشات الكبيرة) */
.bgmaker-result-img.bg-mobile { 
    max-width: 240px; 
    aspect-ratio: 9 / 16; 
    max-height: none;
}

/* أبعاد المربع (الوضع الافتراضي للشاشات الكبيرة) */
.bgmaker-result-img.bg-square { 
    max-width: 320px; 
    aspect-ratio: 1 / 1; 
    max-height: none;
}

.bgmaker-result-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap; 
    justify-content: center;
}
.bgmaker-action-btn {
    padding: 10px 22px;
    border-radius: 10px;
    border: none;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    transition: all 0.2s;
}
.bgmaker-dl-btn    { background: #fff; color: #2d2d2d; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.bgmaker-dl-btn:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.15); transform: scale(1.03); }
.bgmaker-retry-btn { background: #2d2d2d; color: #fff; }
.bgmaker-retry-btn:hover { background: #111; transform: scale(1.03); }

/* ── Gallery modal ── */
@keyframes bgFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes bgZoomIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

.bgmaker-gallery-overlay {
    position: fixed;
    inset: 0;
    z-index: 10100;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: bgFadeIn 0.2s ease;
}
.bgmaker-gallery-box {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 860px;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    animation: bgZoomIn 0.25s cubic-bezier(0.16,1,0.3,1);
}
.bgmaker-gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
    flex-shrink: 0;
}
.bgmaker-gallery-header h3 { font-size: 1.1rem; margin: 0; }
.bgmaker-gallery-close {
    background: none;
    border: 1.5px solid #ddd;
    color: #666;
    width: 32px; height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.bgmaker-gallery-close:hover { background: #fee2e2; color: #e53e3e; border-color: #fca5a5; }
.bgmaker-gallery-body { padding: 20px; overflow-y: auto; flex: 1; }
.bgmaker-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}
.bgmaker-gallery-empty {
    grid-column: 1/-1;
    text-align: center;
    padding: 40px;
    color: #aaa;
}

/* ── Zoom modal ── */
.bgmaker-zoom-overlay {
    position: fixed;
    inset: 0;
    z-index: 10200;
    background: rgba(0,0,0,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    cursor: zoom-out;
    animation: bgFadeIn 0.2s ease;
}
.bgmaker-zoom-overlay img {
    max-width: 100%;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 0 60px rgba(0,0,0,0.4);
    cursor: default;
    animation: bgZoomIn 0.25s ease;
}
.bgmaker-zoom-close {
    position: absolute;
    top: 20px; right: 24px;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 40px; height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.bgmaker-zoom-close:hover { background: rgba(255,255,255,0.28); }

/* ================================================================
   🚀 إبداع التصميم وتجاوبه مع الجوال (MOBILE REDESIGN)
   ================================================================ */
/* ================================================================
   📱 BGMAKER — COMPLETE MOBILE FIX (max-width: 768px)
   Replace your entire old @media block with this
   ================================================================ */

@media (max-width: 768px) {

    /* ── Section ── */
    .bgmaker-section {
        padding: 30px 0;
        overflow: hidden;
    }

    /* ── Wrapper ── */
    .bgmaker-wrapper {
        display: flex;
        flex-direction: column;
        gap: 14px;
        width: 100%;
        max-width: 100%;
        padding: 0 10px;
        overflow: hidden;
        box-sizing: border-box;
    }

    /* ✅ Controls on top */
    .bgmaker-controls {
        order: 0;
        padding: 14px;
        border-radius: 16px;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    /* ✅ Preview at bottom */
    .bgmaker-preview {
        order: 1;
        padding: 12px;
        min-height: 200px;
        border-radius: 16px;
        width: 100%;
        box-sizing: border-box;
    }

    /* ── Aspect ratio bar ── */
    .bgmaker-aspect-bar {
        display: flex;
        width: 100%;
        box-sizing: border-box;
    }
    .bg-aspect-btn {
        flex: 1;
        min-width: 0;
        font-size: 0.68rem;
        padding: 7px 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* ── Thumb grids ── */
    .bg-base-grid,
    .bg-texture-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
        width: 100%;
        box-sizing: border-box;
    }

    /* ── Thumb cards ── */
    .bgmaker-thumb-card {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }
    .bgmaker-thumb-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
    .bgmaker-thumb-name {
        font-size: 0.6rem;
        padding: 2px;
    }
    .bgmaker-thumb-zoom {
        width: 22px;
        height: 22px;
        font-size: 0.55rem;
    }

    /* ── Block title ── */
    .bgmaker-block-title {
        font-size: 0.85rem;
    }

    /* ── Pills (inside controls) ── */
    .bgmaker-pills {
        gap: 4px;
        max-width: 100%;
    }
    .bgmaker-pill {
        font-size: 0.75rem;
        padding: 4px 10px;
    }

    /* ── Buttons ── */
    .bgmaker-generate-btn {
        padding: 12px;
        font-size: 0.9rem;
        width: 100%;
        box-sizing: border-box;
    }
    .bgmaker-action-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    /* ── Empty state ── */
    .bgmaker-empty-title { font-size: 0.9rem; }
    .bgmaker-empty-sub   { font-size: 0.8rem; }

    /* ── Result image ── */
    .bgmaker-result-img {
        width: 100%;
        height: auto;
        max-width: 100%;
        display: block;
        box-sizing: border-box;
    }
    .bgmaker-result-img.bg-mobile {
        max-width: 160px;
        aspect-ratio: 9 / 16;
        margin: 0 auto;
        display: block;
    }
    .bgmaker-result-img.bg-square {
        max-width: 200px;
        aspect-ratio: 1 / 1;
        margin: 0 auto;
        display: block;
    }

    /* ================================================================
       ✅ GALLERY MODAL FIX — pills overflow + grid bleed
       ================================================================ */

    .bgmaker-gallery-overlay {
        padding: 0;                  /* ✅ remove padding so modal fills screen */
        align-items: flex-end;       /* ✅ sheet slides up from bottom */
    }

    .bgmaker-gallery-box {
        max-height: 92vh;
        border-radius: 20px 20px 0 0;  /* ✅ bottom sheet style */
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .bgmaker-gallery-header {
        padding: 14px 16px;
        box-sizing: border-box;
        width: 100%;
    }

    /* ✅ THE FIX: pills row inside modal */
    #bg-gallery-filter-wrap {
        display: flex !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 0 16px 10px !important;
        gap: 6px;
        width: 100%;
        box-sizing: border-box;
        /* ✅ make sure it doesn't clip pills */
        direction: rtl;
    }
    #bg-gallery-filter-wrap::-webkit-scrollbar {
        display: none;
    }
    #bg-gallery-filter-wrap .bgmaker-pill {
        flex-shrink: 0;          /* ✅ pills never compress/hide */
        font-size: 0.78rem;
        padding: 5px 12px;
    }

    .bgmaker-gallery-body {
        padding: 12px 16px;
        box-sizing: border-box;
        overflow-y: auto;
        overflow-x: hidden;      /* ✅ no horizontal scroll inside body */
    }

    /* ✅ Gallery grid — same minmax trick */
    .bgmaker-gallery-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
        box-sizing: border-box;
    }
}


.bgmaker-thumb-zoom--touch {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 26px;
    height: 26px;
    font-size: 0.65rem;
    background: rgba(0,0,0,.5);
    border: none;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    backdrop-filter: blur(4px);
}

/* Hide it on desktop — desktop uses hover overlay instead */
@media (hover: hover) {
    .bgmaker-thumb-zoom--touch { display: none !important; }
}

/* ── Mobile: disable hover overlay so first tap always fires onclick ── */
@media (hover: none) {

    .bgmaker-thumb-hover {
        display: none !important;  /* overlay was stealing first tap */
    }

    /* Show image title as a static bottom gradient instead */
    .bgmaker-thumb-card::after {
        content: attr(title);
        position: absolute;
        bottom: 0; left: 0; right: 0;
        background: linear-gradient(transparent, rgba(0,0,0,.55));
        color: #fff;
        font-size: 0.65rem;
        font-weight: 700;
        padding: 14px 5px 5px;
        text-align: center;
        pointer-events: none;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        border-radius: 0 0 8px 8px;
    }

    /* Selected state pulse — replaces hover feedback on touch */
    .bgmaker-thumb-card:active {
        transform: scale(0.94);
        opacity: 0.85;
        transition: transform 0.1s, opacity 0.1s;
    }
}



