/* ==========================================================================
   core/hero-centered.css - Shared Centered Hero Section
   Requires: variables.css, typography.css (load first)
   Used by: About, Contact, Blog, Careers, Services, Client Success, Legal pages
   NOT used by: Home (uses home-slider.css - left-aligned hero)
   Responsive: 1280x720 to 5120x2880 (5K)
   ========================================================================== */

/* ==========================================================================
   HERO CONTAINER
   ========================================================================== */

.hero-centered {
  position: relative;
  /* Use percentage-based full-width technique to avoid scrollbar issues with 100vw */
  width: 100%;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding-left: calc(50vw - 50%);
  padding-right: calc(50vw - 50%);
  box-sizing: content-box;
  min-height: clamp(450px, 70vh, 850px);
  overflow: hidden;
  display: flex;
  align-items: center;
  background: #000;
}

/* ==========================================================================
   HERO IMAGE - With Ken Burns Animation
   ========================================================================== */

.hero-centered-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.hero-centered-image.loaded {
  opacity: 1;
}

/* Ken Burns Animation - Subtle Zoom with Pan */
@keyframes heroCenteredKenBurns {
  0% {
    transform: scale(1) translate(0, 0);
  }
  100% {
    transform: scale(1.15) translate(-2%, -2%);
  }
}

.hero-centered-image.ken-burns.loaded {
  animation: heroCenteredKenBurns 20s ease-in-out forwards;
  transform-origin: center center;
}

/* ==========================================================================
   HERO OVERLAY - Gradient over image
   Use CSS variable --hero-gradient to customize per page
   ========================================================================== */

.hero-centered-overlay {
  position: absolute;
  inset: 0;
  background: var(--hero-gradient, linear-gradient(135deg, rgba(43, 90, 158, 0.35) 0%, rgba(30, 58, 95, 0.55) 100%));
  z-index: 1;
}

/* ==========================================================================
   HERO CONTENT - Centered positioning
   ========================================================================== */

.hero-centered-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -3.5vw);
  z-index: 2;
  width: calc(100% - 40px);
  max-width: 70%;
  background: transparent;
  padding: 1vw 2vw;
  color: #fff;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* ==========================================================================
   HERO TYPOGRAPHY - Responsive from 1280px to 5K
   ========================================================================== */

.hero-centered-title {
  font-family: var(--font-heading, "Poppins", system-ui, sans-serif);
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  font-size: clamp(24px, 2.6vw, 72px);
  margin: 0 0 5vw 0;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  max-width: 100%;
  overflow-wrap: break-word;
  hyphens: auto;
  width: 100%;
  text-align: center;
}

.hero-centered-subtitle {
  font-family: var(--font-body, "Lato", system-ui, sans-serif);
  color: #f7f7f7;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
  font-weight: 400;
  font-size: clamp(18px, 1.4vw, 38px);
  line-height: 1.6;
  max-width: 100%;
  margin-top: 0;
  width: 100%;
  text-align: center;
}

/* Hero with larger subtitle (for pages with more description) */
.hero-centered-subtitle.hero-subtitle-lg {
  font-size: clamp(18px, 1.5vw, 44px);
  max-width: 900px;
}

/* ==========================================================================
   HERO CTA BUTTON (Optional)
   ========================================================================== */

.hero-centered-cta {
  margin-top: clamp(20px, 2.5vw, 48px);
}

.hero-centered-cta .btn {
  font-size: clamp(14px, 1.1vw, 28px);
  padding: clamp(12px, 1.2vw, 24px) clamp(24px, 2.5vw, 48px);
  border-radius: var(--radius-md, 8px);
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: var(--transition-base, 0.3s ease);
}

