/* ============================================
   CORE CSS - زیست‌بوم هوشمند فناوری
   نسخه نهایی با منوی زیبا و عکس زمینه
   ============================================ */

/* ---------- فونت ---------- */
@font-face {
  font-family: Vazirmatn;
  src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Vazirmatn;
  src: url("../fonts/Vazirmatn-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* ---------- متغیرها ---------- */
:root {
  --blue: #075985;
  --cyan: #00a6a6;
  --dark: #062b45;
  --light: #f5fbff;
  --gray: #64748b;
  --radius: 24px;
  --shadow: 0 15px 40px rgba(8, 124, 193, 0.08);
  --transition: 0.35s ease;
}

/* ---------- ریست ---------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Vazirmatn, Tahoma, Arial, sans-serif;
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--light);
  color: #17324d;
  overflow-x: hidden;
}

/* ---------- کانتینر ---------- */
.container {
  width: min(1180px, 88%);
  margin: auto;
}

/* ---------- دکمه‌ها ---------- */
.btn {
  padding: 11px 30px;
  border-radius: 35px;
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
  display: inline-block;
}
.btn:hover {
  transform: translateY(-3px);
}
.btn-main {
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  color: #fff;
}
.btn-outline {
  background: #fff;
  border: 1px solid var(--cyan);
  color: var(--cyan);
}

/* ==========================================
   HEADER (با عکس زمینه و منوی زیبا)
   ========================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0, 166, 166, 0.18);
  overflow: visible;
}

/* ===== عکس زمینه هدر (fbac.png) ===== */
.header:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: url("../images/fbac.png") repeat-x center/auto 80px;
  opacity: 0.75;
  z-index: -1;
}

.header-inner {
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: 0.3s;
}
.header.scrolled .header-inner {
  height: 45px;
}

.logo-box {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.logo-box img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  transition: 0.3s;
}
.header.scrolled .logo-box img {
  display: none;
}
.logo-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--blue);
  line-height: 1.6;
}
.header.scrolled .logo-title {
  font-size: 13px;
}
.logo-title span {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--gray);
}

/* ==========================================
   منوی جدید - باکس‌های کوچک و زیبا
   ========================================== */
.menu {
  display: flex;
  gap: 2px;
  list-style: none;
  background: rgba(255, 255, 255, 0.5);
  padding: 2px;
  border-radius: 12px;
  border: 1px solid rgba(0, 166, 166, 0.06);
}

.menu li {
  position: relative;
}

.menu a {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 5px 10px;
  border-radius: 12px;
  text-decoration: none;
  color: #475569;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.25s ease;
  background: transparent;
  white-space: nowrap;
  height: 28px;
}

/* آیکون‌های کوچک منو */
.menu a .icon {
  font-size: 14px;
  line-height: 1;
  opacity: 0.5;
  transition: 0.3s;
}

/* حالت هاور */
.menu a:hover {
  background: rgba(0, 166, 166, 0.08);
  color: var(--blue);
}
.menu a:hover .icon {
  opacity: 1;
}

/* ===== حالت فعال (صفحه جاری) ===== */
.menu a.active {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  box-shadow: 0 3px 12px rgba(0, 166, 166, 0.25);
}
.menu a.active .icon {
  opacity: 1;
  color: #fff;
}

/* ===== دکمه ورود ===== */
.header-btn {
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  padding: 6px 18px;
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 3px 12px rgba(0, 166, 166, 0.2);
  flex-shrink: 0;
  height: 32px;
  display: flex;
  align-items: center;
}
.header-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 166, 166, 0.35);
}

/* ===== هدر اسکرول شده ===== */
.header.scrolled .menu a {
  padding: 3px 10px;
  font-size: 12px;
  height: 26px;
}
.header.scrolled .menu {
  padding: 3px;
  border-radius: 10px;
}
.header.scrolled .header-btn {
  padding: 4px 14px;
  font-size: 11px;
  height: 26px;
}

/* ==========================================
   مسیر (Breadcrumb)
   ========================================== */
