:root {
  --bg: #ecf0f1;
  --ink: #111827;
  --muted: #4b5563;
  --blue: #0d6efd;
  --blue-deep: #0759d1;
  --line: rgba(17, 24, 39, 0.12);
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, "Noto Sans Arabic", "Noto Kufi Arabic", Tahoma, sans-serif;
}

img {
  display: block;
  max-width: 100%;
}

.hero {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  background-image: url("https://qamaralfajr.com/System/production/upload/exchange_view/13.png");
  background-position: center;
  background-size: cover;
}

.hero__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(236, 240, 241, 0.12), rgba(236, 240, 241, 0.2));
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr minmax(180px, 320px) 1fr;
  align-items: start;
  gap: 24px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 20px;
}

.hero__time {
  display: grid;
  place-items: center;
  gap: 2px;
  color: #0f172a;
  font-size: 25px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
}

.clock {
  font-variant-numeric: tabular-nums;
}

.brand {
  justify-self: end;
  width: min(50%, 210px);
  min-width: 150px;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: -50px auto 0;
  position: relative;
  z-index: 2;
}

.rates-card {
  padding: 0 0 8px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.rates-table {
  width: 100%;
  min-width: 660px;
  border-collapse: separate;
  border-spacing: 0 10px;
}

.rates-table th {
  padding: 18px 20px;
  color: #0f172a;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.rates-table th span {
  display: block;
  margin-top: 5px;
}

.rates-table td {
  padding: 0 10px;
  text-align: center;
  vertical-align: middle;
}

.rates-table tbody tr {
  filter: drop-shadow(0 8px 14px rgba(15, 23, 42, 0.04));
}

.rate-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 90%;
  min-height: 50px;
  border-radius: 20px;
  background: linear-gradient(180deg, var(--blue), var(--blue-deep));
  color: #fff;
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 8px 16px rgba(13, 110, 253, 0.2);
}

.flag-cell {
  width: 150px;
}

.flag {
  width: 70px;
  height: 48px;
  margin: 0 auto;
  object-fit: contain;
}

.currency {
  min-width: 170px;
  font-size: 30px;
  font-weight: 800;
  white-space: nowrap;
}

.footer {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(280px, 3fr) minmax(260px, 2fr);
  align-items: center;
  gap: 20px;
  min-height: 70px;
  margin-top: 20px;
  padding: 12px max(16px, calc((100vw - 1120px) / 2));
  background: #000;
  color: #fff;
}

.socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.socials a {
  display: inline-flex;
  width: 50px;
  height: 50px;
  align-items: center;
  justify-content: center;
}

.socials img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.address {
  margin: 0;
  font-style: normal;
  line-height: 1.7;
  text-align: center;
}

.address span {
  display: block;
}

.phones {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 10px;
}

.phones ul {
  margin: 0;
  padding-left: 20px;
  line-height: 1.7;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .hero {
    min-height: 210px;
  }

  .hero__content {
    grid-template-columns: 1fr 1fr;
    width: min(100% - 20px, 520px);
    gap: 12px;
  }

  .hero__spacer {
    display: none;
  }

  .hero__time {
    justify-self: start;
    font-size: 18px;
  }

  .brand {
    min-width: 110px;
    width: 42vw;
  }

  .shell {
    width: calc(100% - 12px);
    margin-top: -42px;
  }

  .rates-table {
    min-width: 0;
    border-spacing: 0 7px;
  }

  .rates-table th {
    padding: 14px 4px;
    font-size: 13px;
  }

  .rates-table td {
    padding: 0 3px;
  }

  .rate-value {
    min-height: 30px;
    border-radius: 20px;
    font-size: clamp(10px, 3.2vw, 12px);
  }

  .flag-cell {
    width: 32px;
  }

  .flag {
    width: 25px;
    height: 18px;
  }

  .currency {
    min-width: 66px;
    font-size: clamp(9px, 2.75vw, 10px);
  }

  .footer {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 16px 18px;
  }

  .phones {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-items: center;
    font-size: 14px;
  }
}
