/* ====================================================
   HYTSteel – style.css
   Complete responsive design, RTL-ready
   ==================================================== */

/* Comprehensive font stack with CJK/Arabic/Farsi/Russian fallback */
:root {
  --font-en: 'Inter', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --font-cn: 'Microsoft YaHei', 'PingFang SC', 'Noto Sans SC', 'SimHei', sans-serif;
  --font-ar: 'Segoe UI', 'Tahoma', 'Noto Naskh Arabic', 'Traditional Arabic', 'Arial', sans-serif;
  --font-fa: 'Segoe UI', 'Tahoma', 'Noto Sans Arabic', 'Arial', sans-serif;
  --font-ru: 'Segoe UI', 'Tahoma', 'Noto Sans', 'Arial', sans-serif;
  --font-mono: 'Cascadia Code', 'Consolas', 'Courier New', monospace;
}

/* ---- Reset & Variables ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --dark:    #060e1a;
  --navy:    #0f2d52;
  --blue:    #1a4a8a;
  --accent:  #c9a84c;
  --accent2: #e8c96a;
  --light:   #f0f4f8;
  --gray:    #e8ecf0;
  --dark2:   #0a1a2e;
  --text:    #1e2a3a;
  --muted:   #5a6a7a;
  --white:   #ffffff;
  --section-gap: 90px;
  --radius:  12px;
  --shadow:  0 8px 32px rgba(0,0,0,0.15);
  --transition: 0.3s ease;
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
html[lang="ar"] body,
html[lang="fa"] body { font-family: 'Segoe UI', 'Tahoma', 'Arial', sans-serif; }

img { width: 100%; height: 100%; object-fit: cover; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

/* ---- Utility ---- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.section { padding: var(--section-gap) 0; }
.section-header { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-label {
  display: inline-block;
  font-family: 'Oswald', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  padding-left: 16px;
  margin-bottom: 12px;
  position: relative;
}
.section-label::before {
  content: '';
  position: absolute;
  left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 100%;
  background: var(--accent);
  border-radius: 2px;
}
.section-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--dark2);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
}
.gold-divider {
  width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
  margin: 0 auto 16px;
}
.section-sub {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
}
.section-gray { background: var(--gray); }
.section-dark { background: var(--dark2); }
.section-dark .section-title { color: var(--white); }
.section-dark .section-sub  { color: rgba(255,255,255,0.6); }

/* ---- Buttons ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--dark);
  font-family: 'Oswald', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 13px 28px;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: var(--transition);
  cursor: pointer;
}
.btn-primary:hover {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201,168,76,0.3);
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--white);
  font-family: 'Oswald', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 13px 24px;
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,0.4);
  transition: var(--transition);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ---- Navbar ---- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: all 0.4s ease;
  padding: 16px 0;
}
.navbar.scrolled {
  background: rgba(6, 14, 26, 0.97);
  backdrop-filter: blur(16px);
  padding: 10px 0;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-icon {
  width: 42px; height: 42px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--accent);
}
.logo-icon img { width: 100%; height: 100%; object-fit: cover; }
.logo-name {
  font-family: 'Oswald', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 1px;
  line-height: 1;
}
.logo-sub {
  font-size: 0.6rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Desktop Nav */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  font-family: 'Oswald', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  padding: 8px 14px;
  border-radius: 6px;
  transition: var(--transition);
}
.nav-link:hover {
  color: var(--accent);
  background: rgba(255,255,255,0.06);
}

/* Nav right */
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-cta {
  padding: 9px 20px;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  cursor: pointer;
}
.mobile-toggle span {
  width: 22px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
  display: block;
}
.mobile-toggle span.o1 { transform: rotate(45deg) translate(5px, 5px); }
.mobile-toggle span.o2 { opacity: 0; }
.mobile-toggle span.o3 { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: rgba(6, 14, 26, 0.98);
  padding: 12px 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.mobile-menu.active { max-height: 600px; }
.mobile-link {
  font-family: 'Oswald', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  padding: 13px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: var(--transition);
}
.mobile-link:hover { color: var(--accent); background: rgba(255,255,255,0.04); }
.mobile-cta {
  margin: 12px 24px;
  justify-content: center;
}

/* ====================================================
   HERO
   ==================================================== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 680px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Background Slides */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-slide.active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(6,14,26,0.9) 0%, rgba(6,14,26,0.65) 50%, rgba(6,14,26,0.4) 100%);
}
html[lang="ar"] .hero-overlay,
html[lang="fa"] .hero-overlay {
  background: linear-gradient(255deg, rgba(6,14,26,0.9) 0%, rgba(6,14,26,0.65) 50%, rgba(6,14,26,0.4) 100%);
}

