/* Why M'Cube Pay — benefits section (distinct from How It Works) */

.mcube-why-section {
  --why-bg: #FFFFFF;
  --why-title: #0A1628;
  --why-subtitle: #6B7280;
  --why-card-bg: #F7F5F0;
  --why-card-border: rgba(10, 22, 40, 0.05);
  --why-card-shadow: rgba(10, 22, 40, 0.06);
  --why-heading: #0A1628;
  --why-body: #4B5563;
  --why-btn-border: #0A1628;
  --why-btn-color: #0A1628;
  --why-btn-hover-bg: #0A1628;
  --why-btn-hover-color: #FFFFFF;
  --why-icon-from: #0A1628;
  --why-icon-to: #00C9A7;
  --why-accent: #F5B800;
  --why-detail-bg: #0A1628;

  position: relative;
  padding: 80px var(--mcube-space-page-mobile, 16px) 100px;
  background: var(--why-bg) !important;
  transition: background 0.3s ease;
}

html[data-theme="dark"] .mcube-why-section {
  --why-bg: #070E1A;
  --why-title: #F1F5F9;
  --why-subtitle: #94A3B8;
  --why-card-bg: #111827;
  --why-card-border: rgba(255, 255, 255, 0.08);
  --why-card-shadow: rgba(0, 0, 0, 0.35);
  --why-heading: #E6EDF3;
  --why-body: #9BAAB8;
  --why-btn-border: #00C9A7;
  --why-btn-color: #00C9A7;
  --why-btn-hover-bg: #00C9A7;
  --why-btn-hover-color: #0A1628;
  --why-icon-from: #0A1628;
  --why-icon-to: #00C9A7;
  --why-accent: #F5B800;
  --why-detail-bg: #0A1628;
  background: var(--why-bg) !important;
}

/* Top accent line — marks new section */
.mcube-why-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(200px, 40%);
  height: 3px;
  background: linear-gradient(90deg, transparent, #F5B800, #00C9A7, transparent);
  border-radius: 0 0 4px 4px;
}

.mcube-why-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Header — benefits identity (gold, not teal) */
.mcube-why-header {
  text-align: center;
  margin-bottom: 56px;
}

.mcube-why-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(245, 184, 0, 0.1);
  border: 1px solid rgba(245, 184, 0, 0.3);
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  color: #B8860B;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

html[data-theme="dark"] .mcube-why-eyebrow {
  color: #F5B800;
  background: rgba(245, 184, 0, 0.12);
}

.mcube-why-eyebrow i {
  font-size: 11px;
  color: #F5B800;
}

.mcube-why-title {
  font-family: var(--mcube-font-display, 'Clash Display', sans-serif);
  font-size: clamp(28px, 4vw, 40px);
  color: var(--why-title) !important;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.mcube-why-subtitle {
  text-align: center;
  color: var(--why-subtitle) !important;
  font-size: 18px;
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto;
}

.mcube-why-section .mcube-section-title {
  font-family: var(--mcube-font-display, 'Clash Display', sans-serif);
  font-size: clamp(28px, 4vw, 40px);
  color: var(--why-title) !important;
  text-align: center;
  margin-bottom: 12px;
}

.mcube-why-section .mcube-section-subtitle {
  text-align: center;
  color: var(--why-subtitle) !important;
  font-size: 18px;
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto 48px;
}

.mcube-editorial-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .mcube-editorial-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mcube-editorial-card.mcube-card-2 {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  .mcube-why-section {
    padding: 100px var(--mcube-space-page-desktop, 80px) 120px !important;
  }

  .mcube-editorial-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    align-items: stretch;
  }

  .mcube-editorial-card.mcube-card-2 {
    grid-column: auto;
  }
}

.mcube-editorial-card {
  background: var(--why-card-bg);
  border: 1px solid var(--why-card-border);
  border-radius: 20px;
  padding: 32px 28px 28px;
  box-shadow: 0 2px 16px var(--why-card-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.mcube-editorial-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--why-accent), var(--why-icon-to));
  opacity: 1;
}

.mcube-editorial-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px var(--why-card-shadow);
  border-color: rgba(0, 201, 167, 0.25);
}

.mcube-card-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--why-icon-from), var(--why-icon-to));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  margin-bottom: 20px;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(0, 201, 167, 0.2);
}

