/* nilestartrade.com — additions layered on top of the blockscape theme.
   Uses the theme's own colour tokens so everything matches. */

:root {
  --nst-primary: var(--wp--preset--color--primary, #3773fe);
  --nst-heading: var(--wp--preset--color--heading, #0d173b);
  --nst-body: rgba(13, 23, 59, .8);
  --nst-section: rgba(13, 23, 59, .04);
  --nst-line: rgba(13, 23, 59, .12);
  --nst-wa: #25d366;
  --nst-radius: 12px;
}

/* ---------------------------------------------------------------
   Floating contact dock (WhatsApp + call)
   Bottom-left: on an RTL page that is the far corner, so it never
   sits over the start of a line of Arabic text.
   --------------------------------------------------------------- */
.nst-dock {
  position: fixed;
  inset-block-end: 18px;
  inset-inline-end: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.nst-dock a {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 6px 18px rgba(13, 23, 59, .28);
  transition: transform .18s ease, box-shadow .18s ease;
  text-decoration: none;
}

.nst-dock a:hover,
.nst-dock a:focus-visible {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 10px 24px rgba(13, 23, 59, .34);
}

.nst-dock a:focus-visible { outline: 3px solid var(--nst-primary); outline-offset: 3px; }
.nst-dock svg { width: 27px; height: 27px; fill: currentColor; }
.nst-dock .nst-wa  { background: var(--nst-wa); }
.nst-dock .nst-tel { background: var(--nst-primary); }

/* Label that slides out on hover (desktop only) */
.nst-dock a::after {
  content: attr(data-label);
  position: absolute;
  inset-inline-end: 64px;
  background: var(--nst-heading);
  color: #fff;
  font-size: 14px;
  white-space: nowrap;
  padding: 7px 12px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.nst-dock a:hover::after { opacity: 1; }

@media (hover: none) {
  .nst-dock a::after { display: none; }
}

@media (max-width: 600px) {
  .nst-dock { inset-block-end: 14px; inset-inline-end: 14px; gap: 8px; }
  .nst-dock a { width: 50px; height: 50px; }
}

@media print { .nst-dock { display: none; } }

/* ---------------------------------------------------------------
   Contact page
   --------------------------------------------------------------- */
.nst-wrap {
  max-width: 1100px;
  margin-inline: auto;
  padding: 48px 24px 64px;
}

.nst-wrap h1 {
  color: var(--nst-heading);
  font-size: clamp(30px, 5vw, 46px);
  margin: 0 0 10px;
  line-height: 1.25;
}

.nst-lede {
  color: var(--nst-body);
  font-size: 18px;
  line-height: 1.9;
  margin: 0 0 36px;
  max-width: 62ch;
}

.nst-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 34px;
  align-items: start;
}

@media (max-width: 860px) {
  .nst-grid { grid-template-columns: 1fr; gap: 28px; }
}

.nst-card {
  background: #fff;
  border: 1px solid var(--nst-line);
  border-radius: var(--nst-radius);
  padding: 26px;
}

.nst-card h2 {
  color: var(--nst-heading);
  font-size: 22px;
  margin: 0 0 18px;
}

/* --- form --- */
.nst-field { margin-bottom: 16px; }

.nst-field label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--nst-heading);
  margin-bottom: 7px;
}

.nst-field .req { color: #cf2e2e; }

.nst-field input,
.nst-field select,
.nst-field textarea {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 16px;               /* 16px stops iOS zooming on focus */
  color: var(--nst-heading);
  background: #fff;
  border: 1px solid var(--nst-line);
  border-radius: 9px;
  padding: 12px 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.nst-field textarea { min-height: 128px; resize: vertical; }

.nst-field input:focus,
.nst-field select:focus,
.nst-field textarea:focus {
  outline: none;
  border-color: var(--nst-primary);
  box-shadow: 0 0 0 3px rgba(55, 115, 254, .18);
}

.nst-field input:user-invalid,
.nst-field textarea:user-invalid { border-color: #cf2e2e; }

.nst-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--nst-primary);
  color: #fff;
  border: 0;
  border-radius: 9px;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  padding: 14px 30px;
  cursor: pointer;
  transition: background .15s ease, transform .12s ease;
}

.nst-btn:hover { background: #2a5fd8; }
.nst-btn:active { transform: translateY(1px); }
.nst-btn[disabled] { opacity: .6; cursor: progress; }
.nst-btn svg { width: 20px; height: 20px; fill: currentColor; }
.nst-btn-wa { background: var(--nst-wa); }
.nst-btn-wa:hover { background: #1fb457; }

.nst-note {
  font-size: 14px;
  color: var(--nst-body);
  margin-top: 14px;
  line-height: 1.7;
}

.nst-status {
  margin-top: 16px;
  padding: 13px 16px;
  border-radius: 9px;
  font-size: 15px;
  line-height: 1.7;
  display: none;
}

.nst-status.show { display: block; }
.nst-status.ok   { background: rgba(0, 208, 132, .12); color: #0a6b48; }
.nst-status.err  { background: rgba(207, 46, 46, .10); color: #a11d1d; }

/* --- direct contact list --- */
.nst-list { list-style: none; margin: 0; padding: 0; }

.nst-list li {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 13px 0;
  border-bottom: 1px solid var(--nst-line);
}

.nst-list li:last-child { border-bottom: 0; }

.nst-list .ico {
  flex: 0 0 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(55, 115, 254, .12);
  display: grid;
  place-items: center;
}

.nst-list .ico svg { width: 19px; height: 19px; fill: var(--nst-primary); }
.nst-list b { display: block; color: var(--nst-heading); font-size: 15px; margin-bottom: 3px; }

.nst-list a {
  color: var(--nst-primary);
  text-decoration: none;
  font-size: 16px;
  direction: ltr;
  display: inline-block;
  unicode-bidi: embed;
}

.nst-list a:hover { text-decoration: underline; }
.nst-list .muted { color: var(--nst-body); font-size: 15px; }

/* ---------------------------------------------------------------
   Branch maps
   --------------------------------------------------------------- */
.nst-map {
  margin-top: 14px;
  border-radius: var(--nst-radius);
  overflow: hidden;
  border: 1px solid var(--nst-line);
  background: var(--nst-section);
  line-height: 0;
}

.nst-map iframe {
  width: 100%;
  height: 260px;
  border: 0;
  display: block;
}

@media (max-width: 600px) {
  .nst-map iframe { height: 210px; }
}

.nst-maps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 22px;
  max-width: 1100px;
  margin: 8px auto 0;
  padding: 0 24px;
}

.nst-maps-grid h3 {
  color: var(--nst-heading);
  font-size: 19px;
  margin: 0 0 6px;
}

.nst-maps-grid p {
  color: var(--nst-body);
  font-size: 15px;
  line-height: 1.8;
  margin: 0 0 4px;
}

.nst-maps-grid .tel {
  direction: ltr;
  unicode-bidi: embed;
  display: inline-block;
  color: var(--nst-primary);
  text-decoration: none;
  font-size: 15px;
}

.nst-maps-grid .tel:hover { text-decoration: underline; }

/* ---------------------------------------------------------------
   Small global polish
   --------------------------------------------------------------- */

/* Visible keyboard focus everywhere (theme had none) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--nst-primary);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Phone numbers must render left-to-right inside RTL text */
a[href^="tel:"] {
  direction: ltr;
  unicode-bidi: embed;
  display: inline-block;
}

/* Stop images from overflowing their column on small screens */
img { max-width: 100%; height: auto; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nst-dock a { transition: none; }
}
