/* إعدادات عامة */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #dc2626;
    --secondary-color: #991b1b;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --white: #ffffff;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

html {
    direction: rtl;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--white);
    color: var(--text-color);
    line-height: 1.8;
    direction: rtl;
    text-align: right;
    font-size: 1.05rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Language Switcher */
.language-switcher {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 2000;
}

.language-switcher-mobile {
    display: none;
}

.lang-toggle {
    width: 50px;
    height: 50px;
    background-color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.lang-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-hover);
}

.lang-icon {
    font-size: 1.5rem;
}

.lang-menu {
    position: absolute;
    top: 60px;
    left: 0;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-hover);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    min-width: 150px;
}

.language-switcher:hover .lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: var(--text-color);
    transition: background-color 0.3s ease;
}

.lang-option:first-child {
    border-radius: 12px 12px 0 0;
}

.lang-option:last-child {
    border-radius: 0 0 12px 12px;
}

.lang-option:hover {
    background-color: #f9fafb;
}

.lang-option span {
    font-size: 1.5rem;
}

/* شريط التنقل */
.navbar {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-self: start;
}

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

.nav-brand h1 {
    color: #1f2937;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0;
}

.nav-brand .tagline {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    flex-wrap: wrap;
    justify-self: center;
}

.nav-spacer {
    width: 100%;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    font-size: 1.1rem;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

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

/* القسم الرئيسي */
.hero {
    background-image: url('img/Gemini_Generated_Image_f24rq6f24rq6f24r.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 120vh;
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
    position: relative;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.3;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    color: #1f2937;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.8);
}

/* قسم من نحن */
.about-section {
    padding: 5rem 0;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.lead-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 3rem;
    text-align: center;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.about-item {
    background-color: #f9fafb;
    padding: 2rem;
    border-radius: 12px;
    border-top: 3px solid var(--primary-color);
}

.about-item h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.about-item p {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1.05rem;
}

/* قسم المنتجات */
.products {
    padding: 5rem 0;
    background-color: #f9fafb;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
    font-weight: 700;
    line-height: 1.3;
}

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

.product-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.product-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.product-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-weight: 600;
}

.product-card p {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1.05rem;
}

/* معرض الصور */
.gallery-section {
    padding: 5rem 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.5s ease;
    display: block;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Slideshow Container */
.slideshow-container {
    position: relative;
}

.slideshow-container .slideshow-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.slideshow-container .slideshow-img.active {
    opacity: 1;
    position: relative;
    z-index: 1;
}

.slideshow-container:hover img {
    transform: none;
}

.gallery-item:hover {
    box-shadow: var(--shadow-hover);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--white);
    padding: 2rem 1.5rem 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    pointer-events: none;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay span {
    font-size: 1.2rem;
    font-weight: 600;
}

/* قسم الاتصال المدمج */
.contact-section {
    padding: 5rem 0;
    background-color: #f9fafb;
}

.contact-grid-inline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.contact-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.contact-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.contact-card .info-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.contact-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-weight: 600;
}

.contact-card p {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1.05rem;
}

.map-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.map-link:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
}

.map-link span {
    font-size: 1.2rem;
}

/* التذييل */
.footer {
    background-color: var(--text-color);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
}

/* تصميم متجاوب */
@media (max-width: 768px) {
    .language-switcher-desktop {
        display: none;
    }

    .language-switcher-mobile {
        display: block;
        position: relative;
        top: auto;
        left: auto;
        order: 2;
        z-index: 1001;
    }

    .language-switcher-mobile .lang-menu {
        top: 50px;
        left: auto;
        right: 0;
    }

    .lang-toggle {
        width: 45px;
        height: 45px;
    }

    .lang-icon {
        font-size: 1.3rem;
    }

    .lang-menu {
        min-width: 130px;
    }

    .lang-option {
        padding: 0.75rem 1rem;
    }

    .lang-option span {
        font-size: 1.3rem;
    }

    .navbar .container {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 15px;
    }

    .nav-brand {
        order: 1;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 1rem;
    }

    .nav-menu {
        order: 3;
        display: flex;
        flex-direction: row;
        gap: 0.75rem;
        justify-content: center;
        flex-wrap: wrap;
        width: 100%;
        margin-top: 0;
    }

    .nav-menu li {
        display: inline-block;
    }

    .nav-menu a {
        font-size: 0.95rem;
        padding: 0.5rem 0.75rem;
        white-space: nowrap;
    }

    .nav-brand h1 {
        font-size: 1.25rem;
        margin: 0;
    }

    .nav-brand .tagline {
        font-size: 0.75rem;
    }

    .logo-img {
        height: 60px;
    }

    .nav-spacer {
        display: none;
    }

    .hero {
        min-height: 80vh;
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .about-section,
    .products,
    .gallery-section,
    .contact-section {
        padding: 3rem 0;
    }

    .products-grid,
    .gallery-grid,
    .contact-grid-inline,
    .about-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .gallery-grid {
        gap: 1rem;
    }

    .lead-text {
        margin-bottom: 2rem;
    }

    .product-card,
    .contact-card,
    .about-item {
        padding: 1.5rem;
    }

    .map-link {
        padding: 0.6rem 1.2rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .language-switcher-desktop {
        display: none;
    }

    .language-switcher-mobile {
        display: block;
        position: relative;
        top: auto;
        left: auto;
        order: 2;
        z-index: 1001;
    }

    .language-switcher-mobile .lang-menu {
        top: 45px;
        left: auto;
        right: 0;
    }

    .lang-toggle {
        width: 40px;
        height: 40px;
    }

    .lang-icon {
        font-size: 1.2rem;
    }

    .lang-menu {
        min-width: 120px;
    }

    .lang-option {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }

    .lang-option span {
        font-size: 1.2rem;
    }

    .navbar .container {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem 10px;
    }

    .nav-brand {
        order: 1;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 0.75rem;
    }

    .nav-menu {
        order: 3;
        display: flex;
        flex-direction: row;
        gap: 0.5rem;
        justify-content: center;
        flex-wrap: wrap;
        width: 100%;
        text-align: center;
        font-size: 0.9rem;
    }

    .nav-menu li {
        display: inline-block;
    }

    .nav-menu a {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
        white-space: nowrap;
    }

    .hero {
        min-height: 70vh;
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 1.8rem;
        margin-bottom: 0.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .lead-text {
        font-size: 1rem;
    }
    
    .logo-img {
        height: 50px;
    }
    
    .nav-brand h1 {
        font-size: 1.15rem;
    }

    .container {
        padding: 0 15px;
    }

    .about-section,
    .products,
    .gallery-section,
    .contact-section {
        padding: 2.5rem 0;
    }

    .product-card,
    .contact-card,
    .about-item {
        padding: 1.25rem;
    }

    .product-card h3,
    .contact-card h3,
    .about-item h3 {
        font-size: 1.2rem;
    }

    .product-card p,
    .contact-card p,
    .about-item p {
        font-size: 1rem;
    }

    .info-icon,
    .product-icon {
        font-size: 2.5rem;
    }

    .map-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .footer {
        padding: 1.5rem 0;
        font-size: 0.9rem;
    }
}

/* تحسينات معرض الصور */
.gallery-grid {
    container-type: inline-size;
}

@container (max-width: 600px) {
    .gallery-item {
        aspect-ratio: 1/1;
    }
}

/* تأثيرات التحميل */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item {
    animation: fadeIn 0.5s ease-out;
    animation-fill-mode: both;
}

.gallery-item:nth-child(1) { animation-delay: 0.05s; }
.gallery-item:nth-child(2) { animation-delay: 0.1s; }
.gallery-item:nth-child(3) { animation-delay: 0.15s; }
.gallery-item:nth-child(4) { animation-delay: 0.2s; }
.gallery-item:nth-child(5) { animation-delay: 0.25s; }
.gallery-item:nth-child(6) { animation-delay: 0.3s; }
.gallery-item:nth-child(7) { animation-delay: 0.35s; }
.gallery-item:nth-child(8) { animation-delay: 0.4s; }
.gallery-item:nth-child(9) { animation-delay: 0.45s; }
.gallery-item:nth-child(10) { animation-delay: 0.5s; }
.gallery-item:nth-child(n+11) { animation-delay: 0.6s; }
