/* --- 🎨 پالت رنگ برند --- */
:root {
    --primary-color: #009C9A;
    --primary-dark: #007A78;
    --accent-color: #C8A05D;
    --text-color: #EAEAEA;
    --background-color: #121212;
    --card-bg: #1E1E1E;
    --border-color: #2C2C2C;
}

/* --- 🖋️ فونت BHoma و Roboto --- */
@font-face {
    font-family: 'BHoma';
    src: url('/static/BHoma.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: 'BHoma', sans-serif;
    margin: 0;
    padding-top: 50px; /* فضای برای fixed header */
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    text-align: justify;
    transition: background-color 0.4s, color 0.4s;
}

body.lang-en {
    font-family: 'Roboto', sans-serif;
    text-align: left;
}
body.lang-fa {
    font-family: 'BHoma', sans-serif;
}
/* --- هدر --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background-color: #2a2a2a;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    z-index: 1000;
    height: 50px; /* ارتفاع ثابت برای header */
}

header .logo {
    display: none;
}
h1, h2, h3 {
    font-family: 'BHoma', sans-serif;
}
nav {
    flex: 1;
    text-align: center;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
    gap: 20px;
    flex-wrap: wrap;
}

nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 18px;
    transition: background-color 0.3s;
}

nav ul li.active a,
nav ul li a:hover {
    background-color: var(--accent-color);
    color: #000;
}

/* --- سوئیچ زبان --- */
.lang-toggle {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 80px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background-color: #555;
    border-radius: 34px;
    transition: 0.3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #fff;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .slider {
    background-color: var(--primary-color);
}

.toggle-switch input:checked + .slider:before {
    transform: translate(46px, -50%);
}

.labels {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    font-size: 14px;
    font-weight: bold;
    pointer-events: none;
}

.labels span {
    color: #aaa;
    transition: color 0.3s;
}

.toggle-switch input:not(:checked) ~ .labels span:first-child {
    color: #fff;
}

.toggle-switch input:checked ~ .labels span:last-child {
    color: #fff;
}

/* --- هیرو --- */
.hero {
    height: 80vh; /* افزایش ارتفاع hero برای طولانی‌تر کردن صفحه */
}

.hero-img {
    width: 100%;
    height: 100%; /* ارتفاع کامل hero */
    object-fit: cover; /* پوشش کامل */
    object-position: 50% center; /* تمرکز دقیق روی وسط (50%) */
}

/* --- محتوای اصلی --- */
main {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    text-align: justify;
}

.capabilities {
    background-color: var(--card-bg);
    padding: 40px;
    margin-bottom: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,156,154,0.1);
}

.capabilities h2 {
    text-align: center;
    color: var(--primary-color);
}

.capabilities p {
    text-align: justify;
    font-size: 20px;
}

.activities h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.tiles-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.tile {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid var(--primary-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,156,154,0.3);
}

.tile h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3em;
}

.tile p {
    text-align: justify;
    font-size: 16px;
}

/* --- فوتر --- */
footer {
    background-color: #1a1a1a;
    color: #f1f1f1;
    padding: 40px 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto 20px;
}

.footer-map iframe {
    width: 350px;
    height: 250px;
    border: none;
    border-radius: 10px;
}

.footer-contact {
    flex: 1;
    text-align: right;
}

.footer-contact p {
    text-align: justify;
}

.footer-logo img {
    height: 100px;
    width: auto;
    margin-bottom: 0px; /* فاصله لوگو تا عنوان کم شد */
}

.footer-contact h3 {
    margin-top: 0; /* حذف فاصله بالای عنوان */
    margin-bottom: 5px; /* فاصله پایین عنوان قابل تنظیم */
}

.footer-links {
    list-style: none;
    padding: 0;
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-links li a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links li a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-copy {
    text-align: center;
    font-size: 18px;
    color: #aaa;
    border-top: 1px solid #333;
    padding-top: 15px;
}

/* --- حذف marker های UL --- */
ul {
    list-style: none;
    padding-left: 0;
}

/* --- ریسپانسیو --- */
@media (max-width: 1024px) {
    .tiles-container {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: center;
        height: auto;
        gap: 6px;
        padding: 10px 20px;
    }

    body {
        padding-top: 80px; /* تنظیم برای موبایل */
    }

    nav ul {
        gap: 10px;
    }
    .footer-contact h3 {
        margin-top: 0;
        margin-bottom: 0px; /* فاصله پایین عنوان بیشتر شد */
    }

    .footer-contact p {
        margin-top: 0px; /* فاصله بالا کمی اضافه شد */
        margin-bottom: 0px; /* فاصله پایین پاراگراف */
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-contact {
        text-align: center;
    }

    .footer-map iframe {
        width: 100%;
        height: 220px;
    }

    .toggle-switch {
        width: 70px;
        height: 30px;
    }

    .slider:before {
        height: 22px;
        width: 22px;
        left: 4px;
    }

    .toggle-switch input:checked + .slider:before {
        transform: translate(40px, -50%);
    }

    .labels {
        font-size: 12px;
        padding: 0 8px;
    }
}

@media (max-width: 480px) {
    main {
        padding: 0 10px;
    }

    .capabilities, .tile {
        padding: 20px;
    }

    nav ul {
        flex-direction: column;
    }
    
    .toggle-switch {
        width: 65px;
        height: 28px;
    }
    
    .slider:before {
        height: 20px;
        width: 20px;
    }
    
    .toggle-switch input:checked + .slider:before {
        transform: translate(37px, -50%);
    }
    
    .labels {
        font-size: 11px;
        padding: 0 6px;
    }
}