/* ==========================================================================
   MATSUYA R&D - QUICK STATS BAR COMPONENT (OPTION 2: HIGH-TECH GLASSBAR)
   Namespace: .mrd-stats-*
   ========================================================================== */

.mrd-stats-wrapper {
  position: relative;
  z-index: 20;
  transform: translateY(-50%);
  margin-top: 0;
  margin-bottom: -60px;
  background: rgba(10, 37, 64, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 159, 227, 0.45);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0, 20, 50, 0.42), 0 0 30px rgba(0, 159, 227, 0.22);
  overflow: visible;
}

.mrd-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
}

@media (max-width: 1100px) {
  .mrd-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .mrd-stats-col:nth-child(2) {
    border-right: none !important;
  }
  .mrd-stats-col:nth-child(1),
  .mrd-stats-col:nth-child(2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }
}

@media (max-width: 640px) {
  .mrd-stats-grid {
    grid-template-columns: 1fr;
  }
  .mrd-stats-wrapper {
    transform: none;
    margin-top: 24px;
    margin-bottom: 40px;
  }
  .mrd-stats-col:not(:last-child) {
    border-right: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  }
}

.mrd-stats-col {
  padding: 28px 20px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: left;
  color: #ffffff;
  position: relative;
  cursor: pointer;
  transition: background 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}

.mrd-stats-col:first-child {
  border-top-left-radius: 18px;
  border-bottom-left-radius: 18px;
}

.mrd-stats-col:last-child {
  border-top-right-radius: 18px;
  border-bottom-right-radius: 18px;
}

.mrd-stats-col:not(:last-child) {
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.mrd-stats-col:hover {
  background: rgba(0, 159, 227, 0.22);
  transform: translateY(-4px);
  box-shadow: inset 0 0 25px rgba(56, 189, 248, 0.25);
  z-index: 30;
}

/* Image Thumbnail Frame in Glass Bar */
.mrd-stats-img-frame {
  width: 62px;
  height: 62px;
  border-radius: 12px;
  border: 1.5px solid rgba(56, 189, 248, 0.5);
  box-shadow: 0 4px 16px rgba(0, 159, 227, 0.35);
  overflow: hidden;
  background: #000000;
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}

.mrd-stats-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.mrd-stats-col:hover .mrd-stats-img-frame {
  border-color: #38bdf8;
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.65);
  transform: scale(1.12) rotate(-2deg);
}

.mrd-stats-col:hover .mrd-stats-img {
  transform: scale(1.15);
}

/* Right Content Stack */
.mrd-stats-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.mrd-stats-num {
  font-size: 36px;
  font-weight: 900;
  color: #38bdf8;
  text-shadow: 0 0 18px rgba(56, 189, 248, 0.55);
  line-height: 1.1;
  margin-bottom: 3px;
  letter-spacing: -0.5px;
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 5px;
}

.mrd-stats-unit {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: none;
}

.mrd-stats-label {
  font-size: 14.5px;
  font-weight: 600;
  color: #e0f2fe;
  line-height: 1.35;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   INTERACTIVE HOVER POPOVER PREVIEW CARD
   ========================================================================== */

.mrd-stats-popover {
  position: absolute;
  bottom: calc(100% + 18px);
  left: 50%;
  transform: translateX(-50%) translateY(14px) scale(0.9);
  width: 280px;
  background: rgba(6, 24, 44, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(56, 189, 248, 0.65);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 22px 50px rgba(0, 10, 30, 0.7), 0 0 35px rgba(0, 159, 227, 0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), 
              transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), 
              visibility 0.35s ease;
  z-index: 100;
  text-align: left;
}

/* Pointer Arrow */
.mrd-stats-popover::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 9px 9px 0 9px;
  border-style: solid;
  border-color: rgba(6, 24, 44, 0.97) transparent transparent transparent;
}

.mrd-stats-col:hover .mrd-stats-popover {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
}

.mrd-stats-pop-img-box {
  width: 100%;
  height: 145px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  background: #000000;
}

.mrd-stats-pop-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.mrd-stats-col:hover .mrd-stats-pop-img {
  transform: scale(1.08);
}

.mrd-stats-pop-num {
  font-size: 22px;
  font-weight: 900;
  color: #38bdf8;
  text-shadow: 0 0 14px rgba(56, 189, 248, 0.6);
  margin-bottom: 3px;
}

.mrd-stats-pop-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 6px 0;
}

.mrd-stats-pop-desc {
  font-size: 12.5px;
  font-weight: 400;
  color: #cbd5e1;
  line-height: 1.45;
  margin: 0;
}
