/* المتغيرات والألوان */
:root {
    --primary-color: #8B7355; /* بني جبلي */
    --secondary-color: #A0522D; /* بني محروق */
    --accent-color: #D2691E; /* بني فاتح */
    --light-color: #F5F5DC; /* بيج فاتح */
    --dark-color: #3E2723; /* بني داكن */
    --text-color: #333333;
    --text-light: #777777;
    --white: #FFFFFF;
    --gray: #F8F9FA;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 15px 30px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

/* التنسيقات العامة */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    direction: rtl;
    overflow-x: hidden;
}

body[dir="ltr"] {
    direction: ltr;
    font-family: 'Open Sans', 'Cairo', sans-serif;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* الأزرار */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
}

.btn-whatsapp {
    background-color: #25D366;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-whatsapp:hover {
    background-color: #128C7E;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

/* العناوين */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    position: relative;
    padding-bottom: 15px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

body[dir="ltr"] .section-title::after {
    right: 50%;
    transform: translateX(50%);
}

/* تأثيرات الرسوم المتحركة */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* تأثير الكتابة */
.typing-text {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--white);
    animation: typing 3.5s steps(30, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--white) }
}

.cursor {
    display: inline-block;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* شريط التنقل */
.navbar {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    animation: fadeIn 1s ease;
}

.logo-img {
    height: 60px;
    width: auto;
    transition: var(--transition);
}

.logo-img:hover {
    transform: rotate(5deg) scale(1.05);
}

.logo-text h1 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.logo-text p {
    font-size: 0.9rem;
    color: var(--text-light);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    padding: 5px 0;
    animation: fadeIn 1s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    animation: expandWidth 0.3s ease;
}

@keyframes expandWidth {
    from { width: 0; }
    to { width: 100%; }
}

.language-switcher {
    display: flex;
    background-color: var(--gray);
    border-radius: 5px;
    overflow: hidden;
    margin-right: 15px;
    animation: fadeIn 1s ease 0.2s both;
}

.lang-btn {
    padding: 8px 15px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.lang-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark-color);
    cursor: pointer;
    transition: var(--transition);
}

.menu-toggle:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

/* القسم الرئيسي */
.hero-section {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('6.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    margin-top: 90px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.5) 100%);
    animation: pulseBackground 10s infinite alternate;
}

@keyframes pulseBackground {
    0% { opacity: 0.5; }
    100% { opacity: 0.8; }
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
    position: relative;
    z-index: 1;
    animation: fadeIn 1.5s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    min-height: 80px;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeIn 1s ease 1s forwards;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 1s ease 1.5s forwards;
}

/* قسم عن الشركة */
.about-section {
    padding: 100px 0;
    background-color: var(--gray);
    position: relative;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: url('logo.png') no-repeat center;
    background-size: contain;
    opacity: 0.05;
    animation: float 6s ease-in-out infinite;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    margin-top: 50px;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
    color: var(--text-color);
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.3s forwards;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.feature-card {
    background-color: var(--white);
    padding: 25px 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.feature-card:nth-child(1) { animation-delay: 0.4s; }
.feature-card:nth-child(2) { animation-delay: 0.6s; }
.feature-card:nth-child(3) { animation-delay: 0.8s; }

.feature-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: var(--shadow-heavy);
    animation: pulse 2s infinite;
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    transition: var(--transition);
}

.feature-card:hover i {
    transform: rotate(360deg);
    color: var(--accent-color);
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.about-image {
    opacity: 0;
    animation: slideInRight 1s ease 0.5s forwards;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: var(--shadow-heavy);
    transition: var(--transition);
}

.about-image img:hover {
    transform: scale(1.02) rotate(1deg);
}

/* قسم المنتجات */
.products-section {
    padding: 100px 0;
    background-color: var(--white);
    position: relative;
    overflow: hidden;
}

.products-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.products-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.category-card {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.4s ease;
    border: 2px solid transparent;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.category-card:nth-child(1) { animation-delay: 0.2s; }
.category-card:nth-child(2) { animation-delay: 0.4s; }
.category-card:nth-child(3) { animation-delay: 0.6s; }
.category-card:nth-child(4) { animation-delay: 0.8s; }
.category-card:nth-child(5) { animation-delay: 1s; }
.category-card:nth-child(6) { animation-delay: 1.2s; }

.category-card:hover {
    transform: translateY(-15px) scale(1.03);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-heavy);
}

.category-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: block;
    transition: var(--transition);
}

.category-card:hover i {
    transform: scale(1.2);
    color: var(--accent-color);
    animation: float 3s ease-in-out infinite;
}

.category-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--dark-color);
    transition: var(--transition);
}

.category-card:hover h3 {
    color: var(--primary-color);
}

