/* General Styles */
body {
    font-family: 'Vazir', sans-serif;
    background: linear-gradient(135deg, #f5f6f7, #f7f6f6);
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    color: #2c2c2c;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.15);
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #007bff, #ff0033, #ffd700);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.preloader-logo {
    width: 220px;
    animation: logoMove 2s ease-in-out infinite;
}

@keyframes logoMove {
    0% { transform: scale(0.8) rotate(0deg); opacity: 0.7; }
    50% { transform: scale(1.3) rotate(180deg); opacity: 1; }
    100% { transform: scale(0.8) rotate(360deg); opacity: 0.7; }
}

/* Header */
.header {
    background: linear-gradient(90deg, rgba(243, 240, 240, 0.95), rgba(0, 123, 255, 0.2));
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.25);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(15px);
}

.logo {
    width: 130px;
    transition: transform 0.5s ease;
}

.logo:hover {
    transform: rotate(360deg) scale(1.1);
}

.navbar-nav .nav-link {
    color: #2c2c2c;
    font-weight: 700;
    margin: 0 20px;
    padding: 12px 25px;
    position: relative;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff0033, #ffd700);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after {
    width: 70%;
}

.navbar-nav .nav-link:hover {
    color: #ff0033;
    text-shadow: 0 0 15px rgba(255, 0, 51, 0.6);
}

.language-switcher select {
    padding: 10px 20px;
    border-radius: 30px;
    border: 2px solid #e00505;
    background: linear-gradient(45deg, #007bff, #ff0033);
    color: #ffd700;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="white" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position-x: 95%;
    background-position-y: 50%;
}

.language-switcher select:hover {
    background: linear-gradient(45deg, #ff0033, #ffd700);
    box-shadow: 0 0 15px rgba(255, 0, 51, 0.5);
}

.language-switcher select option {
    background: #2c2c2c;
    color: #ffffff;
    font-weight: 500;
}

/* Slider */
.slider {
    padding: 100px 0;
    background: linear-gradient(45deg, #007bff, #ff0033, #ffd700);
    color: #ffffff;
    position: relative;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.slider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('factory.jpg') no-repeat center center/cover;
    opacity: 0.3;
    z-index: 0;
    transform: translateY(0);
    transition: transform 0.1s ease-out;
}

.slider h1 {
    font-size: 4.5rem;
    margin-bottom: 25px;
    text-shadow: 3px 3px 15px rgba(0, 0, 0, 0.6);
    position: relative;
    z-index: 1;
}

.slider p {
    font-size: 2rem;
    position: relative;
    z-index: 1;
}

.slider-img {
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    transition: transform 0.5s ease;
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.slider-img:hover {
    transform: scale(1.08) rotate(2deg);
}

/* Animations */
.fade-in {
    opacity: 0;
    animation: fadeIn 2s ease-in forwards;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.slide-in {
    opacity: 0;
    transform: translateY(40px);
    animation: slideIn 2s ease-in forwards;
}

@keyframes slideIn {
    0% { opacity: 0; transform: translateY(40px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Sections */
.about-us, .products, .gallery, .contact, .about-hero, .our-story, .our-mission, .products-hero, .products-list, .gallery-hero, .gallery-images, .contact-hero, .contact-section {
    padding: 100px 0;
}

.bg-gradient {
    background: linear-gradient(135deg, #f8f9fa, #fef9e7);
}

.about-img {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.5s ease;
}

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

.card {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.5s ease;
    background: #ffffff;
    position: relative;
    transform-style: preserve-3d;
}

.card:hover {
    transform: translateY(-15px) rotateX(10deg) rotateY(10deg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.card-img-top {
    height: 300px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-img-top {
    transform: scale(1.15);
}

.card-body {
    padding: 25px;
    background: linear-gradient(180deg, #ffffff, #fef9e7);
    position: relative;
    z-index: 1;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0, 123, 255, 0.1), rgba(255, 215, 0, 0.1));
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
}

.card:hover::after {
    opacity: 1;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(45deg, #007bff, #ff0033);
    border: none;
    padding: 12px 40px;
    border-radius: 30px;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #ff0033, #ffd700);
    transition: left 0.3s ease;
    z-index: 0;
}

.btn-primary:hover::before {
    left: 0;
}

.btn-primary:hover {
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.7);
    transform: translateY(-3px);
}

.btn-primary span {
    position: relative;
    z-index: 1;
}

/* Gallery */
.gallery-item {
    margin-bottom: 20px;
}

.gallery-img {
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transition: all 0.5s ease;
}

.gallery-img:hover {
    transform: scale(1.12) rotate(3deg);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.gallery-title {
    text-align: center;
    margin-top: 10px;
    font-size: 1.1rem;
    color: #2c2c2c;
    font-weight: 600;
    transition: color 0.3s ease;
}

.gallery-item:hover .gallery-title {
    color: #ff0033;
    text-shadow: 0 0 10px rgba(255, 0, 51, 0.5);
}

/* Contact */
.contact-info p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.contact-info p:hover {
    color: #ff0033;
    text-shadow: 0 0 10px rgba(255, 0, 51, 0.5);
}

.form-control {
    border-radius: 15px;
    border: 2px solid #007bff;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

/* Footer */
.footer {
    background: linear-gradient(45deg, #2c2c2c, #4a4a4a);
    color: #ffffff;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.4);
}

.footer-logo {
    width: 110px;
    transition: transform 0.5s ease;
}

.footer-logo:hover {
    transform: rotate(360deg) scale(1.1);
}

.social-icon {
    color: #ffffff;
    margin: 0 20px;
    font-size: 2rem;
    transition: all 0.5s ease;
    display: inline-block;
    position: relative;
}

.social-icon:hover {
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    transform: translateY(-10px) rotate(10deg);
}

.social-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.3), transparent);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s ease;
    border-radius: 50%;
    z-index: -1;
}

.social-icon:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

/* Footer Link */
.footer-text a {
    color: #ffd700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-text a:hover {
    color: #ff0033;
    text-shadow: 0 0 10px rgba(255, 0, 51, 0.7);
}

/* RTL/LTR Support */
html[lang="en"], html[lang="ar"] {
    direction: ltr;
}

html[lang="en"] body, html[lang="ar"] body {
    font-family: 'Poppins', sans-serif;
}

html[lang="ar"] body {
    font-family: 'Noto Kufi Arabic', sans-serif;
}