/**
 * Hero Component Styles
 * Full-width hero section with background image and category navigation
 *
 * @package Divi-Child
 */

/* ==========================================================================
   Hero Base
   ========================================================================== */
.hero {
  position: relative;
  width: 100%;
  min-height: 500px;
  overflow: hidden;
}

.hero--large {
  min-height: 700px;
}

/* Mobile-first responsive breakpoints */
@media (max-width: 640px) {
  .hero {
    min-height: 550px;
  }

  .hero--large {
    min-height: 550px;
  }
}

@media (min-width: 641px) and (max-width: 768px) {
  .hero {
    min-height: 600px;
  }

  .hero--large {
    min-height: 600px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .hero {
    min-height: 650px;
  }

  .hero--large {
    min-height: 650px;
  }
}

@media (min-width: 1025px) {
  .hero {
    min-height: 700px;
  }

  .hero--large {
    min-height: 750px;
  }
}

/* ==========================================================================
   Hero Background
   ========================================================================== */
.hero__background {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

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

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.3) 20%, transparent 40%);
}

/* ==========================================================================
   Hero Content Layout
   ========================================================================== */
.hero__content-wrapper {
  position: relative;
  z-index: 10;
  padding-top: var(--space-4);
  padding-bottom: var(--space-8);
  min-height: 500px;
  display: flex;
  align-items: flex-start;
}

/* Responsive padding adjustments */
@media (max-width: 640px) {
  .hero__content-wrapper {
    padding-top: var(--space-6);
    padding-bottom: var(--space-10);
    min-height: 550px;
  }
}

@media (min-width: 641px) and (max-width: 768px) {
  .hero__content-wrapper {
    padding-top: var(--space-6);
    padding-bottom: var(--space-12);
    min-height: 600px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .hero__content-wrapper {
    padding-top: var(--space-8);
    padding-bottom: var(--space-14);
    min-height: 650px;
  }
}

@media (min-width: 1025px) {
  .hero__content-wrapper {
    padding-top: 0;
    padding-bottom: var(--space-16);
    min-height: 700px;
  }
}

.hero__grid {
  grid-template-columns: 1fr;
  height: 100%;
  align-items: flex-start;
}

@media (min-width: 1024px) {
  .hero__grid {
    grid-template-columns: 1fr 2fr;
  }
}

/* ==========================================================================
   Hero Header Section
   ========================================================================== */
.hero__header {
  margin-bottom: var(--space-6);
  animation: heroFadeIn 0.8s ease-out forwards;
  opacity: 0;
}

@media (min-width: 641px) {
  .hero__header {
    margin-bottom: var(--space-8);
  }
}

.hero__title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-inverse);
  margin-bottom: var(--space-3);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
  line-height: 1.2;
}

@media (min-width: 641px) {
  .hero__title {
    font-size: var(--font-size-4xl);
    margin-bottom: var(--space-4);
  }
}

@media (min-width: 1024px) {
  .hero__title {
    font-size: var(--font-size-5xl);
  }
}

.hero__description {
  font-size: var(--font-size-base);
  color: rgba(255, 255, 255, 0.95);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  line-height: 1.5;
}

@media (min-width: 641px) {
  .hero__description {
    font-size: var(--font-size-lg);
  }
}

@media (min-width: 1024px) {
  .hero__description {
    font-size: var(--font-size-xl);
  }
}

/* ==========================================================================
   Hero Category Navigation
   ========================================================================== */
.hero__categories {
  width: fit-content;
  max-width: 100%;
  min-width: auto;
  background: rgba(0, 0, 0, 0.35) !important;
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-2xl);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-block;
  animation: heroFadeIn 0.8s ease-out forwards 0.2s;
  opacity: 0;
  overflow: hidden;
}

/* Responsive category navigation sizing */
@media (max-width: 640px) {
  .hero__categories {
    max-width: calc(100vw - 2rem);
    padding: var(--space-3);
    border-radius: var(--radius-md);
  }
}

@media (min-width: 641px) and (max-width: 768px) {
  .hero__categories {
    padding: var(--space-4);
  }
}

@media (min-width: 769px) {
  .hero__categories {
    padding: var(--space-6);
    border-radius: var(--radius-xl);
  }
}

.hero__categories .pcd-vertical-list-main {
  background: transparent !important;
  width: 100%;
  max-height: none;
}

.hero__categories .pcd-vertical-item-template {
  width: 100%;
}

.hero__categories .pcd-category-link-item {
  font-size: 0.9375rem !important;
  padding: 0.375rem 0 !important;
  white-space: nowrap;
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 44px;
  transition: all 0.2s ease;
  border-radius: var(--radius-sm);
}

/* Responsive link sizing */
@media (min-width: 641px) {
  .hero__categories .pcd-category-link-item {
    font-size: 1rem !important;
    padding: 0.5rem 0 !important;
  }
}

@media (min-width: 1024px) {
  .hero__categories .pcd-category-link-item {
    font-size: 1.125rem !important;
  }
}

/* Ensure arrow and text stay on same line */
.hero__categories .pcd-arrow-indicator {
  flex-shrink: 0;
}

.hero__categories .pcd-category-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hover and focus states for accessibility */
.hero__categories .pcd-category-link-item:hover {
  transform: translateX(6px);
  background: rgba(255, 255, 255, 0.1);
  padding-left: 0.5rem !important;
}

.hero__categories .pcd-category-link-item:focus {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
  background: rgba(255, 255, 255, 0.15);
}

.hero__categories .pcd-category-link-item:focus-visible {
  outline: 3px solid rgba(253, 185, 19, 0.8);
  outline-offset: 3px;
}

/* ==========================================================================
   Hero CTA
   ========================================================================== */
.hero__cta {
  margin-top: var(--space-6);
}

/* ==========================================================================
   Hero Main Content Area
   ========================================================================== */
.hero__main {
  display: none;
}

@media (min-width: 1024px) {
  .hero__main {
    display: block;
  }
}

/* ==========================================================================
   Hero Search Box
   ========================================================================== */
.hero__search {
  max-width: 36rem;
  margin-left: auto;
  margin-top: 8rem;
}

.hero__search-box {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-2xl);
}

.hero__search-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-4);
}

.hero__search-form {
  display: flex;
  gap: 0.5rem;
}

.hero__search-input {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  font-size: var(--font-size-base);
}

.hero__search-input:focus {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

/* ==========================================================================
   Hero Scroll Indicator
   ========================================================================== */
.hero__scroll-indicator {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: none;
}

@media (min-width: 1024px) {
  .hero__scroll-indicator {
    display: block;
  }
}

.hero__scroll-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: rgba(255, 255, 255, 0.8);
  animation: bounce 1s infinite;
}

.hero__scroll-text {
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-2);
}

.hero__scroll-icon {
  width: 1.5rem;
  height: 1.5rem;
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
