/* Added styles for clickable card links */
.stories-section .success-card-body {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  box-shadow: var(--shadow-md);
}

.stories-section .image-wrapper {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  overflow: hidden;
}

.stories-section .social-links a {
  font-size: var(--text-2xl);
  line-height: var(--leading-base);
  font-weight: var(--font-semibold);
  color: var(--white);
}

.stories-section .success-card-body h3 {
  font-size: var(--text-xl);
}

.main-tab-btn {
  min-width: 180px;
  font-weight: 500;
  padding: 10px 20px;
  white-space: nowrap;
}

.scroll-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--primary-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--white);
  padding: 0;
}

/* Tab content visibility */
.main-tab-content {
  display: none;
}

.main-tab-content.active {
  display: block;
}

.inner-tab-content {
  display: none;
}

.inner-tab-content.active {
  display: block;
}

/* Updated navigation styles to match reference design */
.btn.main-dropdown-btn {
  min-width: 160px;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 8px;
  color: var(--gray-700);
  background: var(--white);
  border-color: var(--gray-300);
}

.btn.main-dropdown-btn:hover,
.btn.main-dropdown-btn:active,
.btn.main-dropdown-btn:focus,
.btn.main-dropdown-btn:focus-visible {
  background: var(--white);
  border-color: var(--gray-400);
}

.navigation-section .dropdown-menu {
  right: unset;
  left: 0 !important;
}

.dropdown-item.main-tab-item.active {
  background-color: var(--tertiary-color);
  color: var(--white);
}

.inner-tabs-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  border-left: 1px solid;
}

.inner-tabs-container {
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}

/* Desktop: wrap inner tabs */
@media (min-width: 768px) {
  .inner-tabs-container {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}

@media (max-width: 767px) {
  .stories-section article img {
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .main-tab-btn {
    min-width: 100%;
    width: 100%;
  }

  .scroll-btn {
    width: 30px;
    height: 30px;
  }

  .scroll-btn svg {
    width: 16px;
    height: 16px;
  }

  .inner-tabs-wrapper {
    border-left: 0;
    border-top: 1px solid;
    width: 100%;
    justify-content: center;
  }

  .inner-tab-btn {
    padding: 8px 16px;
    font-size: 13px;
  }

  .inner-tabs-container button {
    text-wrap: nowrap;
  }
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .scroll-btn {
    width: 32px;
    height: 32px;
  }
}