/**
 * assets/css/why-sorella.css
 * Card xanh đậm bo tròn. Header (title + ảnh) + carousel 6 items (3/lượt).
 */

.section-why {
  padding: clamp(48px, 8vw, 80px) 0 0;
  background: var(--cream);
}

.why-card {
  background: var(--green);
  border-radius: 0;
  padding: clamp(40px, 6vw, 72px) clamp(24px, 4vw, 56px);
  color: var(--cream);
}

/* --- Header: title trái (nhỏ) + ảnh phải (rộng, tỉ lệ 1:5) --- */
.why-header {
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 48px);
  margin: 0 auto clamp(40px, 6vw, 64px);
  max-width: var(--grid-max-width);
}

.why-title {
  font-size: clamp(28px, 5vw, 48px);
  color: var(--cream);
  line-height: 1.1;
  flex: 0 0 30%;
}

.why-header-img {
  flex: 1;
  border-radius: clamp(12px, 1.5vw, 16px) 0 0 clamp(12px, 1.5vw, 16px);
  overflow: hidden;
  aspect-ratio: 5 / 2;
  margin-right: calc(-1 * clamp(24px, 4vw, 56px));
}

.why-header-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Carousel --- */
.why-carousel {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1vw, 16px);
  max-width: var(--grid-max-width);
  margin: 0 auto;
}

.why-arrow {
  flex-shrink: 0;
  width: clamp(36px, 4vw, 44px);
  height: clamp(36px, 4vw, 44px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid rgba(247, 242, 231, 0.3);
  border-radius: 50%;
  font-size: clamp(20px, 2.5vw, 28px);
  color: rgba(247, 242, 231, 0.7);
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.why-arrow:hover {
  background: rgba(247, 242, 231, 0.1);
  color: var(--cream);
}

.why-viewport {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 32px);
  transition: opacity 0.25s ease;
}

/* --- Item card --- */
.why-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(8px, 1vw, 14px);
}

.why-icon {
  width: clamp(56px, 6vw, 72px);
  height: clamp(56px, 6vw, 72px);
  border-radius: 50%;
  background: rgba(247, 242, 231, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
}

.why-item-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(16px, 1.8vw, 20px);
  color: var(--cream);
  line-height: 1.3;
}

.why-item-desc {
  font-family: var(--font-body);
  font-size: clamp(13px, 1.4vw, 16px);
  color: rgba(247, 242, 231, 0.6);
  line-height: 1.5;
}

/* --- Mobile: 2 items per page --- */
@media (max-width: 767px) {
  .why-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .why-header-img {
    flex: none;
    width: 100%;
  }

  .why-viewport {
    grid-template-columns: repeat(2, 1fr);
  }
}
