/**
 * Home hero — promo placeholder cards when no ad data is available.
 * Large desktop (≥1400px): single horizontal promo row.
 * Mobile (≤767px): duo grid + stacked promo rows.
 */

.cx-landing-hero-ph {
  width: 100%;
  min-width: 0;
  margin-top: clamp(4px, 0.8vw, 10px);
  border: none;
  background: transparent;
}

.cx-landing-hero-ph[hidden] {
  display: none !important;
}

.cx-landing-hero-ph.is-visible {
  display: block;
}

/* —— Tokens —— */
.cx-landing-hero-ph {
  --cx-hero-ph-card-bg: transparent;
  --cx-hero-ph-card-border: rgba(var(--navbar-icon-color-rgb), 0.12);
  --cx-hero-ph-icon-color: var(--navbar-icon-color);
  --cx-hero-ph-icon-border: rgba(var(--navbar-icon-color-rgb), 0.22);
  --cx-hero-ph-icon-bg: rgba(var(--navbar-icon-color-rgb), 0.06);
  --cx-hero-ph-desc-color: var(--secondary-text-color);
  --cx-hero-ph-title-color: var(--primary-text);
}

[data-theme="dark"] .cx-landing-hero-ph {
  --cx-hero-ph-card-bg: transparent;
  --cx-hero-ph-card-border: rgba(255, 255, 255, 0.1);
  --cx-hero-ph-icon-color: var(--electric-lime);
  --cx-hero-ph-icon-border: rgba(var(--electric-lime-rgb), 0.28);
  --cx-hero-ph-icon-bg: rgba(var(--electric-lime-rgb), 0.1);
  --cx-hero-ph-title-color: var(--primary-text-dark);
}

/* —— Shared card —— */
.cx-landing-hero-ph__card {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--cx-hero-ph-card-border);
  background-color: transparent;
  transform-origin: center bottom;
  transition:
    transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.cx-landing-hero-ph__card:hover,
.cx-landing-hero-ph__card:focus-within {
  transform: scale(1.03) translateY(-4px);
  border-color: rgba(var(--navbar-icon-color-rgb), 0.22);
  box-shadow: 0 8px 20px rgba(var(--sapphire-blue-rgb), 0.08);
}

[data-theme="dark"] .cx-landing-hero-ph__card:hover,
[data-theme="dark"] .cx-landing-hero-ph__card:focus-within {
  border-color: rgba(var(--electric-lime-rgb), 0.22);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* —— Icons —— */
.cx-landing-hero-ph__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--cx-hero-ph-icon-color);
  line-height: 1;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cx-landing-hero-ph__icon-wrap--promo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--cx-hero-ph-icon-border);
  background: var(--cx-hero-ph-icon-bg);
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
}

.cx-landing-hero-ph__icon-wrap--duo {
  width: clamp(2.75rem, 8vw, 3.5rem);
  height: clamp(2.75rem, 8vw, 3.5rem);
  border-radius: 50%;
  border: 1px solid var(--cx-hero-ph-icon-border);
  background: var(--cx-hero-ph-icon-bg);
  font-size: clamp(1.15rem, 3vw, 1.45rem);
}

.cx-landing-hero-ph__card:hover .cx-landing-hero-ph__icon-wrap,
.cx-landing-hero-ph__card:focus-within .cx-landing-hero-ph__icon-wrap {
  transform: scale(1.12) translateY(-4px);
}

/* —— Typography hierarchy (promo / 1×3) —— */
.cx-landing-hero-ph__label {
  display: block;
  margin: 0 0 5px;
  font-size: clamp(0.65rem, 1.2vw, 0.72rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--navbar-icon-color);
}

/* Override main.css h3 { color: … !important } — theme-responsive title color */
.cx-landing-hero-ph h3.cx-landing-hero-ph__title {
  margin: 0;
  font-family: var(--htl-admin-header-font-family, system-ui, -apple-system, 'Segoe UI', sans-serif);
  font-size: clamp(0.95rem, 1.7vw, 1.08rem);
  font-weight: 800 !important;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--cx-hero-ph-title-color) !important;
  transition: none;
}

.cx-landing-hero-ph h3.cx-landing-hero-ph__title--duo {
  font-size: clamp(1.2rem, 2.8vw, 1.65rem);
  font-weight: 800 !important;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--cx-hero-ph-title-color) !important;
}

.cx-landing-hero-ph__desc {
  margin: 5px 0 0;
  font-size: clamp(0.82rem, 1.45vw, 0.92rem);
  line-height: 1.5;
  color: var(--cx-hero-ph-desc-color);
}