/* Content */
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 24px;
  max-width: 1280px;
  margin: 0 auto;
}
.hero-text {
  max-width: 720px;
}
.hero-text.vis .hero-badge,
.hero-text.vis .hero-title,
.hero-text.vis .hero-desc,
.hero-text.vis .hero-actions,
.hero-text.vis .hero-stats {
  animation: fadeUp 0.7s ease forwards;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  margin-bottom: 24px;
  opacity: 0;
}
.badge-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}
.hero-title {
  font-family: 'Oswald', sans-serif;
  font-weight: 800;
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--white);
  margin-bottom: 24px;
  opacity: 0;
}
.title-line { display: block; }
.title-line.accent { color: var(--accent); }
.hero-desc {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.75;
  max-width: 520px;
  margin-bottom: 32px;
  opacity: 0;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
  opacity: 0;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.1);
  opacity: 0;
}
.hero-stat strong {
  display: block;
  font-family: 'Oswald', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.hero-stat span {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.4);
  font-family: 'Oswald', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 3px;
  text-transform: uppercase;
}
.scroll-line {
  width: 1px; height: 36px;
  background: rgba(255,255,255,0.2);
  position: relative;
  overflow: hidden;
}
.scroll-dot {
  width: 3px; height: 3px;
  background: var(--accent);
  border-radius: 50%;
  position: absolute;
  top: 0;
  animation: scrollDown 1.8s ease infinite;
}
@keyframes scrollDown {
  0%   { top: 0; opacity: 1; }
  80%  { top: 36px; opacity: 0; }
  100% { top: 0; opacity: 0; }
}

/* Slide Dots */
.slide-dots {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
html[lang="ar"] .slide-dots,
html[lang="fa"] .slide-dots {
  right: auto;
  left: 40px;
}
.slide-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}
.slide-dot.active {
  background: var(--accent);
  height: 20px;
  border-radius: 3px;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ====================================================
   PRODUCTS
   ==================================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
  transition: all 0.4s ease;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.14);
}
.product-card.featured .product-img { height: 240px; }
.product-img {
  position: relative;
  height: 200px;
  overflow: hidden;
}
.product-img img { transition: transform 0.5s ease; }
.product-card:hover .product-img img { transform: scale(1.05); }
.product-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6,14,26,0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.product-card:hover .product-overlay { opacity: 1; }
.product-overlay-text {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.85);
  text-align: center;
  line-height: 1.6;
}
.product-btn {
  padding: 8px 20px;
  background: var(--accent);
  color: var(--dark);
  font-family: 'Oswald', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-radius: 6px;
  transition: var(--transition);
}
.product-btn:hover { background: var(--accent2); }
.product-info { padding: 20px; }
.product-icon {
  width: 48px; height: 48px;
  background: rgba(201,168,76,0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.product-title {
  font-family: 'Oswald', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.product-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 14px;
  font-weight: 500;
}
.product-grades {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.product-grades li {
  font-size: 0.68rem;
  padding: 3px 8px;
  background: var(--gray);
  border-radius: 4px;
  color: var(--text);
  font-weight: 600;
  font-family: 'Segoe UI', monospace;
  transition: var(--transition);
}
.product-grades li:hover {
  background: var(--accent);
  color: var(--dark);
}

/* ====================================================
   ABOUT
   ==================================================== */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-images {
  position: relative;
}
.img-main {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
}
.about-badge {
  position: absolute;
  bottom: -16px;
  right: -16px;
  background: var(--accent);
  color: var(--dark);
  padding: 16px 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(201,168,76,0.4);
}
html[lang="ar"] .about-badge,
html[lang="fa"] .about-badge {
  right: auto;
  left: -16px;
}
.about-badge strong {
  display: block;
  font-family: 'Oswald', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}
.about-badge span {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.img-secondary {
  position: absolute;
  bottom: -30px;
  right: -30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 55%;
}
html[lang="ar"] .img-secondary,
html[lang="fa"] .img-secondary {
  right: auto;
  left: -30px;
}
.img-secondary img {
  border-radius: 8px;
  aspect-ratio: 1;
  border: 3px solid var(--white);
  box-shadow: var(--shadow);
}
.about-text { }
.about-p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 16px;
}
.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
}
.about-tag {
  padding: 5px 12px;
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
}
.about-cta { margin-top: 8px; }

/* ====================================================
   STATS
   ==================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
}
.stat-item {
  text-align: center;
  padding: 40px 20px;
  border-right: 1px solid rgba(255,255,255,0.08);
  transition: var(--transition);
}
html[lang="ar"] .stat-item,
html[lang="fa"] .stat-item {
  border-right: none;
  border-left: 1px solid rgba(255,255,255,0.08);
}
html[lang="ar"] .stat-item:last-child,
html[lang="fa"] .stat-item:last-child { border-left: none; }
.stat-item:hover { background: rgba(255,255,255,0.03); }
.stat-icon {
  margin-bottom: 16px;
  opacity: 0.8;
}
.stat-number {
  font-family: 'Oswald', sans-serif;
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-unit {
  font-size: 1.4rem;
}
.stat-label {
  font-family: 'Oswald', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 6px;
}
.stat-desc {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.5;
}

/* ====================================================
   APPLICATIONS
   ==================================================== */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 20px;
}
.apps-grid .app-card:nth-child(1) { grid-column: 1; }
.apps-grid .app-card:nth-child(2) { grid-column: 2; }
.apps-grid .app-card:nth-child(3) { grid-column: 3; }
.apps-grid .app-card:nth-child(4) { grid-column: 1 / 3; }
.apps-grid .app-card:nth-child(5) { grid-column: 3; }
.app-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 280px;
  cursor: default;
  transition: transform 0.4s ease;
}
.app-card:hover { transform: translateY(-4px); }
.app-img {
  position: absolute;
  inset: 0;
}
.app-img img { transition: transform 0.5s ease; }
.app-card:hover .app-img img { transform: scale(1.05); }
.app-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6,14,26,0.92) 0%, rgba(6,14,26,0.4) 60%, transparent 100%);
}
html[lang="ar"] .app-gradient,
html[lang="fa"] .app-gradient {
  background: linear-gradient(to top, rgba(6,14,26,0.92) 0%, rgba(6,14,26,0.4) 60%, transparent 100%);
}
.app-content {
  position: relative;
  z-index: 2;
  padding: 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.app-icon { margin-bottom: 12px; }
.app-title {
  font-family: 'Oswald', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.app-desc {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
  margin-bottom: 12px;
}
.app-materials {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.app-materials li {
  font-size: 0.65rem;
  padding: 3px 8px;
  background: rgba(201,168,76,0.15);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 4px;
  color: var(--accent);
  font-weight: 600;
}

/* ====================================================
   ADVANTAGES
   ==================================================== */
.adv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.adv-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 28px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}
.adv-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.adv-card:hover::before { transform: scaleX(1); }
.adv-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.1);
}
.adv-number {
  position: absolute;
  top: 20px;
  right: 20px;
  font-family: 'Oswald', sans-serif;
  font-size: 3.5rem;
  font-weight: 800;
  color: rgba(0,0,0,0.04);
  line-height: 1;
}
html[lang="ar"] .adv-number,
html[lang="fa"] .adv-number {
  right: auto;
  left: 20px;
}
.adv-icon { margin-bottom: 20px; }
.adv-title {
  font-family: 'Oswald', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.adv-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ====================================================
   PROCESS
   ==================================================== */
.process-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 48px;
}
.process-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  overflow: hidden;
}
.process-header {
  padding: 28px 28px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.process-tag {
  font-family: 'Oswald', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 6px;
}
.process-name {
  font-family: 'Oswald', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 2px;
  line-height: 1;
}
.process-full {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  margin-top: 4px;
}
.process-img {
  position: relative;
  height: 200px;
}
.process-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(6,14,26,0.9), transparent);
  padding: 16px;
}
.process-stat {
  display: inline-flex;
  flex-direction: column;
  background: rgba(201,168,76,0.15);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 8px;
  padding: 8px 14px;
}
.process-stat strong {
  font-family: 'Oswald', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 2px;
}
.process-stat span {
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}
.process-steps { padding: 20px 28px; }
.step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}
.step:last-child { margin-bottom: 0; }
.step-num {
  width: 30px; height: 30px;
  min-width: 30px;
  background: rgba(201,168,76,0.15);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Oswald', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
}
.step strong {
  font-family: 'Oswald', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
  display: block;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.step p {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
}
.process-cta {
  text-align: center;
  padding: 40px;
  background: rgba(201,168,76,0.06);
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: var(--radius);
}
.process-cta p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.6);
  max-width: 520px;
  margin: 0 auto 20px;
  line-height: 1.7;
}

