/* タイ留学ブログ記事専用スタイル */

/* 横スクロール防止 */
section {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* パンくずナビ */
.breadcrumb {
    background: var(--bg-light);
    padding: 1rem 0;
    margin-top: 70px;
    border-bottom: 1px solid var(--border-light);
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.breadcrumb-list li {
    display: flex;
    align-items: center;
}

.breadcrumb-list li:not(:last-child)::after {
    content: '>';
    margin-left: 0.5rem;
    color: var(--text-light);
}

.breadcrumb-list a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-list a:hover {
    color: var(--secondary-color);
}

.breadcrumb-list span {
    color: var(--text-light);
}

/* 記事ヘッダー */
.article-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.article-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../img/blog.thai.発表.jpeg') center/cover;
    opacity: 0.1;
    z-index: -1;
}

.article-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.15);
    z-index: 0;
}

.article-header-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.article-category-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.article-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.article-subtitle {
    font-size: 1.2rem;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 3rem;
}

.article-meta-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.author-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
}

.author-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.5);
}

.author-info-detailed h3 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    color: var(--text-white);
    font-weight: 600;
}

.author-title {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.author-bio {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
    font-weight: 400;
}

/* 記事ヘッダー内の著者肩書・自己紹介を純白に固定 */
.article-header .author-title {
    color: #ffffff !important;
}
.article-header .author-bio {
    color: #ffffff !important;
}

.article-stats {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.stat-item i {
    width: 16px;
    opacity: 0.8;
}

/* 記事本文 */
.article-content {
    padding: 4rem 0;
    background: white;
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.article-main {
    min-width: 0; /* グリッドオーバーフロー防止 */
}

/* フィーチャード画像 */
.article-featured-image {
    margin-bottom: 3rem;
}

.featured-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 16px;
}

.image-caption {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 1rem;
    font-style: italic;
}

/* 目次 */
.table-of-contents {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 3rem;
    border-left: 4px solid var(--primary-color);
}

.table-of-contents h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-of-contents ol {
    list-style: none;
    counter-reset: toc-counter;
    padding-left: 0;
}

.table-of-contents li {
    counter-increment: toc-counter;
    margin-bottom: 0.8rem;
}

.table-of-contents li::before {
    content: counter(toc-counter);
    background: var(--primary-color);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 0.8rem;
}

.table-of-contents a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.table-of-contents a:hover {
    color: var(--primary-color);
}

/* 記事本文スタイル */
.article-body {
    line-height: 1.8;
    font-size: 1.1rem;
}

.article-body section {
    margin-bottom: 4rem;
}

.article-body h2 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary-color);
}

.article-body h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin: 2rem 0 1rem;
}

.article-body h4 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin: 1.5rem 0 1rem;
}

