/* ============================================
   AEON-STYLE HERO SECTION
   For Twenty Twenty-Five Theme
   ============================================ */

/* Hero Section Container */
.hero-section {
  margin: 0;
  padding: 0;
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Desktop: 8% wider than content */
@media (min-width: 782px) {
  .hero-section {
    max-width: calc(var(--wp--style--global--content-size, 1200px) * 1.08);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }
}

/* Cover Block Styling */
.hero-section .wp-block-cover {
  min-height: 75vh;
  margin: 0;
  border-radius: 0;
  position: relative;
}

/* Desktop height adjustment */
@media (min-width: 782px) {
  .hero-section .wp-block-cover {
    min-height: 80vh;
  }
}

/* Tablet height adjustment */
@media (min-width: 600px) and (max-width: 781px) {
  .hero-section .wp-block-cover {
    min-height: 70vh;
  }
}

/* Mobile height adjustment */
@media (max-width: 599px) {
  .hero-section .wp-block-cover {
    min-height: 65vh;
  }
}

/* Dark overlay for readability */
.hero-section .wp-block-cover::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.5) 60%,
    rgba(0, 0, 0, 0.7) 100%
  );
  z-index: 1;
}

/* Featured Image Optimization */
.hero-section .wp-block-cover__image-background {
  object-fit: cover;
  object-position: center;
  width: 100%;
  height: 100%;
}

/* Content Container */
.hero-section .wp-block-cover__inner-container {
  z-index: 2;
  position: relative;
  width: 100%;
  max-width: var(--wp--style--global--content-size, 1200px);
  margin: 0 auto;
  padding: 0 var(--wp--preset--spacing--50, 2rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  min-height: inherit;
  padding-bottom: clamp(2rem, 5vw, 4rem);
}

/* Post Title */
.hero-section .hero-post-title {
  color: #ffffff;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 1rem 0;
  max-width: 90%;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Desktop title size */
@media (min-width: 782px) {
  .hero-section .hero-post-title {
    font-size: 3.5rem;
    max-width: 75%;
  }
}

/* Tablet title size */
@media (min-width: 600px) and (max-width: 781px) {
  .hero-section .hero-post-title {
    font-size: 2.5rem;
    max-width: 85%;
  }
}

/* Post Excerpt */
.hero-section .hero-post-excerpt {
  color: #ffffff;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.6;
  margin: 0;
  max-width: 90%;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  opacity: 0.95;
}

/* Desktop excerpt width */
@media (min-width: 782px) {
  .hero-section .hero-post-excerpt {
    max-width: 65%;
    font-size: 1.25rem;
  }
}

/* Tablet excerpt width */
@media (min-width: 600px) and (max-width: 781px) {
  .hero-section .hero-post-excerpt {
    max-width: 80%;
    font-size: 1.125rem;
  }
}

/* Link styling */
.hero-section .hero-post-link {
  color: inherit;
  text-decoration: none;
  display: block;
  transition: opacity 0.3s ease;
}

.hero-section .hero-post-link:hover,
.hero-section .hero-post-link:focus {
  opacity: 0.9;
}

/* Query Loop Reset */
.hero-section .wp-block-query {
  margin: 0;
  padding: 0;
}

.hero-section .wp-block-post-template {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hero-section .wp-block-post-template > li {
  margin: 0;
  padding: 0;
}

/* Performance Optimizations */
.hero-section .wp-block-cover__image-background {
  will-change: transform;
}

/* Accessibility improvements */
.hero-section .hero-post-link:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 4px;
}

/* Preload critical images hint */
.hero-section .wp-block-cover__image-background {
  content-visibility: auto;
}

/* Remove default margins/padding that might interfere */
.hero-section .wp-block-group,
.hero-section .wp-block-post {
  margin: 0;
  padding: 0;
}