/* Swiper用カスタムスタイル - iOS対応版 */
.fabg-slider-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    font-family: 'Noto Sans JP', sans-serif;
}

/* ナビゲーションスタイル */
.fabg-content-navigation {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
    margin: 30px 0;
}

.fabg-nav-item {
    cursor: pointer;
    padding: 8px 16px;
    background-color: #f8f8f8;
    border-radius: 20px;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    /* iOS用タッチ対応 */
    touch-action: manipulation;
}

.fabg-nav-item:hover {
    background-color: #e0e0e0;
}

.fabg-nav-item.active {
    background-color: #111;
}

.fabg-nav-item.active .fabg-nav-text {
    color: #fff;
}

.fabg-nav-text {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    pointer-events: none; /* タッチイベントの伝播を防ぐ */
}

/* スライダーコンテナ */
.fabg-slider-container {
    display: none;
    position: relative;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.fabg-slider-container.active {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* Swiperスタイル */
.fabg-interviews-swiper,
.fabg-contents-swiper {
    width: 100%;
    margin: 20px auto;
    position: relative;
    padding-bottom: 3em!important;
    z-index: 1;
}

/* スライド基本スタイル */
.fabg-interviews-swiper .swiper-slide,
.fabg-contents-swiper .swiper-slide {
    height: auto;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.fabg-article-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    -webkit-tap-highlight-color: transparent;
}

.fabg-featured-article {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    gap: 1em;
    cursor: pointer;
}

/* 画像コンテナ */
.fabg-image-container {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
    border-radius: 6px 6px 0 0;
}

.fabg-featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

/* ホバー時の画像拡大エフェクト */
.fabg-article-link:hover .fabg-featured-image {
    transform: scale(1.08);
}

.fabg-article-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fabg-article-category {
    display: inline-block;
}

.fabg-category-text {
    background-color: #111;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 4px 10px;
    width: fit-content;
    border-radius: 30px;
}

.fabg-article-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fabg-article-title-wrapper {
    margin-bottom: 5px;
}

.fabg-article-title {
    font-size: 1.5vw;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fabg-article-date-wrapper {
    margin-top: auto;
}

.fabg-article-date {
    font-size: 16px;
    color: #aaa;
}

.fabg-no-posts-message {
    text-align: center;
    padding: 40px 20px;
    background: #f8f8f8;
    border-radius: 8px;
    font-size: 16px;
    color: #666;
}

/* ページネーション */
.fabg-slider-wrapper .swiper-pagination {
    bottom: 0em!important;
    position: relative;
    z-index: 10;
}

.fabg-slider-wrapper .swiper-pagination-bullet {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.fabg-slider-wrapper .swiper-pagination-bullet-active {
    background-color: #111;
}

/* モバイル用カードスタイル */
@media (max-width: 640px) {
    .fabg-interviews-swiper,
    .fabg-contents-swiper {
        width: 82%;
        margin: 20px auto;
        padding-bottom: 1em!important;
        /* カードエフェクト用の設定 */
        overflow: visible !important;
    }
    
    /* Swiper wrapper用のiOS対応 */
    .fabg-interviews-swiper .swiper-wrapper,
    .fabg-contents-swiper .swiper-wrapper {
        /* iOS Safari用3D空間設定 */
        -webkit-transform-style: preserve-3d;
        transform-style: preserve-3d;
        -webkit-perspective: 1200px;
        perspective: 1200px;
    }

    /* スライドのiOS対応 */
    .fabg-slider-wrapper .swiper-slide {
        overflow: visible!important;
        /* iOS用3D変換最適化 */
        -webkit-transform-style: preserve-3d;
        transform-style: preserve-3d;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        will-change: transform;
        /* iOS用の高さ設定 */
        height: auto !important;
    }

    .fabg-featured-article {
        box-shadow: 0px 0px 10px 0px rgba(0,0,0,.1);
        padding-bottom: 10px;
        background: #fff;
        border-radius: 6px;
        min-height: 280px;
        /* iOS用レイヤー最適化 */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

    .fabg-article-content {
        padding: 0.1em 1em 1em;
    }

    .fabg-article-title {
        font-size: 16px;
    }
    
    .fabg-slider-wrapper .swiper-pagination {
        bottom: -2.4em!important;
    }

    .fabg-image-container {
        min-height: 150px;
    }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .fabg-slider-wrapper {
        padding-bottom: 2em;
    }
    
    .fabg-content-navigation {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        padding: 0 1em;
    }
    
    .fabg-slider-wrapper .swiper-pagination {
        bottom: -2.4em!important;
    }
}

/* iOS Safari特有の対応 */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari全般 */
    .fabg-interviews-swiper,
    .fabg-contents-swiper {
        -webkit-overflow-scrolling: touch;
    }
    
    /* モバイルiOS Safari用カードエフェクト最適化 */
    @media (max-width: 640px) {
        .fabg-interviews-swiper,
        .fabg-contents-swiper {
            /* 3D空間の最適化 */
            -webkit-perspective: 1000px !important;
            perspective: 1000px !important;
        }
        
        .fabg-slider-wrapper .swiper-slide {
            /* iOS用3D変換の最適化 */
            -webkit-transform: translate3d(0, 0, 0);
            transform: translate3d(0, 0, 0);
            -webkit-transform-origin: center center;
            transform-origin: center center;
        }
        
        /* カードエフェクト時のスライド */
        .swiper-cards .swiper-slide {
            /* iOS用の明示的なz-index設定 */
            z-index: 1;
        }
        
        .swiper-cards .swiper-slide-active {
            z-index: 10;
        }
        
        /* 画像の最適化 */
        .fabg-featured-image {
            -webkit-transform: translateZ(0);
            transform: translateZ(0);
            image-rendering: -webkit-optimize-contrast;
        }
    }
}

/* 高DPIディスプレイ対応 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .fabg-featured-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}