/* CSS Reset وتحديد الألوان */
:root {
    --primary-color: #c62828; /* أحمر دافئ مائل للطماطمي */
    --secondary-color: #f5f5dc; /* بيج/كريمي فاتح */
    --accent-color: #2e7d32; /* أخضر هادئ */
    --text-dark: #333333;
    --text-light: #666666;
    --white: #ffffff;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;
    --border-radius: 4px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    direction: rtl;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: var(--spacing-md);
}

h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
}

h2 {
    font-size: 2rem;
    color: var(--accent-color);
    position: relative;
    padding-bottom: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

h2.animate {
    opacity: 1;
    transform: translateY(0);
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
}

h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
}

p {
    margin-bottom: var(--spacing-md);
    color: var(--text-light);
    font-size: 1.1rem;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    box-sizing: border-box;
}

/* تحسينات للجوال */
@media (max-width: 768px) {
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    html,
    body {
        font-size: 16px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        position: relative;
    }
    
    img {
        max-width: 100%;
        height: auto;
        display: block;
    }
    
    .container {
        padding: 0 1rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    section {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
}

section {
    padding: var(--spacing-xl) 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.section-light {
    background-color: var(--secondary-color);
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.btn:hover {
    background-color: #a62828;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.btn i {
    margin-left: 8px;
}

/* الهيدر */
header {
    position: fixed;
    top: 0;
    width: 100%;
    max-width: 100%;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    left: 0;
    right: 0;
    box-sizing: border-box;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) 0;
    position: relative;
}

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

.logo img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.logo h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 0;
}

.logo h2::after {
    display: none;
}

nav ul {
    display: flex;
    list-style: none;
}

nav li {
    margin-right: var(--spacing-lg);
}

nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

.mobile-menu-btn:hover {
    transform: scale(1.1);
}

.mobile-menu {
    display: none;
    list-style: none;
}

/* Overlay للقائمة المحمولة */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* قسم البطل */
.hero {
    padding-top: 120px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 90vh;
    display: flex;
    align-items: center;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-md);
}

.hero p {
    font-size: 1.4rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-xl);
    max-width: 700px;
    margin-right: auto;
    margin-left: auto;
}

