/* AABD Hero Block Styles - Three Image Layout */

/* CSS Variables for consistent theming */
:root {
  --hero-height: 90vh;
  --gap-size: 1px;
  --transition-duration: 0.4s;
  --transition-easing: cubic-bezier(0.4, 0, 0.2, 1);
  --text-color: #ffffff;
  --shadow-color: rgba(0, 0, 0, 0.575);
}

/* Reset and base styles */
.aabd-hero-block * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Hero section */
.aabd-hero-block {
  position: relative;
  height: var(--hero-height);
  margin-top: 2%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: 'Arial', 'Helvetica', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
}

/* Background images container */
.aabd-hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  gap: var(--gap-size);
  z-index: 1;
}

/* Individual image containers */
.aabd-hero-image {
  flex: 1;
  position: relative;
  overflow: hidden;
  transition: flex var(--transition-duration) var(--transition-easing);
  cursor: pointer;
}

.aabd-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--transition-duration) var(--transition-easing);
}

/* Black overlay with 20% transparency */
.aabd-hero-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.2);
  z-index: 1;
  transition: opacity var(--transition-duration) var(--transition-easing);
}

/* Hover effects - expand towards center */
.aabd-hero-image:hover {
  flex: 1.5;
}

.aabd-hero-image:hover img {
  transform: scale(1.05);
}

.aabd-hero-image:hover::after {
  opacity: 0.1;
}

/* Content overlay */
.aabd-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 2rem;
}

/* Logo styling */
.aabd-hero-logo {
  margin-bottom: 1.5rem;
}

.aabd-hero-logo img {
  max-width: 200px;
  height: auto;
  filter: drop-shadow(0 4px 8px var(--shadow-color));
  transition: transform var(--transition-duration) var(--transition-easing);
}

.aabd-hero-logo img:hover {
  transform: scale(1.05);
}

/* Title styling */
.aabd-hero-title {
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 700;
  color: white;
  text-shadow: 2px 2px 8px var(--shadow-color);
  letter-spacing: 0.05em;
  line-height: 1.2;
}

/* Focus styles for accessibility */
.aabd-hero-image:focus {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

.aabd-hero-logo img:focus {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

/* Editor-specific styles */
.aabd-hero-block-editor .aabd-hero-block {
  border: 2px dashed #ccc;
  margin: 20px 0;
}

.aabd-logo-placeholder {
  width: 200px;
  height: 100px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px dashed rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.2rem;
  margin: 0 auto;
  border-radius: 8px;
}

/* Mobile-first responsive design */
@media (max-width: 768px) {
  :root {
    --gap-size: 15px;
  }
  
  .aabd-hero-background {
    flex-direction: column;
    gap: var(--gap-size);
  }
  
  .aabd-hero-image {
    flex: 1;
    min-height: calc(var(--hero-height) / 3);
  }
  
  .aabd-hero-image:hover {
    flex: 1.2;
  }
  
  .aabd-hero-content {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .aabd-hero-logo img {
    max-width: 150px;
  }
  
  .aabd-hero-title {
    font-size: clamp(1.2rem, 5vw, 2rem);
  }
}

@media (max-width: 480px) {
  :root {
    --gap-size: 10px;
  }
  
  .aabd-hero-content {
    padding: 1rem;
    margin: 0.5rem;
  }
  
  .aabd-hero-logo img {
    max-width: 120px;
  }
  
  .aabd-hero-title {
    font-size: clamp(1rem, 6vw, 1.5rem);
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .aabd-hero-content {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #ffffff;
  }
  
  .aabd-hero-title {
    text-shadow: 3px 3px 6px var(--shadow-color);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .aabd-hero-image,
  .aabd-hero-image img,
  .aabd-hero-image::after,
  .aabd-hero-logo img {
    transition: none;
  }
  
  .aabd-hero-image:hover {
    flex: 1;
  }
  
  .aabd-hero-image:hover img {
    transform: none;
  }
  
  .aabd-hero-image:hover::after {
    opacity: 0.2;
  }
  
  .aabd-hero-logo img:hover {
    transform: none;
  }
}