/* ====================================
   Catalog Page Styles (Clean Rebuild)
   ==================================== */

/* ヒーローセクション */
.catalog-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-align: center;
    padding: 100px 20px 40px;
    margin-bottom: 0;
}

.catalog-hero .hero-content {
    max-width: 1000px;
    margin: 0 auto;
}

.catalog-hero .main-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 0.15em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.catalog-hero .subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    opacity: 0.95;
    margin-bottom: 24px;
}

/* リード文 */
.catalog-intro {
    max-width: 1000px;
    margin: 12px auto 0;
    padding: 0 20px 8px;
    color: #222;
}
.catalog-intro p {
    margin: 0;
    line-height: 1.8;
}

.catalog-hero .profile-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.catalog-hero .profile-btn {
    display: inline-block;
    padding: 12px 28px;
    background: #fff;
    color: #764ba2;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.catalog-hero .profile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.catalog-hero .profile-btn.secondary {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    backdrop-filter: blur(10px);
}

/* フレームワークセクション */
.framework {
    background: #fff;
    color: #000;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 24px;
    margin: 20px auto;
    max-width: 1000px;
}

.framework h3 {
    color: #333;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.framework-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.framework-grid.phases {
    margin-bottom: 0;
}

.framework-item {
    background: #f8f9fa;
    color: #000;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    transition: all 0.3s ease;
}

.framework-item:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.framework-item .fw-en {
    display: block;
    font-weight: 700;
    font-size: 1.1rem;
    color: #764ba2;
    margin-bottom: 6px;
}

.framework-item .fw-ja {
    display: block;
    font-size: 0.95rem;
    color: #555;
}

/* 役割のサブラベル */
.framework-item .fw-alt {
    display: block;
    margin-top: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

/* カテゴリタブ */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px auto;
    justify-content: center;
    max-width: 1000px;
}

.tab {
    background: rgba(255, 255, 255, 0.95);
    color: #764ba2;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tab:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.tab.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    transform: scale(1.05);
}

/* スキルグリッド */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 0 auto 40px;
    max-width: 1200px;
    padding: 0 20px;
}

.skill-tile {
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    padding-top: 35px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.5s ease backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.skill-tile:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.skill-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
    padding-right: 100px;
}

.skill-rating {
    display: flex;
    gap: 3px;
    margin-bottom: 10px;
}

.star {
    font-size: 1.2rem;
    color: #ddd;
}

.star.filled {
    color: #ffc107;
}

.skill-content {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s ease;
}

.skill-tile:hover .skill-content,
.skill-tile.expanded .skill-content {
    max-height: 200px;
    opacity: 1;
    margin-top: 10px;
}

/* カテゴリバッジ */
.category-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
}

.category-badge.strategy {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.category-badge.technical {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.category-badge.creative {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.category-badge.hobby {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
}

.category-badge.other {
    background: linear-gradient(135deg, #fa709a, #fee140);
}

/* 評価基準セクション */
.legend {
    background: #fff;
    border-radius: 15px;
    padding: 24px;
    margin: 30px auto;
    max-width: 800px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.legend h3 {
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.legend-items {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.legend-item .star {
    font-size: 1.1rem;
}

/* スクリーンリーダー用 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* カタログページ固有の調整 */
.catalog-page .catalog-hero {
    padding-top: 90px;
    padding-bottom: 30px;
}

.catalog-page .framework {
    margin-top: 16px;
    margin-bottom: 16px;
}

.catalog-page .category-tabs {
    margin-top: 12px;
    margin-bottom: 20px;
}

/* 選択メニュー（フレームワーク直下） */
.category-select-wrap {
    max-width: 1000px;
    margin: 10px auto 16px;
    padding: 0 20px;
    display: flex;
    justify-content: flex-end;
}
.category-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: #fff;
    color: #764ba2;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px;
    padding: 10px 36px 10px 12px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    background-image: linear-gradient(45deg, transparent 50%, #764ba2 50%), linear-gradient(135deg, #764ba2 50%, transparent 50%);
    background-position: calc(100% - 20px) calc(50% - 3px), calc(100% - 15px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}
.category-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(118,75,162,0.15);
}

/* 大ボタン選択UI */
.category-buttons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-width: 1000px;
    margin: 12px auto 8px;
    padding: 0 20px;
}
.category-btn {
    display: inline-block;
    width: 100%;
    padding: 14px 12px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    color: #764ba2;
    background: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.12);
}
.category-btn.is-active {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: #fff;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .catalog-hero {
        padding: 80px 16px 24px;
    }
    
    .catalog-hero .main-title {
        font-size: 1.6rem;
    }
    
    .catalog-hero .subtitle {
        font-size: 0.95rem;
    }
    .catalog-intro {
        padding: 0 16px 6px;
        margin-top: 8px;
    }
    
    .framework {
        padding: 16px;
        margin: 12px 16px;
    }
    
    .framework h3 {
        font-size: 1.2rem;
        margin-bottom: 16px;
    }
    
    .framework-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .framework-item {
        padding: 12px;
    }
    .framework-item .fw-alt {
        font-size: 0.95rem;
    }
    
    .category-tabs {
        margin: 16px 12px;
        gap: 8px;
    }
    
    .tab {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 16px;
    }
    
    .skill-title {
        padding-right: 85px;
        font-size: 1rem;
    }
    
    .legend {
        margin: 20px 16px;
        padding: 20px 16px;
    }
    
    .legend-items {
        gap: 20px;
    }
    
    .catalog-page .catalog-hero {
        padding-top: 75px;
        padding-bottom: 20px;
    }

    .category-select-wrap {
        padding: 0 16px;
        justify-content: stretch;
    }
    .category-select {
        width: 100%;
    }

    .category-buttons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 0 16px;
    }
    .category-btn {
        padding: 12px 10px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .catalog-hero {
        padding: 70px 12px 20px;
    }
    
    .catalog-hero .profile-buttons {
        gap: 8px;
    }
    
    .catalog-hero .profile-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .framework {
        padding: 14px;
        margin: 10px 12px;
    }
    
    .framework-item .fw-en {
        font-size: 1rem;
    }
    
    .framework-item .fw-ja {
        font-size: 0.9rem;
    }
    .framework-item .fw-alt {
        font-size: 0.9rem;
    }
    .catalog-intro {
        padding: 0 12px 6px;
        margin-top: 6px;
    }
    
    .category-tabs {
        gap: 6px;
    }
    
    .tab {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .skill-title {
        padding-right: 75px;
    }
    
    .category-badge {
        font-size: 0.7rem;
        padding: 4px 8px;
    }

    .category-buttons {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 0 12px;
    }
    .category-btn {
        padding: 12px;
        font-size: 1rem;
    }
}