/* ═══════════════════════════════════════════════════════════════════════════
   دليل القرنة الإلكتروني - ملف الأنماط
   تصميم: حيدر سالم
   ═══════════════════════════════════════════════════════════════════════════ */

/* المتغيرات */
:root {
    --primary: #66B9B1;
    --primary-dark: #4A8B84;
    --primary-light: #8DCAC3;
    --secondary: #F1A774;
    --secondary-dark: #E08B4E;
    
    --success: #6CBA4D;
    --warning: #FFB74D;
    --error: #E57373;
    
    --text-primary: #2D3132;
    --text-secondary: #707778;
    --text-light: #9CA3AF;
    
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8FAFB;
    --bg-dark: #1E2736;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
}

/* إعادة التعيين */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Cairo', sans-serif;
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* الحاوية */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   الهيدر
   ═══════════════════════════════════════════════════════════════════════════ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    transition: var(--transition);
    padding: 20px 0;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 12px 0;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    transition: var(--transition);
}

/* روابط القائمة على خلفية Hero تكون بيضاء */
.header:not(.scrolled) .nav-link {
    color: rgba(255, 255, 255, 0.9);
}
.header:not(.scrolled) .nav-link:hover,
.header:not(.scrolled) .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}
.header:not(.scrolled) .btn-nav {
    background: rgba(255,255,255,0.2) !important;
    color: white !important;
    border: 1px solid rgba(255,255,255,0.4);
}
.header:not(.scrolled) .logo-text {
    color: white;
}
.header:not(.scrolled) .nav-toggle span {
    background: white;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 16px;
    border-radius: var(--radius-full);
    font-weight: 500;
    color: var(--text-primary);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary);
    color: white;
}

.btn-nav {
    background: var(--primary) !important;
    color: white !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ═══════════════════════════════════════════════════════════════════════════
   قسم البطل (Hero)
   ═══════════════════════════════════════════════════════════════════════════ */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.03)"/></svg>');
    background-size: 200px;
    animation: float 20s linear infinite;
}

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

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text {
    color: white;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-title .highlight {
    color: var(--secondary);
}

.hero-subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 32px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* صورة البطل */
.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
}

.phone-mockup {
    position: relative;
    width: 280px;
    height: 570px;
    background: #1a1a1a;
    border-radius: 40px;
    padding: 12px;
    box-shadow: var(--shadow-xl);
}

.phone-mockup::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 24px;
    background: #000;
    border-radius: 20px;
}

.phone-mockup img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 28px;
}

.floating-card {
    position: absolute;
    background: white;
    padding: 12px 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: float-card 3s ease-in-out infinite;
}

.floating-card .card-icon {
    font-size: 1.5rem;
}

.floating-card .card-text {
    font-weight: 600;
    color: var(--text-primary);
}

.card-1 {
    top: 80px;
    right: -40px;
    animation-delay: 0s;
}

.card-2 {
    top: 50%;
    left: -60px;
    animation-delay: 1s;
}

.card-3 {
    bottom: 100px;
    right: -30px;
    animation-delay: 2s;
}

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

.hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
}