.hero-centered-cta .btn-primary {
  background: #ffffff;
  color: var(--hero-cta-color, #2b5a9e);
  border: 2px solid #ffffff;
}

.hero-centered-cta .btn-primary:hover {
  background: transparent;
  color: #ffffff;
}

.hero-centered-cta .btn-outline {
  background: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
}

.hero-centered-cta .btn-outline:hover {
  background: #ffffff;
  color: var(--hero-cta-color, #2b5a9e);
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */

/* Tablet and below - Center hero content like service-hero */
@media (max-width: 1199px) {
  .hero-centered-content {
    left: 50%;
    transform: translate(-50%, -8vw);
    width: calc(100% - 40px);
    justify-content: center;
    text-align: center;
  }
}

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
  .hero-centered {
    min-height: 55vh;
  }
}

/* Tablet Portrait & Mobile Landscape (max-width: 768px) */
@media (max-width: 768px) {
  .hero-centered {
    min-height: 50vh;
  }
}

/* Mobile (max-width: 767px) */
@media (max-width: 767px) {
  .hero-centered {
    min-height: 450px;
  }

  .hero-centered-content {
    max-width: 92%;
    padding: 2vw 3vw;
  }

  .hero-centered-title {
    line-height: 1.25;
    margin-bottom: 14vw;
  }

  .hero-centered-cta .btn {
    font-size: 14px;
    padding: 12px 24px;
  }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
  .hero-centered {
    min-height: 450px;
  }

  .hero-centered-content {
    max-width: 95%;
    padding: 2.5vw 3.5vw;
  }

  .hero-centered-title {
    line-height: 1.3;
  }
}

/* Very Small Mobile (max-width: 375px) - iPhone SE, mini */
@media (max-width: 375px) {
  .hero-centered {
    min-height: 400px;
  }

  .hero-centered-content {
    max-width: 96%;
    padding: 3vw 4vw;
  }

  .hero-centered-title {
    font-size: clamp(22px, 6vw, 32px);
    line-height: 1.25;
  }

  .hero-centered-subtitle {
    font-size: clamp(14px, 3.5vw, 18px);
    line-height: 1.5;
  }
}

/* ==========================================================================
   HIGH RESOLUTION DISPLAYS (1920px, 2K, 4K, 5K)
   ========================================================================== */

/* Large Screens (1920px - 2560px) */
@media (min-width: 1920px) {
  .hero-centered-content {
    max-width: 1200px;
  }
}

/* 2K/QHD Displays (2560px - 3839px) */
@media (min-width: 2560px) and (max-width: 3839px) {
  .hero-centered-title {
    font-size: clamp(48px, 2.8vw, 96px);
  }

  .hero-centered-subtitle {
    font-size: clamp(24px, 1.6vw, 48px);
  }

  .hero-centered-image {
    image-rendering: high-quality;
    image-rendering: -webkit-optimize-contrast;
  }
}

/* 4K Displays (3840px - 5119px) */
@media (min-width: 3840px) and (max-width: 5119px) {
  .hero-centered {
    min-height: clamp(600px, 75vh, 1000px);
  }

  .hero-centered-title {
    font-size: clamp(56px, 2.8vw, 110px);
  }

  .hero-centered-subtitle {
    font-size: clamp(28px, 1.6vw, 56px);
  }

  .hero-centered-content {
    max-width: 80%;
  }
}

/* 5K+ Displays (5120px+) */
@media (min-width: 5120px) {
  .hero-centered {
    min-height: clamp(700px, 80vh, 1200px);
  }

  .hero-centered-title {
    font-size: clamp(64px, 2.6vw, 120px);
  }

  .hero-centered-subtitle {
    font-size: clamp(32px, 1.5vw, 64px);
  }

  .hero-centered-content {
    max-width: 75%;
  }

  .hero-centered-image {
    image-rendering: high-quality;
    image-rendering: -webkit-optimize-contrast;
  }

  .hero-centered-cta .btn {
    font-size: 28px;
    padding: 24px 48px;
  }
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .hero-centered-image.ken-burns.loaded {
    animation: none;
    transform: scale(1);
  }

  .hero-centered-image {
    transition: opacity 0.3s ease;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .hero-centered-overlay {
    background: rgba(0, 0, 0, 0.7);
  }

  .hero-centered-title,
  .hero-centered-subtitle {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  }
}
