/**
 * Hero component styles
 * BEM methodology: Block = c-hero
 */

.c-hero {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-gray-100);
  /* Edge-to-edge display */
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  width: 100vw;
  max-width: 100vw;
}

/* Height variants */
.c-hero--small {
  min-height: 300px;
}

.c-hero--medium {
  min-height: 400px;
}

.c-hero--large {
  min-height: 500px;
}

.c-hero--full {
  min-height: 100vh;
}

/* Background image handling */
.c-hero__background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.c-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.c-hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(0, 38, 58, 0.9) 0%,
    rgba(0, 140, 149, 0.8) 100%
  );
}

/* Container */
.c-hero__container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-md);
}

/* Content */
.c-hero__content {
  max-width: 600px;
}

.c-hero__subtitle {
  font-family: var(--font-secondary);
  font-size: var(--font-size-lg);
  font-weight: 500;
  color: var(--color-primary-light);
  margin-bottom: var(--spacing-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.c-hero__title {
  font-size: var(--font-size-h1);
  font-weight: 700;
  color: var(--color-navy);
  margin: 0 0 var(--spacing-md) 0;
  line-height: var(--line-height-tight);
}

.c-hero--has-image .c-hero__title {
  color: var(--color-white);
}

.c-hero__text {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-base);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-lg);
}

.c-hero--has-image .c-hero__text {
  color: rgba(255, 255, 255, 0.9);
}

.c-hero__custom {
  margin-bottom: var(--spacing-lg);
}

.c-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

/* Variant: Centered */
.c-hero--centered .c-hero__container {
  display: flex;
  justify-content: center;
  text-align: center;
}

.c-hero--centered .c-hero__content {
  max-width: 800px;
}

.c-hero--centered .c-hero__actions {
  justify-content: center;
}

/* Variant: Overlay */
.c-hero--overlay .c-hero__overlay {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.6) 100%
  );
}

.c-hero--overlay .c-hero__title,
.c-hero--overlay .c-hero__text {
  color: var(--color-white);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Responsive adjustments */
@media (min-width: 768px) {
  .c-hero--small {
    min-height: 350px;
  }
  
  .c-hero--medium {
    min-height: 450px;
  }
  
  .c-hero--large {
    min-height: 600px;
  }
  
  .c-hero__container {
    padding: var(--spacing-2xl) var(--spacing-lg);
  }
  
  .c-hero__title {
    font-size: var(--font-size-h1-lg);
  }
}

@media (min-width: 1024px) {
  .c-hero__content {
    max-width: 700px;
  }
  
  .c-hero--centered .c-hero__content {
    max-width: 900px;
  }
}

/* Animations */
.animations-enabled .c-hero__subtitle {
  animation: fadeInUp 0.6s ease-out;
}

.animations-enabled .c-hero__title {
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

.animations-enabled .c-hero__text {
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

.animations-enabled .c-hero__actions {
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .c-hero__subtitle,
  .c-hero__title,
  .c-hero__text,
  .c-hero__actions {
    animation: none;
  }
}