.cg-hero { position: relative; color: inherit; }

/* Image area */
.cg-hero__img-wrap { position: relative; width: 100%; }
.cg-hero__img { display: block; width: 100%; height: auto; }
.cg-hero__placeholder { width: 100%; height: 100%; min-height: var(--hero-min-h, 480px); background: #f2f2f2; }
.cg-hero__img-overlay { position: absolute; inset: 0; background: var(--hero-photo-overlay-color, transparent); opacity: var(--hero-photo-overlay-opacity, 0); pointer-events: none; }

/* Boxed panel sized by % of the image container */
.cg-hero__panel-box {
  position: absolute;
  width: var(--hero-panel-w-pct, 60%);
  border-radius: var(--hero-panel-radius, 12px);
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}

/* Overlay inside the box only */
.cg-hero__panel-overlay {
  position: absolute; inset: 0;
  background: var(--hero-panel-bg-color, transparent);
  opacity: var(--hero-panel-bg-opacity, 0);
  pointer-events: none;
}

/* Content stack */
.cg-hero__stack {
  position: relative; z-index: 1;
  display: grid; align-content: start; grid-auto-rows: min-content;
  gap: var(--hero-content-gap, 12px);
  padding: 16px;
  width: 100%; height: 100%;
  text-align: left;
}

/* Text alignment */
.cg-hero.align-left  .cg-hero__stack { text-align: left; }
.cg-hero.align-center .cg-hero__stack { text-align: center; }
.cg-hero.align-right .cg-hero__stack { text-align: right; }

/* Position presets (9-point grid) */
.cg-hero.pos-top-left     .cg-hero__panel-box { top: 16px; left: 16px; }
.cg-hero.pos-top-center   .cg-hero__panel-box { top: 16px; left: 50%; transform: translateX(-50%); }
.cg-hero.pos-top-right    .cg-hero__panel-box { top: 16px; right: 16px; }

.cg-hero.pos-middle-left  .cg-hero__panel-box { top: 50%; left: 16px; transform: translateY(-50%); }
.cg-hero.pos-middle-center .cg-hero__panel-box { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.cg-hero.pos-middle-right .cg-hero__panel-box { top: 50%; right: 16px; transform: translateY(-50%); }

.cg-hero.pos-bottom-left  .cg-hero__panel-box { bottom: 16px; left: 16px; }
.cg-hero.pos-bottom-center .cg-hero__panel-box { bottom: 16px; left: 50%; transform: translateX(-50%); }
.cg-hero.pos-bottom-right .cg-hero__panel-box { bottom: 16px; right: 16px; }

/* Shadows */
.cg-hero.shadow-none .cg-hero__panel-box { box-shadow: none; }
.cg-hero.shadow-sm   .cg-hero__panel-box { box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.cg-hero.shadow-md   .cg-hero__panel-box { box-shadow: 0 10px 24px rgba(0,0,0,.18); }
.cg-hero.shadow-lg   .cg-hero__panel-box { box-shadow: 0 20px 44px rgba(0,0,0,.28); }

/* Countdown style */
.cg-hero__countdown {
  font-size: 1.25em;
  font-weight: bold;
  margin-top: 1em;
  color: #b10000;
}

/* Responsive */
@media (max-width: 782px) {
  .cg-hero__panel-box {
    width: calc(100% - 24px);
    min-height: 220px;
    height: auto;
  }
  .cg-hero.pos-top-left .cg-hero__panel-box,
  .cg-hero.pos-top-center .cg-hero__panel-box,
  .cg-hero.pos-top-right .cg-hero__panel-box { top: 12px; left: 12px; right: 12px; transform: none; margin: 0 auto; }
  .cg-hero.pos-middle-left .cg-hero__panel-box,
  .cg-hero.pos-middle-center .cg-hero__panel-box,
  .cg-hero.pos-middle-right .cg-hero__panel-box { top: 12px; left: 12px; right: 12px; transform: none; }
  .cg-hero.pos-bottom-left .cg-hero__panel-box,
  .cg-hero.pos-bottom-center .cg-hero__panel-box,
  .cg-hero.pos-bottom-right .cg-hero__panel-box { bottom: 12px; left: 12px; right: 12px; transform: none; }
}
