/**
 * SHB iThanks - Body Chuyện của iThanks / List (Figma node 250-385)
 * Tin nổi bật (1+3), 3 carousel 4 thẻ/slide, nav dots + arrows
 */

/* ===== Chuyện của iThanks – List ===== */
.ithanks-main .ithanks-story-list {
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

.ithanks-story-list .ithanks-breadcrumb {
  margin-bottom: 1rem;
}

.ithanks-story-list__title {
  margin-bottom: 2rem;
  color: var(--ithanks-se-100);
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.ithanks-story-list__section {
  margin-bottom: 3rem;
}

.ithanks-story-list__section:last-child {
  margin-bottom: 0;
}

/* ===== Tiêu đề section (Tin nổi bật, Leader Talk, …) – line cùng hàng với text (Figma 330-3016) ===== */
.ithanks-section__title--story {
  font-size: 2rem;
  font-weight: 700;
  color: var(--ithanks-se-100);
  text-align: left;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ithanks-section__title--story::after {
  content: "";
  flex: 1;
  height: 1px;
  min-width: 0;
  background: var(--ithanks-se-40);
  border-radius: 1px;
}

/* ===== Tin nổi bật: 1 card lớn + 3 card nhỏ ===== */
.ithanks-featured .row {
  margin-left: -0.75rem;
  margin-right: -0.75rem;
}

.ithanks-featured .row > [class*="col-"] {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

/* .ithanks-card__link styles đã chuyển vào ithanks-common.css */

/* Card lớn – img fix height cân xứng với 3 card nhỏ bên phải (Figma 330-3015) */
.ithanks-card--feature .ithanks-card__img--feature {
  display: block;
  width: 100%;
  height: 26.5625rem; /* 425px = 26.5625rem */
  border-radius: 1rem;
  object-fit: cover;
  object-position: center;
}

.ithanks-card--feature .ithanks-card__body {
  padding: 1rem 0 0;
}

.ithanks-card--feature .ithanks-card__text {
  margin: 0;
  font-size: 1.5rem; /* 24px = 1.5rem */
  font-weight: 700;
  color: var(--ithanks-text-figma);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Featured Small Cards Carousel */
.ithanks-featured-small-carousel {
  height: 100%;
}

.ithanks-featured-small-carousel .splide__track {
  height: 100%;
}

.ithanks-featured-small-carousel .splide__list {
  height: 100%;
}

.ithanks-featured-small-carousel .splide__slide {
  height: auto;
}

/* Desktop/Tablet: hiển thị như grid (không scroll, ẩn arrows và pagination) */
@media (min-width: 768px) {
  .ithanks-featured-small-carousel .splide__arrows {
    display: none !important;
  }
  .ithanks-featured-small-carousel .splide__pagination {
    display: none !important;
  }
  .ithanks-featured-small-carousel .splide__list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transform: none !important;
  }
  .ithanks-featured-small-carousel .splide__slide {
    width: 100% !important;
    margin-right: 0 !important;
  }
}

/* Card nhỏ – thumb trái, text phải (horizontal, Figma 330-3015: thumb height lớn hơn) */
.ithanks-card--small .ithanks-card__link {
  display: block;
}

.ithanks-card--small .ithanks-card__link .row {
  margin-left: 0;
  margin-right: 0;
}

.ithanks-card--small .ithanks-card__link .row > [class*="col-"] {
  padding-left: 0;
  padding-right: 0;
}

.ithanks-card--small .ithanks-card__img--thumb {
  display: block;
  width: 100%;
  height: 7.8125rem; /* 125px = 7.8125rem */
  border-radius: 0.625rem; /* 10px = 0.625rem */
  object-fit: cover;
  object-position: center;
}

.ithanks-card--small .ithanks-card__body {
  padding: 0;
  padding-left: 1.3125rem; /* 21px = 1.3125rem - gap giữa ảnh và text */
}

.ithanks-card--small .ithanks-card__text {
  margin: 0;
  font-size: 1.125rem; /* 18px = 1.125rem */
  font-weight: 700;
  color: var(--ithanks-text-figma);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Carousel 4 thẻ/slide (Leader Talk, Ơn giời, Tin tức khác) ===== */
.ithanks-story-list__carousel .row {
  margin-left: -0.75rem;
  margin-right: -0.75rem;
}

.ithanks-story-list__carousel .row > [class*="col-"] {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

/* Card story – ảnh fix height tránh xô lệch (Leader Talk, Ơn giời Cam, Tin tức khác) */
.ithanks-card--story {
  background: var(--ithanks-white);
  overflow: visible;
  height: 100%;
}

.ithanks-card--story .ithanks-card__link {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.ithanks-card--story .ithanks-card__img {
  display: block;
  width: 100%;
  height: 15.625rem;
  border-radius: 1rem;
  object-fit: cover;
  object-position: center;
  flex-shrink: 0;
}

.ithanks-card--story .ithanks-card__body {
  padding: 1.5rem 0 0;
  flex: 1;
  min-width: 0;
}

.ithanks-card--story .ithanks-card__text {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ithanks-text-figma);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Responsive: tablet & mobile ===== */
@media (max-width: 991.98px) {
  .ithanks-story-list {
    padding-top: 1rem;
    padding-bottom: 1.5rem;
  }
  .ithanks-story-list__title {
    font-size: 2.5rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
    margin-bottom: 1.5rem;
  }
  .ithanks-section__title--story {
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
  }
  .ithanks-story-list__section {
    margin-bottom: 2.5rem;
  }
  /* Featured section - tablet adjustments */
  .ithanks-featured .row {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
  }
  .ithanks-featured .row > [class*="col-"] {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  .ithanks-card--feature .ithanks-card__img--feature {
    height: 22rem;
  }
  .ithanks-card--feature .ithanks-card__body {
    padding-top: 0.875rem;
  }
  .ithanks-card--feature .ithanks-card__text {
    font-size: 1.375rem;
  }
  .ithanks-card--small .ithanks-card__body {
    padding-left: 1rem;
  }
  .ithanks-card--small .ithanks-card__text {
    font-size: 1rem;
  }
  .ithanks-card--story .ithanks-card__img {
    height: 14rem;
  }
  .ithanks-card--story .ithanks-card__text {
    font-size: 1rem;
  }
  /* Hide splide arrows on tablet */
  .ithanks-story-list__carousel .splide__arrows {
    display: none !important;
  }
}

@media (max-width: 767.98px) {
  .ithanks-story-list__title {
    font-size: 2rem;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    margin-bottom: 1.25rem;
  }
  .ithanks-section__title--story {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    gap: 0.75rem;
  }
  .ithanks-story-list__section {
    margin-bottom: 2rem;
  }
  /* Featured section - tablet portrait adjustments */
  .ithanks-featured .row {
    margin-left: 0;
    margin-right: 0;
  }
  .ithanks-featured .row > [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
  }
  .ithanks-featured .col-md-7 {
    margin-bottom: 1.5rem;
  }
  .ithanks-card--feature .ithanks-card__img--feature {
    height: 20rem;
  }
  .ithanks-card--feature .ithanks-card__body {
    padding-top: 0.75rem;
  }
  .ithanks-card--feature .ithanks-card__text {
    font-size: 1.25rem;
  }
  /* Featured Small Carousel - tablet portrait: enable carousel */
  .ithanks-featured-small-carousel .splide__list {
    flex-direction: row;
    gap: 0;
  }
  .ithanks-featured-small-carousel .splide__arrows {
    display: none !important;
  }
  .ithanks-featured-small-carousel .splide__pagination {
    display: flex;
  }
  /* Small cards - adjust spacing and layout */
  .ithanks-card--small {
    margin-bottom: 0 !important;
  }
  .ithanks-card--small .ithanks-card__body {
    padding-left: 0.875rem;
  }
  .ithanks-card--small .ithanks-card__text {
    font-size: 0.9375rem;
  }
  .ithanks-card--story .ithanks-card__img {
    height: 13rem;
  }
  .ithanks-card--story .ithanks-card__text {
    font-size: 0.9375rem;
  }
}

@media (max-width: 575.98px) {
  .ithanks-story-list {
    padding-top: 0.75rem;
    padding-bottom: 1rem;
  }
  .ithanks-story-list__title {
    font-size: 1.75rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
  }
  .ithanks-section__title--story {
    font-size: 1.25rem;
    margin-bottom: 0.875rem;
    gap: 0.5rem;
  }
  .ithanks-story-list__section {
    margin-bottom: 1.5rem;
  }
  /* Featured section - mobile adjustments */
  .ithanks-featured .row {
    margin-left: 0;
    margin-right: 0;
  }
  .ithanks-featured .row > [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
  }
  .ithanks-featured .col-md-7 {
    margin-bottom: 1.25rem;
  }
  .ithanks-card--feature .ithanks-card__img--feature {
    height: 18rem;
  }
  .ithanks-card--feature .ithanks-card__body {
    padding-top: 0.75rem;
  }
  .ithanks-card--feature .ithanks-card__text {
    font-size: 1.125rem;
    line-height: 1.4;
  }
  /* Featured Small Carousel - mobile: enable carousel with vertical card layout */
  .ithanks-featured-small-carousel .splide__list {
    flex-direction: row;
    gap: 0;
  }
  .ithanks-featured-small-carousel .splide__slide {
    padding-right: 0;
    margin-right: 0;
  }
  /* Small cards - mobile: vertical layout */
  .ithanks-card--small {
    margin-bottom: 0 !important;
    height: 100%;
  }
  .ithanks-card--small .ithanks-card__link {
    height: 100%;
  }
  .ithanks-card--small .ithanks-card__link .row {
    flex-direction: column;
    height: 100%;
  }
  .ithanks-card--small .ithanks-card__link .row > [class*="col-"] {
    max-width: 100%;
    flex: 0 0 auto;
    width: 100%;
  }
  .ithanks-card--small .ithanks-card__body {
    padding-left: 0;
    padding-top: 0.75rem;
    flex: 1;
  }
  .ithanks-card--small .ithanks-card__img--thumb {
    height: 12rem;
  }
  .ithanks-card--small .ithanks-card__text {
    font-size: 0.875rem;
    line-height: 1.4;
  }
  .ithanks-story-list__carousel .row {
    margin-left: 0;
    margin-right: 0;
  }
  .ithanks-story-list__carousel .row > [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
  }
  .ithanks-card--story .ithanks-card__img {
    height: 12rem;
  }
  .ithanks-card--story .ithanks-card__text {
    font-size: 0.875rem;
  }
}
