/* Hero Festival - Fully Responsive with No Cropping
   - Simplified button hovers (no shine, no gradient changes, no movement)
   - Container queries keep sizes responsive to hero width
*/

/* Root container uses the image's intrinsic aspect ratio and enables container queries */
.rf-hero {
  position: relative;
  width: 100%;
  aspect-ratio: calc(var(--img-w) / var(--img-h));
  background-color: #5647A4;
  overflow: hidden;
  container-type: inline-size; /* enables @container and cqi/cqw units */
}

/* Fallback for browsers without aspect-ratio support */
@supports not (aspect-ratio: 1) {
  .rf-hero::before {
    content: "";
    display: block;
    padding-top: calc(var(--img-h) / var(--img-w) * 100%);
  }
}

/* Image Container - Shows Full Image */
.rf-hero__image-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background-color: #5647A4;
}

.rf-hero__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* Content Layer - Full-cover centered overlay */
.rf-hero__content {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: clamp(1rem, 3vw, 2.5rem) clamp(1rem, 4vw, 1.5rem);
  display: grid;
  place-items: center;
  width: 100%;
}

/* Button Container */
.rf-hero__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: min(90%, 600px);
}

/* --- Base (fallback) fluid sizing using VW so it still scales without container support --- */
.rf-hero__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Fluid size (fallback) */
  font-size: clamp(0.85rem, 1.6vw, 1.1rem);
  padding: clamp(0.8rem, 1.4vw, 1.1rem) clamp(1.25rem, 2.6vw, 2.4rem);
  border-radius: clamp(28px, 3vw, 50px);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.03em;
  border: 2px solid transparent;
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
  cursor: pointer;
  /* No shine, no overflow tricks */
  position: relative;
  min-width: auto;
  max-width: 100%;
  white-space: nowrap;
}

/* Upgrade to container-relative sizing where supported */
@supports (container-type: inline-size) {
  .rf-hero__btn {
    font-size: clamp(0.85rem, 2.2cqi, 1.2rem);
    padding: clamp(0.75rem, 1.2cqi, 1.1rem) clamp(1rem, 2.8cqi, 2.2rem);
    border-radius: clamp(24px, 4cqi, 48px);
    min-width: clamp(132px, 26cqi, 220px);
  }
}

/* PRIMARY BUTTON — keep base look; simple hover */
.rf-hero__btn--primary {
  /* Keep your original feel (gradient base); change is only on hover behavior */
  background: linear-gradient(135deg, #FFD700 0%, #FFC700 100%);
  color: #2D1B69;
  border-color: #FFD700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  font-weight: 700;
}

/* Simple hover: tiny darken via box-shadow only, no movement, no gradient swap */
.rf-hero__btn--primary:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

/* Simple active: slightly reduce shadow, no movement */
.rf-hero__btn--primary:active {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}

/* SECONDARY BUTTON — translucent base; simple hover */
.rf-hero__btn--secondary {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.rf-hero__btn--secondary:hover {
  background: rgba(255, 255, 255, 0.16); /* slightly stronger only */
  border-color: #ffffff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.rf-hero__btn--secondary:active {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Remove the previous shine pseudo-element entirely */
.rf-hero__btn::before { display: none !important; content: none !important; }

/* Focus States for Accessibility (unchanged) */
.rf-hero__btn:focus-visible {
  outline: 3px solid #FFD700;
  outline-offset: 4px;
}

/* Tablet & down: bottom-center for reachability and allow wrap if needed */
@media (max-width: 768px) {
  .rf-hero__content { place-items: end center; }
  .rf-hero__buttons {
    flex-direction: column;
    max-width: min(85%, 360px);
    gap: clamp(0.75rem, 2.5vw, 1rem);
  }
  .rf-hero__btn {
    width: 100%;
    white-space: normal; /* allow two-line labels instead of overflow */
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .rf-hero__buttons { max-width: 100%; padding: 0 0.5rem; }
}

/* Extra Small Mobile */
@media (max-width: 360px) {
  .rf-hero__btn { letter-spacing: 0.02em; }
}

/* Large Desktop - cap growth a bit */
@media (min-width: 1440px) {
  .rf-hero__buttons { gap: 1.25rem; }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .rf-hero__btn { transition: none; }
}

/* Print */
@media print {
  .rf-hero { page-break-after: always; }
  .rf-hero__buttons { display: none; }
}
