/* Featured Blog Swiper Styles - Matching featured-collection-swiper styles exactly */

/* Reuse container styles from featured-collection-swiper.css */
.featured-blog-swiper-container {
  margin: 0 auto;
  padding: 30px;
  position: relative;
  width: 100%;
  max-width: 1600px;
  overflow: visible;
  box-sizing: border-box;
}

/* Title styling to match container padding */
.collection .collection__title {
  /* max-width: 1200px; */
  margin: 0 auto;
}

/* Dual language title styling */
.featured-collection__title-container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.featured-collection__en-title {
  margin: 0;
  font-weight: 700;
}

.featured-collection__jp-title {
  color: #505050;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
  margin-top: 4px;
}

/* Ensure all elements use border-box sizing */
.featured-blog-swiper-container *,
.featured-blog-swiper-container *::before,
.featured-blog-swiper-container *::after {
  box-sizing: border-box;
}

.featured-blog-swiper {
  width: 100%;
  position: relative;
  overflow: hidden;
}

/* Initial layout before Swiper initializes - prevent single column */
.featured-blog-swiper:not(.swiper-initialized) .swiper-wrapper {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
}

/* Hide overflow during initialization */
.featured-blog-swiper:not(.swiper-initialized) {
  overflow: hidden;
}

/* Slide Layout - Individual article slides */
.featured-blog-swiper .swiper-slide {
  padding: 0;
  display: flex;
  flex-direction: column;
  height: auto;
}

/* Ensure slides are visible before Swiper init */
.featured-blog-swiper:not(.swiper-initialized) .swiper-slide {
  flex: 0 0 calc((100% / 4) - (20px * 3 / 4));
  max-width: calc((100% / 4) - (20px * 3 / 4));
  display: flex;
  flex-direction: column;
}

/* Swiperが初期化された後のスライド高さ統一 */
.swiper-initialized .featured-blog-swiper .swiper-slide {
  height: auto;
}

.swiper-initialized .featured-blog-swiper .swiper-wrapper {
  align-items: stretch;
}

/* Article Card Styles - Match featured-collection product card structure */
.featured-blog-article-card {
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  gap: 18px;
}

.featured-blog-article-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.featured-blog-article-card__link {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-decoration: none;
  color: inherit;
  align-items: flex-start;
  text-align: left;
}

/* Image wrapper matching featured-collection style */
.featured-blog-article-card__image-wrapper {
  width: 100%;
  aspect-ratio: 3 / 2;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.75rem;
  padding-bottom: 0;
  position: relative;
}

.featured-blog-article-card__image {
  max-width: 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-blog-article-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.featured-blog-article-card__link {
  display: contents;
}

/* Content matching featured-collection info style */
.featured-blog-article-card__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 18px;
  padding-top: 0;
  gap: 0.5rem !important;
  align-items: flex-start;
  text-align: left;
}

.featured-blog-article-card__title {
  font-size: 1.5rem;
  line-height: 1.8rem;
  height: calc(1.8rem * 2);
  color: #333;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 400;
}

.featured-blog-article-card__date {
  font-size: 0.875rem;
  color: #666;
  margin: 0;
}

/* Navigation arrows are inherited from featured-collection-swiper.css */

/* Responsive grid for different screen sizes before Swiper init */
@media screen and (max-width: 1200px) {
  .featured-blog-swiper:not(.swiper-initialized) .swiper-slide {
    flex: 0 0 calc((100% / 3) - (20px * 2 / 3));
    max-width: calc((100% / 3) - (20px * 2 / 3));
  }
}

@media screen and (max-width: 990px) {
  .featured-blog-swiper:not(.swiper-initialized) .swiper-slide {
    flex: 0 0 calc((100% / 2) - (20px / 2));
    max-width: calc((100% / 2) - (20px / 2));
  }
}

@media screen and (max-width: 768px) {
  .featured-blog-swiper:not(.swiper-initialized) .swiper-wrapper {
    gap: 10px;
  }
  .featured-blog-swiper:not(.swiper-initialized) .swiper-slide {
    flex: 0 0 calc((100% / 2) - (10px / 2));
    max-width: calc((100% / 2) - (10px / 2));
  }

  /* Hide navigation arrows on mobile */
  .featured-collection-button-next,
  .featured-collection-button-prev {
    display: none;
  }
}

/* Mobile adjustments */
@media screen and (max-width: 750px) {
  .featured-blog-swiper-container {
    padding: 15px;
  }

  .featured-blog-article-card__date {
    font-size: 0.8rem;
  }

  .featured-collection__title-container {
    flex-direction: column;
    align-items: start;
    gap: 5px;
  }

  .featured-collection__header {
    gap: 2px;
  }

  .featured-collection__view-all-btn {
    padding: 7px 15px !important;
  }
}

/* Scrollbar Styles */
.featured-blog__scrollbar {
  --swiper-scrollbar-size: 3px;
  --swiper-scrollbar-bg-color: #ffffff;
  --swiper-scrollbar-sides-offset: 25%;
  display: block;
  max-width: 50%;
  margin: 20px auto 0;
}

.featured-blog__scrollbar .swiper-scrollbar-drag {
  background: #505050;
  opacity: 0.8;
  border-radius: 3px;
  cursor: grab;
  position: relative;
  height: 100%;
  display: block;
}

.featured-blog__scrollbar.swiper-scrollbar-horizontal {
  width: 100%;
}

/* Hide scrollbar when navigation arrows are visible (PC) */
@media screen and (min-width: 1681px) {
  .featured-blog__scrollbar {
    display: none;
  }
}
