/* ============================================================
   HAMATE REPORT WIDGET — CSS
   يطابق تصميم قسم التقرير الفني في index.html
   ============================================================ */

/* ── Variables (موروثة من الثيم) ── */
.hmrep-wrap {
  --rep-primary:  #0B1F33;
  --rep-gold:     #C9A24D;
  --rep-gold-2:   #E5C677;
  --rep-green:    #28C76F;
  --rep-white:    #FFFFFF;
  --rep-light:    #F5F7FA;
  --rep-border:   #E5E7EB;
  --rep-muted:    #6B7280;
  --rep-shadow:   0 18px 48px rgba(11,31,51,.10);
  --rep-shadow-strong: 0 30px 80px rgba(11,31,51,.18);
  --rep-radius:   18px;
  font-family: "Tajawal", sans-serif;
}

/* ── Background Variants ── */
.hmrep-bg-white { background: #ffffff; }
.hmrep-bg-light { background: var(--rep-light); }
.hmrep-bg-dark  {
  background:
    radial-gradient(circle at 10% 10%, rgba(201,162,77,.15), transparent 30%),
    linear-gradient(135deg, var(--rep-primary), #061421);
  color: white;
  position: relative;
}
.hmrep-bg-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: .45;
  pointer-events: none;
}

/* ── Container ── */
.hmrep-container {
  width: min(1200px, calc(100% - 32px));
  margin-inline: auto;
  padding-block: 72px;
  position: relative;
  z-index: 2;
}

/* ── Stats Strip ── */
.hmrep-stats-strip {
  background: var(--rep-primary);
  position: relative;
  z-index: 3;
}

.hmrep-stats-strip .hmrep-container {
  padding-block: 0;
}

.hmrep-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-inline: 1px solid rgba(255,255,255,.08);
}

.hmrep-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 28px 20px;
  border-left: 1px solid rgba(255,255,255,.08);
  transition: background .25s;
}

.hmrep-stat:first-child { border-left: none; }

.hmrep-stat:hover {
  background: rgba(201,162,77,.08);
}

.hmrep-stat-icon {
  font-size: 22px;
  color: var(--rep-gold);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(201,162,77,.12);
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}

.hmrep-stat-number {
  font-size: 30px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

.hmrep-stat-label {
  font-size: 13px;
  color: rgba(255,255,255,.65);
  font-weight: 600;
}

/* ── Main Box ── */
.hmrep-box {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 56px;
  align-items: center;
}

.hmrep-box.hmrep-reverse {
  direction: ltr;
}
.hmrep-box.hmrep-reverse .hmrep-copy,
.hmrep-box.hmrep-reverse .hmrep-visual {
  direction: rtl;
}

/* ── Visual (Left Column) ── */
.hmrep-visual {
  display: grid;
  grid-template-columns: 175px 1fr;
  gap: 18px;
  align-items: start;
}

/* ── Report Cover Card ── */
.hmrep-cover {
  height: 280px;
  border-radius: 16px;
  background: linear-gradient(145deg,
    #fff 0% 52%,
    var(--rep-primary) 52% 78%,
    var(--rep-gold) 78% 82%,
    #fff 82%
  );
  border: 1px solid var(--rep-border);
  box-shadow: var(--rep-shadow-strong);
  padding: 22px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hmrep-cover-stripe {
  position: absolute;
  top: 0;
  right: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(to bottom, var(--rep-gold), var(--rep-gold-2));
}

.hmrep-cover-logo {
  width: 72px;
  height: auto;
  object-fit: contain;
  margin-bottom: 8px;
}

.hmrep-cover-logo-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--rep-primary);
  color: var(--rep-gold);
  font-size: 26px;
  font-weight: 900;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
}

.hmrep-cover-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hmrep-cover-title {
  color: var(--rep-primary);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.45;
  margin-bottom: 4px;
}

.hmrep-cover-sub {
  color: var(--rep-muted);
  font-size: 12px;
  font-weight: 600;
}

.hmrep-cover-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--rep-border);
  font-size: 12px;
}

.hmrep-cover-footer span {
  color: var(--rep-muted);
}

.hmrep-cover-footer strong {
  color: var(--rep-primary);
  font-weight: 900;
}

/* Stamp badge */
.hmrep-stamp {
  position: absolute;
  bottom: 22px;
  left: 22px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--rep-gold);
  background: rgba(201,162,77,.10);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}

