/* =========================== 
   メンズエステランキング専用CSS
=========================== */

.ranking-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Hiragino Sans', 'ヒラギノ角ゴシック', 'Yu Gothic', 'メイリオ', sans-serif;
}

.ranking-section-title {
    all: initial !important;
    font-family: 'Hiragino Sans', 'ヒラギノ角ゴシック', 'Yu Gothic', 'メイリオ', sans-serif !important;
    text-align: center !important;
    font-size: clamp(18px, 2.5vw, 24px) !important;
    font-weight: bold !important;
    color: #2c3e50 !important;
    margin: 0 auto 40px auto !important;
    position: relative !important;
    padding: 20px 30px !important;
    background-color: white !important;
    border: 2px solid #000 !important;
    width: 90% !important;
    max-width: 90% !important;
    display: block !important;
    box-sizing: border-box !important;
    line-height: 1.4 !important;
    letter-spacing: normal !important;
    text-decoration: none !important;
    text-transform: none !important;
    text-shadow: none !important;
    border-radius: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* タブレット用の調整 */
@media (min-width: 769px) and (max-width: 1024px) {
    .ranking-section-title {
        font-size: clamp(16px, 2.2vw, 22px) !important;
        padding: 18px 25px !important;
    }
}

/* 大画面用の調整 */
@media (min-width: 1200px) {
    .ranking-section-title {
        font-size: 24px !important;
        max-width: 80% !important;
    }
}

.ranking-section-title::after {
    content: '' !important;
    position: absolute !important;
    bottom: -15px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 0 !important;
    height: 0 !important;
    border-left: 15px solid transparent !important;
    border-right: 15px solid transparent !important;
    border-top: 15px solid #000 !important;
    z-index: 1 !important;
}

.ranking-section-title .mobile-br {
    display: none;
}

.ranking-section-title .highlight-red {
    color: #dc3545;
    font-weight: bold;
}

.ranking-section-title .highlight-yellow {
    background: linear-gradient(transparent 60%, #fff59d 60%);
    font-weight: bold;
}

.ranking-item {
    display: block;
    padding: 15px 25px 25px 25px;
    margin-bottom: 25px;
    background: #fff;
    border: 3px solid #e9ecef;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.ranking-item.rank-1 {
    background: linear-gradient(135deg, #fffbf0 0%, #ffffff 100%);
    border-color: #FFD700;
}

.ribbon-content {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 110px;
    height: 110px;
    overflow: hidden;
    z-index: 10;
}

.ribbon {
    display: inline-block;
    position: absolute;
    padding: 9px 0;
    left: -28px;
    top: 28px;
    width: 190px;
    text-align: center;
    font-size: 20px;
    line-height: 18px;
    background: linear-gradient(to right, #ff4757 0%, #ff6b7a 100%);
    color: #fff;
    text-shadow: 0 2px 2px #d63031;
    letter-spacing: 0.05em;
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    font-weight: bold;
}

.ranking-item.rank-2,
.ranking-item.rank-3 {
    background: #fff;
    border-color: #C0C0C0;
}

.rank-ribbon {
    position: absolute;
    top: 0;
    left: 15px;
    width: 45px;
    height: 60px;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 900;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 85%, 0 100%);
    z-index: 1;
}

.rank-number {
    font-size: 25px;
    font-weight: bold;
    line-height: 1;
}

.rank-suffix {
    font-size: 12px;
    margin-top: 2px;
}

.rank-1-ribbon {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.rank-2-ribbon {
    background: linear-gradient(135deg, #E8E8E8 0%, #C0C0C0 50%, #A8A8A8 100%);
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.4);
}

.rank-3-ribbon {
    background: linear-gradient(135deg, #E8E8E8 0%, #C0C0C0 50%, #A8A8A8 100%);
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.4);
}

.rank-1-text {
    color: #ffd700;
}

.rank-2-text {
    color: #c0c0c0;
}

.rank-3-text {
    color: #cd7f32;
}

.school-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 8px;
}

/* PC版のレイアウト */
.pc-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    width: 100%;
}

/* スマホ版のレイアウト */
.mobile-layout {
    display: none;
}

.pc-image {
    width: 150px;
    height: 130px;
    object-fit: cover;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    cursor: pointer;
}

.mobile-image {
    width: 100%;
    object-fit: cover;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.school-info {
    flex: 1;
    min-width: 0;
    height: 130px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.school-basic-info {
    display: flex;
    flex-direction: column;
    gap: 0px;
    height: 100%;
    justify-content: space-between;
}

.school-name-container {
    margin-bottom: 12px;
    margin-left: 50px;
    display: flex;
    align-items: center;
}

.rank-text {
    font-size: 22px;
    font-weight: bold;
    color: #2c3e50;
    margin-right: 8px;
}

.school-name {
    font-size: 22px;
    font-weight: bold;
    color: #2c3e50;
}

.school-name-link {
    color: #0073aa;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.school-name-link:hover {
    color: #005177;
    text-decoration: underline;
}

.school-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1px;
}

.school-details {
    margin-bottom: 1px;
}

.rating-label {
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.stars {
    font-size: 18px;
    color: #ffc107;
}

.rating-count {
    font-size: 13px;
    color: #666;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    font-size: 14px;
}

.info-icon {
    color: #3498db;
    width: 16px;
    text-align: center;
}

.info-label {
    font-weight: 600;
    color: #555;
    min-width: 80px;
}

.info-value {
    color: #2c3e50;
    font-weight: 500;
}

.price-value {
    color: #E91E63;
    font-weight: 600;
    font-size: 16px;
}

.school-features {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #e9ecef;
}

.features {
    color: #666;
    font-size: 13px;
    line-height: 1.6;
}

.recommendation-title {
    font-weight: 600;
    color: #D80028;
    margin-bottom: 8px;
    font-size: 16px;
}

.recommendation {
    margin-bottom: 15px;
}

.recommendation-text {
    color: #666;
    line-height: 1.6;
    font-size: 14px;
}

.button-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.detail-button {
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    width: 70%;
    justify-content: center;
    background: linear-gradient(135deg, #ff7043, #e64a19);
    color: #fff;
    box-shadow: 0 4px 0 #bf360c, 0 6px 15px rgba(255, 112, 67, 0.3);
}

.detail-button:hover {
    background: linear-gradient(135deg, #e64a19, #d84315);
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #bf360c, 0 8px 20px rgba(255, 112, 67, 0.4);
}

.detail-button:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #bf360c, 0 4px 10px rgba(255, 112, 67, 0.3);
}

@media (max-width: 768px) {
    .ranking-container {
        padding: 0px;
    }

    .ranking-section-title {
        font-size: 20px;
        padding: 15px 20px;
        line-height: 1.2;
    }

    .ranking-section-title .mobile-br {
        display: block;
        line-height: 0.5;
        margin: -2px 0;
    }

    .ranking-item {
        padding: 10px;
    }

    /* PC版を非表示、スマホ版を表示 */
    .pc-layout {
        display: none;
    }

    .mobile-layout {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .school-content {
        flex-direction: column;
        gap: 10px;
    }

    .mobile-image {
        width: 100%;
    }

    .mobile-info {
        height: auto;
    }

    .school-name-container {
        margin-bottom: 8px;
        margin-left: 55px;
    }

    .school-name {
        font-size: 18px;
    }

    .school-rating,
    .info-row {
        justify-content: flex-start;
    }

    .button-container {
        gap: 8px;
    }

    .detail-button {
        font-size: 15px;
        padding: 10px 16px;
        width: 80%;
    }

    .features {
        justify-content: flex-start;
    }

    .ribbon-content {
        width: 85px;
        height: 85px;
        top: -6px;
        right: -6px;
        display: none;
    }

    .ribbon {
        width: 140px;
        left: -20px;
        top: 20px;
        font-size: 16px;
        line-height: 16px;
        padding: 7px 0;
    }

    .recommendation-title {
        font-size: 15px;
        line-height: 1.5;
    }
}