/* ============================================================
   Ebdaa Furniture — ebdaafurniture.com
   Dark & gold theme matching the Ibdaa brand
   ============================================================ */
:root {
  --gold: #c9a05a;
  --gold-light: #e3c68f;
  --gold-dark: #a37f3e;
  --dark: #14100c;
  --dark-2: #1e1813;
  --dark-3: #2a221b;
  --text: #2b2620;
  --muted: #7a7168;
  --bg: #faf8f5;
  --white: #ffffff;
  --line: #e8e2d9;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(20, 16, 12, .10);
  --shadow-lg: 0 20px 50px rgba(20, 16, 12, .18);
  --font: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
  overflow-x: clip; /* modern browsers: contains overflow WITHOUT breaking position:sticky */
  overflow-wrap: break-word;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; display: block; height: auto; }
iframe, video, embed, object { max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
.container { width: min(1200px, 92%); margin-inline: auto; }

/* ---------- topbar ---------- */
.topbar {
  background: var(--dark);
  color: #cfc6ba;
  font-size: .85rem;
  padding: .45rem 0;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.topbar a { color: var(--gold-light); }
.topbar .tb-group { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.topbar i { color: var(--gold); margin-inline-end: .35rem; }

/* ---------- header ---------- */
.site-header {
  background: rgba(20, 16, 12, .97);
  position: sticky; top: 0; z-index: 900;
  box-shadow: 0 2px 20px rgba(0,0,0,.35);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .55rem 0; }
.brand { display: flex; align-items: center; gap: .8rem; color: #fff; }
.brand img { height: 54px; width: auto; border-radius: 10px; }
.brand .b-name { font-weight: 800; font-size: 1.15rem; letter-spacing: .3px; line-height: 1.25; }
.brand .b-sub { font-size: .68rem; color: var(--gold-light); font-weight: 500; }
.main-nav { display: flex; align-items: center; gap: 1.35rem; }
.main-nav a { color: #e9e2d7; font-weight: 600; font-size: .95rem; padding: .35rem 0; position: relative; }
.main-nav a::after {
  content: ''; position: absolute; inset-inline-start: 0; bottom: -2px;
  width: 0; height: 2px; background: var(--gold); transition: width .25s;
}
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }
.main-nav a.active { color: var(--gold-light); }
.nav-cta {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #fff !important; padding: .55rem 1.2rem !important; border-radius: 50px;
  font-weight: 700; box-shadow: 0 6px 18px rgba(201,160,90,.35);
  transition: transform .2s;
}
.nav-cta::after { display: none; }
.nav-cta:hover { transform: translateY(-2px); }
.lang-btn {
  border: 1px solid var(--gold); color: var(--gold-light) !important;
  padding: .3rem .9rem !important; border-radius: 50px; font-size: .85rem !important;
}
.lang-btn::after { display: none; }
.nav-toggle {
  display: none; background: none; border: 1px solid rgba(201,160,90,.45); border-radius: 9px;
  color: var(--gold-light); font-size: 1.35rem; line-height: 1; cursor: pointer;
  width: 44px; height: 42px; align-items: center; justify-content: center; flex-shrink: 0;
}

/* ---------- hero ---------- */
.hero {
  position: relative; color: #fff;
  background: linear-gradient(120deg, rgba(16,12,8,.93) 35%, rgba(16,12,8,.55)), url('../img/hero-chair.jpg') center/cover no-repeat;
  padding: 7rem 0 8rem;
}
.hero-inner { max-width: 640px; }
.hero .kicker {
  display: inline-block; color: var(--gold-light); font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; font-size: .8rem; border: 1px solid rgba(201,160,90,.5);
  padding: .3rem 1rem; border-radius: 40px; margin-bottom: 1.2rem;
}
.hero h1 { font-size: clamp(2rem, 4.5vw, 3.3rem); line-height: 1.2; font-weight: 800; margin-bottom: 1.1rem; }
.hero h1 .accent { color: var(--gold); }
.hero p { color: #d8d0c4; font-size: 1.08rem; margin-bottom: 2rem; }
.btn {
  display: inline-block; padding: .8rem 1.9rem; border-radius: 50px; font-weight: 700;
  transition: all .25s; border: none; cursor: pointer; font-family: var(--font); font-size: .98rem;
}
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #fff; box-shadow: 0 8px 24px rgba(201,160,90,.4); }
.btn-gold:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(201,160,90,.5); }
.btn-outline { border: 1.5px solid rgba(255,255,255,.6); color: #fff; margin-inline-start: .8rem; }
.btn-outline:hover { border-color: var(--gold); color: var(--gold-light); }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: var(--dark-3); }

/* ---------- stats strip ---------- */
.stats-strip { margin-top: -3.4rem; position: relative; z-index: 5; }
.stats-grid {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  display: grid; grid-template-columns: repeat(4, 1fr); overflow: hidden;
}
.stat { text-align: center; padding: 1.6rem 1rem; border-inline-end: 1px solid var(--line); }
.stat:last-child { border-inline-end: none; }
.stat .num { font-size: 2rem; font-weight: 800; color: var(--gold-dark); }
.stat .num span { color: var(--gold); }
.stat .lbl { color: var(--muted); font-size: .88rem; font-weight: 600; }

/* ---------- sections ---------- */
.section { padding: 4.5rem 0; }
.section.alt { background: #f2eee7; }
.section.dark { background: var(--dark-2); color: #e7dfd3; }
.sec-head { text-align: center; max-width: 640px; margin: 0 auto 3rem; }
.sec-head .kicker { color: var(--gold-dark); font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; font-size: .78rem; }
.sec-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; margin: .4rem 0 .6rem; }
.section.dark .sec-head h2 { color: #fff; }
.sec-head p { color: var(--muted); }
.section.dark .sec-head p { color: #b5aca0; }
.sec-head .bar { width: 70px; height: 3px; background: linear-gradient(90deg, var(--gold), var(--gold-dark)); margin: 1rem auto 0; border-radius: 3px; }

/* ---------- cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem; }
.card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card .thumb { position: relative; overflow: hidden; aspect-ratio: 4/3; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .thumb img { transform: scale(1.07); }
.card .body { padding: 1.3rem 1.4rem 1.5rem; flex: 1; display: flex; flex-direction: column; }
.card h3 { font-size: 1.08rem; font-weight: 800; margin-bottom: .45rem; }
.card p { color: var(--muted); font-size: .9rem; flex: 1; }
.card .more { color: var(--gold-dark); font-weight: 700; font-size: .88rem; margin-top: .9rem; }
.card .tag {
  position: absolute; top: .8rem; inset-inline-start: .8rem;
  background: rgba(20,16,12,.85); color: var(--gold-light);
  padding: .2rem .8rem; border-radius: 40px; font-size: .74rem; font-weight: 700;
}
.icon-badge {
  width: 52px; height: 52px; border-radius: 13px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #fff; font-size: 1.3rem;
  margin-bottom: 1rem; box-shadow: 0 8px 18px rgba(201,160,90,.35);
}
.service-card .body { padding-top: 1.5rem; }

/* ---------- divisions ---------- */
.div-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.1rem; }
.div-card {
  background: rgba(255,255,255,.05); border: 1px solid rgba(201,160,90,.25);
  border-radius: var(--radius); padding: 1.5rem 1.1rem; text-align: center; transition: all .25s;
}
.div-card:hover { background: rgba(201,160,90,.12); transform: translateY(-4px); }
.div-card i { font-size: 1.7rem; color: var(--gold); margin-bottom: .7rem; }
.div-card h3 { font-size: .98rem; color: #fff; margin-bottom: .3rem; }
.div-card p { font-size: .76rem; color: #b5aca0; }

/* ---------- clients ---------- */
.clients-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.client-chip {
  background: var(--white); border: 1px solid var(--line); border-radius: 10px;
  padding: 1.1rem 1rem; text-align: center; font-weight: 700; font-size: .92rem;
  color: var(--text); transition: all .25s; display: flex; align-items: center; justify-content: center; min-height: 70px;
}
.client-chip:hover { border-color: var(--gold); color: var(--gold-dark); box-shadow: var(--shadow); }
.client-chip img { max-height: 46px; width: auto; margin-inline: auto; }

/* ---------- testimonials ---------- */
.testi { background: var(--white); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow); position: relative; }
.testi::before { content: '\201C'; font-size: 4rem; color: var(--gold); opacity: .35; position: absolute; top: .2rem; inset-inline-start: 1.2rem; line-height: 1; }
.testi p { font-size: .95rem; color: var(--text); margin: 1rem 0 1.2rem; }
.testi .who { font-weight: 800; font-size: .92rem; }
.testi .role { color: var(--muted); font-size: .8rem; }

/* ---------- page hero ---------- */
.page-hero {
  background: linear-gradient(120deg, rgba(16,12,8,.92), rgba(16,12,8,.72)), url('../img/factory-3-1.jpg') center/cover;
  color: #fff; padding: 4rem 0 3.4rem; text-align: center;
}
.page-hero h1 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); font-weight: 800; }
.page-hero .crumbs { color: var(--gold-light); font-size: .88rem; margin-top: .5rem; }
.page-hero .crumbs a { color: #d8d0c4; }

/* ---------- detail pages ---------- */
.detail-wrap { display: grid; grid-template-columns: 2fr 1fr; gap: 2.5rem; align-items: start; }
.detail-main img.lead { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.detail-main h2 { margin: 1.6rem 0 .8rem; font-size: 1.5rem; }
.detail-main p { margin-bottom: 1rem; color: #4c453d; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin-top: 1rem; }
.gallery.gallery-4 { grid-template-columns: repeat(4, 1fr); }
.gallery a { border-radius: 10px; overflow: hidden; aspect-ratio: 4/3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery a:hover img { transform: scale(1.08); }
.side-box { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.6rem; margin-bottom: 1.4rem; }
.side-box h3 { font-size: 1.05rem; margin-bottom: 1rem; padding-bottom: .6rem; border-bottom: 2px solid var(--gold); display: inline-block; }
.side-box ul li { padding: .5rem 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.side-box ul li:last-child { border-bottom: none; }
.side-box ul li a:hover { color: var(--gold-dark); }
.side-box .meta { color: var(--muted); font-size: .85rem; }
.side-cta {
  background: linear-gradient(135deg, var(--dark), var(--dark-3)); color: #fff;
  text-align: center;
}
.side-cta h3 { color: var(--gold-light); border-color: var(--gold); }
.side-cta p { color: #cfc6ba; font-size: .9rem; margin-bottom: 1.1rem; }

/* ---------- forms ---------- */
.form-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2.2rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form-grid .full { grid-column: 1 / -1; }
label { font-weight: 700; font-size: .88rem; display: block; margin-bottom: .35rem; }
label .req { color: #c0392b; }
input[type=text], input[type=email], input[type=tel], input[type=password], select, textarea {
  width: 100%; padding: .75rem 1rem; border: 1.5px solid var(--line); border-radius: 10px;
  font-family: var(--font); font-size: .95rem; background: #fdfcfa; transition: border .2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); }
textarea { min-height: 140px; resize: vertical; }
.alert { padding: .9rem 1.2rem; border-radius: 10px; margin-bottom: 1.3rem; font-weight: 600; font-size: .93rem; }
.alert-ok { background: #e8f6ec; color: #1e7a3c; border: 1px solid #bfe5cb; }
.alert-err { background: #fdecea; color: #b03a2e; border: 1px solid #f5c6c0; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 2rem; align-items: start; }
.info-tile { display: flex; gap: 1rem; align-items: flex-start; padding: 1.1rem 0; border-bottom: 1px dashed var(--line); }
.info-tile:last-child { border-bottom: none; }
.info-tile i { width: 42px; height: 42px; border-radius: 10px; background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.info-tile .t { font-weight: 800; font-size: .92rem; }
.info-tile .v { color: var(--muted); font-size: .9rem; direction: ltr; text-align: start; }
.info-tile .v.keep-dir { direction: inherit; }

/* ---------- careers ---------- */
.job { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.7rem; margin-bottom: 1.2rem; }
.job .head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.job h3 { font-size: 1.15rem; }
.job .meta { color: var(--muted); font-size: .85rem; margin-top: .2rem; }
.job .badge { background: #efe7d8; color: var(--gold-dark); font-weight: 700; font-size: .78rem; padding: .25rem .9rem; border-radius: 40px; }
.job .desc { margin-top: 1rem; color: #4c453d; font-size: .93rem; white-space: pre-line; }

/* ---------- footer ---------- */
.site-footer { background: var(--dark); color: #b5aca0; padding: 3.5rem 0 0; margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 2.2rem; padding-bottom: 2.4rem; }
.site-footer h4 { color: #fff; font-size: 1.02rem; margin-bottom: 1.1rem; position: relative; padding-bottom: .5rem; }
.site-footer h4::after { content:''; position: absolute; bottom: 0; inset-inline-start: 0; width: 38px; height: 2.5px; background: var(--gold); border-radius: 2px; }
.site-footer p, .site-footer li { font-size: .89rem; }
.site-footer li { padding: .3rem 0; }
.site-footer a:hover { color: var(--gold-light); }
.site-footer .f-logo { height: 62px; border-radius: 10px; margin-bottom: 1rem; }
.socials { display: flex; gap: .6rem; margin-top: 1rem; }
.socials a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; color: #fff; transition: all .25s; }
.socials a:hover { background: var(--gold); transform: translateY(-3px); }
.copyright { border-top: 1px solid rgba(255,255,255,.08); padding: 1.1rem 0; text-align: center; font-size: .83rem; }
.copyright .container { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }

/* ---------- floating buttons ---------- */
.float-wa {
  position: fixed; bottom: 1.5rem; inset-inline-end: 1.5rem; z-index: 950;
  background: #25d366; color: #fff; width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 1.7rem;
  box-shadow: 0 10px 26px rgba(37,211,102,.45); transition: transform .25s;
}
.float-wa:hover { transform: scale(1.1); }

/* ---------- mobile bottom action bar ---------- */
.mob-cta {
  display: none; position: fixed; bottom: 0; inset-inline: 0; z-index: 960;
  background: rgba(20, 16, 12, .97); backdrop-filter: blur(10px);
  border-top: 1px solid rgba(201,160,90,.35);
  grid-template-columns: 1fr 1fr 1fr;
  padding: .45rem .6rem calc(.45rem + env(safe-area-inset-bottom));
  gap: .5rem;
}
.mob-cta a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .1rem; padding: .4rem 0; border-radius: 12px; color: #e9e2d7;
  font-size: .72rem; font-weight: 700;
}
.mob-cta a i { font-size: 1.15rem; color: var(--gold-light); }
.mob-cta a.wa i { color: #25d366; }
.mob-cta a.q {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #fff;
  box-shadow: 0 6px 16px rgba(201,160,90,.35);
}
.mob-cta a.q i { color: #fff; }

/* ---------- reveal animation ---------- */
@media (prefers-reduced-motion: no-preference) {
  .will-reveal { opacity: 0; transform: translateY(22px); transition: opacity .55s ease, transform .55s ease; }
  .will-reveal.revealed { opacity: 1; transform: none; }
}

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; background: rgba(10,8,6,.92); z-index: 1000; display: none; align-items: center; justify-content: center; padding: 2rem; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92%; max-height: 88vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lightbox .close { position: absolute; top: 1.2rem; inset-inline-end: 1.6rem; color: #fff; font-size: 2.2rem; cursor: pointer; background: none; border: none; }

/* ---------- filter pills ---------- */
.pills { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; margin-bottom: 2.4rem; }
.pill { border: 1.5px solid var(--line); background: var(--white); border-radius: 40px; padding: .42rem 1.25rem; font-weight: 700; font-size: .87rem; color: var(--muted); transition: all .2s; }
.pill:hover, .pill.active { background: var(--dark); color: var(--gold-light); border-color: var(--dark); }

/* ---------- mission/vision ---------- */
.mv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
.mv-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem; border-top: 4px solid var(--gold); }
.mv-card h3 { display: flex; align-items: center; gap: .6rem; margin-bottom: .8rem; }
.mv-card h3 i { color: var(--gold-dark); }
.about-cols { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.6rem; align-items: center; }
.about-cols .img-stack { position: relative; }
.about-cols .img-stack img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.about-cols .img-stack .badge-exp {
  position: absolute; bottom: -1.2rem; inset-inline-start: -1rem;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #fff;
  border-radius: var(--radius); padding: 1.1rem 1.5rem; font-weight: 800; text-align: center;
  box-shadow: var(--shadow-lg);
}
.about-cols .img-stack .badge-exp .n { font-size: 1.9rem; line-height: 1; }
.about-cols .img-stack .badge-exp .t { font-size: .78rem; font-weight: 600; }
.checks li { padding: .4rem 0; font-weight: 600; }
.checks li i { color: var(--gold-dark); margin-inline-end: .6rem; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .grid-4, .clients-grid { grid-template-columns: repeat(3, 1fr); }
  .div-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .detail-wrap, .contact-grid, .about-cols { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-inline-end: none; }
  .gallery.gallery-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 800px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .container { width: 90%; }
  .mob-cta { display: grid; }
  .float-wa { display: none; }
  .grid-3, .grid-2, .mv-grid { grid-template-columns: 1fr; }
  .grid-4, .clients-grid { grid-template-columns: repeat(2, 1fr); }
  .div-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: flex; }
  .main-nav {
    display: none; position: absolute; top: 100%; inset-inline: 0;
    background: var(--dark-2); flex-direction: column; padding: 1.2rem 6% 1.5rem;
    align-items: flex-start; gap: .9rem; box-shadow: 0 20px 30px rgba(0,0,0,.4);
    max-height: calc(100vh - 80px); overflow-y: auto;
  }
  .main-nav.open { display: flex; }
  .main-nav a { font-size: 1.02rem; width: 100%; padding: .5rem 0; border-bottom: 1px solid rgba(255,255,255,.06); }
  .main-nav a::after { display: none; }
  .main-nav .nav-cta { border: none; text-align: center; margin-top: .4rem; }
  .main-nav .lang-btn { text-align: center; border-bottom: none; }

  /* hero: centered, cleaner */
  .hero { padding: 4rem 0 5.6rem; text-align: center; }
  .hero-inner { margin-inline: auto; }
  .hero .kicker { font-size: .68rem; letter-spacing: 1.6px; padding: .28rem .9rem; }
  .hero .btn { display: block; width: min(100%, 340px); margin: 0 auto .75rem; }
  .btn-outline { margin-inline-start: 0; }

  .topbar .tb-group.tb-hide-sm { display: none; }
  .gallery.gallery-4 { grid-template-columns: repeat(2, 1fr); }

  /* swipeable edge-to-edge carousels (homepage) — % based so RTL + scrollbars stay exact */
  .scroll-x {
    display: flex !important; grid-template-columns: none !important;
    overflow-x: auto; scroll-snap-type: x mandatory;
    gap: .9rem; margin-inline: -5.55%;
    padding-inline: 5.55%; padding-bottom: 1rem;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .scroll-x::-webkit-scrollbar { display: none; }
  .scroll-x > * { flex: 0 0 78%; scroll-snap-align: center; }
  .grid-4.scroll-x > * { flex-basis: 64%; }
  .clients-grid.scroll-x { padding-bottom: .6rem; }
  .clients-grid.scroll-x > * { flex: 0 0 44%; }
  .div-grid.scroll-x > * { flex: 0 0 44%; }
  .div-grid.scroll-x { padding-bottom: .6rem; }
  .scroll-x .card { box-shadow: 0 6px 22px rgba(20,16,12,.12); }

  /* prevent iOS zoom-on-focus */
  input[type=text], input[type=email], input[type=tel], input[type=password], select, textarea { font-size: 16px; }
}
@media (max-width: 520px) {
  .container { width: 90%; }
  .section { padding: 2.8rem 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; text-align: center; }
  .site-footer h4::after { inset-inline-start: 50%; transform: translateX(-50%); }
  [dir="rtl"] .site-footer h4::after { transform: translateX(50%); }
  .site-footer .f-logo { margin-inline: auto; }
  .socials { justify-content: center; }
  .site-footer .footer-grid > div:first-child .btn { margin-inline: auto; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .topbar { font-size: .74rem; padding: .35rem 0; }
  .topbar .container { justify-content: center; text-align: center; }
  .tb-mail { display: none; }
  .site-header .container { padding: .5rem 0; }
  .brand { gap: .55rem; }
  .brand img { height: 42px; }
  .brand .b-name { font-size: .95rem; }
  .brand .b-sub { font-size: .58rem; letter-spacing: .2px; }

  /* hero */
  .hero { padding: 3.2rem 0 4.6rem; }
  .hero h1 { font-size: 1.72rem; line-height: 1.28; }
  .hero p { font-size: .94rem; margin-bottom: 1.5rem; }
  .btn { padding: .78rem 1.5rem; font-size: .95rem; }

  /* stats: compact premium 2x2 */
  .stats-strip { margin-top: -2.4rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; border-radius: 16px; }
  .stat { padding: 1rem .5rem .9rem; border-inline-end: none; position: relative; }
  .stat:nth-child(odd)::after {
    content: ''; position: absolute; inset-inline-end: 0; top: 22%; height: 56%;
    width: 1px; background: var(--line);
  }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .stat .num { font-size: 1.55rem; }
  .stat .lbl { font-size: .72rem; }

  /* section rhythm */
  .sec-head { margin-bottom: 1.8rem; }
  .sec-head .kicker { font-size: .68rem; letter-spacing: 1.8px; }
  .sec-head h2 { font-size: 1.42rem; }
  .sec-head p { font-size: .88rem; }
  .sec-head .bar { margin-top: .7rem; }

  /* cards */
  .card { border-radius: 16px; }
  .card .body { padding: 1rem 1.05rem 1.2rem; }
  .card h3 { font-size: .99rem; }
  .card p { font-size: .85rem; }
  .icon-badge { width: 44px; height: 44px; font-size: 1.1rem; margin-bottom: .7rem; }
  .testi { padding: 1.4rem 1.2rem; }
  .testi p { font-size: .88rem; }

  .form-card { padding: 1.4rem 1.1rem; border-radius: 16px; }
  .div-grid { grid-template-columns: 1fr 1fr; gap: .7rem; }
  .div-card { padding: 1.05rem .7rem; border-radius: 12px; }
  .div-card i { font-size: 1.4rem; margin-bottom: .45rem; }
  .div-card h3 { font-size: .88rem; }
  .div-card p { font-size: .68rem; }
  .clients-grid { gap: .6rem; }
  .client-chip { font-size: .8rem; padding: .8rem .5rem; min-height: 56px; }
  .pills { gap: .45rem; }
  .pill { padding: .35rem 1rem; font-size: .8rem; }

  .page-hero { padding: 2.6rem 0 2.3rem; }
  .page-hero .crumbs { font-size: .78rem; }

  .about-cols { gap: 1.8rem; }
  .about-cols .img-stack .badge-exp { padding: .8rem 1.1rem; inset-inline-start: .4rem; bottom: -.9rem; }
  .about-cols .img-stack .badge-exp .n { font-size: 1.4rem; }
  .checks li { font-size: .9rem; }
  .job { padding: 1.2rem 1rem; }
  .job h3 { font-size: 1.02rem; }
  .copyright { padding-bottom: .9rem; }
  .copyright .container { justify-content: center; }
  .kv { grid-template-columns: 1fr; gap: 0 0; }
  .kv dt { margin-top: .5rem; }
  .side-box { padding: 1.3rem 1.1rem; }
  .detail-main h2 { font-size: 1.25rem; }
}
@media (max-width: 380px) {
  .grid-4, .clients-grid, .gallery, .gallery.gallery-4, .div-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .brand .b-sub { display: none; }
  .hero h1 { font-size: 1.55rem; }
}

/* ---------- RTL tweaks ---------- */
[dir="rtl"] body, [dir="rtl"] { letter-spacing: 0 !important; }
[dir="rtl"] .hero .kicker, [dir="rtl"] .sec-head .kicker { letter-spacing: 0; }
