/* ===================================
   ROOT VARIABLES & RESET
   =================================== */
:root {
    --primary-blue: #003B7A;
    --secondary-blue: #6B9BD2;
    --accent-light: #E8F0FE;
    --white: #FFFFFF;
    --text-dark: #2C3E50;
    --text-light: #7F8C8D;
    --success-green: #27AE60;
    --error-red: #E74C3C;
    --border-color: #E0E0E0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 5px 20px rgba(0, 0, 0, 0.15);
}

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

body {
    color: var(--text-dark);
    line-height: 1.8;
    background-color: var(--white);
    overflow-x: hidden;
}

/* فونت فارسی */
html[lang="fa"] body {
    font-family: 'Vazirmatn', sans-serif;
}

/* فونت انگلیسی */
html[lang="en"] body {
    font-family: 'Roboto', sans-serif;
    direction: ltr;
    text-align: left;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* ===================================
   HEADER & NAVIGATION
   =================================== */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

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

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

html[lang="fa"] .nav-menu { direction: rtl; }
html[lang="en"] .nav-menu { direction: ltr; }

.nav-menu a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 5px;
}

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

.lang-switcher a {
    border: 2px solid var(--secondary-blue);
    color: var(--secondary-blue);
    padding: 5px 12px;
    border-radius: 5px;
    font-weight: 600;
}

.lang-switcher a:hover {
    background-color: var(--secondary-blue);
    color: var(--white);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary-blue);
}

/* ===================================
   HERO SECTION (اصلاح شده برای نمایش صحیح عکس)
   =================================== */
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--accent-light); /* رنگ پس‌زمینه در صورت لود نشدن عکس */
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* عکس را طوری تنظیم می‌کند که کل کادر را پر کند */
    object-position: center; /* اگر عکس عمودی است، می‌توانید به 'right center' یا 'left center' تغییر دهید */
}

/* تنظیم خاص برای زبان فارسی (عکس کمی به سمت راست متمایل شود اگر عمودی بود) */
html[lang="fa"] .hero-bg-img {
    object-position: right center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* یک لایه گرادینت آبی روی عکس برای خوانایی متن */
    background: linear-gradient(135deg, rgba(0, 59, 122, 0.85) 0%, rgba(107, 155, 210, 0.7) 100%);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 700px;
    color: var(--white);
}

html[lang="fa"] .hero-content { text-align: right; }
html[lang="en"] .hero-content { text-align: left; }

.hero-title {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
    color: var(--white);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 500;
    color: var(--accent-light);
}

.hero-text {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

/* ===================================
   BUTTONS
   =================================== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background-color: var(--white);
    color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary-blue);
    transform: translateY(-2px);
}

/* ===================================
   FEATURES SECTION
   =================================== */
.features {
    padding: 80px 0;
    background-color: var(--white);
}

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

.feature-card {
    background-color: var(--white);
    padding: 40px 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background-color: var(--accent-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    color: var(--secondary-blue);
}

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

.feature-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ===================================
   ABOUT PREVIEW
   =================================== */
.about-preview {
    padding: 80px 0;
    background-color: var(--accent-light);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content h2 {
    color: var(--primary-blue);
    font-size: 2rem;
    margin-bottom: 25px;
}

.about-content p {
    margin-bottom: 20px;
    font-size: 1.05rem;
    color: var(--text-dark);
}

/* ===================================
   PRODUCTS PREVIEW
   =================================== */
.products-preview {
    padding: 80px 0;
    background-color: var(--white);
}

.section-title {
    text-align: center;
    color: var(--primary-blue);
    font-size: 2rem;
    margin-bottom: 50px;
}

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

.product-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

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

/* استایل عکس محصولات در صفحه اصلی */
.products-preview .product-image {
    height: 250px;
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.products-preview .product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 20px;
}

.product-card h3 {
    padding: 0 20px 10px;
    color: var(--primary-blue);
    font-size: 1.2rem;
}

.product-card p {
    padding: 0 20px 20px;
    color: var(--text-light);
    font-size: 0.95rem;
}

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

/* ===================================
   CONTACT PREVIEW
   =================================== */
.contact-preview {
    padding: 80px 0;
    background-color: var(--accent-light);
}

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

.contact-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background-color: var(--white);
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.contact-item i {
    font-size: 30px;
    color: var(--secondary-blue);
    margin-top: 5px;
}

.contact-item h4 {
    color: var(--primary-blue);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.contact-item p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===================================
   FOOTER
   =================================== */
.footer {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 60px 0 30px;
}

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

.footer-logo .logo-img {
    filter: brightness(0) invert(1);
    margin-bottom: 20px;
}

.footer-info p,
.footer-contact p {
    margin-bottom: 10px;
    opacity: 0.9;
}

.footer-contact i {
    margin-left: 8px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0.8;
    font-size: 0.9rem;
}

/* ===================================
   CONTACT PAGE STYLES
   =================================== */
.contact-page {
    padding: 80px 0;
    background-color: var(--accent-light);
    min-height: 600px;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background-color: var(--white);
    padding: 50px;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
}

.contact-form h2 {
    color: var(--primary-blue);
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.form-group {
    margin-bottom: 25px;
}

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

html[lang="fa"] .form-group input,
html[lang="fa"] .form-group textarea,
html[lang="fa"] .form-group select {
    font-family: 'Vazirmatn', sans-serif;
}

html[lang="en"] .form-group input,
html[lang="en"] .form-group textarea,
html[lang="en"] .form-group select {
    font-family: 'Roboto', sans-serif;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-blue);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
}

.contact-details h3 {
    color: var(--primary-blue);
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.detail-item {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    align-items: flex-start;
}

.detail-item i {
    font-size: 24px;
    color: var(--secondary-blue);
    margin-top: 5px;
    width: 30px;
}

.detail-item h4 {
    color: var(--primary-blue);
    margin-bottom: 5px;
}

.detail-item p {
    color: var(--text-light);
    line-height: 1.6;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        padding: 30px;
        box-shadow: var(--shadow);
        transition: right 0.3s ease;
        gap: 15px;
        z-index: 999;
    }
    
    html[lang="en"] .nav-menu {
        right: auto;
        left: -100%;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    html[lang="en"] .nav-menu.active {
        left: 0;
    }
    
    .hero {
        min-height: 500px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .features-grid,
    .products-grid,
    .contact-info-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
        padding: 30px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.6rem;
    }
    
    .section-title,
    .about-content h2 {
        font-size: 1.5rem;
    }
}