/**
 * Hero Homepage Styles
 *
 * Responsive hero section with expandable columns (desktop) and slider (mobile)
 *
 * @package Empyreal\Clicksteel
 */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Montserrat:wght@400;500;600;700&display=swap');

/* ============================================
   CSS VARIABLES - CUSTOMIZE THESE
   ============================================ */
.ecml-hero-section {
  --ecml-hero-height: 60vh;
  --ecml-hero-min-height: 500px;
  --ecml-hero-max-height: 700px;

  /* Colors */
  --ecml-hero-primary-color: #ff0c3a;
  --ecml-hero-primary-hover: #e0002e;
  --ecml-hero-dark-brand: #011f30;
  --ecml-hero-overlay-color: rgba(1, 31, 48, 0.7);
  --ecml-hero-overlay-hover: rgba(1, 31, 48, 0.55);
  --ecml-hero-text-color: #ffffff;
  --ecml-hero-tab-bg: rgba(0, 56, 87, 0.7);
  --ecml-hero-tab-active-bg: rgba(0, 56, 87, 0.9);
  --ecml-hero-progress-bar-bg: rgba(255, 255, 255, 0.3);
  --ecml-hero-progress-bar-fill: var(--ecml-hero-primary-color);

  /* Typography */
  --ecml-hero-font-display: 'Bebas Neue', sans-serif;
  --ecml-hero-font-body: 'Montserrat', sans-serif;

  /* Timing */
  --ecml-hero-slide-duration: 6000;
  --ecml-hero-transition-speed: 0.5s;

  /* Mobile */
  --ecml-hero-mobile-breakpoint: 900px;
}

/* ============================================
   RESET & BASE
   ============================================ */
.ecml-hero-section *,
.ecml-hero-section *::before,
.ecml-hero-section *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.ecml-hero-section {
  font-family: var(--ecml-hero-font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   HERO CONTAINER
   ============================================ */
.ecml-hero-section {
  position: relative;
  width: 100%;
  max-width: 100vw;
  height: var(--ecml-hero-height);
  min-height: var(--ecml-hero-min-height);
  max-height: var(--ecml-hero-max-height);
  overflow: hidden;
  overflow-x: clip;
}

.ecml-hero-columns {
  display: flex;
  width: 100%;
  height: 100%;
}

/* ============================================
   DESKTOP COLUMNS
   ============================================ */
.ecml-hero-column {
  position: relative;
  flex: 1;
  height: 100%;
  overflow: hidden;
  cursor: pointer;
  transition: flex var(--ecml-hero-transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

/* Background Image */
.ecml-hero-column__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(1.15);
}

.ecml-hero-column:hover .ecml-hero-column__bg {
  transform: scale(1.0);
}

/* Overlay */
.ecml-hero-column__overlay {
  position: absolute;
  inset: 0;
  background: var(--ecml-hero-overlay-color);
  transition: background var(--ecml-hero-transition-speed) ease;
}

.ecml-hero-column:hover .ecml-hero-column__overlay {
  background: var(--ecml-hero-overlay-hover);
}

/* Content Container */
.ecml-hero-column__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  padding: 3rem 2.5rem;
  color: var(--ecml-hero-text-color);
}

/* Typography */
.ecml-hero-column__subtitle {
  font-family: var(--ecml-hero-font-body) !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ecml-hero-text-color) !important;
  opacity: 0.85;
  margin-bottom: 0.5rem;
}

.ecml-hero-column__title {
  font-family: var(--ecml-hero-font-display) !important;
  font-size: clamp(2.5rem, 4vw, 3.5rem) !important;
  font-weight: 400 !important;
  letter-spacing: 0.02em;
  line-height: 1.1 !important;
  color: var(--ecml-hero-text-color) !important;
  margin-bottom: 1rem;
}

.ecml-hero-column__description {
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.9;
  max-width: 320px;
  margin-bottom: 1.25rem;
}

/* Expanded Content - Hidden by default */
.ecml-hero-column__expanded {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.4s ease 0.1s;
}

.ecml-hero-column:hover .ecml-hero-column__expanded {
  max-height: 300px;
  opacity: 1;
}

.ecml-hero-column__blurb {
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.85;
  margin-bottom: 1.25rem;
  max-width: 300px;
}

/* Icon List */
.ecml-hero-column__features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  list-style: none;
}

.ecml-hero-column__feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.ecml-hero-column__feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  flex-shrink: 0;
}