.breadcrumb {
  padding: 18px 0;
  font-size: 13px;
  color: var(--gray);
}
.breadcrumb a {
  color: var(--cyan);
  text-decoration: none;
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
  background: #061f33;
  color: #fff;
  padding: 45px 0 25px;
  position: relative;
  overflow: hidden;
}

.footer:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 220px;
  background: url("../images/fbac.png") repeat-x center top/auto 220px;
  opacity: 0.55;
}
.footer:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent, #061f33 80%);
  pointer-events: none;
}
.footer .container {
  position: relative;
  z-index: 2;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 30px;
}
.footer-brand {
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  padding: 25px;
  backdrop-filter: blur(12px);
  text-align: center;
}
.footer-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 15px;
}
.footer-logo img {
  width: 95px;
  height: 95px;
  object-fit: contain;
}
.footer-brand h3 {
  font-size: 20px;
  margin-bottom: 12px;
}
.footer-brand p {
  font-size: 14px;
  line-height: 2.3;
  color: #d1d5db;
  text-align: justify;
}

.footer-col h4 {
  font-size: 17px;
  color: #00d4d4;
  margin-bottom: 18px;
  text-align: center;
}
.footer-col ul {
  list-style: none;
  text-align: center;
}
.footer-col li {
  margin-bottom: 10px;
}
.footer-col a {
  font-size: 14px;
  color: #dbeafe;
  text-decoration: none;
  transition: var(--transition);
}
.footer-col a:hover {
  color: #00d4d4;
}

.footer-trust {
  margin-top: 40px;
  padding: 25px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.trust-box {
  width: 125px;
  height: 75px;
  background: #fff;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.trust-box img {
  max-width: 90%;
  max-height: 60px;
}

.social {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}
.social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
  transition: var(--transition);
}
.social a:hover {
  background: var(--cyan);
}

.copyright {
  text-align: center;
  margin-top: 25px;
  font-size: 13px;
  color: #94a3b8;
}

/* ---------- دکمه بازگشت ---------- */
#topBtn {
  position: fixed;
  right: 25px;
  bottom: 25px;
  width: 45px;
  height: 45px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: none;
  z-index: 999;
  transition: var(--transition);
}
#topBtn:hover {
  transform: scale(1.1);
}

/* ---------- منوی موبایل ---------- */
.mobile-menu {
  display: none;
}

/* ---------- ریسپانسیو ---------- */
@media (max-width: 900px) {
  .container {
    width: 90%;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .menu a {
    padding: 4px 10px;
    font-size: 12px;
  }
  .menu a .icon {
    font-size: 12px;
  }
}

@media (max-width: 700px) {
  body {
    padding-bottom: 100px;
  }

  .menu {
    display: none;
  }
  .header-inner {
    height: 58px;
  }
  .logo-box img {
    width: 45px;
    height: 45px;
  }
  .logo-title {
    font-size: 13px;
  }
  .logo-title span {
    display: none;
  }
  .header-btn {
    padding: 4px 12px;
    font-size: 11px;
    height: 28px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  .footer-brand {
    grid-column: 1/3;
  }
  .footer-brand p {
    text-align: center;
  }

  .mobile-menu {
    position: fixed;
    display: flex;
    bottom: 15px;
    left: 15px;
    right: 15px;
    height: 70px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(0, 166, 166, 0.25);
    border-radius: 28px;
    z-index: 3000;
    align-items: center;
    justify-content: space-around;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.18);
  }
  .mobile-menu a {
    flex: 1;
    font-size: 11px;
    color: var(--blue);
    text-decoration: none;
    text-align: center;
  }
  .mobile-menu span {
    display: block;
    font-size: 18px;
    margin-bottom: 3px;
  }
  .center-space {
    flex: 1;
  }
  .mobile-logo-center {
    position: absolute;
    left: 50%;
    top: -28px;
    transform: translateX(-50%);
    width: 70px;
    height: 70px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(0, 166, 166, 0.35);
    box-shadow: 0 10px 30px rgba(0, 166, 166, 0.35);
  }
  .mobile-logo-center img {
    width: 50px;
    height: 50px;
    object-fit: contain;
  }
}