/**
 * Hero + Embed Component
 * Full-screen hero with background image and embed (form) overlay
 */

.hero-embed {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Background Image Layer */
.hero-embed__background {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-embed__background-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Overlay for better text readability */
.hero-embed__overlay {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(90deg, rgba(0, 0, 0, var(--overlay-opacity, 0)) 0%, rgba(0, 0, 0, var(--overlay-opacity, 0)) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.1) 100%);
  z-index: 1;
}

/* Content Container */
.hero-embed__container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-48);
  display: grid;
  gap: var(--space-48);
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-embed__container {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-64);
  }
}

/* Optional: Wider embed (uncomment to give embed more space) */
/*
@media (min-width: 1024px) {
  .hero-embed__container {
    grid-template-columns: 1fr 1.5fr;
  }
}
*/

/* Left Column: Content */
.hero-embed__content {
  max-width: 100%;
  color: #fff;
}

.hero-embed__title {
  font-size: 2.5em;
  font-weight: 700;
  line-height: var(--lh-tight);
  color: #fff;
  margin-bottom: var(--space-24);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
  .hero-embed__title {
    font-size: 3em;
  }
}

@media (min-width: 1024px) {
  .hero-embed__title {
    font-size: 3.5em;
  }
}

@media (min-width: 1280px) {
  .hero-embed__title {
    font-size: 4em;
  }
}

/* Title Size Variations */
.hero-embed__title--small {
  font-size: 1.75em !important;
}

@media (min-width: 768px) {
  .hero-embed__title--small {
    font-size: 2em !important;
  }
}

.hero-embed__title--medium {
  font-size: 2em !important;
}

@media (min-width: 768px) {
  .hero-embed__title--medium {
    font-size: 2.5em !important;
  }
}

@media (min-width: 1024px) {
  .hero-embed__title--medium {
    font-size: 3em !important;
  }
}

.hero-embed__title--large {
  font-size: 2.75em !important;
}

@media (min-width: 768px) {
  .hero-embed__title--large {
    font-size: 3.5em !important;
  }
}

@media (min-width: 1024px) {
  .hero-embed__title--large {
    font-size: 4em !important;
  }
}

@media (min-width: 1280px) {
  .hero-embed__title--large {
    font-size: 4.5em !important;
  }
}

.hero-embed__title--xlarge {
  font-size: 3em !important;
}

@media (min-width: 768px) {
  .hero-embed__title--xlarge {
    font-size: 4em !important;
  }
}

@media (min-width: 1024px) {
  .hero-embed__title--xlarge {
    font-size: 5em !important;
  }
}

@media (min-width: 1280px) {
  .hero-embed__title--xlarge {
    font-size: 5.5em !important;
  }
}

.hero-embed__subtitle {
  font-size: 1.125em;
  line-height: var(--lh-normal);
  color: #fff;
  margin-bottom: var(--space-32);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Style paragraphs and other elements inside subtitle */
.hero-embed__subtitle p {
  margin: 0 0 var(--space-16) 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  text-shadow: inherit;
}

.hero-embed__subtitle p:last-child {
  margin-bottom: 0;
}

.hero-embed__subtitle strong,
.hero-embed__subtitle b {
  font-weight: 700;
}

.hero-embed__subtitle em,
.hero-embed__subtitle i {
  font-style: italic;
}

@media (min-width: 768px) {
  .hero-embed__subtitle {
    font-size: 1.25em;
  }
}

@media (min-width: 1024px) {
  .hero-embed__subtitle {
    font-size: 1.375em;
  }
}

/* Subtitle Size Variations */
.hero-embed__subtitle--small {
  font-size: 0.875em !important;
}

@media (min-width: 768px) {
  .hero-embed__subtitle--small {
    font-size: 1em !important;
  }
}

.hero-embed__subtitle--medium {
  font-size: 1em !important;
}

@media (min-width: 768px) {
  .hero-embed__subtitle--medium {
    font-size: 1.125em !important;
  }
}

@media (min-width: 1024px) {
  .hero-embed__subtitle--medium {
    font-size: 1.25em !important;
  }
}

.hero-embed__subtitle--large {
  font-size: 1.25em !important;
}

@media (min-width: 768px) {
  .hero-embed__subtitle--large {
    font-size: 1.5em !important;
  }
}

@media (min-width: 1024px) {
  .hero-embed__subtitle--large {
    font-size: 1.75em !important;
  }
}

/* Right Column: Embed Wrapper */
.hero-embed__embed-wrapper {
  position: relative;
  width: 650px; /* Fixed 650px width */
  max-width: 650px;
  margin: 0; /* No margin */
  margin-left: auto;
}

@media (max-width: 1023px) {
  .hero-embed__embed-wrapper {
    width: 100%;
    max-width: 100%;
  }
}

/* Embed Container */
.hero-embed__embed {
  background: none; /* No background */
  backdrop-filter: none;
  padding: 0; /* No padding */
  border-radius: 0; /* No rounded corners */
  box-shadow: none; /* No shadow */
  width: 650px; /* Fixed 650px width */
  height: 100%; /* Allow height to adjust to content */
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.hero-embed__embed-heading {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0; /* No margin */
  padding: 0 0 var(--space-24) 0; /* Minimal padding only below heading if it exists */
  text-align: center;
  color: #fff; /* White text to match hero style */
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); /* Shadow for readability */
}

.hero-embed__embed-content {
  /* Allow embedded forms to display properly */
  width: 100%;
  flex: 1; /* Allow content to expand */
  display: flex;
  flex-direction: column;
}

/* Make sure iframes and embedded content are responsive */
.hero-embed__embed-content iframe {
  width: 100%;
  min-height: 400px;
  border: none;
}

.hero-embed__embed-content > * {
  width: 100%;
}

/* Style common form elements within the embed */
.hero-embed__embed-content input[type="text"],
.hero-embed__embed-content input[type="email"],
.hero-embed__embed-content input[type="tel"],
.hero-embed__embed-content input[type="number"],
.hero-embed__embed-content select,
.hero-embed__embed-content textarea {
  width: 100%;
  padding: var(--space-16);
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-8);
  font-family: inherit;
  font-size: 1rem;
  margin-bottom: var(--space-16);
  transition: border-color 0.3s ease;
}