.cx-landing-hero-ph__cta {
  display: inline-block;
  margin-top: 8px;
  padding: 0;
  border: none;
  background: none;
  font-size: clamp(0.8rem, 1.35vw, 0.88rem);
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  background-image: linear-gradient(135deg, var(--sapphire-blue), var(--electric-lime));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cx-landing-hero-ph__cta:hover,
.cx-landing-hero-ph__cta:focus-visible {
  opacity: 0.85;
  transform: translateY(-1px);
  outline: none;
}

.cx-landing-hero-ph__cta:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* —— Duo grid (1×2) — matches hero column heading/desc —— */
.cx-landing-hero-ph__duo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1.6vw, 14px);
  width: 100%;
  margin-bottom: clamp(10px, 1.6vw, 14px);
}

.cx-landing-hero-ph__card--duo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 2vw, 16px) clamp(10px, 1.8vw, 14px);
  min-height: 100%;
}

.cx-landing-hero-ph__duo-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.2vw, 12px);
  width: 100%;
  text-align: center;
}

.cx-landing-hero-ph__desc--duo {
  margin: 0;
  max-width: 28ch;
  font-size: clamp(0.9rem, 1.8vw, 1.05rem);
  line-height: 1.55;
  color: var(--cx-hero-ph-desc-color);
}

/* —— Promo row layout (icon left, content right) —— */
.cx-landing-hero-ph__promo-row {
  display: flex;
  align-items: flex-start;
  gap: clamp(10px, 1.6vw, 14px);
  width: 100%;
}

.cx-landing-hero-ph__content {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.cx-landing-hero-ph__card--promo .cx-landing-hero-ph__title,
.cx-landing-hero-ph__card--promo .cx-landing-hero-ph__desc {
  text-align: left;
}

/* —— Desktop (≥1400px) —— */
.cx-landing-hero-ph__desktop {
  display: none;
}

.cx-landing-hero-ph__desktop-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 20px);
  width: 100%;
  max-width: min(1200px, 100%);
  margin: 0 auto;
  align-items: stretch;
}

.cx-landing-hero-ph__desktop .cx-landing-hero-ph__card--promo {
  padding: 14px;
}

@media (min-width: 1400px) {
  .cx-landing-hero-ph.is-visible .cx-landing-hero-ph__desktop {
    display: block;
  }

  .cx-landing-hero-ph.is-visible .cx-landing-hero-ph__mobile {
    display: none !important;
  }
}

/* —— Mobile (≤767px) —— */
.cx-landing-hero-ph__mobile {
  display: none;
}

.cx-landing-hero-ph__mobile-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  border: none;
  background: transparent;
}

/* Duo grid — mobile only (hidden on desktop via parent .cx-landing-hero-ph__mobile) */
.cx-landing-hero-ph__mobile .cx-landing-hero-ph__duo-grid {
  margin-bottom: 0;
}

@media (max-width: 767px) {
  .cx-landing-hero-ph.is-visible .cx-landing-hero-ph__mobile {
    display: block;
  }

  .cx-landing-hero-ph.is-visible .cx-landing-hero-ph__desktop {
    display: none !important;
  }
}

/* Hide on tablet / mid-laptop where neither layout applies */
@media (min-width: 768px) and (max-width: 1399px) {
  .cx-landing-hero-ph.is-visible {
    display: none !important;
  }
}

/* —— Scroll-in animations (match landing-ux-top) —— */
.cx-landing-hero-ph .float-in-up {
  opacity: 0;
  transform: translateY(50px);
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: 0s !important;
  will-change: opacity, transform;
}

.cx-landing-hero-ph .float-in-up.cx-landing-hero-ph__card {
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.25s ease,
    box-shadow 0.25s ease;
  transition-delay: 0s !important;
}

.cx-landing-hero-ph .float-in-up.float-in-visible {
  opacity: 1;
  transform: translate(0, 0);
}

@media (prefers-reduced-motion: reduce) {
  .cx-landing-hero-ph .float-in-up {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .cx-landing-hero-ph__card:hover,
  .cx-landing-hero-ph__card:focus-within,
  .cx-landing-hero-ph__card:hover .cx-landing-hero-ph__icon-wrap,
  .cx-landing-hero-ph__card:focus-within .cx-landing-hero-ph__icon-wrap {
    transform: none !important;
    box-shadow: none !important;
  }
}
