@charset "utf-8";
/* ---------------------------------------------------------
  FANZA GAMES ランキング特集
----------------------------------------------------------*/
/* ランキングセクション全体のコンテナ */
div.adRanking-section {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #f8f8f8;
    max-width: 100%;
    margin: 30px auto 0;
    background-color: #ffffff;
    border-top: 1px solid #e0e0e0;
    border-bottom: 10px solid #f761a6;
    padding: 10px 0 20px 0;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* ヘッダーコンテナとPR表示 (Flexboxで横並び) */
div.adRanking-section div.adHeader-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 20px;
    margin: 0 auto 10px;
    max-width: 1910px;
    width: 100%;
    box-sizing: border-box;
}

div.adRanking-section h2.adSection-title {
    display: flex;
    align-items: center;
    line-height: 1;
    font-size: 1.5em;
    font-weight: 700;
    margin: 0;
}
  h2.adSection-title img {
      margin-right: 8px;
      display: block;
  }


div.adRanking-section span.pr-indicator {
    background-color: #eaeaea;
    color: #444;
    font-size: 0.8em;
    font-weight: 700;
    padding: 4px 6px;
    border-radius: 3px;
    margin-left: auto;
}

/* --- タブのスタイル (Flexboxで横並び) --- */

div.adRanking-section div.adRanking-tabs-container {
    width: 100%;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    padding-right: 20px;
    margin-bottom: 15px; 
}

div.adRanking-section div.adRanking-tabs {
    display: flex;
    max-width: 1910px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    gap: 20px;
}

div.adRanking-section button.adTab-button {
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 10px 15px;
    font-size: 1.1em;
    color: #666;
    transition: color 0.3s;
    position: relative;
    font-weight: 400;
}

div.adRanking-section button.adTab-button.active {
    color: #000000;
    font-weight: 700;
}

div.adRanking-section button.adTab-button.active::after {
    content: '';
    position: absolute;
    bottom: -1px; 
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #ff0055;
}

/* --- タブ内容（ランキングリスト） --- */
div.adRanking-section div.adRanking-list {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 150px));
    gap: 10px;
    justify-content: center;
    padding: 0 10px 20px;
    margin: 0 auto;
    max-width: 1910px;
    width: 100%;
    box-sizing: border-box;
}

/* **ランキングアイテム（カード）** */
div.adRanking-section a.adRanking-item {
    display: inline-block;
    width: 100px;
    max-width: 150px;
    margin: 5px;
    vertical-align: top;
    text-align: left;
    text-decoration: none;
    color: #333;
    position: relative;
}
@supports (display: grid) {
    div.adRanking-section a.adRanking-item {
        display: block; 
        width: 100%;
        margin: 0;
    }
}


/* --- 順位バッジの基本スタイル --- */
div.adRanking-section span.adRank-number {
    position: absolute;
    top: 0; left: 0; z-index: 10;
    color: #fff;
    font-weight: 900;
    font-size: 0.85em;
    padding: 4px 10px 4px 6px;
    border-bottom-right-radius: 15px; 
    background-color: #cc0000;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    display: flex; align-items: center; justify-content: center;
    min-width: 25px;
}

/* --- 1位〜3位の個別色設定 --- */

/* 1位：金 (Gold) */
a.adRanking-item:nth-child(1) span.adRank-number {
    background: linear-gradient(135deg, #ffd700 0%, #b8860b 100%);
    text-shadow: 1px 1px 1px rgba(0,0,0,0.3);
    font-size: 1.1em;
    padding: 6px 12px 6px 8px;
    border-bottom-right-radius: 20px;
}
a.adRanking-item:nth-child(1) span.adRank-number::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(45deg, rgba(255,255,255,0.4) 0%, transparent 50%, rgba(255,255,255,0.4) 100%);
    border-bottom-right-radius: 20px;
}
/* 2位：銀 (Silver) */
a.adRanking-item:nth-child(2) span.adRank-number {
    background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 50%, #707070 100%);
    text-shadow: 1px 1px 1px rgba(0,0,0,0.3);
    font-size: 1.0em;
    border-bottom-right-radius: 20px;
}

/* 3位：銅 (Bronze) */
a.adRanking-item:nth-child(3) span.adRank-number {
    background: linear-gradient(135deg, #f4a460 0%, #8b4513 100%);
    text-shadow: 1px 1px 1px rgba(0,0,0,0.3);
    font-size: 1.0em;
    border-bottom-right-radius: 20px;
}

/* 王冠アイコンのような装飾を擬似要素で追加（お好みで） */
a.adRanking-item:nth-child(1) span.adRank-number::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(45deg, rgba(255,255,255,0.4) 0%, transparent 50%, rgba(255,255,255,0.4) 100%);
    border-bottom-right-radius: 20px;
}


/* サムネイル画像 */
div.adRanking-section div.adItem-thumbnail {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 4px;
    background-color: #eee;
    margin-bottom: 5px;
    position: relative;
}
  div.adRanking-section div.adItem-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
    transition: transform 0.3s ease;
  }

/* --- ホバーエフェクトの設定 --- */

/* ランキングアイテム全体にマウスを乗せた時、画像を拡大する */
a.adRanking-item:hover div.adItem-thumbnail img {
    /* 1.25倍に拡大 */
    transform: scale(1.25); 
}

/* タイトルも少し色を変えて「押せる感」を出す */
a.adRanking-item:hover .adItem-title {
    color: #cc0000;
    text-decoration: underline;
}


/* ゲームタイトル */
div.adRanking-section p.adItem-title {
    white-space: normal;
    font-size: 1em;
    font-weight: 600;
    line-height: 1.4;
    height: 3em; 
    overflow: hidden;
    text-overflow: ellipsis; 
    margin: 0;
    padding: 0;
    text-align: left;
}


/* --- レスポンシブ設定（列数と表示個数の制御） --- */
/* タブレット: 横に6列、2段（計12個）にする設定 */
@media (max-width: 1024px) {
  @supports (display: grid) {
      div.adRanking-section div.adRanking-list {
          grid-template-columns: repeat(6, minmax(0, 150px));
      }
  }
}
/* スマホ: 横に3列、2段（計6個）にする設定 */
@media (max-width: 600px) {
    @supports (display: grid) {
        div.adRanking-section div.adRanking-list {
            /* repeat(3, 1fr) にすると画面幅に収まるよう自動伸縮します */
            grid-template-columns: repeat(3, 1fr); 
            gap: 5px;
            padding: 0 5px 20px;
        }
        .adRanking-item:nth-child(n+7) {
            display: none !important; /* 7個目以降を消す */
        }
        div.adRanking-section button.adTab-button {
            font-size: 1.4em;
            font-weight: 800;
        }
        div.adRanking-section p.adItem-title {
            font-size: 1.2em;
            font-weight: 800;
        }
        
    }
    
    div.adRanking-section {
        border-bottom: none;
    }
    
    /* 古いブラウザ（Grid非対応）向けの指示、7番目以降のアイテムを隠す */
    .adRanking-item:nth-child(n+7) {
        display: none !important;
    }
}