.hero-embed__embed-content input[type="text"]:focus,
.hero-embed__embed-content input[type="email"]:focus,
.hero-embed__embed-content input[type="tel"]:focus,
.hero-embed__embed-content input[type="number"]:focus,
.hero-embed__embed-content select:focus,
.hero-embed__embed-content textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.hero-embed__embed-content button[type="submit"],
.hero-embed__embed-content input[type="submit"] {
  width: 100%;
  padding: var(--space-24) var(--space-48);
  font-size: var(--fs-400);
  font-weight: 700;
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: #000;
  border: none;
  border-radius: var(--radius-8);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(255, 165, 0, 0.4);
}

.hero-embed__embed-content button[type="submit"]:hover,
.hero-embed__embed-content input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 165, 0, 0.6);
  background: linear-gradient(135deg, #FFE44D 0%, #FFB347 100%);
}

.hero-embed__embed-content button[type="submit"]:active,
.hero-embed__embed-content input[type="submit"]:active {
  transform: translateY(0);
}

/* Hero Scroll Arrow - Hidden for this section */
.hero-embed__scroll-arrow {
  display: none;
}

/* Mobile Layout - Title Above Embed, Subtitle Below */
@media (max-width: 1023px) {
  .hero-embed {
    min-height: auto;
    padding-top: 0;
    padding-bottom: 0;
  }

  .hero-embed__container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
  }

  /* Mobile Order: Title → Embed → Subtitle */
  .hero-embed__content {
    display: contents; /* Allow children to participate in parent flex layout */
  }

  .hero-embed__title {
    order: 1;
    font-size: 2em;
    margin-bottom: 0;
    text-align: center;
  }

  .hero-embed__embed-wrapper {
    order: 2;
    max-width: 100%;
    margin: 0;
  }

  .hero-embed__subtitle {
    order: 3;
    font-size: 1em;
    margin-bottom: 0;
    margin-top: 0;
    text-align: center;
  }

  .hero-embed__embed {
    width: 100%;
    padding: 0;
  }

  .hero-embed__embed-heading {
    font-size: 1.25rem;
    padding: var(--space-24) var(--space-24) var(--space-16);
  }
}

/* Tablet Adjustments */
@media (min-width: 640px) and (max-width: 1023px) {
  .hero-embed__title {
    font-size: 2.5em !important;
  }

  .hero-embed__subtitle {
    font-size: 1.125em !important;
  }

  .hero-embed__embed {
    width: 100%;
    padding: 0;
  }

  .hero-embed__container {
    gap: var(--space-40);
  }
}

/* Accessibility: Reduce Motion */
@media (prefers-reduced-motion: reduce) {
  .hero-embed__embed-content button[type="submit"]:hover,
  .hero-embed__embed-content input[type="submit"]:hover {
    transform: none;
  }
}

/* Utility Classes for Different Embed Sizes */

/* Constrained width embed (max 500px) */
.hero-embed--constrained .hero-embed__embed-wrapper {
  max-width: 500px;
}

/* Wide embed (max 700px) */
.hero-embed--wide .hero-embed__embed-wrapper {
  max-width: 700px;
}

/* Full width embed within grid column */
.hero-embed--full .hero-embed__embed-wrapper {
  max-width: none;
}

/* Adjust grid ratio to give embed more space */
@media (min-width: 1024px) {
  .hero-embed--embed-dominant .hero-embed__container {
    grid-template-columns: 1fr 1.5fr;
  }

  .hero-embed--embed-large .hero-embed__container {
    grid-template-columns: 1fr 2fr;
  }
}

