/**
 * House Ads — card styles for affiliate CTAs injected by ad-injector-v5.js
 * on gold + silver tier pages. See files/js/house-ads-v1.js for the
 * picker, _data/house_ads.yml for the pool.
 *
 * Visual target: feels like a site card (not a programmatic ad). Clean
 * shadow, clear CTA, tone color from .hg-house-ad-tone-* modifier.
 */

.hg-house-ad-wrap {
  /* Inline-block + width cap so the card centers within the hgads
     container's text-align:center rule. Margin auto is a belt-and-
     suspenders fallback if a caller skips text-center on the parent. */
  display: inline-block;
  vertical-align: top;
  width: 100%;
  max-width: 720px;
  margin: 24px auto;
  text-align: left; /* reset for the ad content itself */
}

.hg-house-ad {
  /* Fill the CLS-reserved 280px hgads box rather than float in the top-left.
     min-height: 240px + centered flex lays out icon/body/cta vertically
     centered within the monstera container without looking cramped. */
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 28px 32px;
  min-height: 260px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-left: 8px solid #1866B4; /* default tone — overridden by .hg-house-ad-tone-* */
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
  box-sizing: border-box;
}

.hg-house-ad:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.10);
  transform: translateY(-1px);
  text-decoration: none;
  color: inherit;
}

.hg-house-ad-icon {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #1866B4; /* tone override below */
}

.hg-house-ad-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.hg-house-ad-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: #1a1a1a;
}

.hg-house-ad-subtitle {
  font-size: 16px;
  line-height: 1.5;
  color: #555;
}

.hg-house-ad-cta {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 700;
  color: #1866B4; /* tone override below */
  white-space: nowrap;
  align-self: center;
  border-radius: 8px;
  border: 2px solid currentColor;
  transition: background .15s ease, color .15s ease;
}
.hg-house-ad:hover .hg-house-ad-cta {
  background: currentColor;
}
.hg-house-ad:hover .hg-house-ad-cta-text,
.hg-house-ad:hover .hg-house-ad-cta i {
  color: #fff;
}

.hg-house-ad-cta i {
  font-size: 12px;
}

.hg-house-ad-label {
  display: block;
  font-size: 11px;
  color: #9ca3af;
  text-align: center;
  margin-top: 6px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* ── Tone variants: match island brand colors + utility colors ── */
.hg-house-ad-tone-blue   { border-left-color: #1866B4; }
.hg-house-ad-tone-blue   .hg-house-ad-icon { color: #1866B4; }
.hg-house-ad-tone-blue   .hg-house-ad-cta  { color: #1866B4; }

.hg-house-ad-tone-green  { border-left-color: #1D9771; }
.hg-house-ad-tone-green  .hg-house-ad-icon { color: #1D9771; }
.hg-house-ad-tone-green  .hg-house-ad-cta  { color: #1D9771; }

.hg-house-ad-tone-orange { border-left-color: #F27A24; }
.hg-house-ad-tone-orange .hg-house-ad-icon { color: #F27A24; }
.hg-house-ad-tone-orange .hg-house-ad-cta  { color: #F27A24; }

.hg-house-ad-tone-red    { border-left-color: #c3232f; }
.hg-house-ad-tone-red    .hg-house-ad-icon { color: #c3232f; }
.hg-house-ad-tone-red    .hg-house-ad-cta  { color: #c3232f; }

.hg-house-ad-tone-amber  { border-left-color: #D69E2E; }
.hg-house-ad-tone-amber  .hg-house-ad-icon { color: #D69E2E; }
.hg-house-ad-tone-amber  .hg-house-ad-cta  { color: #D69E2E; }

/* ── Mobile ── */
@media (max-width: 640px) {
  .hg-house-ad {
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 16px;
  }
  .hg-house-ad-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  .hg-house-ad-cta {
    flex: 1 1 100%;
    padding: 6px 0 0;
    justify-content: flex-end;
  }
  .hg-house-ad-title  { font-size: 16px; }
  .hg-house-ad-subtitle { font-size: 13px; }
}

/* ── Print: hide house ads (they're web-only CTAs, no value on paper) ── */
@media print {
  .hg-house-ad-wrap { display: none !important; }
}