.hero-wave svg {
    width: 100%;
    height: auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   الأقسام المشتركة
   ═══════════════════════════════════════════════════════════════════════════ */

section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.section-header.light {
    color: white;
}

.section-badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.section-header.light .section-badge {
    background: rgba(255, 255, 255, 0.2);
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.section-header.light .section-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

/* ═══════════════════════════════════════════════════════════════════════════
   قسم المميزات
   ═══════════════════════════════════════════════════════════════════════════ */

.features {
    background: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.feature-card {
    background: white;
    padding: 32px;
    border-radius: var(--radius-xl);
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.feature-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   قسم الصور
   ═══════════════════════════════════════════════════════════════════════════ */

.screenshots {
    background: white;
}

.screenshots-slider {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding: 20px 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.screenshots-slider::-webkit-scrollbar {
    display: none;
}

.screenshot-item {
    flex: 0 0 auto;
    width: 220px;
    scroll-snap-align: center;
    text-align: center;
}

.screenshot-item img {
    width: 100%;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.screenshot-item:hover img {
    transform: scale(1.05);
}

.screenshot-label {
    display: block;
    margin-top: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   قسم الخدمات
   ═══════════════════════════════════════════════════════════════════════════ */

.services {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.service-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.service-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
}

.service-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
}

.service-name {
    font-weight: 600;
    font-size: 0.95rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   قسم التواصل
   ═══════════════════════════════════════════════════════════════════════════ */

.contact {
    background: var(--bg-secondary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.contact-desc {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.contact-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.contact-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    font-weight: 500;
}

.contact-feature svg {
    color: var(--success);
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #25D366;
    color: white;
    padding: 16px 32px;
    border-radius: var(--radius-lg);
    font-size: 1.1rem;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    background: #20bd5a;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.4);
}

.contact-image img {
    max-width: 400px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   قسم التحميل
   ═══════════════════════════════════════════════════════════════════════════ */

.download {
    background: var(--bg-dark);
    color: white;
}

.download-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.download-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.download-desc {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
}

.download-buttons {
    display: flex;
    gap: 16px;
}

.store-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.store-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.store-text {
    display: flex;
    flex-direction: column;
}

.store-label {
    font-size: 0.75rem;
    opacity: 0.7;
}

.store-name {
    font-weight: 600;
}

.download-qr {
    text-align: center;
}

.qr-code {
    background: white;
    padding: 16px;
    border-radius: var(--radius-lg);
    display: inline-block;
    margin-bottom: 12px;
}

.qr-code img {
    width: 150px;
    height: 150px;
}

.qr-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   الفوتر
   ═══════════════════════════════════════════════════════════════════════════ */

.footer {
    background: var(--text-primary);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.footer-logo img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
}

.footer-logo span {
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-desc {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    max-width: 300px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
}

.footer-links h4 {
    font-size: 1rem;
    margin-bottom: 20px;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

.footer-bottom a {
    color: var(--primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   صفحات فرعية
   ═══════════════════════════════════════════════════════════════════════════ */

.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 140px 0 60px;
    text-align: center;
    color: white;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.page-subtitle {
    opacity: 0.9;
}

.page-content {
    padding: 60px 0;
}

.page-content .container {
    max-width: 800px;
}

.page-content h2 {
    font-size: 1.5rem;
    color: var(--primary);
    margin: 40px 0 16px;
}

.page-content h2:first-child {
    margin-top: 0;
}

.page-content p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.page-content ul {
    margin: 16px 0;
    padding-right: 24px;
}

.page-content li {
    color: var(--text-secondary);
    margin-bottom: 8px;
    position: relative;
    padding-right: 20px;
}

.page-content li::before {
    content: '✓';
    position: absolute;
    right: 0;
    color: var(--primary);
    font-weight: bold;
}

/* ═══════════════════════════════════════════════════════════════════════════
   التجاوب (Responsive)
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-subtitle {
        margin: 0 auto 32px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-image {
        margin-top: 40px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .contact-features {
        align-items: center;
    }
    
    .contact-image {
        order: -1;
    }
    
    .download-content {
        flex-direction: column;
        text-align: center;
    }
    
    .download-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
        z-index: 1100;
        position: relative;
    }

    /* تحويل الهمبرغر إلى X */
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
        transform: translateX(-10px);
    }
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* overlay خلف القائمة */
    .nav-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        backdrop-filter: blur(3px);
    }
    .nav-overlay.active {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: white;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        padding: 80px 20px 30px;
        box-shadow: var(--shadow-xl);
        transition: right var(--transition);
        z-index: 1000;
        gap: 4px;
        visibility: hidden;
    }

    .nav-menu.active {
        right: 0;
        visibility: visible;
    }


    .nav-menu li {
        width: 100%;
    }

    .nav-link {
        display: block;
        padding: 14px 16px;
        width: 100%;
        text-align: right;
        border-radius: var(--radius-md);
        font-size: 1rem;
    }

    .header:not(.scrolled) .nav-link {
        color: var(--text-primary);
    }
    .header:not(.scrolled) .nav-link:hover,
    .header:not(.scrolled) .nav-link.active {
        background: var(--primary);
        color: white;
    }
    .header:not(.scrolled) .btn-nav {
        background: var(--primary) !important;
        color: white !important;
        border: none;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .phone-mockup {
        width: 220px;
        height: 450px;
    }
    
    .floating-card {
        display: none;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .footer-desc {
        max-width: 100%;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .stat {
        flex: 0 0 calc(50% - 10px);
    }
    
    .store-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   الأنيميشن
   ═══════════════════════════════════════════════════════════════════════════ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* ═══════════════════════════════════════════════════════════════════════════
   مؤشر scroll للصور
   ═══════════════════════════════════════════════════════════════════════════ */

.screenshots-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.screenshots-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
}

.screenshots-dots .dot.active {
    background: var(--primary);
    width: 24px;
}
