/* Carousel One Styles
   Dynamic version – works with templates/carousel-one.php
   and assets/js/carousel-one.js
*/

/* Reset-ish */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: mulish;
  margin: 0;
  background-color: #f8f9fa;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding-top: 20px;
  color: #1d1d1f;
}

/* Outer frame */
.frame {
  background-color: #ffffff;
  padding: 40px;
  border-radius: 12px;
  width: 100%;
  max-width: 1100px;
}

/* Section header */
.carousel-container h1 {
  font-size: 32px;
  margin: 0 0 28px;
  font-weight: 600;
  text-align: center;
}

/* Tabs */
.carousel-tabs {
  display: inline-flex;
  justify-content: center;
  margin: 0 auto 36px;
  border-bottom: 1px solid #eff1f5;
  gap: 6px;
  flex-wrap: wrap;
}
.tab-button {
  background-color: #eee !important;
  border: none;
  padding: 15px!important;
  width: 250px!important;
  height: 250px!important;
  cursor: pointer;
  font-size: 18px;
  color: #FF9E48 !important;
  position: relative;
  outline: none;
  font-weight: 500;
  flex-direction: column;   /* stack icon over text */
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: color .2s ease;
}
.tab-button:hover { color: #FFCF76; }
.tab-button .tab-icon {
  width: 110px;
  height: 110px;
  object-fit: contain;
}
.tab-button .progress-bar {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 3px;
  background-color: #FFCF76;
  width: 0;
  border-radius: 2px;
}
.tab-button.active { color: #FF9E48 !important; font-weight: 600; }

/* Panels */
.carousel-content { margin-top: 10px; }
.feature-panel {
  display: none;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  text-align: left;
}
.feature-panel.active {
  display: flex;
  animation: fadeIn .45s ease-in-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.feature-text { flex: 1 1 50%; }
.feature-text h2 {
  font-size: 40px;
  margin: 0 0 16px;
  font-weight: 600;
}
.feature-text p {
  font-size: 17px;
  line-height: 1.65;
  color: #374151 !important;
  margin: 0 0 22px;
}

.feature-visual {
  flex: 1 1 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.feature-visual img {
  max-width: 100%;
  border-radius: 12px;
}

.placeholder-visual {
  width: 100%;
  min-height: 280px;
  background: linear-gradient(180deg, #eef2ff, #f5f3ff);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  color: #6b7280;
  text-align: center;
  padding: 24px;
}

/* Accessibility */
.tab-button:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
  box-shadow: 0 0 0 1px #ffffff;
}

/* ==========================================
   ✅ Responsive layout for Tablet & Mobile
   Tabs → Image → Text
   ========================================== */
@media (max-width: 1024px) {
  .carousel-tabs {
    order: 1;
    width: 100%;
    margin-bottom: 20px;
  }

  .carousel-content {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .feature-panel {
    flex-direction: column !important;
    align-items: center;
    text-align: center;
  }

  .feature-visual {
    order: 2;
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 15px 0;
  }

  .feature-text {
    order: 3;
    width: 100%;
  }

  .feature-text h2 {
    font-size: 26px;
  }

  .feature-text p {
    font-size: 16px;
  }

  .tab-button {
    width: 45% !important;
    height: auto !important;
    padding: 20px !important;
  }
}

/* Smaller Mobile Screens (<=480px) */
@media (max-width: 480px) {
  .tab-button {
    width: 100% !important;
    height: auto !important;
  }
  .tab-button .tab-icon {
    width: 90px;
    height: 90px;
  }
  .feature-text h2 {
    font-size: 22px;
  }
  .feature-text p {
    font-size: 15px;
  }
    
}