.article-body p {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.article-body ul,
.article-body ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-body li {
    margin-bottom: 0.5rem;
}

/* 引用 */
.quote {
    background: var(--bg-light);
    border-left: 4px solid var(--accent-color);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.quote p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.quote cite {
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: normal;
}

/* 情報ボックス */
.info-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 1px solid #2196f3;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.info-box h4 {
    color: #1976d2;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.warning-box {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 1px solid #ff9800;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.warning-box h4 {
    color: #f57c00;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* テーブル */
.comparison-table-container {
    overflow-x: auto;
    margin: 2rem 0;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.comparison-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.comparison-table tr:hover {
    background: var(--bg-light);
}

/* タイ記事専用スタイル */
.strategy-timeline {
    position: relative;
    padding-left: 2rem;
}

.strategy-timeline .timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 3rem;
}

.strategy-timeline .timeline-marker {
    position: absolute;
    left: -1rem;
    top: 0;
    width: 2rem;
    height: 2rem;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.strategy-timeline .timeline-content h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.strategy-timeline .timeline-content ul {
    list-style: disc;
    padding-left: 1.5rem;
    color: var(--text-light);
}

.principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.principle-item {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-light);
}

.principle-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.principle-icon i {
    color: white;
    font-size: 1.5rem;
}

.principle-item h4 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.challenge-solution {
    margin: 2rem 0;
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
}

.challenge h3 {
    color: #e74c3c;
    margin-bottom: 1rem;
}

.solution h3 {
    color: #27ae60;
    margin-bottom: 1rem;
}

.cultural-insights {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin: 2rem 0;
}

.insight-item {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: start;
}

.insight-image {
    border-radius: 12px;
    overflow: hidden;
}

.insight-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.insight-content h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.ux-takeaway {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.roadmap {
    position: relative;
    padding-left: 2rem;
}

.roadmap::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
}

.roadmap-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 3rem;
}

.roadmap-item::before {
    content: '';
    position: absolute;
    left: -0.5rem;
    top: 0.5rem;
    width: 1rem;
    height: 1rem;
    background: var(--primary-color);
    border-radius: 50%;
}

.roadmap-date {
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.roadmap-content h3 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.conclusion-box {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.key-learnings h3 {
    color: var(--text-dark);
    margin: 1.5rem 0 1rem;
}

.key-learnings ul {
    list-style: none;
    padding: 0;
}

.key-learnings li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
}

.key-learnings li:last-child {
    border-bottom: none;
}

.cta-section {
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    margin: 2rem 0;
}

.cta-section h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

/* 画像ギャラリー */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.gallery-item {
    text-align: center;
}

.gallery-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.gallery-caption {
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
}

/* 体験カード */
.experience-card {
    background: white;
    border-radius: 12px;
    margin: 2rem 0;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.card-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
}

.card-content {
    padding: 1.5rem;
}

/* 画像ショーケース */
.image-showcase {
    text-align: center;
    margin: 2rem 0;
}

.showcase-image {
    width: 100%;
    max-width: 600px;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1rem;
}

/* コードブロック */
.code-block {
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
    background: #2d3748;
}

.code-block h4 {
    background: #1a202c;
    color: white;
    padding: 1rem 1.5rem;
    margin: 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.code-block pre {
    margin: 0;
    padding: 1.5rem;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #e2e8f0;
}

/* 今後の展開 */
.future-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.plan-item {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.plan-item h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* 記事アクション */
.article-actions {
    background: var(--bg-light);
    padding: 3rem 2rem;
    border-radius: 16px;
    margin: 3rem 0;
    text-align: center;
}

.social-share {
    margin-bottom: 2rem;
}

.social-share h4 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: transform 0.3s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.share-btn:hover {
    transform: translateY(-2px);
}

.share-btn.twitter { background: #1da1f2; }
.share-btn.facebook { background: #4267b2; }
.share-btn.linkedin { background: #0077b5; }
.share-btn.copy { background: var(--text-dark); }

.article-rating h4 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.rating-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.rating-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rating-btn.helpful {
    border-color: #4caf50;
    color: #4caf50;
}

.rating-btn.helpful:hover {
    background: #4caf50;
    color: white;
}

.rating-btn.not-helpful {
    border-color: #f44336;
    color: #f44336;
}

.rating-btn.not-helpful:hover {
    background: #f44336;
    color: white;
}

/* 関連記事 */
.related-articles {
    margin: 4rem 0;
}

.related-articles h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--text-dark);
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.related-item {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.related-item:hover {
    transform: translateY(-5px);
}

.related-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.related-content {
    padding: 1.5rem;
}

.related-content h4 {
    color: var(--text-dark);
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.related-content p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.related-date {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* サイドバー */
.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 2rem;
}

.sidebar-widget h4 {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

/* 著者ウィジェット（シンプル版） */
.author-widget-simple {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
}

.author-widget-simple h4 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    text-align: center;
}

.author-simple {
    text-align: center;
}

.author-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    display: block;
    border: 2px solid #e2e8f0;
}

.author-name {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    color: var(--text-dark);
}

.author-title {
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.author-bio {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 1.2rem;
}

.author-links {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
}

.author-link {
    padding: 0.4rem 0.8rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: background 0.3s ease;
}

.author-link:hover {
    background: var(--secondary-color);
}

/* 目次ウィジェット */
.toc-widget {
    position: sticky;
    top: 100px;
    z-index: 2;
    background: #ffffff;
}

.toc-nav ul {
    list-style: none;
    padding: 0;
}

.toc-nav li {
    margin-bottom: 0.8rem;
}

.toc-nav a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    display: block;
    padding: 0.3rem 0;
}

.toc-nav a:hover,
.toc-nav a.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* ニュースレターウィジェット */
.newsletter-widget {
    background: var(--bg-light);
    text-align: center;
}

.newsletter-widget p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.newsletter-widget .newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-widget input {
    padding: 0.8rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 1rem;
}

.newsletter-widget input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .article-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .article-meta-header {
        flex-direction: column;
        text-align: center;
    }

    .author-section {
        flex-direction: column;
        text-align: center;
    }

    .article-stats {
        flex-direction: row;
        justify-content: center;
        gap: 1.5rem;
    }

    .principles-grid {
        grid-template-columns: 1fr;
    }
    
    .insight-item {
        grid-template-columns: 1fr;
    }
    
    .strategy-timeline .timeline-item {
        padding-left: 2rem;
    }
    
    .roadmap-item {
        padding-left: 2rem;
    }

    .future-plans {
        grid-template-columns: 1fr;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .share-buttons {
        flex-direction: column;
        align-items: center;
    }

    .rating-buttons {
        flex-direction: column;
        align-items: center;
    }

    .toc-widget {
        position: static;
    }

    .comparison-table-container {
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .article-header {
        padding: 2rem 0;
    }

    .article-title {
        font-size: 1.8rem;
    }

    .article-subtitle {
        font-size: 1rem;
    }

    .article-layout {
        padding: 0 1rem;
    }

    .featured-img {
        height: 250px;
    }

    .table-of-contents {
        padding: 1.5rem;
    }

    .article-body {
        font-size: 1rem;
    }

    .article-body h2 {
        font-size: 1.5rem;
    }

    .image-gallery {
        grid-template-columns: 1fr;
    }

    .gallery-image {
        height: 150px;
    }
}

/* スクロールアニメーション */
.article-body section {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.article-body section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 読み進捗バー */
.reading-progress {
    position: fixed;
    top: 70px;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--gradient-primary);
    z-index: 1000;
    transition: width 0.1s ease;
}
