/* ==========================================================================
   HERO.CSS — Sagra San Giuseppe
   Hero sections with gradient backgrounds, petal canvas, overlays,
   and scroll indicators.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Hero base
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  overflow: hidden;
  background-color: var(--color-primary-dark);
}

/* --------------------------------------------------------------------------
   2. Hero size variants
   -------------------------------------------------------------------------- */
.hero--full {
  min-height: 100vh;
  min-height: 100dvh;
}

.hero--half {
  min-height: 50vh;
}

.hero--small {
  min-height: 40vh;
}

/* --------------------------------------------------------------------------
   3. Hero background — gradient
   -------------------------------------------------------------------------- */
.hero__background {
  position: absolute;
  inset: 0;
  z-index: var(--z-base);
}

.hero__background--gradient {
  background: var(--gradient-hero);
}

/* Optional image background */
.hero__background--image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero__background-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

/* --------------------------------------------------------------------------
   4. Hero petals canvas — for animated falling petals (JS driven)
   -------------------------------------------------------------------------- */
#hero-petals,
.hero__petals {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   5. Hero overlay — soft gradient overlay for readability
   -------------------------------------------------------------------------- */
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: var(--gradient-hero-overlay);
  pointer-events: none;
}

/* Lighter overlay variant */
.hero__overlay--light {
  background: linear-gradient(
    180deg,
    rgba(19, 80, 63, 0.15) 0%,
    rgba(19, 80, 63, 0.05) 40%,
    rgba(19, 80, 63, 0.25) 100%
  );
}

/* Stronger overlay variant */
.hero__overlay--dark {
  background: linear-gradient(
    180deg,
    rgba(19, 80, 63, 0.5) 0%,
    rgba(19, 80, 63, 0.3) 40%,
    rgba(19, 80, 63, 0.6) 100%
  );
}

/* --------------------------------------------------------------------------
   6. Hero content — centered text
   -------------------------------------------------------------------------- */
.hero__content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: var(--container-narrow);
  padding: var(--space-3xl) var(--container-padding);
}

/* Edition label — e.g. "XII Edizione" */
.hero__edition {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  color: rgba(255, 255, 255, 0.85);
  padding: 0.35rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-lg);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  background-color: rgba(255, 255, 255, 0.08);
}

/* Hero title — large Georgia display */
.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: var(--weight-bold);
  color: var(--color-white);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-md);
  text-shadow: 0 2px 12px rgba(19, 80, 63, 0.3),
               0 4px 24px rgba(19, 80, 63, 0.15);
}

/* Hero subtitle */
.hero__subtitle {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.9);
  max-width: 50ch;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-md);
  line-height: var(--leading-normal);
}

/* Hero dates */
.hero__dates {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-white);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
}

/* Decorative dot between date parts */
.hero__dates-divider {
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--color-accent-light);
  border-radius: 50%;
  opacity: 0.8;
}

/* Hero location */
.hero__location {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
}

.hero__location-icon {
  width: 16px;
  height: 16px;
  opacity: 0.75;
}

/* Hero CTA button(s) */
.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

/* --------------------------------------------------------------------------
   7. Hero countdown wrapper
   -------------------------------------------------------------------------- */
.hero__countdown {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

.hero__countdown .countdown__message {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--color-accent-light);
  margin-top: var(--space-md);
}

/* --------------------------------------------------------------------------
   8. Scroll indicator — bouncing chevron at bottom
   -------------------------------------------------------------------------- */
.hero__scroll {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.hero__scroll:hover {
  color: rgba(255, 255, 255, 0.9);
}

.hero__scroll-text {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}

.hero__scroll-icon {
  width: 20px;
  height: 20px;
  animation: bounce 2s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   9. Hero with image background
   -------------------------------------------------------------------------- */
.hero--image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* --------------------------------------------------------------------------
   10. Page hero — smaller hero for interior pages
   -------------------------------------------------------------------------- */
.hero--page {
  min-height: 35vh;
  background: linear-gradient(
    160deg,
    var(--color-primary-dark) 0%,
    var(--color-primary) 50%,
    var(--color-primary-light) 100%
  );
}

.hero--page .hero__title {
  font-size: var(--text-3xl);
}

/* --------------------------------------------------------------------------
   11. Hero decorative bottom edge
   -------------------------------------------------------------------------- */
/* Section divider inside hero needs higher z-index than overlay */
.hero .section-divider {
  z-index: 4;
}

.hero__divider {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  z-index: 4;
  line-height: 0;
  pointer-events: none;
}

.hero__divider svg {
  display: block;
  width: 100%;
  height: auto;
}