.ecml-hero-column__feature-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--ecml-hero-primary-color);
  stroke-width: 2;
  fill: none;
}

/* CTA Button */
.ecml-hero-column__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: var(--ecml-hero-primary-color);
  color: var(--ecml-hero-text-color);
  font-family: var(--ecml-hero-font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  width: fit-content;
}

.ecml-hero-column__cta:hover {
  background: var(--ecml-hero-primary-hover);
  transform: translateY(-2px);
  color: var(--ecml-hero-text-color);
}

.ecml-hero-column__cta svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.ecml-hero-column__cta:hover svg {
  transform: translateX(4px);
}

/* Hover expansion effect */
.ecml-hero-columns:hover .ecml-hero-column {
  flex: 0.85;
}

.ecml-hero-columns:hover .ecml-hero-column:hover {
  flex: 1.3;
}

/* Divider lines between columns */
.ecml-hero-column:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 10%;
  height: 80%;
  width: 1px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 3;
}

/* ============================================
   MOBILE TABS & SLIDER
   ============================================ */
.ecml-hero-tabs {
  display: none;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Progress Bar */
.ecml-hero-tabs__progress {
  height: 3px;
  background: var(--ecml-hero-progress-bar-bg);
  position: relative;
  overflow: hidden;
}

.ecml-hero-tabs__progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: var(--ecml-hero-progress-bar-fill);
  transition: width 0.1s linear;
}

.ecml-hero-tabs__progress-bar.animating {
  animation: ecmlHeroProgressFill 6s linear forwards;
}

@keyframes ecmlHeroProgressFill {
  from { width: 0; }
  to { width: 100%; }
}

/* Tab Buttons */
.ecml-hero-tabs__buttons {
  display: flex;
}

.ecml-hero-tab {
  flex: 1;
  padding: 1rem;
  background: var(--ecml-hero-tab-bg);
  border: none;
  color: var(--ecml-hero-text-color);
  font-family: var(--ecml-hero-font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s ease;
  position: relative;
}

.ecml-hero-tab:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.ecml-hero-tab.active {
  background: var(--ecml-hero-tab-active-bg);
}

.ecml-hero-tab:hover {
  background: var(--ecml-hero-tab-active-bg);
}

/* ============================================
   MOBILE STYLES
   ============================================ */
@media (max-width: 900px) {
  .ecml-hero-section {
    height: auto;
    min-height: 70svh;
    max-height: none;
  }

  .ecml-hero-columns {
    position: relative;
    width: 100%;
  }

  .ecml-hero-column {
    position: absolute;
    inset: 0;
    width: 100%;
    flex: none !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
  }

  .ecml-hero-column.active {
    opacity: 1;
    visibility: visible;
    position: relative;
    width: 100%;
  }

  .ecml-hero-column__bg {
    transform: scale(1.05);
  }

  .ecml-hero-column__content {
    padding: 2rem 1.5rem;
    padding-bottom: 6rem;
    min-height: 70svh;
  }

  .ecml-hero-column__title {
    font-size: 2.5rem;
  }

  /* Always show expanded content on mobile */
  .ecml-hero-column__expanded {
    max-height: 500px;
    opacity: 1;
  }

  .ecml-hero-tabs {
    display: block;
  }

  /* Disable hover effects on mobile */
  .ecml-hero-column:hover .ecml-hero-column__bg {
    transform: scale(1.05);
  }

  .ecml-hero-column:hover .ecml-hero-column__overlay {
    background: var(--ecml-hero-overlay-color);
  }

  .ecml-hero-columns:hover .ecml-hero-column {
    flex: none !important;
  }
}

/* ============================================
   BACKGROUND IMAGES - CUSTOMIZE THESE
   ============================================ */
.ecml-hero-column--roofing .ecml-hero-column__bg {
  background-image: url('https://www.clicksteel.com.au/wp-content/uploads/2025/12/echs_roofing.jpg');
}

.ecml-hero-column--fencing .ecml-hero-column__bg {
  background-image: url('https://www.clicksteel.com.au/wp-content/uploads/2025/12/echs_fencing.jpg');
}

.ecml-hero-column--patios .ecml-hero-column__bg {
  background-image: url('https://www.clicksteel.com.au/wp-content/uploads/2025/12/echs_patio.jpg');
}

/* ============================================
   PERFORMANCE OPTIMIZATION
   ============================================ */
.ecml-hero-column__bg {
  will-change: transform;
}

.ecml-hero-column {
  will-change: flex;
}
