/* ===== CSS Variables ===== */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-gradient: linear-gradient(135deg, #0c0c1e 0%, #1a1a3e 50%, #0c0c1e 100%);

    --bg-primary: #0a0a1a;
    --bg-secondary: #111128;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-glass: rgba(255, 255, 255, 0.08);

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);

    --border-glass: rgba(255, 255, 255, 0.1);
    --border-glow: rgba(102, 126, 234, 0.5);

    --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(102, 126, 234, 0.3);

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ===== Animated Background ===== */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--primary-gradient);
    top: -200px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary-gradient);
    bottom: -150px;
    left: -100px;
    animation-delay: -7s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: var(--accent-gradient);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(50px, -50px) scale(1.1);
    }

    50% {
        transform: translate(-30px, 30px) scale(0.9);
    }

    75% {
        transform: translate(-50px, -30px) scale(1.05);
    }
}

/* ===== Container ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ===== Header ===== */
.header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000 !important;
    /* ضمان الظهور فوق كل شيء */
    padding: 15px 0;
    /* تقليل الهوامش قليلاً */
    background: rgba(10, 10, 26, 0.95);
    /* خلفية أكثر تعتيماً للوضوح */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    /* ظل لتمييزه */
    transition: all 0.3s ease;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-icon {
    font-size: 2rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: var(--bg-glass);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
}

.title-line {
    display: block;
}

.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 40px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-glow);
}

.cta-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.5);
}

.arrow-icon {
    width: 24px;
    height: 24px;
    transition: var(--transition-fast);
}

.cta-button:hover .arrow-icon {
    transform: translateX(-8px);
}

/* Hero Decoration */
.hero-decoration {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.floating-shape {
    position: absolute;
    border: 2px solid var(--border-glass);
    border-radius: 50%;
    animation: floatShapes 15s infinite ease-in-out;
}

.shape-1 {
    width: 100px;
    height: 100px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    bottom: 30%;
    right: 15%;
    animation-delay: -5s;
}

.shape-3 {
    width: 80px;
    height: 80px;
    top: 60%;
    left: 20%;
    animation-delay: -10s;
}

@keyframes floatShapes {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(20px, -30px) rotate(90deg);
    }

    50% {
        transform: translate(-20px, 20px) rotate(180deg);
    }

    75% {
        transform: translate(30px, 10px) rotate(270deg);
    }
}

/* ===== Gallery Section ===== */
.gallery-section {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-badge {
    display: inline-block;
    padding: 8px 20px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 16px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    transition: var(--transition-normal);
}

.gallery-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 1;
    opacity: 0;
    transition: var(--transition-normal);
}

.gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-glow);
    border-color: var(--border-glow);
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.gallery-item:hover .gallery-image {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    z-index: 2;
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition-normal);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
    opacity: 1;
}

.gallery-number {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
}

.gallery-number::before {
    content: '🎨';
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 26, 0.95);
    backdrop-filter: blur(20px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    width: 100%;
    max-width: 1200px;
    max-height: 90vh;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-glass);
    overflow: hidden;
    position: relative;
    transform: scale(0.9) translateY(40px);
    transition: var(--transition-normal);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--border-glass);
    background: var(--bg-glass);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    z-index: 10;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(90deg);
}

.modal-close svg {
    width: 24px;
    height: 24px;
}

.modal-content {
    padding: 32px;
    overflow-y: auto;
    max-height: 90vh;
}

.modal-header {
    text-align: center;
    margin-bottom: 32px;
}

.design-badge {
    display: inline-block;
    padding: 8px 20px;
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
}

/* Comparison Container */
.comparison-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: start;
    margin-bottom: 32px;
}

@media (max-width: 768px) {
    .comparison-container {
        grid-template-columns: 1fr;
    }
}

.comparison-item {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.comparison-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    background: var(--bg-glass);
    border-bottom: 1px solid var(--border-glass);
    font-weight: 600;
}

.label-icon {
    font-size: 1.2rem;
}

.image-wrapper {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background: rgba(0, 0, 0, 0.2);
}

.comparison-image {
    max-width: 100%;
    max-height: 450px;
    object-fit: contain;
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
}

.comparison-image:hover {
    transform: scale(1.02);
}

.comparison-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 20px 0;
}

.divider-line {
    width: 2px;
    height: 100px;
    background: linear-gradient(180deg, transparent, var(--border-glass), transparent);
}

.divider-icon {
    font-size: 1.5rem;
    color: var(--text-secondary);
    background: var(--bg-glass);
    padding: 12px;
    border-radius: 50%;
    border: 1px solid var(--border-glass);
}

@media (max-width: 768px) {
    .comparison-divider {
        flex-direction: row;
        padding: 0 20px;
    }

    .divider-line {
        width: 100px;
        height: 2px;
    }
}

/* Modal Navigation */
.modal-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.nav-btn:hover:not(:disabled) {
    background: var(--primary-gradient);
    border-color: transparent;
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-btn svg {
    width: 20px;
    height: 20px;
}

.nav-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    font-weight: 600;
    color: var(--text-secondary);
}

.nav-indicator span:first-child {
    color: var(--text-primary);
    font-size: 1.2rem;
}

/* ===== Footer ===== */
.footer {
    padding: 60px 0;
    border-top: 1px solid var(--border-glass);
    position: relative;
    z-index: 1;
}

.footer-content {
    text-align: center;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-text {
    color: var(--text-muted);
}

/* ===== Loading Animation ===== */
.gallery-item.loading {
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -100% 0;
    }

    100% {
        background-position: 100% 0;
    }
}

.gallery-item.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-glass);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .header .container {
        flex-direction: column;
        gap: 16px;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }

    .modal-content {
        padding: 20px;
    }

    .modal-navigation {
        flex-wrap: wrap;
    }
}