/* قسم من نحن */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.about-text {
    padding-left: var(--spacing-lg);
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.about-text.animate {
    opacity: 1;
    transform: translateX(0);
}

.about-image {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.about-image.animate {
    opacity: 1;
    transform: translateX(0);
}

.about-image img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

/* قسم المنتجات */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    justify-items: center;
    justify-content: center;
}

.products-grid .product-card {
    width: 100%;
    max-width: 320px;
}

/* توسيط الكاردات في الصف الأخير - المنتج 5 في العمود 2 والمنتج 6 في العمود 3 */
.products-grid .product-card:nth-child(5) {
    grid-column: 2;
}

.products-grid .product-card:nth-child(6) {
    grid-column: 3;
}

.product-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.product-card.animate {
    opacity: 1;
    transform: translateY(0);
}

.product-card:hover {
    transform: translateY(-10px);
}

.product-image {
    height: 200px;
    background-color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.product-image i {
    font-size: 4rem;
    color: var(--accent-color);
}

.product-info {
    padding: var(--spacing-md);
    text-align: center;
}

.product-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* قسم لماذا نحن */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.feature {
    background-color: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.feature.animate {
    opacity: 1;
    transform: translateY(0);
}

.feature:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: var(--spacing-md);
}

.feature h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

/* قسم التواصل */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-md);
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.contact-item.animate {
    opacity: 1;
    transform: translateX(0);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: var(--spacing-md);
    color: var(--primary-color);
    font-size: 1.2rem;
}

.contact-details h4 {
    margin-bottom: 5px;
    color: var(--text-dark);
}

.contact-form {
    background-color: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.contact-form.animate {
    opacity: 1;
    transform: translateX(0);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* الفوتر */
footer {
    background-color: var(--text-dark);
    color: var(--white);
    padding: var(--spacing-xl) 0 var(--spacing-md) 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.footer-logo img {
    height: 80px;
    width: auto;
    object-fit: contain;
    margin-bottom: var(--spacing-sm);
}

.footer-logo h2 {
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 0;
}

.copyright {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    color: rgba(255, 255, 255, 0.7);
}

/* التجاوب مع الشاشات الصغيرة */

/* شاشات متوسطة (Tablets) */
@media (max-width: 992px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .hero p {
        font-size: 1.3rem;
    }
    
    .about-content,
    .contact-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .about-text {
        padding-left: 0;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    .products-grid .product-card:nth-child(5),
    .products-grid .product-card:nth-child(6) {
        grid-column: auto;
    }
    
    .features {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* شاشات صغيرة (Mobile Large) */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.6rem;
        margin-bottom: var(--spacing-md);
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    p {
        font-size: 1rem;
    }
    
    .hero {
        padding-top: 100px;
        min-height: 70vh;
    }
    
    .hero h1 {
        font-size: 2rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .hero p {
        font-size: 1.1rem;
        margin-bottom: var(--spacing-lg);
    }
    
    .btn {
        padding: 0.7rem 1.5rem;
        font-size: 1rem;
    }
    
    /* الهيدر */
    .header-container {
        padding: 0.8rem 0;
    }
    
    .logo {
        gap: 8px;
    }
    
    .logo img {
        height: 35px;
    }
    
    .logo h2 {
        font-size: 1.3rem;
    }
    
    nav ul {
        display: none;
    }
    
    .header-container {
        justify-content: space-between;
    }
    
    .logo {
        order: 1;
    }
    
    nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
        font-size: 1.3rem;
        padding: 0.5rem;
        order: 2;
        margin-right: auto;
        margin-left: 0;
    }
    
    .mobile-menu {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 70px;
        right: 0;
        width: 100%;
        max-width: 300px;
        background: linear-gradient(135deg, var(--white) 0%, var(--secondary-color) 100%);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
        padding: var(--spacing-lg) 0;
        z-index: 999;
        list-style: none;
        margin: 0;
        border-top: 3px solid var(--primary-color);
        border-left: 3px solid var(--primary-color);
        border-bottom-left-radius: 15px;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    
    .mobile-menu.active {
        display: flex;
        transform: translateX(0);
    }
    
    .mobile-menu-overlay.active {
        display: block;
    }
    
    .mobile-menu li {
        margin: 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .mobile-menu li:last-child {
        border-bottom: none;
    }
    
    .mobile-menu a {
        display: block;
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
        color: var(--text-dark);
        text-decoration: none;
        font-weight: 600;
        transition: all 0.3s ease;
        position: relative;
    }
    
    .mobile-menu a::before {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        width: 4px;
        height: 100%;
        background-color: var(--primary-color);
        transform: scaleY(0);
        transition: transform 0.3s ease;
    }
    
    .mobile-menu a:hover,
    .mobile-menu a:active {
        background-color: rgba(198, 40, 40, 0.1);
        color: var(--primary-color);
        padding-right: 1.8rem;
    }
    
    .mobile-menu a:hover::before,
    .mobile-menu a:active::before {
        transform: scaleY(1);
    }
    
    /* الأقسام */
    section {
        padding: var(--spacing-lg) 0;
    }
    
    /* المنتجات */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    .product-card {
        max-width: 100%;
    }
    
    .product-image {
        height: 150px;
    }
    
    .product-image i {
        font-size: 3rem;
    }
    
    .product-name {
        font-size: 1.1rem;
    }
    
    /* المميزات */
    .features {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    .feature {
        padding: var(--spacing-md);
    }
    
    .feature-icon {
        font-size: 2rem;
    }
    
    /* التواصل */
    .contact-container {
        gap: var(--spacing-lg);
    }
    
    .contact-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin-left: 0;
        margin-bottom: var(--spacing-sm);
    }
    
    .contact-form {
        padding: var(--spacing-md);
    }
    
    /* الفوتر */
    .footer-logo img {
        height: 50px;
    }
    
    .footer-logo h2 {
        font-size: 1.5rem;
    }
    
    footer {
        padding: var(--spacing-lg) 0 var(--spacing-md) 0;
    }
}

/* شاشات صغيرة جداً (Mobile Small) */
@media (max-width: 576px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .container {
        padding: 0 0.8rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    header {
        width: 100%;
        max-width: 100%;
    }
    
    .header-container {
        width: 100%;
        max-width: 100%;
        padding: 0.8rem 0.8rem;
        box-sizing: border-box;
    }
    
    section {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.4rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    .hero {
        padding-top: 90px;
        min-height: 60vh;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        width: 100%;
        text-align: center;
    }
    
    /* الهيدر */
    .logo img {
        height: 30px;
    }
    
    .logo h2 {
        font-size: 1.1rem;
    }
    
    .mobile-menu {
        max-width: 100%;
        top: 60px;
    }
    
    .mobile-menu a {
        padding: 0.9rem 1.2rem;
        font-size: 1rem;
    }
    
    /* الأقسام */
    section {
        padding: var(--spacing-md) 0;
    }
    
    /* المنتجات */
    .products-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .product-image {
        height: 180px;
    }
    
    /* المميزات */
    .features {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .feature {
        padding: var(--spacing-md);
    }
    
    /* التواصل */
    .contact-container {
        gap: var(--spacing-md);
    }
    
    .contact-form {
        padding: var(--spacing-md);
    }
    
    .form-control {
        padding: 0.7rem;
        font-size: 0.9rem;
    }
    
    /* الفوتر */
    .footer-logo img {
        height: 40px;
    }
    
    .footer-logo h2 {
        font-size: 1.3rem;
    }
    
    .copyright {
        font-size: 0.85rem;
    }
}

/* شاشات صغيرة جداً جداً (Extra Small) */
@media (max-width: 400px) {
    .container {
        padding: 0 0.5rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.2rem;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    .logo h2 {
        font-size: 1rem;
    }
    
    .mobile-menu {
        top: 55px;
        padding: var(--spacing-md) 0;
    }
    
    .mobile-menu a {
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
    }
    
    .product-name {
        font-size: 1rem;
    }
    
    .feature h3 {
        font-size: 1.1rem;
    }
}

