/* ALSAADITRADE: Trade page (/trade/ and /ar/trade.html). Loaded after about.css and partners.css.
   Logical properties throughout so the Arabic (RTL) page mirrors on its own. */

/* ---------- Services ---------- */
.tr-svc { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.tr-svc__card {
  position: relative; display: flex; flex-direction: column; padding: 36px 30px 32px; border-radius: 22px;
  background: linear-gradient(165deg, #fff 0%, var(--bg-soft) 100%); border: 1px solid var(--line); overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .4s, background .5s;
}
.tr-svc__card::after { content: ""; position: absolute; inset-inline: 30px; bottom: 0; height: 2px; background: var(--teal); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
[dir="rtl"] .tr-svc__card::after { transform-origin: right; }
.tr-svc__card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: transparent; }
.tr-svc__card:hover::after { transform: scaleX(1); }
.tr-svc__n { position: absolute; top: 22px; inset-inline-end: 26px; font-family: "Noto Serif", Georgia, serif; font-style: italic; font-size: 46px; line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(31,127,116,.45); }
.tr-svc__i { width: 54px; height: 54px; border-radius: 16px; background: var(--navy); color: var(--teal); display: grid; place-items: center; margin-bottom: 26px; transition: background .4s, color .4s; }
.tr-svc__card:hover .tr-svc__i { background: var(--teal); color: var(--navy); }
.tr-svc__card h3 { font-size: 19px; margin-bottom: 10px; }
.tr-svc__card p { font-size: 14.5px; color: var(--muted); line-height: 1.75; margin: 0; }
.tr-svc__card--link { background: var(--navy); border-color: var(--navy); }
.tr-svc__card--link h3 { color: var(--white); }
.tr-svc__card--link p { color: #a9b9c7; }
.tr-svc__card--link .tr-svc__i { background: rgba(73,197,182,.15); }
.tr-svc__card--link .tr-svc__n { -webkit-text-stroke-color: rgba(73,197,182,.5); }
.tr-svc__go { margin-top: auto; padding-top: 22px; display: inline-flex; align-items: center; gap: 8px; color: var(--teal); font-size: 14px; font-weight: 500; }
.tr-svc__go .i { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.tr-svc__card--link:hover .tr-svc__go .i { transform: translateX(4px); }
[dir="rtl"] .tr-svc__card--link:hover .tr-svc__go .i { transform: translateX(-4px); }

/* ---------- Product portfolio (dark) ---------- */
.tr-prod { overflow: hidden; }
.tr-prod .container { position: relative; }
.tr-prod__head { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: end; margin-bottom: 40px; }
.tr-prod__head .lead { margin: 0; }

.tr-filter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.tr-filter button {
  font: inherit; font-size: 13.5px; font-weight: 500; color: #c3d0db; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 40px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.14); transition: background .25s, color .25s, border-color .25s;
}
.tr-filter button i { font-style: normal; font-size: 11px; min-width: 22px; padding: 2px 6px; border-radius: 20px; background: rgba(255,255,255,.08); color: #8ea2b3; text-align: center; }
.tr-filter button:hover { border-color: var(--teal); color: var(--white); }
.tr-filter button.is-on { background: var(--teal); border-color: var(--teal); color: var(--navy); }
.tr-filter button.is-on i { background: rgba(7,26,44,.15); color: var(--navy); }
.tr-filter button:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

.tr-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 340px; grid-auto-flow: dense; gap: 18px; }
.tr-card {
  position: relative; display: block; border-radius: 18px; overflow: hidden; isolation: isolate; color: var(--white);
  background: var(--navy-2); box-shadow: 0 30px 60px -40px rgba(0,0,0,.8);
  animation: trIn .6s var(--ease) both;
}
.tr-card--wide { grid-column: span 2; }
.tr-card[hidden] { display: none; }
@keyframes trIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.tr-card__img { position: absolute; inset: 0; z-index: -1; }
.tr-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), filter .6s; filter: saturate(.92); }
.tr-card:hover .tr-card__img img { transform: scale(1.07); filter: saturate(1.05); }
.tr-card__img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,26,44,0) 25%, rgba(7,26,44,.55) 55%, rgba(7,26,44,.96) 100%); transition: background .5s; }
.tr-card:hover .tr-card__img::after { background: linear-gradient(180deg, rgba(7,26,44,.15) 0%, rgba(7,26,44,.7) 45%, rgba(7,26,44,.97) 100%); }
.tr-card__body { position: absolute; inset-inline: 0; bottom: 0; padding: 24px 24px 22px; display: grid; gap: 6px; }
.tr-card__body small { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--teal); font-weight: 600; }
.tr-card__body b { font-size: 18px; line-height: 1.3; font-weight: 600; }
.tr-card__body > span { font-size: 13.5px; line-height: 1.6; color: #c3d0db; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .6s var(--ease), opacity .5s; }
.tr-card:hover .tr-card__body > span, .tr-card:focus-visible .tr-card__body > span { max-height: 120px; opacity: 1; }
.tr-card__body em { font-style: normal; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--teal); margin-top: 4px; }
.tr-card__body em .i { width: 15px; height: 15px; transition: transform .3s var(--ease); }
.tr-card:hover .tr-card__body em .i { transform: translateX(4px); }
[dir="rtl"] .tr-card:hover .tr-card__body em .i { transform: translateX(-4px); }
a.tr-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 1px solid transparent; transition: border-color .4s; z-index: 1; pointer-events: none; }
a.tr-card:hover::before { border-color: rgba(73,197,182,.6); }
a.tr-card:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
@media (hover: none) { .tr-card__body > span { max-height: 120px; opacity: 1; } }