/* ====================================================
   INQUIRY / CONTACT
   ==================================================== */
.inquiry-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.inquiry-desc {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 32px;
}
.contact-list { display: flex; flex-direction: column; gap: 20px; margin-bottom: 28px; }
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.contact-icon {
  width: 40px; height: 40px;
  min-width: 40px;
  background: rgba(201,168,76,0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-label {
  font-family: 'Oswald', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 3px;
}
.contact-value {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
}
.contact-value a { color: var(--blue); }
.contact-value a:hover { color: var(--accent); }
.social-links { display: flex; gap: 10px; }
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-family: 'Oswald', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: var(--transition);
}
.social-btn.whatsapp {
  background: rgba(37,211,102,0.1);
  border: 1px solid rgba(37,211,102,0.3);
  color: #25d366;
}
.social-btn.whatsapp:hover {
  background: #25d366;
  color: var(--white);
  transform: translateY(-2px);
}

/* Form */
.form-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.1);
}
.form-title {
  font-family: 'Oswald', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark2);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.form-sub {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 28px;
}
.form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 11px 14px;
  border: 1.5px solid #dde2e8;
  border-radius: 8px;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--text);
  background: #f8fafc;
  transition: border-color 0.25s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--accent); background: var(--white); }
.form-group select { appearance: none; cursor: pointer; }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-submit {
  width: 100%;
  justify-content: center;
  padding: 14px;
  font-size: 0.88rem;
}
.form-submit.done { background: #2e7d32; color: var(--white); border-color: #2e7d32; cursor: default; }
.form-submit.done svg { display: none; }
.success-msg {
  text-align: center;
  padding: 14px;
  background: rgba(46,125,50,0.08);
  border: 1px solid rgba(46,125,50,0.2);
  border-radius: 8px;
  font-size: 0.88rem;
  color: #2e7d32;
  font-weight: 600;
}

/* ====================================================
   FOOTER
   ==================================================== */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
}
.footer-top { padding: 60px 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.footer-logo img {
  width: 42px; height: 42px;
  border-radius: 8px;
  border: 2px solid var(--accent);
}
.footer-logo-name {
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.5px;
}
.footer-logo-sub {
  font-size: 0.65rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.footer-desc {
  font-size: 0.85rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.45);
}
.footer-heading {
  font-family: 'Oswald', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 16px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  transition: var(--transition);
}
.footer-links a:hover { color: var(--accent); padding-left: 4px; }
html[lang="ar"] .footer-links a:hover,
html[lang="fa"] .footer-links a:hover { padding-left: 0; padding-right: 4px; }
.footer-contact { display: flex; flex-direction: column; gap: 10px; }
.fc-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
}
.footer-social {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.footer-social a {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  color: rgba(255,255,255,0.5);
  transition: var(--transition);
}
.footer-social a:hover { background: var(--accent); color: var(--dark); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 20px 0;
}
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
}
.footer-bottom-inner a { color: var(--accent); transition: var(--transition); }
.footer-bottom-inner a:hover { color: var(--accent2); }

