/**
 * Irmanha Hero Module Styles
 *
 * Full-width hero slider with CTA button and floating social media bars
 */

/* ===== HERO CONTAINER ===== */
.irmanha-hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  height: 85vh;
  min-height: 500px;
  max-height: 900px;
  margin: 0 !important;
  padding: 0 !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  background-color: #000; /* Prevent white flash during fade */
}

/* Remove any spacing from parent containers */
.fl-module .irmanha-hero,
.fl-col .irmanha-hero,
.fl-row .irmanha-hero {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* ===== SLIDER FIXES ===== */
.irmanha-hero__slider {
  /* Use calc for better browser support on full width breakout */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  height: 85vh;
  min-height: 500px;
  max-height: 900px;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  display: block !important;
  background-color: #000; /* Prevent white flash during fade */
  position: relative;
}

/* Individual slides */
.irmanha-hero__slide {
  position: relative;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #000; /* Prevent white flash */
}

.irmanha-hero__slide-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Ensure image covers the div */
}

/* Fallback slide */
.irmanha-hero__slide--fallback {
  background: linear-gradient(135deg, var(--irmanha-beige) 0%, var(--irmanha-grey) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Builder placeholder for slides without images */
.irmanha-hero__slide-placeholder {
  background: linear-gradient(135deg, var(--irmanha-beige, #f5f5dc) 0%, var(--irmanha-grey, #e0e0e0) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 200px;
}

.irmanha-hero__placeholder-content {
  text-align: center;
  color: var(--irmanha-black, #333);
  padding: var(--irmanha-space-4);
}

.irmanha-hero__placeholder-content svg {
  width: 48px;
  height: 48px;
  margin-bottom: var(--irmanha-space-3);
  opacity: 0.6;
}

.irmanha-hero__placeholder-content p {
  font-size: var(--irmanha-h3, 1.5rem);
  font-weight: 600;
  margin-bottom: var(--irmanha-space-2);
}

.irmanha-hero__placeholder-content small {
  font-size: var(--irmanha-body, 1rem);
  opacity: 0.8;
}

.irmanha-hero__fallback-content {
  text-align: center;
  color: var(--irmanha-black);
}

.irmanha-hero__fallback-content h2 {
  font-size: var(--irmanha-h2);
  margin-bottom: var(--irmanha-space-4);
}

.irmanha-hero__fallback-content p {
  font-size: var(--irmanha-body);
}

/* ===== CONTENT CONTAINER ===== */
.irmanha-hero__content {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1400px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--irmanha-space-6);
  z-index: 10;
}

/* ===== DOTS CONTAINER ===== */
.irmanha-hero__dots-container {
    position: absolute;
    left: var(--irmanha-space-6, 2rem);
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 20px;
}

/* Slick Dots Styling */
.irmanha-hero__dots-container .slick-dots {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

.irmanha-hero__dots-container .slick-dots li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    display: block !important;
}

.irmanha-hero__dots-container .slick-dots li button {
    font-size: 0 !important;
    line-height: 0 !important;
    display: block !important;
    width: 12px !important;
    height: 12px !important;
    padding: 0 !important;
    cursor: pointer !important;
    color: transparent !important;
    border: 0 !important;
    outline: none !important;
    background: rgba(255, 255, 255, 0.3) !important;
    border-radius: 0 !important; /* Square corners */
    transition: var(--irmanha-transition-base);
}

.irmanha-hero__dots-container .slick-dots li.slick-active button {
    background-color: #fff !important;
    transform: scale(1.2) !important;
}

/* ===== CALL-TO-ACTION BUTTON ===== */
.irmanha-hero__button-container {
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
}

.irmanha-hero__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  min-height: 70px;
  padding: 20px 32px;
  font-size: 20px; /* Maximum 20px font size */

  background-color: var(--irmanha-black, #000);
  color: var(--irmanha-white, #fff);
  border-radius: 0; /* Square corners */
  text-decoration: none;
  transition: var(--irmanha-transition-base);
}

/* REVEAL THE TEXT */
.irmanha-hero__button-text {
  position: static; /* Reset from absolute */
  opacity: 1;
  visibility: visible;
  font-weight: 400;
  font-size: 20px !important; /* Maximum 20px font size */
  letter-spacing: 1px;
  margin: 0 !important; /* Override Beaver Builder theme margin-bottom */
}

/* Override any p tags inside button text */
.irmanha-hero__button-text p,
.irmanha-hero__button p {
  margin: 0 !important;
  margin-bottom: 0 !important;
}

.irmanha-hero__button:focus {
  outline: none;
}

.irmanha-hero__button:hover {
  background-color: var(--irmanha-beige, #f5f5dc);
  color: var(--irmanha-black, #000);
}

.irmanha-hero__button--no-link {
  cursor: pointer;
  opacity: 0.8;
}

.irmanha-hero__button--no-link:hover {
  background-color: var(--irmanha-beige, #f5f5dc);
  color: var(--irmanha-black, #000);
}

/* Builder placeholder for button */
.irmanha-hero__button-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  min-height: 70px;
    padding: 20px 32px; /* Even padding on all sides */
  background-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  border: 2px dashed rgba(255, 255, 255, 0.5);
  border-radius: 0;
  text-decoration: none;
  transition: var(--irmanha-transition-base);
}

.irmanha-hero__button-placeholder-content {
  text-align: center;
}

.irmanha-hero__button-placeholder-content span {
  display: block;
  font-weight: 600;
  font-size: var(--irmanha-body);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.irmanha-hero__button-placeholder-content small {
  font-size: var(--irmanha-body-sm);
  opacity: 0.8;
}

/* ===== SOCIAL MEDIA BARS ===== */
.irmanha-hero__social-bars {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: var(--irmanha-space-3);
  width: 180px;
  z-index: 10;
}

.irmanha-hero__social-bar {
  position: relative;
  overflow: hidden;
}

.irmanha-hero__social-link {
  display: flex;
  align-items: center;
  background-color: var(--irmanha-beige);
  height: 48px;
  width: 180px;
  border-radius: var(--irmanha-radius-sm);
  text-decoration: none;
  color: var(--irmanha-black);
  transform: translateX(132px);
  transition: transform var(--irmanha-transition-base);
  overflow: hidden;
}

.irmanha-hero__social-link:hover,
.irmanha-hero__social-link--focused {
  transform: translateX(0);
}

.irmanha-hero__social-icon {
  width: 48px;
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.irmanha-hero__social-icon svg,
.irmanha-hero__social-icon img {
  max-width: 24px;
  max-height: 24px;
}

/* Zorg ervoor dat iconen altijd dezelfde kleur houden */
.irmanha-hero__social-icon svg {
  color: var(--irmanha-black);
}

.irmanha-hero__social-link:hover .irmanha-hero__social-icon svg,
.irmanha-hero__social-link--focused .irmanha-hero__social-icon svg {
  color: var(--irmanha-black);
}

.irmanha-hero__social-text {
  padding: 0 var(--irmanha-space-3) 0 var(--irmanha-space-2);
  white-space: nowrap;
  font-size: var(--irmanha-body);
  font-weight: var(--irmanha-font-weight-medium);
  color: var(--irmanha-black);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
  .irmanha-hero {
    height: 85vh;
    min-height: 500px;
    max-height: 900px;
  }
  
  .irmanha-hero__slider {
    height: 85vh;
    min-height: 500px;
    max-height: 900px;
  }
  
  .irmanha-hero__content {
    padding: 0 var(--irmanha-space-4);
  }

  .irmanha-hero__social-content {
    min-width: 220px;
    padding: var(--irmanha-space-2) var(--irmanha-space-3);
  }

  .irmanha-hero__social-text {
    font-size: var(--irmanha-body-sm);
  }
}

@media (max-width: 768px) {
  .irmanha-hero {
    height: 60vh;
    height: 60dvh; /* Use dynamic viewport height for mobile browsers */
    min-height: 400px;
    max-height: 600px;
  }
  
  .irmanha-hero__slider {
    height: 60vh;
    height: 60dvh; /* Use dynamic viewport height for mobile browsers */
    min-height: 400px;
    max-height: 600px;
  }
  
  /* Ensure only one slide is visible on mobile */
  .irmanha-hero__slider .slick-slide {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
  }
  
  .irmanha-hero__slider .slick-track {
    width: 100% !important;
  }

  .irmanha-hero__content {
      flex-direction: column;
      justify-content: center;
      text-align: center;
  }

  .irmanha-hero__button-container {
      position: static;
      transform: none;
      margin: 0 auto;
  }

  /* Move dots to bottom on mobile */
  .irmanha-hero__dots-container {
      top: auto;
      bottom: 20px;
      left: 50%;
      transform: translateX(-50%);
      width: auto;
  }

  .irmanha-hero__dots-container .slick-dots {
      flex-direction: row !important; /* Override desktop column layout */
      gap: 8px !important; /* Smaller gap for horizontal layout */
  }

  /* Hide social bars on mobile */
  .irmanha-hero__social-bars {
      display: none;
  }

  .irmanha-hero__social-link {
      width: 48px; /* Collapse to icon only on small screens */
      transform: none;
      border-radius: 50%;
  }

  .irmanha-hero__social-text {
      display: none;
  }
}

@media (max-width: 480px) {
  .irmanha-hero__button {
    min-height: 60px;
    padding: 18px 28px; /* Even padding on all sides */
    font-size: var(--irmanha-text-mobile-lg);
  }

  .irmanha-hero__button-text {
    font-size: var(--irmanha-button-hero-mobile);
    letter-spacing: 0.5px;
  }

  .irmanha-hero__social-content {
    width: 180px;
    padding: var(--irmanha-space-2);
  }

  .irmanha-hero__social-icon {
    width: 20px;
    height: 20px;
  }

  .irmanha-hero__social-text {
    font-size: var(--irmanha-body-sm);
  }
}

/* ===== BUILDER SPECIFIC STYLES ===== */
.fl-builder-edit .irmanha-hero__slider {
  width: 100%;
  left: auto;
  right: auto;
  margin-left: 0;
  margin-right: 0;
  height: 400px;
  min-height: 400px;
  max-height: 400px;
}

.fl-builder-edit .irmanha-hero__content {
  position: relative;
  transform: none;
  width: 100%;
  max-width: none;
  height: auto;
  min-height: 200px;
  padding: var(--irmanha-space-4);
  background: rgba(0, 0, 0, 0.7);
  border-radius: var(--irmanha-radius-md);
  margin-top: var(--irmanha-space-4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.fl-builder-edit .irmanha-hero__button-container {
  position: static;
  transform: none;
  margin-top: var(--irmanha-space-3);
}

.fl-builder-edit .irmanha-hero__button-placeholder {
  background-color: rgba(0, 0, 0, 0.1);
  color: var(--irmanha-black);
  border-color: var(--irmanha-black);
  border-style: dashed;
}

.fl-builder-edit .irmanha-hero__dots {
  margin-top: 0;
}

.fl-builder-edit .irmanha-hero__social-bars {
  position: static;
  transform: none;
  margin-top: var(--irmanha-space-4);
  display: flex;
  flex-direction: row;
  gap: var(--irmanha-space-2);
  justify-content: center;
}

  .fl-builder-edit .irmanha-hero__social-link {
    transform: translateX(0);
    width: auto;
    padding: var(--irmanha-space-2) var(--irmanha-space-3);
  }

/* ===== SLICK CAROUSEL OVERRIDES ===== */
/* Hide Slick arrows since we're using dots */
.irmanha-hero__slider .slick-prev,
.irmanha-hero__slider .slick-next {
  display: none !important;
}

/* Remove any borders from Slick elements */
.irmanha-hero__slider .slick-list,
.irmanha-hero__slider .slick-track,
.irmanha-hero__slider .slick-slide,
.irmanha-hero__slider .slick-slide > div {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  height: 100% !important; /* Ensure full height */
}

.irmanha-hero__slider .slick-list {
  height: 100% !important;
  overflow: hidden !important;
  position: relative !important;
  padding: 0 !important;
  margin: 0 !important;
  background-color: #000; /* Prevent white flash */
}

.irmanha-hero__slider .slick-track {
  display: block !important; /* Default for fade */
  top: 0;
  left: 0;
  height: 100% !important;
  width: 100% !important;
  background-color: #000; /* Prevent white flash */
}

.irmanha-hero__slider .slick-slide {
  height: 100% !important;
  width: 100% !important;
  display: block !important; /* Default for fade */
  float: left !important; /* Required for fade fallback */
  position: absolute !important; /* Required for fade */
  top: 0 !important;
  left: 0 !important;
  opacity: 0 !important; /* Start hidden */
  transition: opacity 0.6s ease-in-out !important; /* Smooth fade */
  z-index: 1;
  background-color: #000; /* Prevent white flash */
}

.irmanha-hero__slider .slick-slide.slick-active {
  opacity: 1 !important; /* Show active slide */
  z-index: 2; /* Keep active slide on top */
}

.irmanha-hero__slider .slick-slide > div {
  height: 100% !important;
  width: 100% !important;
  background-color: transparent; /* Let slide image show through */
}

.irmanha-hero__slider.slick-initialized .slick-track {
  height: 100% !important;
}

/* Prevent any extra spacing after hero */
.irmanha-hero + * {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Ensure proper stacking */
.irmanha-hero__slider .slick-dots {
  display: none; /* We use our custom dots container */
}

/* Loading state */
.irmanha-hero__slide-image {
  opacity: 0;
  transition: opacity var(--irmanha-transition-base);
}

.irmanha-hero__slide-image.loaded {
  opacity: 1;
}

/* ===== ACCESSIBILITY ===== */
.irmanha-hero__button:focus-visible,
.irmanha-hero__social-link:focus-visible {
  outline: 2px solid var(--irmanha-white);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .irmanha-hero__button {
    border: 2px solid var(--irmanha-white);
  }

  .irmanha-hero__social-link {
    border: 2px solid var(--irmanha-black);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .irmanha-hero__button,
  .irmanha-hero__social-link,
  .irmanha-hero__dots button {
    transition: none;
  }

  .irmanha-hero__slide-image {
    opacity: 1;
  }
}
