/* ============================================================================
   関連リンクセクション - resources-section用CSS
   ============================================================================ */

/* セクション全体 */
.resources-section {
    padding: 5rem 0;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    position: relative;
}

.resources-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(203, 213, 225, 0.5), transparent);
}

/* コンテナ */
.resources-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ============================================================================
   ヘッダー部分
   ============================================================================ */

.resources-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.resources-main-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 1rem 0;
    letter-spacing: -0.02em;
}

.resources-subtitle {
    font-size: 1.05rem;
    color: #64748b;
    line-height: 1.7;
    margin: 0;
}

/* ============================================================================
   カードグリッド
   ============================================================================ */

.resources-cards-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================================================
   カード共通スタイル
   ============================================================================ */

.resource-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.05),
        0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid #f1f5f9;
}

.resource-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.resource-card:hover {
    transform: translateY(-12px);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.1),
        0 10px 40px rgba(59, 130, 246, 0.15);
    border-color: #e0e7ff;
}

.resource-card:hover::before {
    transform: scaleX(1);
}

/* カード別カラー */
.resource-card-internal::before {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.resource-card-external::before {
    background: linear-gradient(90deg, #8b5cf6, #7c3aed);
}

.resource-card-video::before {
    background: linear-gradient(90deg, #ec4899, #db2777);
}

/* ============================================================================
   カードヘッダー
   ============================================================================ */

.resource-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.resource-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.resource-card-internal .resource-icon-wrapper {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.resource-card-external .resource-icon-wrapper {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
}

.resource-card-video .resource-icon-wrapper {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
}

.resource-card:hover .resource-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

.resource-icon {
    font-size: 2rem;
    line-height: 1;
}

.resource-badge {
    padding: 0.35rem 0.9rem;
    background: #f1f5f9;
    color: #475569;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.resource-badge-primary {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

.resource-badge-video {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    color: #9f1239;
}

/* ============================================================================
   カードボディ
   ============================================================================ */

.resource-card-body {
    flex: 1;
    margin-bottom: 1.5rem;
}

.resource-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.resource-card:hover .resource-card-title {
    color: #3b82f6;
}

.resource-card-external:hover .resource-card-title {
    color: #8b5cf6;
}

.resource-card-video:hover .resource-card-title {
    color: #ec4899;
}

.resource-card-desc {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.7;
    margin: 0 0 1.5rem 0;
}

/* ============================================================================
   特徴リスト
   ============================================================================ */

.resource-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.resource-features-list li {
    font-size: 0.85rem;
    color: #475569;
    padding: 0.4rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================================================
   カードフッター
   ============================================================================ */

.resource-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.25rem;
    border-top: 1px solid #f1f5f9;
    transition: border-color 0.3s ease;
}

.resource-card:hover .resource-card-footer {
    border-top-color: #e0e7ff;
}

.resource-link-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #3b82f6;
    transition: all 0.3s ease;
}

.resource-card-external .resource-link-text {
    color: #8b5cf6;
}

.resource-card-video .resource-link-text {
    color: #ec4899;
}

.resource-arrow-icon {
    color: #3b82f6;
    transition: all 0.3s ease;
}

.resource-card-external .resource-arrow-icon {
    color: #8b5cf6;
}

.resource-card-video .resource-arrow-icon {
    color: #ec4899;
}

.resource-card:hover .resource-link-text {
    transform: translateX(-4px);
}

.resource-card:hover .resource-arrow-icon {
    transform: translateX(6px);
}

/* ============================================================================
   レスポンシブデザイン
   ============================================================================ */

/* タブレット（1024px以下） */
@media (max-width: 1024px) {
    .resources-section {
        padding: 4rem 0;
    }
    
    .resources-cards-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .resource-card:last-child {
        grid-column: 1 / -1;
        max-width: 600px;
        margin: 0 auto;
    }
}

/* モバイル（768px以下） */
@media (max-width: 768px) {
    .resources-section {
        padding: 3.5rem 0;
    }
    
    .resources-main-title {
        font-size: 1.75rem;
    }
    
    .resources-subtitle {
        font-size: 0.95rem;
    }
    
    .resources-header {
        margin-bottom: 2.5rem;
    }
    
    .resources-cards-wrapper {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .resource-card {
        padding: 1.75rem;
    }
    
    .resource-card:last-child {
        grid-column: auto;
        max-width: none;
    }
    
    .resource-icon-wrapper {
        width: 56px;
        height: 56px;
    }
    
    .resource-icon {
        font-size: 1.75rem;
    }
    
    .resource-card-title {
        font-size: 1.2rem;
    }
    
    .resource-card-desc {
        font-size: 0.875rem;
    }
    
    .resource-features-list li {
        font-size: 0.8rem;
    }
}

/* 小型モバイル（480px以下） */
@media (max-width: 480px) {
    .resources-section {
        padding: 3rem 0;
    }
    
    .resources-main-title {
        font-size: 1.5rem;
    }
    
    .resources-subtitle {
        font-size: 0.9rem;
    }
    
    .resources-header {
        margin-bottom: 2rem;
    }
    
    .resource-card {
        padding: 1.5rem;
    }
    
    .resource-card-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .resource-badge {
        align-self: flex-start;
    }
    
    .resource-icon-wrapper {
        width: 52px;
        height: 52px;
    }
    
    .resource-icon {
        font-size: 1.5rem;
    }
}

/* ============================================================================
   ダークモード対応（オプション）
   ============================================================================ */

@media (prefers-color-scheme: dark) {
    .resources-section {
        background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    }
    
    .resources-section::before {
        background: linear-gradient(90deg, transparent, rgba(71, 85, 105, 0.5), transparent);
    }
    
    .resources-main-title {
        color: #f1f5f9;
    }
    
    .resources-subtitle {
        color: #cbd5e1;
    }
    
    .resource-card {
        background: #1e293b;
        border-color: #334155;
    }
    
    .resource-card-title {
        color: #f1f5f9;
    }
    
    .resource-card-desc {
        color: #cbd5e1;
    }
    
    .resource-features-list li {
        color: #cbd5e1;
    }
    
    .resource-card:hover {
        border-color: rgba(59, 130, 246, 0.5);
    }
    
    .resource-card-footer {
        border-top-color: #334155;
    }
    
    .resource-card:hover .resource-card-footer {
        border-top-color: rgba(59, 130, 246, 0.3);
    }
}

/* ============================================================================
   アクセシビリティ対応
   ============================================================================ */

/* フォーカス時のスタイル */
.resource-card:focus {
    outline: 3px solid #3b82f6;
    outline-offset: 4px;
}

.resource-card:focus:not(:focus-visible) {
    outline: none;
}

/* 縮小モーション設定を優先するユーザー向け */
@media (prefers-reduced-motion: reduce) {
    .resource-card,
    .resource-icon-wrapper,
    .resource-card-title,
    .resource-link-text,
    .resource-arrow-icon,
    .resource-card::before,
    .resource-card-footer {
        transition: none;
    }
    
    .resource-card:hover {
        transform: none;
    }
    
    .resource-card:hover .resource-icon-wrapper {
        transform: none;
    }
    
    .resource-card:hover .resource-link-text {
        transform: none;
    }
    
    .resource-card:hover .resource-arrow-icon {
        transform: none;
    }
}

/* ============================================================================
   印刷時のスタイル
   ============================================================================ */

@media print {
    .resources-section {
        background: white;
        padding: 1rem 0;
    }
    
    .resources-section::before {
        display: none;
    }
    
    .resource-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .resource-card::before {
        display: none;
    }
    
    .resources-cards-wrapper {
        gap: 1rem;
    }
}