/* お客様の声セクション */
.testimonials {
    background: linear-gradient(135deg, #f0f2f5 0%, #eaedf0 100%);
    position: relative;
    padding: 100px 0;
    overflow: hidden;
}

.testimonials-container {
    position: relative;
    overflow: hidden;
    padding-bottom: 50px;
}

.testimonials-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin: 0 -20px;
    padding: 20px;
    gap: 30px;
}

.testimonials-slider::-webkit-scrollbar {
    display: none;
}

.testimonial-card {
    scroll-snap-align: start;
    min-width: 350px;
    background: linear-gradient(135deg, #fff 0%, #f9f9f9 100%);
    border-radius: var(--border-radius);
    padding: 35px 30px;
    box-shadow: var(--box-shadow);
    flex: 0 0 auto;
    width: calc(33.333% - 20px);
    position: relative;
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.03);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.testimonial-card::before {
    content: "\201C";
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 100px;
    line-height: 1;
    color: rgba(52, 152, 219, 0.1);
    font-family: Georgia, serif;
    z-index: 0;
}

.testimonial-content {
    position: relative;
    z-index: 1;
    margin-bottom: 25px;
}

.testimonial-content p {
    color: var(--text);
    font-size: 16px;
    line-height: 1.7;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 20px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--secondary-light);
    margin-right: 15px;
    overflow: hidden;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-avatar.dark {
    background-color: #222;
}

.author-avatar svg {
    width: 30px;
    height: 30px;
    fill: white;
}

.author-name {
    font-weight: bold;
    color: var(--dark);
    font-size: 16px;
    margin-bottom: 3px;
}

.author-title {
    font-size: 14px;
    color: var(--text-light);
}

.testimonial-nav {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.testimonial-btn {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 8px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.2);
    position: relative;
    overflow: hidden;
    border: none;
}

.testimonial-btn::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 30%;
    top: 0;
    left: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
    border-radius: 50% 50% 0 0;
}

.testimonial-btn:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
}

@media (max-width: 1200px) {
    .testimonial-card {
        width: calc(50% - 20px);
    }
}

@media (max-width: 768px) {
    .testimonials {
        padding: 70px 0;
    }
    
    .testimonial-card {
        min-width: 280px;
        width: calc(100% - 20px);
        padding: 25px 20px;
    }
    
    .testimonial-card::before {
        font-size: 80px;
    }
}

@media (max-width: 576px) {
    .testimonials {
        padding: 50px 0;
    }
    
    .testimonial-card {
        padding: 20px 15px;
    }
}
/* --- Fix: スマホでカードが端にくっつく問題を解消 --- */
.testimonials-slider{
  /* 既存の margin: 0 -20px を打ち消す */
  margin: 0 !important;
  /* コンテナ内にきれいな内側余白を作る */
  padding: 0 16px 20px !important;
  gap: 16px;                 /* モバイルはカード間隔を少し詰める */
  scroll-padding: 0 16px;    /* スナップ開始位置も揃える（任意） */
}

/* タブレット以下：カード幅を“画面に気持ち小さめ”で中央寄せ */
@media (max-width: 768px){
  .testimonials-container{ overflow: visible; } /* 影の切れ防止（任意） */

  .testimonial-card{
    width: auto;                 /* 既存の calc(...) を無効化 */
    min-width: 88vw;             /* 画面幅の約9割 */
    max-width: 560px;            /* 横広端末で伸びすぎない上限 */
    margin: 0 auto;              /* 中央寄せ */
    padding: 20px 16px;          /* 文字の左右もゆとりを確保 */
  }
}

/* さらに小さい端末 */
@media (max-width: 576px){
  .testimonials-slider{ padding: 0 12px 16px !important; }
  .testimonial-card{ min-width: 90vw; }
}
