/**
 * Property Hero Section Styles
 * 
 * Styles for single property hero section with gallery slider and property info
 * Following BEM methodology for consistent styling
 * 
 * @package wbl
 */

/* ================================================================
   PROPERTY HERO BASE STYLES
   ================================================================ */

.property-hero {
  background-color: var(--color-white);
  padding: var(--spacing-xl) 0;
}

.property-hero__content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--spacing-xl);
  align-items: start;
}

/* ================================================================
   PROPERTY GALLERY SLIDER
   ================================================================ */

.property-hero__gallery {
  position: relative;
  border-radius: var(--radius-medium);
  overflow: hidden;
  background-color: #f8f9fa;
}

.property-gallery-slider {
  position: relative;
}

.gallery-slider__main {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  border-radius: var(--radius-medium);
}

.gallery-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity var(--transition-medium);
  z-index: 1;
}

.gallery-slide--active {
  opacity: 1;
  z-index: 2;
}

.gallery-slide__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ================================================================
   GALLERY NAVIGATION
   ================================================================ */

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  color: var(--color-white);
  cursor: pointer;
  z-index: 3;
  transition: all var(--transition-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.gallery-nav:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: translateY(-50%) scale(1.1);
}

.gallery-nav:focus {
  outline: 2px solid var(--color-white);
  outline-offset: 2px;
}

.gallery-nav--prev {
  left: var(--spacing-md);
}

.gallery-nav--next {
  right: var(--spacing-md);
}

.gallery-nav svg {
  width: 24px;
  height: 24px;
}

/* ================================================================
   GALLERY THUMBNAILS
   ================================================================ */

.gallery-slider__thumbs {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
  overflow-x: auto;
  padding: var(--spacing-xs) 0;
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary) transparent;
}

.gallery-slider__thumbs::-webkit-scrollbar {
  height: 4px;
}

.gallery-slider__thumbs::-webkit-scrollbar-track {
  background: transparent;
}

.gallery-slider__thumbs::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 2px;
}

.gallery-thumb {
  flex-shrink: 0;
  width: 80px;
  height: 60px;
  border: 2px solid transparent;
  border-radius: var(--radius-small);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-medium);
  background: none;
  padding: 0;
}

.gallery-thumb:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

.gallery-thumb--active {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(115, 53, 16, 0.2);
}

.gallery-thumb__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ================================================================
   GALLERY COUNTER & ACTIONS
   ================================================================ */

.gallery-counter {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  background: rgba(0, 0, 0, 0.6);
  color: var(--color-white);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-small);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-medium);
  z-index: 3;
  backdrop-filter: blur(10px);
}

.gallery-counter__separator {
  margin: 0 var(--spacing-xs);
  opacity: 0.7;
}

.gallery-actions {
  position: absolute;
  bottom: var(--spacing-md);
  right: var(--spacing-md);
  display: flex;
  gap: var(--spacing-sm);
  z-index: 3;
}

.gallery-action {
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  border-radius: var(--radius-small);
  color: var(--color-white);
  cursor: pointer;
  transition: all var(--transition-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.gallery-action:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: translateY(-2px);
}

.gallery-action:focus {
  outline: 2px solid var(--color-white);
  outline-offset: 2px;
}

.gallery-action svg {
  width: 20px;
  height: 20px;
}

/* ================================================================
   SINGLE IMAGE & PLACEHOLDER
   ================================================================ */

.property-hero__single-image {
  aspect-ratio: 16/10;
  border-radius: var(--radius-medium);
  overflow: hidden;
}

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

.property-hero__placeholder {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: var(--radius-medium);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  text-align: center;
  padding: var(--spacing-lg);
}

.property-hero__placeholder svg {
  width: 120px;
  height: 120px;
  margin-bottom: var(--spacing-md);
  opacity: 0.5;
}

.property-hero__placeholder p {
  font-size: var(--font-size-h6);
  font-weight: var(--font-weight-medium);
  margin: 0;
  opacity: 0.7;
}

/* ================================================================
   RESPONSIVE GALLERY
   ================================================================ */

@media (max-width: 767px) {
  .property-hero {
    padding: var(--spacing-lg) 0;
  }
  
  .property-hero__content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .gallery-slider__main {
    aspect-ratio: 4/3;
  }
  
  .gallery-nav {
    width: 40px;
    height: 40px;
  }
  
  .gallery-nav--prev {
    left: var(--spacing-sm);
  }
  
  .gallery-nav--next {
    right: var(--spacing-sm);
  }
  
  .gallery-nav svg {
    width: 20px;
    height: 20px;
  }
  
  .gallery-counter {
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    font-size: 12px;
    padding: 4px 8px;
  }
  
  .gallery-actions {
    bottom: var(--spacing-sm);
    right: var(--spacing-sm);
    gap: var(--spacing-xs);
  }
  
  .gallery-action {
    width: 36px;
    height: 36px;
  }
  
  .gallery-action svg {
    width: 16px;
    height: 16px;
  }
  
  .gallery-thumb {
    width: 60px;
    height: 45px;
  }
  
  .property-hero__single-image,
  .property-hero__placeholder {
    aspect-ratio: 4/3;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .property-hero__content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
}

/* ================================================================
   GALLERY ANIMATIONS
   ================================================================ */

.gallery-slide {
  animation-duration: 0.5s;
  animation-timing-function: ease-in-out;
  animation-fill-mode: both;
}

.gallery-slide--entering {
  animation-name: slideInRight;
}

.gallery-slide--exiting {
  animation-name: slideOutLeft;
}

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

@keyframes slideOutLeft {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-30px);
  }
}

.gallery-thumb {
  animation: fadeInUp 0.4s ease-out;
  animation-fill-mode: both;
}

.gallery-thumb:nth-child(1) { animation-delay: 0.1s; }
.gallery-thumb:nth-child(2) { animation-delay: 0.2s; }
.gallery-thumb:nth-child(3) { animation-delay: 0.3s; }
.gallery-thumb:nth-child(4) { animation-delay: 0.4s; }
.gallery-thumb:nth-child(5) { animation-delay: 0.5s; }

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

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

.gallery-nav:focus,
.gallery-thumb:focus,
.gallery-action:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .gallery-nav,
  .gallery-action {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid var(--color-white);
  }
  
  .gallery-counter {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid var(--color-white);
  }
  
  .gallery-thumb {
    border-width: 3px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .gallery-slide,
  .gallery-nav,
  .gallery-thumb,
  .gallery-action {
    transition: none;
    animation: none;
  }
  
  .gallery-nav:hover,
  .gallery-thumb:hover,
  .gallery-action:hover {
    transform: none;
  }
  
  .gallery-slide--entering,
  .gallery-slide--exiting {
    animation: none;
  }
}