.mcube-editorial-card h3 {
  font-family: var(--mcube-font-display, 'Clash Display', sans-serif);
  font-size: clamp(20px, 2.2vw, 24px);
  color: var(--why-heading) !important;
  margin-bottom: 12px;
  line-height: 1.25;
}

.mcube-editorial-card p {
  font-size: 15px;
  color: var(--why-body) !important;
  line-height: 1.65;
  margin-bottom: 24px;
  flex: 1;
}

.mcube-card-expand {
  background: transparent;
  border: 1.5px solid var(--why-btn-border);
  color: var(--why-btn-color);
  padding: 10px 20px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
  margin-top: auto;
  align-self: flex-start;
  font-family: inherit;
}

.mcube-card-expand:hover {
  background: var(--why-btn-hover-bg);
  color: var(--why-btn-hover-color) !important;
  border-color: var(--why-btn-hover-bg);
  transform: translateX(2px);
}

.mcube-card-expand:hover span,
.mcube-card-expand:hover i {
  color: inherit !important;
}

.mcube-card-expand i {
  font-size: 11px;
  transition: transform 0.2s;
}

.mcube-card-expand:hover i {
  transform: translateX(3px);
}

/* Featured middle card accent on desktop */
@media (min-width: 1024px) {
  .mcube-editorial-card.mcube-card-2 {
    border-color: rgba(245, 184, 0, 0.25);
  }

  .mcube-editorial-card.mcube-card-2::before {
    height: 4px;
    background: linear-gradient(90deg, #F5B800, #00C9A7);
  }
}

/* Expandable detail panel */
.mcube-card-detail {
  position: absolute;
  inset: 0;
  background: var(--why-detail-bg);
  color: #fff;
  padding: 32px 28px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  z-index: 2;
}

.mcube-card-detail.open {
  transform: translateY(0);
}

.mcube-detail-content h4 {
  font-family: var(--mcube-font-display, 'Clash Display', sans-serif);
  font-size: 20px;
  color: var(--why-accent);
  margin-bottom: 20px;
  padding-right: 40px;
}

.mcube-detail-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mcube-detail-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
}

.mcube-detail-list i {
  color: #00C9A7;
  font-size: 14px;
  margin-top: 3px;
  flex-shrink: 0;
}

.mcube-detail-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mcube-detail-close:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: rotate(90deg);
}

/* Beat global darkmode !important rules — scoped to this section */
html[data-theme="dark"] .mcube-why-section {
  background: var(--why-bg) !important;
}

html[data-theme="dark"] .mcube-why-section .mcube-editorial-card {
  background: var(--why-card-bg) !important;
  border-color: var(--why-card-border) !important;
  box-shadow: 0 4px 24px var(--why-card-shadow) !important;
}

html[data-theme="dark"] .mcube-why-section .mcube-editorial-card h3 {
  color: var(--why-heading) !important;
}

html[data-theme="dark"] .mcube-why-section .mcube-editorial-card p {
  color: var(--why-body) !important;
}

html[data-theme="dark"] .mcube-why-section .mcube-card-icon {
  background: linear-gradient(135deg, var(--why-icon-from), var(--why-icon-to)) !important;
  box-shadow: 0 8px 20px rgba(0, 201, 167, 0.25) !important;
}

html[data-theme="dark"] .mcube-why-section .mcube-card-expand {
  border: 1.5px solid var(--why-btn-border) !important;
  color: var(--why-btn-color) !important;
  background: transparent !important;
  border-radius: 9999px !important;
  padding: 10px 20px !important;
  font-size: 13px !important;
}

html[data-theme="dark"] .mcube-why-section .mcube-card-expand span,
html[data-theme="dark"] .mcube-why-section .mcube-card-expand i {
  color: var(--why-btn-color) !important;
}

html[data-theme="dark"] .mcube-why-section .mcube-card-expand:hover {
  background: var(--why-btn-hover-bg) !important;
  color: var(--why-btn-hover-color) !important;
  border-color: var(--why-btn-hover-bg) !important;
}

html[data-theme="dark"] .mcube-why-section .mcube-card-expand:hover span,
html[data-theme="dark"] .mcube-why-section .mcube-card-expand:hover i {
  color: var(--why-btn-hover-color) !important;
}

html[data-theme="dark"] .mcube-why-section .mcube-section-title {
  color: var(--why-title) !important;
}

html[data-theme="dark"] .mcube-why-section .mcube-section-subtitle {
  color: var(--why-subtitle) !important;
}
