/* ============================================
   全体コンテナ
============================================ */
.category-index-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem 6rem;
    background: transparent;
    min-height: 100vh;
}

/* ============================================
   ページヘッダー
============================================ */
.page-header {
    text-align: center;
    margin-bottom: 4.5rem;
    padding-bottom: 2.5rem;
    position: relative;
}

.page-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 2px;
    box-shadow: 0 2px 10px rgba(214, 51, 132, 0.3);
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.page-description {
    font-size: 1.2rem;
    color: var(--text-medium);
    margin: 0;
    line-height: 1.7;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   カテゴリグリッド
============================================ */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    max-width: 100%;
}

/* ============================================
   カテゴリカード
============================================ */
.category-card {
    position: relative;
    height: 100%;
}

.category-link {
    display: block;
    text-decoration: none;
    height: 100%;
    background: linear-gradient(135deg, #fff 0%, #fff5f7 100%);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(214, 51, 132, 0.1);
    position: relative;
}

.category-link::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
    z-index: 1;
}

.category-link:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
    background: linear-gradient(135deg, #fff 0%, var(--accent-pink) 100%);
}

.category-link:hover::before {
    transform: scaleX(1);
}

.category-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
}

/* ============================================
   カードの中身
============================================ */
.category-card-inner {
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.75rem;
    min-height: 320px;
}

/* ビジュアル部分 */
.category-visual {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.5rem;
}

.category-icon-wrapper {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-pink) 0%, var(--accent-rose) 100%);
    border-radius: 50%;
    padding: 1.5rem;
    transition: all 0.4s ease;
    position: relative;
    box-shadow: 0 4px 15px rgba(214, 51, 132, 0.15);
}

.category-icon-wrapper::after {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.category-link:hover .category-icon-wrapper {
    transform: scale(1.08) rotate(-5deg);
    box-shadow: 0 10px 30px rgba(214, 51, 132, 0.25);
}

.category-link:hover .category-icon-wrapper::after {
    opacity: 1;
}

.category-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.category-link:hover .category-icon {
    transform: scale(1.1);
}

/* コンテンツ部分 */
.category-content {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.category-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    transition: all 0.3s ease;
    line-height: 1.3;
}

.category-link:hover .category-name {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.category-description {
    font-size: 0.95rem;
    color: var(--text-medium);
    line-height: 1.6;
    margin: 0;
    max-width: 280px;
}

.category-count {
    display: inline-block;
    font-size: 0.875rem;
    color: var(--primary-color);
    background: rgba(214, 51, 132, 0.1);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    margin-top: 0.25rem;
    border: 1px solid rgba(214, 51, 132, 0.2);
}

/* アクション部分 */
.category-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.category-link:hover .category-action {
    opacity: 1;
    gap: 0.75rem;
}

.action-text {
    transition: transform 0.3s ease;
}

.action-arrow {
    transition: transform 0.3s ease;
}

.category-link:hover .action-arrow {
    transform: translateX(4px);
}

/* ============================================
   タブレット（768px～1024px）
============================================ */
@media (max-width: 1024px) and (min-width: 769px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .category-card-inner {
        min-height: 300px;
    }
}

/* ============================================
   タブレット・スマホ（769px以下）
============================================ */
@media (max-width: 768px) {
    .category-index-page {
        padding: 3rem 1.5rem 4rem;
    }

    .page-header {
        margin-bottom: 3.5rem;
        padding-bottom: 2rem;
    }

    .page-title {
        font-size: 2.25rem;
    }

    .page-description {
        font-size: 1.05rem;
    }

    .category-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .category-card-inner {
        padding: 2.5rem 2rem;
        gap: 1.5rem;
        min-height: 280px;
    }

    .category-icon-wrapper {
        width: 100px;
        height: 100px;
        padding: 1.25rem;
    }

    .category-name {
        font-size: 1.6rem;
    }

    .category-description {
        font-size: 0.9rem;
    }

    /* スマホではホバー効果を常に表示 */
    .category-action {
        opacity: 1;
    }

    .category-icon-wrapper::after {
        opacity: 0.5;
    }
}

/* ============================================
   スマホ（480px以下）
============================================ */
@media (max-width: 480px) {
    .category-index-page {
        padding: 2.5rem 1rem 3.5rem;
    }

    .page-header {
        margin-bottom: 3rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .page-description {
        font-size: 1rem;
    }

    .category-card-inner {
        padding: 2rem 1.5rem;
        gap: 1.25rem;
        min-height: 260px;
    }

    .category-icon-wrapper {
        width: 90px;
        height: 90px;
        padding: 1rem;
    }

    .category-name {
        font-size: 1.5rem;
    }

    .category-description {
        font-size: 0.875rem;
        max-width: 100%;
    }

    .category-count {
        font-size: 0.8rem;
        padding: 0.35rem 0.85rem;
    }

    .action-text {
        font-size: 0.875rem;
    }

    .action-arrow {
        width: 18px;
        height: 18px;
    }
}

/* ============================================
   アクセシビリティ
============================================ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   アニメーション
============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-card {
    animation: fadeInUp 0.6s ease-out backwards;
}

.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }
.category-card:nth-child(4) { animation-delay: 0.4s; }
.category-card:nth-child(5) { animation-delay: 0.5s; }
.category-card:nth-child(6) { animation-delay: 0.6s; }