/* ====================================================
   AOS Animations
   ==================================================== */
[data-aos] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-aos].aos-animate {
  opacity: 1;
  transform: translateY(0);
}

/* ====================================================
   RESPONSIVE
   ==================================================== */
@media (max-width: 1024px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid   { grid-template-columns: repeat(3, 1fr); }
  .stat-item:nth-child(3) { border-right: none; }
  .stat-item:nth-child(3),
  .stat-item:nth-child(4),
  .stat-item:nth-child(5) { border-top: 1px solid rgba(255,255,255,0.08); }
  .apps-grid { grid-template-columns: repeat(2, 1fr); }
  .apps-grid .app-card:nth-child(4) { grid-column: 1 / 3; }
  .apps-grid .app-card:nth-child(5) { grid-column: auto; }
  .adv-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --section-gap: 60px; }

  .desktop-nav { display: none; }
  .mobile-toggle { display: flex; }
  /* 关键修复：移动菜单是 navbar-inner 的 flex 子项，必须脱离文档流做整宽下拉，
     否则展开时会作为横排列挤在顶栏右侧/重叠 */
  .mobile-menu { display: flex; position: absolute; top: 100%; left: 0; right: 0; }
  /* 移动端顶栏精简：隐藏顶栏搜索框与 CTA，只留 logo + 语言 + 汉堡 */
  .nav-cta, .nav-search { display: none !important; }

  .hero { min-height: 600px; }
  .hero-title { font-size: clamp(2.4rem, 8vw, 3.5rem); }
  .hero-stats { gap: 16px; }
  .hero-stat strong { font-size: 1.2rem; }
  .slide-dots { display: none; }

  .products-grid { grid-template-columns: 1fr; }
  .about-layout { grid-template-columns: 1fr; gap: 40px; }
  .img-secondary { display: none; }
  .about-badge { bottom: -12px; right: -12px; }
  html[lang="ar"] .about-badge,
  html[lang="fa"] .about-badge { right: auto; left: -12px; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,0.08); }
  .stat-number { font-size: 2rem; }

  .apps-grid { grid-template-columns: 1fr; }
  .apps-grid .app-card:nth-child(n) { grid-column: auto; }

  .adv-grid { grid-template-columns: 1fr; }
  .process-layout { grid-template-columns: 1fr; }
  .inquiry-layout { grid-template-columns: 1fr; gap: 40px; }
  .form-row { grid-template-columns: 1fr; }
  .form-card { padding: 28px 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom-inner { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .hero-stats { flex-direction: column; gap: 12px; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-item { border-right: none !important; border-top: 1px solid rgba(255,255,255,0.08) !important; }
  .stat-item:first-child { border-top: none !important; }
}

/* ====================================================
   RTL-specific styles (ar & fa)
   ==================================================== */
html[lang="ar"],
html[lang="fa"] {
  /* Global RTL text alignment */
  direction: rtl;
  text-align: right;
}

/* Keep certain elements LTR */
html[lang="ar"] input,
html[lang="ar"] textarea,
html[lang="ar"] select,
html[lang="fa"] input,
html[lang="fa"] textarea,
html[lang="fa"] select,
html[lang="ar"] .form-group label,
html[lang="fa"] .form-group label,
html[lang="ar"] .product-grades li,
html[lang="fa"] .product-grades li,
html[lang="ar"] .app-materials li,
html[lang="fa"] .app-materials li {
  direction: ltr;
  text-align: left;
}

html[lang="ar"] .form-group label,
html[lang="fa"] .form-group label {
  text-align: right;
}

html[lang="ar"] .contact-value,
html[lang="fa"] .contact-value {
  text-align: right;
}

html[lang="ar"] .step strong,
html[lang="fa"] .step strong {
  text-align: right;
}

/* Hero slide dots rtl */
html[lang="ar"] .slide-dots,
html[lang="fa"] .slide-dots {
  right: auto;
  left: 20px;
}

/* Scroll hint RTL */
html[lang="ar"] .scroll-hint,
html[lang="fa"] .scroll-hint {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

/* App materials RTL */
html[lang="ar"] .app-materials,
html[lang="fa"] .app-materials {
  flex-direction: row-reverse;
}

/* Footer links RTL */
html[lang="ar"] .footer-links a:hover,
html[lang="fa"] .footer-links a:hover {
  padding-left: 0;
  padding-right: 4px;
}

/* Product card RTL hover */
html[lang="ar"] .product-card:hover .product-img img,
html[lang="fa"] .product-card:hover .product-img img {
  transform: scaleX(-1.05);
}

/* Nav RTL alignment */
html[lang="ar"] .nav-right,
html[lang="fa"] .nav-right {
  flex-direction: row-reverse;
}

/* Hero badge RTL */
html[lang="ar"] .hero-badge,
html[lang="fa"] .hero-badge {
  flex-direction: row;
}

/* Stat number unit RTL */
html[lang="ar"] .stat-number,
html[lang="fa"] .stat-number {
  direction: ltr;
  text-align: right;
}

/* Form submit RTL */
html[lang="ar"] .form-submit,
html[lang="fa"] .form-submit {
  flex-direction: row;
}

/* Success msg RTL */
html[lang="ar"] .success-msg,
html[lang="fa"] .success-msg {
  text-align: center;
}

/* ===========================================================
   Appended (shared) – Language switcher (prominent) + grade links
   Used by grade.html (harmless on index.html which has its own inline copy).
   =========================================================== */
    .lang-switcher {
      display: flex;
      align-items: center;
      position: relative;
      cursor: pointer;
    }
    .lang-globe { width: 18px; height: 18px; color: var(--accent); transition: color 0.25s; }
    .lang-text { text-transform: uppercase; font-size: 0.7rem; letter-spacing: 1.5px; }
    .lang-flag { font-size: 1.05rem; line-height: 1; }
    .lang-code {
      background: var(--accent); color: var(--dark);
      padding: 2px 7px; border-radius: 12px; font-size: 0.7rem; letter-spacing: 1px;
    }
    .lang-arrow { font-size: 0.6rem; opacity: 0.8; transition: transform 0.25s; margin-left: 2px; }
    .lang-current {
      display: flex; align-items: center; gap: 8px;
      padding: 9px 16px; font-size: 0.8rem; font-family: 'Oswald', sans-serif;
      font-weight: 700; letter-spacing: 1px; color: var(--white);
      background: rgba(201,168,76,0.16); border: 1.5px solid var(--accent);
      border-radius: 30px; transition: all 0.25s; user-select: none;
      animation: langPulse 2.4s ease-in-out infinite;
    }
    .lang-current:hover { background: var(--accent); color: var(--dark); transform: translateY(-1px); }
    .lang-current:hover .lang-globe { color: var(--dark); }
    .lang-current:hover .lang-code { background: var(--dark); color: var(--accent); }
    .lang-current:active { transform: scale(0.96); }
    @keyframes langPulse {
      0%,100% { box-shadow: 0 0 0 4px rgba(201,168,76,0.45); }
      50%     { box-shadow: 0 0 0 0 rgba(201,168,76,0); }
    }
    .lang-switcher.open .lang-arrow { transform: rotate(180deg); }
    .lang-dropdown {
      position: absolute; top: calc(100% + 8px); right: 0;
      background: rgba(10,26,46,0.98); border: 1px solid rgba(255,255,255,0.12);
      border-radius: 8px; overflow: hidden; min-width: 160px;
      box-shadow: 0 12px 40px rgba(0,0,0,0.5);
      opacity: 0; visibility: hidden; transform: translateY(-8px); transition: all 0.3s ease; z-index: 100;
    }
    html[lang="ar"] .lang-dropdown, html[lang="fa"] .lang-dropdown { right: auto; left: 0; }
    .lang-switcher.open .lang-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
    .lang-option {
      display: flex; align-items: center; gap: 10px; width: 100%;
      padding: 10px 14px; font-size: 0.82rem; font-family: 'Segoe UI', sans-serif;
      color: rgba(255,255,255,0.7); cursor: pointer; transition: all 0.2s;
      border: none; background: none; text-align: left;
    }
    .lang-option:hover { background: rgba(201,168,76,0.15); color: var(--accent); }
    .lang-option.active { background: rgba(201,168,76,0.2); color: var(--accent); }
    html[lang="ar"] .lang-option, html[lang="fa"] .lang-option { text-align: right; flex-direction: row-reverse; }

    /* Mobile language row */
    .mobile-lang-row { display: none; padding: 12px 24px; border-bottom: 1px solid rgba(255,255,255,0.08); }
    .mobile-lang-label { font-size: 0.7rem; font-family:'Oswald',sans-serif; text-transform: uppercase; letter-spacing: 2px; color: rgba(255,255,255,0.4); margin-bottom: 10px; }
    .mobile-lang-btns { display: flex; gap: 6px; flex-wrap: wrap; }
    .mobile-lang-btn {
      flex: 1; padding: 12px 8px; font-size: 0.8rem; font-family: 'Oswald', sans-serif;
      font-weight: 700; letter-spacing: 1px; color: rgba(255,255,255,0.85);
      background: rgba(201,168,76,0.08); border: 1.5px solid rgba(201,168,76,0.4);
      border-radius: 10px; cursor: pointer; transition: all 0.25s;
    }
    .mobile-lang-btn:hover { border-color: var(--accent); color: var(--accent); }
    .mobile-lang-btn.active { background: var(--accent); color: var(--dark); border-color: var(--accent); box-shadow: 0 4px 16px rgba(201,168,76,0.4); }

    /* Grade links (clickable chips on product cards) */
    .product-grades li.grade-link,
    .grade-link {
      cursor: pointer;
      transition: var(--transition);
    }
    .product-grades li.grade-link:hover,
    .grade-link:hover {
      background: var(--accent) !important;
      color: var(--dark) !important;
      transform: translateY(-2px);
    }
    .grade-link {
      display: inline-block;
      padding: 3px 8px;
      background: var(--gray);
      border-radius: 4px;
      font-size: 0.68rem;
      font-weight: 600;
      font-family: 'Segoe UI', monospace;
    }

    /* Grade page navbar responsive */
    @media (max-width: 600px) {
      .grade-navbar .navbar-inner { flex-wrap: wrap; gap: 10px; }
      .grade-navbar .lang-switcher { margin-left: auto; }
    }

/* ============================================================
   Material Database Search (search.js)
   ============================================================ */
.yt-search { position: relative; display: flex; align-items: center; }
.nav-search { margin-right: 14px; }

.yt-search-ic {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none; z-index: 2;
}

.yt-search-input {
  height: 40px; width: 200px; padding: 0 38px 0 34px;
  border-radius: 999px; border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06); color: #fff; font-size: 0.9rem; outline: none;
  transition: var(--transition);
}
.yt-search-input::placeholder { color: rgba(255,255,255,0.5); }
.yt-search-input:focus {
  border-color: var(--accent); background: rgba(255,255,255,0.12);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.18);
}

.yt-search-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border: none; background: transparent; color: var(--accent);
  font-size: 1.1rem; cursor: pointer; border-radius: 50%; transition: background .15s;
}
.yt-search-btn:hover { background: rgba(201,168,76,0.15); }