.hmrep-stamp span {
  font-size: 16px;
  color: var(--rep-gold);
  font-weight: 900;
  line-height: 1;
}

.hmrep-stamp small {
  font-size: 9px;
  color: var(--rep-gold);
  font-weight: 900;
}

/* ── Data Cards Grid ── */
.hmrep-data-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.hmrep-data-card {
  padding: 16px;
  background: white;
  border: 1px solid var(--rep-border);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(11,31,51,.05);
  transition: .25s ease;
  position: relative;
  overflow: hidden;
}

.hmrep-data-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 3px;
  background: var(--rep-gold);
  transition: .3s ease;
}

.hmrep-data-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--rep-shadow);
  border-color: rgba(201,162,77,.35);
}

.hmrep-data-card:hover::before {
  width: 100%;
}

/* Dark bg version */
.hmrep-bg-dark .hmrep-data-card {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.12);
}

.hmrep-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(201,162,77,.12);
  color: var(--rep-gold);
  display: grid;
  place-items: center;
  font-size: 17px;
  margin-bottom: 10px;
}

.hmrep-card-label {
  display: block;
  color: var(--rep-primary);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.hmrep-bg-dark .hmrep-card-label {
  color: rgba(255,255,255,.55);
}

.hmrep-card-value {
  color: var(--rep-muted);
  font-size: 14px;
  line-height: 1.65;
  font-weight: 600;
}

.hmrep-bg-dark .hmrep-card-value {
  color: rgba(255,255,255,.82);
}

.hmrep-status-good {
  color: var(--rep-green) !important;
  font-weight: 900;
}

/* Risk Bar */
.hmrep-risk-bar {
  margin-top: 10px;
  height: 8px;
  border-radius: 99px;
  background: #E5E7EB;
  overflow: hidden;
  position: relative;
}

.hmrep-bg-dark .hmrep-risk-bar {
  background: rgba(255,255,255,.12);
}

.hmrep-risk-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .8s ease;
}

.hmrep-risk-pct {
  position: absolute;
  top: -18px;
  left: 0;
  font-size: 11px;
  color: var(--rep-muted);
  font-weight: 900;
}

/* ── Copy (Right Column) ── */
.hmrep-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hmrep-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--rep-gold);
  font-weight: 900;
  font-size: 14px;
}

.hmrep-kicker::before {
  content: "";
  width: 34px;
  height: 2px;
  background: var(--rep-gold);
  flex-shrink: 0;
}

.hmrep-bg-dark .hmrep-kicker { color: var(--rep-gold); }

.hmrep-heading {
  font-size: 42px;
  font-weight: 900;
  line-height: 1.25;
  color: var(--rep-primary);
  letter-spacing: -.5px;
  margin: 0;
}

.hmrep-bg-dark .hmrep-heading { color: #fff; }

.hmrep-highlight {
  color: var(--rep-gold);
}

.hmrep-desc {
  color: var(--rep-muted);
  font-size: 17px;
  line-height: 1.9;
  max-width: 560px;
  margin: 0;
}

.hmrep-bg-dark .hmrep-desc { color: rgba(255,255,255,.72); }

/* ── Feature List ── */
.hmrep-features {
  list-style: none;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.hmrep-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--rep-primary);
}

.hmrep-bg-dark .hmrep-features li { color: rgba(255,255,255,.88); }

.hmrep-feat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rep-gold);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(201,162,77,.20);
}

/* ── CTA Button ── */
.hmrep-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--rep-gold), var(--rep-gold-2));
  color: var(--rep-primary);
  text-decoration: none;
  box-shadow: 0 16px 36px rgba(201,162,77,.28);
  transition: .25s ease;
  align-self: flex-start;
}

.hmrep-cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 54px rgba(201,162,77,.38);
  color: var(--rep-primary);
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .hmrep-box {
    grid-template-columns: 1fr;
  }

  .hmrep-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hmrep-visual {
    grid-template-columns: 160px 1fr;
  }

  .hmrep-heading {
    font-size: 34px;
  }
}

@media (max-width: 680px) {
  .hmrep-container {
    padding-block: 50px;
  }

  .hmrep-visual {
    grid-template-columns: 1fr;
  }

  .hmrep-cover {
    height: 200px;
  }

  .hmrep-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hmrep-heading {
    font-size: 28px;
  }

  .hmrep-data-grid {
    grid-template-columns: 1fr;
  }

  .hmrep-cta-btn {
    width: 100%;
    justify-content: center;
  }
}
