/* Home Banner Component Styles */
/* Section is 100vh; padding-top keeps content below the header */
.home-banner {
  --home-banner-header-height: 80px;
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding-top: var(--home-banner-header-height);
  height: 100vh;
  min-height: 100vh;
  box-sizing: border-box;
}

/* Content Section (Left) */
.home-banner-content {
  position: relative;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  z-index: 10;
  overflow: hidden;
}

/* Video Section (Right) – muted 5s preview + click to open modal */
.home-banner-video {
  position: relative;
  width: 100%;
  flex: 1;
  overflow: hidden;
  z-index: 1;
}

/* Preview player container (YouTube API injects iframe here) */
.home-banner-video-preview-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #000;
}

.home-banner-video-preview-player {
  width: 100%;
  height: 100%;
}

.home-banner-video-preview-player iframe,
#home-banner-preview-player {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%) scale(2);
  pointer-events: none;
  display: block;
}

/* Clickable overlay with play button on top */
.home-banner-video-trigger {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 280px;
  z-index: 3;
}

/* Play button overlay */
.home-banner-video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  transition: background 0.2s ease, transform 0.2s ease;
}

.home-banner-video-play::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-40%, -50%);
  border-style: solid;
  border-width: 14px 0 14px 24px;
  border-color: transparent transparent transparent var(--primary-100, #680144);
}

.home-banner-video-trigger:hover .home-banner-video-play {
  background: #fff;
  transform: translate(-50%, -50%) scale(1.08);
}

/* Legacy image section (kept for any fallback) */
.home-banner-image {
  position: relative;
  width: 100%;
  flex: 1;
  overflow: hidden;
  z-index: 1;
}

.home-banner-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Desktop: 50/50 layout, full height */
@media (min-width: 1024px) {
  .home-banner {
    flex-direction: row;
    height: 100vh;
    max-height: 100vh;
    min-height: 100vh;
  }
  
  .home-banner-content {
    width: 50%;
    height: 100%;
    flex-shrink: 0;
    max-width: 50%;
  }

  .home-banner-image,
  .home-banner-video {
    width: 50%;
    height: 100%;
    flex-shrink: 0;
    max-width: 50%;
  }

  .home-banner-video-trigger {
    min-height: 100%;
  }
  
  .home-banner-image img {
    height: 100%;
    object-fit: cover;
  }
}

/* Video modal */
.home-banner-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}

.home-banner-modal[hidden] {
  display: none !important;
}

.home-banner-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  cursor: pointer;
}

.home-banner-modal-inner {
  position: relative;
  width: 100%;
  max-width: 960px;
  z-index: 1;
}

.home-banner-modal-close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.home-banner-modal-close:hover {
  background: #fff;
  color: #000;
}

.home-banner-modal-video-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  background: #000;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.home-banner-modal-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Gradient Overlay */
.home-banner-gradient {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(270deg, rgba(0, 0, 0, 0.00) 49.91%, rgba(0, 0, 0, 0.20) 86.76%),
    linear-gradient(0deg, rgba(104, 1, 68, 0.20) 0%, rgba(104, 1, 68, 0.20) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.20) 0%, rgba(0, 0, 0, 0.00) 15.87%);
  z-index: 2;
  pointer-events: none;
}

/* Heading */
.home-banner-heading {
  width: 100%;
}

.home-banner-heading span {
  display: inline;
}

.home-banner-heading {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Heading Part 2 - Specific Styles */
.home-banner-heading-part2 {
  font-family: "Calluna", serif;
  font-style: italic;
  line-height: 110%;
  letter-spacing: -4.2px;
}

/* Desktop: fluid heading so it scales when browser is narrowed (1024px–large) */
@media (min-width: 1024px) {
  .home-banner .home-banner-heading span,
  .home-banner .home-banner-heading-part2 {
    font-size: clamp(2.5rem, 3.5vw + 1.5rem, 84px);
  }
  .home-banner .home-banner-heading-part2 {
    letter-spacing: clamp(-1.25px, -0.15vw - 0.2px, -4.2px);
  }
}

/* Description */
.home-banner-description {
  width: 100%;
}

/* Button */
.home-banner-button {
  transition: all 0.3s ease;
}

.home-banner-button:hover {
  background-color: var(--secondary-100, #FF7D78);
}

/* Responsive adjustments */
@media (max-width: 1023px) {
  .home-banner {
    height: 100vh;
    min-height: 100vh;
  }
  
  .home-banner-content {
    flex: 1;
    height: auto;
    min-height: auto;
  }
  
  .home-banner-image,
  .home-banner-video {
    flex: 1;
    height: auto;
    min-height: auto;
    order: -1; /* Show video/image first on mobile */
  }
  
  .home-banner-heading span {
    font-size: 2.5rem;
    line-height: 1.2;
  }
  
  .home-banner-heading-part2 {
    font-size: 2.5rem;
    letter-spacing: -1.25px;
  }
}

@media (max-width: 767px) {
  .home-banner {
    height: 100vh;
    min-height: 100vh;
  }
  
  .home-banner-content {
    flex: 1;
    height: auto;
    min-height: auto;
  }
  
  .home-banner-image,
  .home-banner-video {
    flex: 1;
    height: auto;
    min-height: auto;
  }
  
  .home-banner-heading {
    gap: 1rem;
  }
  
  .home-banner-heading span {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  .home-banner-heading-part2 {
    font-size: 2rem;
    letter-spacing: -1px;
  }
  
  .home-banner-description {
    font-size: 1rem;
    line-height: 1.5;
  }
  
  .home-banner-button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .home-banner {
    height: 100vh;
    min-height: 100vh;
  }
  
  .home-banner-content {
    flex: 1;
    height: auto;
    min-height: auto;
  }
  
  .home-banner-image,
  .home-banner-video {
    flex: 1;
    height: auto;
    min-height: auto;
  }
  
  .home-banner-heading span {
    font-size: 1.75rem;
  }
  
  .home-banner-heading-part2 {
    font-size: 1.75rem;
    letter-spacing: -0.875px;
  }
}
