:root {
    --primary-color: #14245A; 
    --primary-light: #203370; 
    --secondary-color: #0054A6; 
    --secondary-dark: #1A4086; 
    --text-dark: #333333;
    --text-light: #7f8c8d;
    --bg-light: #F5F7FA;
    --white: #ffffff;
    --transition: all 0.4s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Open Sans', sans-serif; color: var(--text-dark); line-height: 1.6; overflow-x: hidden; }
h1, h2, h3, h4 { font-family: 'Montserrat', sans-serif; font-weight: 700; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.animate-on-scroll { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

.btn-primary { display: inline-block; padding: 12px 28px; background-color: var(--secondary-color); color: var(--white); text-decoration: none; border-radius: 4px; font-weight: 600; transition: var(--transition); border: none; cursor: pointer; box-shadow: 0 4px 6px rgba(0, 84, 166, 0.2); }
.btn-primary:hover { background-color: var(--secondary-dark); transform: translateY(-3px); box-shadow: 0 8px 15px rgba(0, 84, 166, 0.4); }
.btn-outline { display: inline-block; padding: 8px 20px; border: 2px solid var(--secondary-color); color: var(--secondary-color); text-decoration: none; border-radius: 4px; font-weight: 600; transition: var(--transition); }
.btn-outline:hover { background-color: var(--secondary-color); color: var(--white); }

.lang-switch { color: var(--secondary-color) !important; display: flex; align-items: center; gap: 5px; font-weight: 700 !important; }
.lang-switch:hover { color: var(--primary-color) !important; }

header { background-color: #f2f2f2; box-shadow: 0 2px 10px rgba(0,0,0,0.1); position: fixed; width: 100%; top: 0; z-index: 1000; }
/* تنظیم هدر برای فضای مهندسی */
.header-container { display: flex; justify-content: space-between; align-items: center; height: 100px; }

/* استایل جدید برای لوگوی متنی */
/* استایل مهندسی و هم‌تراز برای لوگوی متنی */
.logo a {
    text-decoration: none;
    display: flex; /* قرار دادن نوشته‌ها در یک ردیف */
    align-items: baseline; /* جادوی اصلی: هم‌تراز کردن پایینِ نوشته‌ها */
    gap: 8px; /* فاصله بین دو کلمه */
}

.logo h1 {
    color: var(--primary-color);
    font-size: 28px; /* درشت‌تر برای تاکید روی نام اصلی */
    font-weight: 800;
    text-transform: uppercase;
    margin: 0;
    line-height: 1;
}

.logo h1 span {
    color: var(--secondary-color);
    font-size: 16px; /* کوچک‌تر برای زیرمجموعه */
    font-weight: 400;
    text-transform: none; /* حالت معمولی نوشته */
    letter-spacing: 0.5px;
}

.logo a:hover h1 {
    color: var(--secondary-color);
}
nav ul { list-style: none; display: flex; align-items: center; }
nav ul li { margin-left: 18px; }
nav ul li a { text-decoration: none; color: var(--primary-color); font-weight: 600; font-size: 14px; transition: var(--transition); white-space: nowrap; }
nav ul li a:hover { color: var(--secondary-color); }

.hero { background: url('img/hero_bg.png') center/cover no-repeat, var(--primary-color); background-attachment: fixed; height: 100vh; display: flex; align-items: center; color: var(--white); padding-top: 80px; }
.hero-content { max-width: 800px; }
.hero-content h2 { font-size: 54px; margin-bottom: 20px; line-height: 1.2; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); }
.hero-content p { font-size: 20px; margin-bottom: 30px; color: #e0e0e0; }

section { padding: 80px 0; }
.bg-light { background-color: var(--bg-light); }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { font-size: 32px; color: var(--primary-color); }
.divider { height: 4px; width: 60px; background-color: var(--secondary-color); margin: 15px auto; }

.about-text { text-align: center; max-width: 800px; margin: 0 auto 50px; font-size: 18px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; text-align: center; }
.stat-item { padding: 30px; background-color: var(--white); border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); border-bottom: 4px solid var(--secondary-color); transition: var(--transition); }
.stat-item:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.stat-item i { font-size: 40px; color: var(--secondary-color); margin-bottom: 15px; }
.stat-item h3 { font-size: 36px; color: var(--primary-color); }

.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.service-card { background-color: var(--white); padding: 40px 30px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: var(--transition); }
.service-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.service-card .icon { width: 70px; height: 70px; background-color: rgba(0, 84, 166, 0.1); color: var(--secondary-color); border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 30px; margin-bottom: 20px; }
.service-card h3 { color: var(--primary-color); margin-bottom: 15px; font-size: 20px; }

.schwachstrom-section { position: relative; padding: 100px 0; background: url('img/schwachstrom_bg.png') center/cover no-repeat, var(--primary-light); background-attachment: fixed; }
.overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(20, 36, 90, 0.85); }
.relative-z { position: relative; z-index: 2; }
.text-white h2, .text-white p { color: var(--white); }
.bg-white { background-color: var(--white); }
.dark-card { background-color: rgba(255, 255, 255, 0.05); backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.1); color: var(--white); }
.dark-card h3 { color: var(--white); }
.dark-card p { color: #d1d8e0; }
.dark-card:hover { background-color: rgba(255, 255, 255, 0.15); border-color: var(--secondary-color); transform: translateY(-10px); }

.projects { background-color: var(--white); }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.project-card { background: var(--bg-light); border-radius: 8px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: var(--transition); }
.project-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0, 32, 112, 0.15); }
.project-img-wrapper { width: 100%; height: 250px; overflow: hidden; }
.project-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.project-card:hover .project-img-wrapper img { transform: scale(1.08); }
.project-info { padding: 25px; }
.project-info h3 { color: var(--primary-color); margin-bottom: 10px; font-size: 20px; }
.project-info p { color: var(--text-light); font-size: 15px; }

.contact-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 50px; }
.info-item { display: flex; margin-bottom: 30px; }
.info-item i { font-size: 24px; color: var(--secondary-color); margin-right: 20px; margin-top: 5px; }
.info-item h4 { color: var(--primary-color); margin-bottom: 5px; }
.contact-form form { display: flex; flex-direction: column; }
.contact-form input, .contact-form textarea { padding: 15px; margin-bottom: 20px; border: 1px solid #ddd; border-radius: 4px; font-family: 'Open Sans', sans-serif; transition: var(--transition); }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--secondary-color); box-shadow: 0 0 8px rgba(0, 84, 166, 0.2); }

footer { background-color: var(--primary-color); color: var(--white); padding: 30px 0; text-align: center; }

@media (max-width: 1050px) {
    .header-container { flex-direction: column; height: auto; padding: 15px 0; }
    .logo { margin-bottom: 15px; }
    nav ul { flex-wrap: wrap; justify-content: center; gap: 10px; }
    nav ul li { margin: 5px 10px; }
    .hero-content h2 { font-size: 42px; }
}
@media (max-width: 768px) {
    .hero-content h2 { font-size: 32px; }
    .hero-content p { font-size: 16px; }
    .contact-grid { grid-template-columns: 1fr; }
    .about-text { font-size: 16px; }
    section { padding: 50px 0; }
}