/* ==========================================================================
   CMS Hero — Reusable page hero section
   Prefix: cms-hero-
   ========================================================================== */

.cms-hero {
  position: relative;
  padding: 160px 0 80px;
  background: linear-gradient(135deg, var(--color-primary, #1E5C9B) 0%, var(--color-deep-blue, #0B1F36) 100%);
  overflow: hidden;
}

.cms-hero-bg {
  position: absolute;
  top: 50%;
  right: 18%;
  transform: translateY(-50%);
  width: 400px;
  height: 400px;
  pointer-events: none;
  opacity: 1;
}

.cms-hero-motif {
  width: 100%;
  height: 100%;
}

.cms-hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.cms-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 24px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.cms-hero-title {
  font-family: var(--font-heading, 'Inter', system-ui, sans-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
}

.cms-hero-desc {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.7;
  margin: 0 0 32px;
  max-width: 600px;
}

/* --- Stats row --- */

.cms-hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
}

.cms-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.cms-hero-stat-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-gold, #C4A35A);
  line-height: 1;
  min-width: 2ch;
  animation: cms-hero-pulse 1.8s ease-in-out infinite;
}

.cms-hero-stat-num:not(:empty) {
  animation: none;
}

.cms-hero-stat-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 4px;
}

.cms-hero-stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.12);
}

@keyframes cms-hero-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* --- No-stats variant (desc has no bottom margin if no stats follow) --- */

.cms-hero-desc:last-child {
  margin-bottom: 0;
}

/* --- Responsive --- */

@media (max-width: 768px) {
  .cms-hero {
    padding: 70px 0 50px;
  }

  .cms-hero-bg {
    right: 5%;
    width: 280px;
    height: 280px;
    opacity: 0.5;
  }

  .cms-hero-stats {
    flex-wrap: wrap;
    gap: 16px;
  }
}

/* --- RTL --- */

[dir="rtl"] .cms-hero-content {
  text-align: right;
}

[dir="rtl"] .cms-hero-stat {
  align-items: flex-end;
}

[dir="rtl"] .cms-hero-bg {
  right: auto;
  left: 18%;
}

@media (max-width: 768px) {
  [dir="rtl"] .cms-hero-bg {
    left: 5%;
  }
}