/* Featured brand strip */
.tr-brand {
  display: grid; grid-template-columns: 280px 1fr auto; align-items: center; gap: 36px; margin-top: 40px; padding: 26px 32px;
  border-radius: 20px; background: linear-gradient(100deg, #000 0%, #0b0b0b 40%, rgba(7,26,44,.4) 100%); border: 1px solid rgba(233,105,77,.25);
  transition: border-color .4s, transform .5s var(--ease);
}
.tr-brand:hover { border-color: rgba(233,105,77,.6); transform: translateY(-3px); }
.tr-brand__logo img { width: 100%; height: auto; mix-blend-mode: lighten; }
.tr-brand__text { display: grid; gap: 4px; }
.tr-brand__text small { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: #e9694d; font-weight: 600; }
.tr-brand__text b { color: var(--white); font-size: 20px; font-weight: 600; }
.tr-brand__text span { color: #a9b9c7; font-size: 14.5px; }
.tr-brand__go { display: inline-flex; align-items: center; gap: 8px; color: var(--white); font-weight: 500; font-size: 14px; white-space: nowrap; padding: 12px 20px; border-radius: 40px; border: 1px solid rgba(255,255,255,.25); transition: border-color .3s, background .3s; }
.tr-brand:hover .tr-brand__go { border-color: var(--white); background: rgba(255,255,255,.06); }
.tr-brand__go .i { width: 16px; height: 16px; }

/* ---------- Who we are ---------- */
.tr-p { color: var(--muted); font-size: 15.5px; line-height: 1.85; }
.tr-points { list-style: none; padding: 0; margin: 28px 0 36px; display: flex; flex-wrap: wrap; gap: 10px; }
.tr-points li { display: inline-flex; align-items: center; gap: 9px; padding: 10px 16px; border-radius: 40px; background: var(--bg-soft); border: 1px solid var(--line); font-size: 14px; font-weight: 500; color: var(--navy); }
.tr-points .i { width: 17px; height: 17px; color: var(--teal-dark); }

/* ---------- Partners ---------- */
.tr-plates { margin: 0 0 40px; }
.btn-row.center { justify-content: center; }

/* ---------- Responsive ---------- */
@media (max-width: 1140px) {
  .tr-svc { grid-template-columns: 1fr 1fr; }
  .tr-grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 320px; }
  .tr-brand { grid-template-columns: 220px 1fr; }
  .tr-brand__go { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 960px) {
  .tr-prod__head { grid-template-columns: 1fr; gap: 18px; }
  .tr-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 300px; }
}
@media (max-width: 600px) {
  .tr-svc { grid-template-columns: 1fr; }
  .tr-filter { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 2px 16px 8px; scrollbar-width: none; }
  .tr-filter::-webkit-scrollbar { display: none; }
  .tr-filter button { flex: none; }
  .tr-grid { grid-template-columns: 1fr; grid-auto-rows: 280px; gap: 14px; }
  .tr-card--wide { grid-column: auto; }
  .tr-card__body > span { max-height: 120px; opacity: 1; }
  .tr-brand { grid-template-columns: 1fr; gap: 18px; padding: 24px 20px; }
  .tr-brand__logo { max-width: 240px; }
}
@media (prefers-reduced-motion: reduce) { .tr-card { animation: none; } }
