/* ==========================================================================
   Sammys Logistics — Design System v2 (Round 1 Deep Optimization)
   Apple-inspired: clarity, depth, generous whitespace, refined motion.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-subtle: #f5f5f7;
  --bg-elevated: #ffffff;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #86868b;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-light: rgba(0, 113, 227, 0.08);
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.12);
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.04);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.12);
  --max-width: 1120px;
  --nav-height: 52px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text',
    'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  letter-spacing: -0.01em;
  font-size: 17px;
  overflow-x: hidden;
}

body.rtl { direction: rtl; }

a { color: inherit; text-decoration: none; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 1000;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; color: var(--text); transition: opacity var(--transition); }
.nav-logo:hover { opacity: 0.7; }
.nav-links { display: flex; gap: 32px; list-style: none; align-items: center; }
.nav-links > li > a {
  color: var(--text-secondary); font-size: 14px; font-weight: 400;
  transition: color var(--transition); position: relative;
}
.nav-links > li > a:hover { color: var(--text); }

/* ---------- Language Switcher (Fixed & Enhanced) ---------- */
.lang-switcher { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-subtle); border: 1px solid var(--border);
  border-radius: 980px; padding: 6px 14px; cursor: pointer;
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  transition: all var(--transition); font-family: inherit;
}
.lang-btn:hover { background: var(--accent-light); border-color: var(--accent); color: var(--accent); }
.lang-globe { font-size: 14px; }
.lang-current { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang-arrow { font-size: 10px; transition: transform var(--transition); }
.lang-btn[aria-expanded="true"] .lang-arrow { transform: rotate(180deg); }

.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--bg-elevated); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
  min-width: 260px; max-height: 400px; overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(0.96);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 1001;
}
.lang-menu.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.lang-search { padding: 12px 14px 8px; border-bottom: 1px solid var(--border); }
.lang-search-input {
  width: 100%; padding: 8px 12px; font-size: 13px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-subtle); color: var(--text); font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.lang-search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }

.lang-list { max-height: 300px; overflow-y: auto; padding: 6px; }
.lang-list::-webkit-scrollbar { width: 6px; }
.lang-list::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

.lang-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
}
.lang-item:hover { background: var(--bg-subtle); color: var(--text); }
.lang-item.lang-active { color: var(--accent); font-weight: 500; background: var(--accent-light); }
.lang-code { font-size: 11px; font-weight: 600; color: var(--text-tertiary); min-width: 28px; text-transform: uppercase; }
.lang-item.lang-active .lang-code { color: var(--accent); }
.lang-name { flex: 1; }
.lang-check { font-size: 14px; color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  padding: 120px 0 100px; text-align: center;
  background: linear-gradient(180deg, var(--bg-subtle) 0%, var(--bg) 100%);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -50%; left: 50%; transform: translateX(-50%);
  width: 800px; height: 800px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,113,227,0.04) 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(40px, 6vw, 76px); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 24px;
  position: relative;
}
.hero p {
  font-size: clamp(18px, 2.2vw, 24px); color: var(--text-secondary);
  max-width: 720px; margin: 0 auto 40px; line-height: 1.4; letter-spacing: 0;
  position: relative;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 14px 30px; border-radius: 980px;
  font-size: 16px; font-weight: 500; text-decoration: none;
  transition: all var(--transition); cursor: pointer; border: none;
  position: relative; overflow: hidden;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: scale(1.02); box-shadow: 0 4px 20px rgba(0,113,227,0.3); }
.btn-secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-secondary:hover { background: var(--accent-light); }

/* ---------- Sections ---------- */
.section { padding: 100px 0; }
.section-subtle { background: var(--bg-subtle); }
.section-title {
  font-size: clamp(28px, 4vw, 48px); font-weight: 700;
  letter-spacing: -0.025em; text-align: center; margin-bottom: 16px;
}
.section-subtitle {
  font-size: 19px; color: var(--text-secondary); text-align: center;
  max-width: 640px; margin: 0 auto 64px; letter-spacing: 0;
}

/* ---------- Cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg-elevated); border-radius: var(--radius-lg);
  padding: 36px 32px; box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid var(--border);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 12px; }
.card p { font-size: 15px; color: var(--text-secondary); line-height: 1.55; letter-spacing: 0; }
.card-icon { font-size: 32px; margin-bottom: 20px; color: var(--accent); }

/* ---------- Service Detail ---------- */
.service-detail { max-width: 820px; margin: 0 auto; }
.service-detail h1 { font-size: clamp(32px, 5vw, 56px); font-weight: 700; letter-spacing: -0.025em; margin-bottom: 24px; }
.service-detail .lead { font-size: 20px; color: var(--text-secondary); margin-bottom: 32px; line-height: 1.5; }
.service-detail .body { font-size: 17px; line-height: 1.7; color: var(--text); }
.service-detail .body h3 { font-size: 22px; font-weight: 600; margin: 32px 0 12px; letter-spacing: -0.02em; color: var(--text); }
.service-detail .body p { margin-bottom: 12px; }
.service-detail .body ul { list-style: none; padding: 0; margin: 12px 0 20px; }
.service-detail .body li { padding: 6px 0 6px 24px; position: relative; line-height: 1.6; }
.service-detail .body li::before { content: '—'; position: absolute; left: 0; color: var(--accent); }
.service-detail .body ol { counter-reset: step; list-style: none; padding: 0; margin: 12px 0 20px; }
.service-detail .body ol li { counter-increment: step; padding: 8px 0 8px 40px; position: relative; line-height: 1.6; }
.service-detail .body ol li::before { content: counter(step); position: absolute; left: 0; top: 6px; width: 28px; height: 28px; background: var(--accent); color: #fff; border-radius: 50%; font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.service-detail .body strong { font-weight: 600; color: var(--text); }
.service-detail .body hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-subtle); padding: 64px 0 40px;
  border-top: 1px solid var(--border); font-size: 14px; color: var(--text-secondary);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer h4 { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 16px; letter-spacing: 0; }
.footer a { color: var(--text-secondary); text-decoration: none; display: block; margin-bottom: 10px; transition: color var(--transition); }
.footer a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; font-size: 13px; color: var(--text-tertiary); }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; color: var(--text); }
.form-control {
  width: 100%; padding: 14px 16px; font-size: 16px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--bg); color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition); font-family: inherit;
}
.form-control:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-light); }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 834px) {
  .nav-links { gap: 12px; flex-wrap: wrap; }
  .nav-links > li > a { font-size: 13px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 72px 0; }
  .hero { padding: 80px 0 64px; }
  .lang-current { display: none; }
  .lang-btn { padding: 6px 10px; }
}
@media (max-width: 600px) {
  .nav-inner { padding: 0 12px; }
  .nav-links { gap: 8px; }
  .nav-links > li > a { font-size: 12px; }
  .nav-logo { font-size: 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .card { padding: 28px 24px; }
  .lang-menu { right: -20px; min-width: 220px; }
}
