/* ملف التنسيقات الرئيسي - style.css */

:root {
    /* الألوان الرئيسية */
    --primary-color: #0D4D3D;
    --primary-light: #145F4C;
    --primary-dark: #082D25;
    --secondary-color: #D4C5A9;
    --accent-color: #F0E5D8;
    
    /* الألوان العامة */
    --text-color: #2C3E50;
    --text-light: #7F8C8D;
    --bg-color: #FFFFFF;
    --bg-light: #F8F9FA;
    --border-color: #E0E0E0;
    
    /* الظلال */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
    
    /* الانتقالات */
    --transition: all 0.3s ease;
    --transition-fast: all 0.2s ease;
    
    /* المسافات */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

/* وضع الظلام */
body.dark-mode {
    --text-color: #ECF0F1;
    --text-light: #BDC3C7;
    --bg-color: #1A1A1A;
    --bg-light: #2C2C2C;
    --border-color: #3A3A3A;
}

/* إعادة تعيين الأنماط */
* {
    margin: 0;
    padding: 0px;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: var(--transition);
}

body[dir="rtl"] {
    text-align: right;
}

/* الحاوية */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* الروابط */
a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

/* الأزرار */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-size: 1rem;
}

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

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

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline:hover {
    background: white;
    color: var(--primary-color);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}

.btn-whatsapp:hover {
    background: #1fb855;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-light {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline-light:hover {
    background: white;
    color: var(--primary-color);
}

.btn-block {
    width: 100%;
}

.btn-link {
    color: var(--primary-color);
    font-weight: 600;
    transition: var(--transition);
}

.btn-link:hover {
    color: var(--primary-light);
    transform: translateX(5px);
}

/* رأس الصفحة */
.header {
    background: var(--bg-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header-top {
    background: var(--primary-color);
    color: white;
    padding: 10px 0;
    font-size: 0.9rem;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.header-info-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.header-info-item i {
    font-size: 0.9rem;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.lang-switcher select {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}

.header-main {
    padding: 20px 0;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo img {
    height: 50px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu li a {
    font-weight: 600;
    color: var(--text-color);
    position: relative;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-menu li a:hover::after,
.nav-menu li a.active::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
}

/* قسم البطل */
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 60px 0;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.shape {
    position: absolute;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    right: 10%;
    animation-delay: -5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    right: -50px;
    animation-delay: -10s;
}

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

/* الأقسام */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* شبكة الفئات */
.categories-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.category-card {
    background: var(--bg-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
}

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

.category-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.category-card:hover .category-image img {
    transform: scale(1.1);
}

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.7));
}

.category-content {
    padding: 25px;
}

.category-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.category-content p {
    color: var(--text-light);
    margin-bottom: 15px;
}

/* شبكة المنتجات */
.featured-products {
    padding: 80px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--bg-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: var(--bg-light);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.stock-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.stock-badge.out-of-stock {
    background: #E74C3C;
}

.product-content {
    padding: 25px;
}

.product-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.product-desc {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.product-prices {
    background: var(--bg-light);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.price-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.price-item:last-child {
    margin-bottom: 0;
}

.price-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

.price-value {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
}

/* قسم المميزات */
.features-section {
    padding: 80px 0;
    background: var(--bg-light);
}

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

.feature-card {
    background: var(--bg-color);
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

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

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.feature-card p {
    color: var(--text-light);
}

/* قسم الفيديوهات */


.videos-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.video-card {
    background: var(--bg-color);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.video-thumbnail {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #f8f9fa;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.1);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: var(--transition);
    opacity: 0;
}

.video-card:hover .play-button {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 15px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 2;
}

.video-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.video-content h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 12px;
    line-height: 1.4;
    min-height: 56px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-content p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 600;
    transition: var(--transition);
    margin-top: auto;
}

.btn-link:hover {
    color: var(--primary-dark);
    gap: 12px;
}

/* Responsive Design for Videos */
@media (max-width: 1024px) {
    .videos-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .videos-section {
        padding: 60px 0;
    }
    
    .videos-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .video-thumbnail {
        height: 200px;
    }
    
    .video-content {
        padding: 20px;
    }
    
    .video-content h3 {
        font-size: 1.1rem;
        min-height: 50px;
    }
    
    .play-button {
        width: 60px;
        height: 60px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .videos-grid {
        grid-template-columns: 1fr;
    }
    
    .video-thumbnail {
        height: 180px;
    }
    
    .video-content h3 {
        font-size: 1rem;
        min-height: 48px;
    }
}

/* Dark Mode Support */
body.dark-mode .videos-section {
    background: var(--bg-dark);
}

body.dark-mode .video-card {
    background: var(--bg-light);
}

body.dark-mode .video-thumbnail {
    background: #2c2c2c;
}

body.dark-mode .play-button {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* قسم الدعوة للعمل */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* التذييل */
.footer {
    background: var(--primary-dark);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.footer-section p,
.footer-section li {
    opacity: 0.8;
    margin-bottom: 10px;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: white;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--secondary-color);
    padding-right: 5px;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.social-link {
    width: 35px;
    height: 35px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 0.9rem;
    padding: 8px;
}

.social-link:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    opacity: 0.7;
}

/* زر واتساب العائم */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    50% { box-shadow: 0 0 0 20px rgba(37, 211, 102, 0); }
}

/* زر تبديل الوضع */
.theme-toggle {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    z-index: 999;
    transition: var(--transition);
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* الرسوم المتحركة */
.fade-in {
    animation: fadeIn 1s ease-in;
}

.fade-in-delay {
    animation: fadeIn 1s ease-in 0.3s both;
}

.fade-in-delay-2 {
    animation: fadeIn 1s ease-in 0.6s both;
}

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



/* الاستجابة للشاشات الصغيرة */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .header-top .container {
        flex-direction: column;
        gap: 10px;
    }
    
    .categories-grid,
    .products-grid,
    .videos-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .whatsapp-float,
    .theme-toggle {
        right: 20px;
    }
}

.product-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.product-action-buttons .btn {
    padding: 12px 20px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.stock-badge.low-stock {
    background: #F39C12;
}

.product-badge.featured {
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

.mt-4 {
    margin-top: 2rem;
}

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

/* تحسين مظهر الأزرار على الشاشات الصغيرة */
@media (max-width: 768px) {
    .product-action-buttons .btn {
        font-size: 0.9rem;
        padding: 10px 15px;
    }
}

.no-thumbnail {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 1rem;
}

.no-thumbnail i {
    font-size: 3rem;
    margin-bottom: 10px;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card-admin:hover .video-thumbnail img {
    transform: scale(1.05);
}
.phone-number {
    direction: ltr;
    text-align: left;
}