.yt-search-panel {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 300px; max-width: 360px;
  max-height: 420px; overflow-y: auto; background: var(--white);
  border: 1px solid #e6e9ef; border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(8,18,38,0.22); padding: 8px; display: none; z-index: 300;
}
.yt-search-panel.open { display: block; }

.yt-result {
  display: flex; flex-direction: column; gap: 2px;
  padding: 9px 12px; border-radius: 10px; text-decoration: none;
  color: var(--dark); transition: background .15s;
}
.yt-result:hover { background: #f3f6fc; }
.yt-r-grade { font-weight: 700; color: var(--dark); font-family: 'Oswald', sans-serif; font-size: 0.98rem; }
.yt-r-cat { font-size: 0.7rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.5px; }
.yt-r-eq { font-size: 0.76rem; color: var(--muted); }
.yt-noresult { padding: 14px; font-size: 0.88rem; color: var(--muted); line-height: 1.6; }
.yt-noresult a { color: var(--accent); font-weight: 600; }

/* Mobile search (inside mobile menu) */
.mobile-search { width: 100%; margin: 4px 0 12px; }
.mobile-search .yt-search-input { width: 100%; background: rgba(255,255,255,0.08); }
.mobile-search .yt-search-input::placeholder { color: rgba(255,255,255,0.55); }
.mobile-search .yt-search-panel {
  position: static; display: none; margin-top: 8px; box-shadow: none; border-color: rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05); max-height: 280px;
}
.mobile-search .yt-search-panel.open { display: block; }
.mobile-search .yt-result { color: #fff; }
.mobile-search .yt-r-grade { color: #fff; }
.mobile-search .yt-noresult { color: rgba(255,255,255,0.7); }
.mobile-search .yt-noresult a { color: var(--accent); }

/* ---- Material Database section (homepage) ---- */
.db-section { padding: 72px 0; background: linear-gradient(180deg, #f7f9fc, #eef2f8); }
.db-section .section-head { text-align: center; margin-bottom: 8px; }

.db-search {
  position: relative; max-width: 680px; margin: 28px auto 0; display: flex; align-items: center; flex-wrap: wrap;
}
.db-search .yt-search-ic { left: 20px; color: var(--muted); }
.db-search .yt-search-input {
  height: 56px; width: 100%; padding: 0 58px 0 50px; font-size: 1rem; color: var(--dark);
  background: #fff; border: 1px solid #d8dee9; border-radius: 999px;
  box-shadow: 0 8px 24px rgba(8,18,38,0.06);
}
.db-search .yt-search-input::placeholder { color: #8a93a3; }
.db-search .yt-search-input:focus {
  border-color: var(--accent); box-shadow: 0 0 0 4px rgba(201,168,76,0.16);
}
.db-search .yt-search-btn {
  right: 8px; width: 42px; height: 42px; font-size: 1.3rem; color: #0a1a2e;
  background: var(--accent); border-radius: 50%;
}
.db-search .yt-search-btn:hover { filter: brightness(1.05); background: var(--accent); }
.db-search .yt-search-panel,
.db-search .yt-catalog { flex: 1 1 100%; }
.db-search .yt-search-panel { position: static; max-width: 680px; margin: 14px auto 0; box-shadow: 0 12px 40px rgba(8,18,38,0.12); }

.db-catalog { margin-top: 34px; }
.db-head { text-align: center; margin-bottom: 18px; }
.db-head h3 {
  font-family: 'Oswald', sans-serif; font-size: 1.05rem; letter-spacing: 2px;
  text-transform: uppercase; color: var(--muted);
}
.db-group { margin-bottom: 22px; }
.db-group-h {
  font-family: 'Oswald', sans-serif; font-size: 0.92rem; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--navy); margin-bottom: 12px; padding-bottom: 6px;
  border-bottom: 2px solid rgba(201,168,76,0.4);
}
.db-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.db-item {
  display: flex; flex-direction: column; gap: 3px; padding: 12px 14px;
  background: #fff; border: 1px solid #e2e7ee; border-radius: 12px;
  text-decoration: none; transition: var(--transition);
}
.db-item:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(8,18,38,0.08); }
.db-i-grade { font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 1.02rem; color: var(--dark); }
.db-i-eq { font-size: 0.74rem; color: var(--muted); }

/* RTL: align dropdown to the left */
html[lang="ar"] .yt-search-panel,
html[lang="fa"] .yt-search-panel { right: auto; left: 0; }

/* Hide navbar search on mobile (mobile menu has its own) */
@media (max-width: 860px) {
  .nav-search { display: none; }
}
@media (max-width: 520px) {
  .db-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}


/* Language-specific body fonts */
html[lang="zh"] body,
html[lang="zh-CN"] body { font-family: var(--font-cn), var(--font-en); }
html[lang="ar"] body { font-family: var(--font-ar), var(--font-en); }
html[lang="fa"] body { font-family: var(--font-fa), var(--font-en); }
html[lang="ru"] body { font-family: var(--font-ru), var(--font-en); }
html[lang="vi"] body { font-family: var(--font-vi), var(--font-en); }
html[lang="de"] body { font-family: var(--font-en); }
html[lang="en"] body, body { font-family: var(--font-en); }

/* Monospace fallback for data/code */
code, pre, .grade-composition, .grade-props { font-family: var(--font-mono); }

/* RTL body adjustment */
html[dir="rtl"] body { text-align: right; }



/* ========== HOMEPAGE DB TEASER ========== */
.db-teaser-section {
  background: linear-gradient(170deg, #0a1e33 0%, #0f2d52 50%, #091a2e 100%);
  position: relative;
}
.db-teaser-section::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4a843' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}
.db-teaser-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; margin-top: 28px;
  position: relative; z-index: 1;
}
.db-teaser-card {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(212,168,67,0.15);
  border-radius: 14px; padding: 28px 18px 22px; text-align: center; cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4,0,0.2,1); display: flex; flex-direction: column; align-items: center;
  text-decoration: none; color: var(--white);
}
.db-teaser-card:hover {
  background: rgba(212,168,67,0.12); border-color: rgba(212,168,67,0.4);
  transform: translateY(-6px); box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}
.db-teaser-card:active { transform: translateY(-2px); }
.db-tc-icon { height: 48px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.db-tc-icon svg { opacity: 0.85; }
.db-teaser-card:hover .db-tc-icon svg { opacity: 1; }
.db-tc-count { font-family: 'Oswald',sans-serif; font-size: 1.6rem; font-weight: 700; color: var(--accent); line-height: 1; }
.db-tc-name { font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; margin: 6px 0 8px; color: rgba(255,255,255,0.9); }
.db-tc-ex { font-size: 0.7rem; color: rgba(255,255,255,0.5); line-height: 1.4; }

/* Search in teaser */
.db-teaser-search { max-width: 540px; margin: 32px auto 0; position: relative; z-index: 1; }
.db-teaser-srch { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; }
.db-teaser-srch:hover { border-color: rgba(212,168,67,0.3); }
.db-teaser-srch .yt-search-input { background: transparent; height: 48px; font-size: 0.85rem; }
.db-teaser-srch .yt-search-btn { background: var(--accent); color: var(--dark2); width: 38px; height: 38px; border-radius: 8px; margin: 5px; }
.db-teaser-srch .yt-search-btn:hover { background: #c99a38; }

/* CTA row */
.db-teaser-cta { text-align: center; margin-top: 28px; position: relative; z-index: 1; }
.db-teaser-cta .btn-outline {
  display: inline-flex; align-items: center; padding: 12px 32px;
  background: transparent; border: 1.5px solid var(--accent); color: var(--accent);
  border-radius: 8px; font-weight: 600; font-size: 0.85rem; letter-spacing: 0.5px;
  transition: all 0.3s; text-decoration: none;
}
.db-teaser-cta .btn-outline:hover { background: var(--accent); color: var(--dark2); }
.db-teaser-note { display: block; margin-top: 14px; font-size: 0.7rem; color: rgba(255,255,255,0.35); letter-spacing: 1px; }

/* ========== DATABASE HERO ========== */
.db-page-hero {
  padding: 130px 0 50px;
  background: linear-gradient(160deg, #060e1a 0%, #0f2d52 60%, #060e1a 100%);
  text-align: center; position: relative; overflow: hidden;
}
.db-page-hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.db-page-hero .container { position: relative; z-index: 1; }

/* Stats row */
.db-page-stats { display: flex; justify-content: center; gap: 40px; margin: 28px 0; flex-wrap: wrap; }
.db-page-stat { text-align: center; }
.db-page-stat strong { display: block; font-family: 'Oswald',sans-serif; font-size: 1.8rem; font-weight: 700; color: var(--accent); line-height: 1; }
.db-page-stat span { display: block; font-size: 0.72rem; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 1px; margin-top: 3px; }

/* Search */
.db-search-wrap { max-width: 600px; margin: 0 auto 24px; }
.db-main-search { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); border-radius: 14px; transition: border-color 0.3s; }
.db-main-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(212,168,67,0.15); }
.db-main-search .yt-search-input { background: transparent; height: 52px; font-size: 0.9rem; }
.db-main-search .yt-search-btn { background: var(--accent); color: var(--dark2); font-family: 'Oswald',sans-serif; font-weight: 700; letter-spacing: 1px; font-size: 0.78rem; padding: 0 24px; border-radius: 10px; height: 40px; margin: 6px; border: none; cursor: pointer; transition: background 0.2s; }
.db-main-search .yt-search-btn:hover { background: #c99a38; }

/* Category pills */
.db-cats { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.db-cat-pill {
  padding: 8px 22px; border-radius: 100px; border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.7);
  font-size: 0.78rem; font-weight: 500; cursor: pointer; transition: all 0.25s;
}
.db-cat-pill:hover { border-color: var(--accent); color: var(--accent); }
.db-cat-pill.active { background: var(--accent); color: var(--dark2); border-color: var(--accent); font-weight: 600; }

/* ========== DATABASE RESULTS ========== */
.db-main-section { padding: 60px 0; }

/* Section head */
.db-head { text-align: center; margin-bottom: 48px; }
.db-head .section-label { margin-bottom: 6px; }
.db-head h2 { font-family: 'Oswald',sans-serif; font-size: clamp(1.6rem,3vw,2.2rem); font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--dark2); margin: 8px 0; }
.db-head p { color: var(--muted); max-width: 560px; margin: 0 auto; font-size: 0.9rem; line-height: 1.6; }

/* Catalog groups */
#dbCatalog { margin-top: 24px; }
#dbCatalog .db-head { text-align: center; margin-bottom: 36px; }
#dbCatalog .db-head h3 { font-family: 'Oswald',sans-serif; font-size: 1.1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; color: var(--dark2); }

.db-group { margin-bottom: 32px; }
.db-group-h {
  font-family: 'Oswald',sans-serif; font-size: 0.95rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 2px; color: var(--accent);
  padding: 12px 20px; margin-bottom: 12px;
  background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
  opacity: 0.08; border-radius: 6px; color: #1a2d42;
}
.db-group-h { background: linear-gradient(90deg, rgba(212,168,67,0.12) 0%, transparent 100%); opacity: 1; padding-left: 16px; border-left: 3px solid var(--accent); }

.db-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.db-item {
  display: flex; flex-direction: column; padding: 12px 16px;
  background: var(--white); border: 1px solid var(--gray);
  border-radius: 10px; text-decoration: none; color: var(--dark2);
  transition: all 0.2s;
}
.db-item:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(212,168,67,0.12); transform: translateY(-2px); }
.db-item .db-i-grade { font-weight: 700; font-size: 0.88rem; color: var(--primary); font-family: 'Inter',sans-serif; }
.db-item .db-i-eq { font-size: 0.71rem; color: var(--muted); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Search results panel */
.db-panel { max-height: 400px; overflow-y: auto; }
.yt-result { display: flex; gap: 14px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--gray); text-decoration: none; transition: background 0.15s; }
.yt-result:hover { background: #f5f8fc; }
.yt-r-grade { font-weight: 700; font-size: 0.85rem; color: var(--primary); min-width: 80px; font-family: 'Inter',sans-serif; }
.yt-r-cat { font-size: 0.72rem; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; min-width: 100px; }
.yt-r-eq { font-size: 0.72rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* CTA block */
.db-cta-block {
  text-align: center; margin-top: 56px; padding: 48px 40px;
  background: linear-gradient(135deg, #f8faff 0%, #eef4fd 100%);
  border-radius: 16px; border: 1px solid var(--gray);
}
.db-cta-icon { margin-bottom: 12px; color: var(--accent); }
.db-cta-title { font-family: 'Oswald',sans-serif; font-size: 1.4rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--dark2); margin-bottom: 10px; }
.db-cta-text { color: var(--muted); font-size: 0.95rem; max-width: 520px; margin: 0 auto 20px; line-height: 1.7; }

/* RTL overrides for AR/FA */
html[lang="ar"] .db-item { text-align: right; }
html[lang="fa"] .db-item { text-align: right; }
html[lang="ar"] .db-group-h { border-left: none; border-right: 3px solid var(--accent); padding-left: 0; padding-right: 16px; background: linear-gradient(-90deg, rgba(212,168,67,0.12) 0%, transparent 100%); }
html[lang="fa"] .db-group-h { border-left: none; border-right: 3px solid var(--accent); padding-left: 0; padding-right: 16px; background: linear-gradient(-90deg, rgba(212,168,67,0.12) 0%, transparent 100%); }
html[lang="ar"] .db-cta-block, html[lang="fa"] .db-cta-block { direction: rtl; }

/* Mobile */
@media(max-width:900px){
  .db-teaser-grid { grid-template-columns: repeat(3,1fr); gap: 12px; }
  .db-teaser-card { padding: 20px 12px; }
  .db-tc-count { font-size: 1.3rem; }
}
@media(max-width:640px){
  .db-teaser-grid { grid-template-columns: repeat(2,1fr); }
  .db-page-stats { gap: 20px; }
  .db-page-stat strong { font-size: 1.3rem; }
  .db-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
