/* ==========================================================================
   Feature Showcase Component Stylesheet (Pure CSS Filter)
   File: template-parts/components/feature-showcase.css
   ========================================================================== */

/* 1. Main Container
   -------------------------------------------------------------------------- */
.feature-showcase-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 20px;
  font-family: inherit;
  box-sizing: border-box;
}

/* Hide Radio Inputs */
.feature-showcase-container input[type="radio"].feature-radio {
  display: none !important;
}

/* 2. Header Filter Navigation Tabs (Matches Screenshot)
   -------------------------------------------------------------------------- */
.feature-nav-wrapper {
  width: 100%;
  margin-bottom: 50px;
  border-bottom: 1px solid #e0e0e0; /* Horizontal line across full width */
}

.feature-nav {
  display: flex;
  justify-content: center;
  align-items: flex-end; /* Align tabs onto the bottom border line */
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.feature-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.5px;
  color: #555555;
  text-transform: uppercase;
  background-color: transparent;
  cursor: pointer;
  border-radius: 8px 8px 0 0; /* Rounded top corners matching your image */
  transition:
    background-color 0.25s ease,
    color 0.25s ease;
  margin-bottom: -1px; /* Seats flush on top of the bottom border */
  user-select: none;
}

.feature-tab-btn:hover {
  color: #a81c1c;
}

/* 3. Pure CSS State Engine (Active Red Filled Block)
   -------------------------------------------------------------------------- */
.feature-slide {
  display: none;
}

/* Active Tab Solid Red Block */
.feature-radio[data-index="0"]:checked ~ .feature-nav-wrapper .feature-tab-0,
.feature-radio[data-index="1"]:checked ~ .feature-nav-wrapper .feature-tab-1,
.feature-radio[data-index="2"]:checked ~ .feature-nav-wrapper .feature-tab-2,
.feature-radio[data-index="3"]:checked ~ .feature-nav-wrapper .feature-tab-3,
.feature-radio[data-index="4"]:checked ~ .feature-nav-wrapper .feature-tab-4,
.feature-radio[data-index="5"]:checked ~ .feature-nav-wrapper .feature-tab-5 {
  background-color: #aa1111; /* Solid Red Fill */
  color: #ffffff; /* White Text */
}

/* Active Slide Visibility */
.feature-radio[data-index="0"]:checked ~ .feature-stage .feature-slide-0,
.feature-radio[data-index="1"]:checked ~ .feature-stage .feature-slide-1,
.feature-radio[data-index="2"]:checked ~ .feature-stage .feature-slide-2,
.feature-radio[data-index="3"]:checked ~ .feature-stage .feature-slide-3,
.feature-radio[data-index="4"]:checked ~ .feature-stage .feature-slide-4,
.feature-radio[data-index="5"]:checked ~ .feature-stage .feature-slide-5 {
  display: flex;
}

/* 4. Overlapping Layout Design
   -------------------------------------------------------------------------- */
.feature-stage {
  position: relative;
  width: 100%;
}

.feature-slide {
  position: relative;
  align-items: center;
  width: 100%;
  min-height: 480px;
}

/* Floating White Content Box (Left) */
.feature-card {
  position: relative;
  z-index: 2;
  width: 50%;
  background: #ffffff;
  padding: 50px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
  margin-right: -10%; /* Creates the overlap over the image */
}

/* Title */
.feature-card-title {
  color: #2c2c2c;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 20px 0;
}

/* WYSIWYG Content */
.feature-card-desc {
  color: #4a4a4a;
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 30px;
}

.feature-card-desc p {
  margin: 0 0 12px 0;
}

.feature-card-desc p:last-child {
  margin-bottom: 0;
}

/* Red Arrow CTA Link */
.feature-card-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #aa1111;
  font-size: 16px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.feature-card-link svg {
  transition: transform 0.25s ease;
}

.feature-card-link:hover {
  color: #801313;
}

.feature-card-link:hover svg {
  transform: translateX(6px);
}

/* Side Media (Right Image) */
.feature-media {
  position: relative;
  z-index: 1;
  width: 60%;
  height: 100%;
  min-height: 480px;
  margin-left: auto;
  overflow: hidden;
}

.feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 992px) {
  .feature-nav {
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
  }

  .feature-tab-btn {
    flex: 0 0 auto;
    padding: 12px 20px;
    font-size: 12px;
  }

  .feature-slide {
    flex-direction: column-reverse;
    min-height: auto;
  }

  .feature-card {
    width: 100%;
    margin-right: 0;
    margin-bottom: -40px;
    padding: 35px 25px;
  }

  .feature-media {
    width: 100%;
    min-height: 320px;
  }
}

@media (max-width: 640px) {
  .feature-card {
    padding: 25px 20px;
    margin-bottom: 0;
  }

  .feature-card-title {
    font-size: 22px;
  }

  .feature-card-link {
    font-size: 14px;
  }

  .feature-media {
    min-height: 240px;
  }
}