.category-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* قسم معرض الصور */
.gallery-section {
    padding: 100px 0;
    background-color: var(--gray);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 50px;
    font-size: 1.2rem;
    opacity: 0;
    animation: fadeIn 1s ease 0.5s forwards;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    border-radius: 10px;
    overflow: hidden;
    height: 250px;
    position: relative;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: scale(0.9);
    animation: fadeIn 0.8s ease forwards;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }

.gallery-item:hover {
    transform: scale(1.05);
    z-index: 2;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(139, 115, 85, 0.1), rgba(160, 82, 45, 0.1));
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.2) rotate(2deg);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 2;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

/* قسم اتصل بنا */
.contact-section {
    padding: 100px 0;
    background-color: var(--white);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-top: 50px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
    opacity: 0;
    animation: slideInLeft 1s ease 0.3s forwards;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateX(10px);
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    background-color: var(--light-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}

.contact-item:hover i {
    background-color: var(--primary-color);
    color: var(--white);
    transform: rotate(15deg) scale(1.1);
}

.contact-item h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.contact-item p, .contact-item a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.map-link, .whatsapp-link {
    color: var(--primary-color) !important;
    font-weight: 600;
    margin-top: 5px;
    display: inline-block;
    position: relative;
}

.map-link::after, .whatsapp-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.map-link:hover::after, .whatsapp-link:hover::after {
    width: 100%;
}

.map-link:hover, .whatsapp-link:hover {
    color: var(--secondary-color) !important;
}

.whatsapp-button {
    margin-top: 20px;
    animation: pulse 2s infinite;
}

.contact-form {
    background-color: var(--gray);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    opacity: 0;
    animation: slideInRight 1s ease 0.3s forwards;
}

.contact-form h3 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--dark-color);
    text-align: center;
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form input,
.contact-form textarea {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.contact-form input:nth-child(1) { animation-delay: 0.4s; }
.contact-form input:nth-child(2) { animation-delay: 0.5s; }
.contact-form input:nth-child(3) { animation-delay: 0.6s; }
.contact-form textarea { animation-delay: 0.7s; }

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.2);
    transform: translateY(-2px);
}

.contact-form button {
    align-self: flex-start;
    margin-top: 10px;
    opacity: 0;
    animation: fadeIn 0.5s ease 0.8s forwards;
}

/* الفوتر */
.footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 60px 0 30px;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
    animation: slideGradient 3s linear infinite;
}

@keyframes slideGradient {
    0% { background-position: -100% 0; }
    100% { background-position: 100% 0; }
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
    margin-bottom: 50px;
    opacity: 0;
    animation: fadeIn 1s ease 0.3s forwards;
}

.footer-logo {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.footer-logo-img {
    height: 60px;
    width: auto;
    animation: float 6s ease-in-out infinite;
}

.footer-logo h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.footer-logo p {
    color: #bbb;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
}

.footer-links h4 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.footer-links:hover h4::after {
    width: 100%;
}

body[dir="ltr"] .footer-links h4::after {
    right: 0;
    left: auto;
}

.footer-links a {
    color: #bbb;
    text-decoration: none;
    margin-bottom: 10px;
    transition: var(--transition);
    position: relative;
    padding-right: 0;
}

.footer-links a::before {
    content: '→';
    position: absolute;
    right: -20px;
    opacity: 0;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
    padding-right: 20px;
}

.footer-links a:hover::before {
    opacity: 1;
    right: 0;
}

body[dir="ltr"] .footer-links a {
    padding-left: 0;
}

body[dir="ltr"] .footer-links a::before {
    content: '←';
    right: auto;
    left: -20px;
}

body[dir="ltr"] .footer-links a:hover {
    padding-right: 0;
    padding-left: 20px;
}

body[dir="ltr"] .footer-links a:hover::before {
    right: auto;
    left: 0;
}

.footer-social h4 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-social h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.footer-social:hover h4::after {
    width: 100%;
}

body[dir="ltr"] .footer-social h4::after {
    right: 0;
    left: auto;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.social-icons a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-color);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.social-icons a:hover::before {
    transform: scale(1);
}

.social-icons a i {
    position: relative;
    z-index: 1;
}

.social-icons a:hover {
    transform: translateY(-5px) rotate(360deg);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #bbb;
    font-size: 0.9rem;
    opacity: 0;
    animation: fadeIn 1s ease 0.5s forwards;
}

/* تصميم متجاوب */
@media (max-width: 1200px) {
    .container {
        max-width: 95%;
    }
}

@media (max-width: 992px) {
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-categories {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background-color: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-heavy);
        gap: 15px;
        animation: slideDown 0.3s ease;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .products-categories {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-title .typing-text {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .feature-card, .category-card {
        padding: 20px 15px;
    }
    
    .footer {
        padding: 40px 0 20px;
    }
}