/* 記事詳細ページ専用スタイル */

/* フェードインアニメーション */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

body.loaded {
    overflow-x: hidden;
}

/* パンくずリスト */
.breadcrumb {
    background: #f8f9fa;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
    margin-top: 80px; /* ヘッダーの高さ分のマージンを追加 */
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* 記事詳細コンテナ */
.article-detail {
    padding: 3rem 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 80vh;
}

/* 記事ヘッダー */
.article-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.article-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .article-title {
        font-size: 2rem;
    }
}

/* メタ情報 */
.article-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8f9fa;
    padding: 0.8rem 1.2rem;
    border-radius: 25px;
    border: 2px solid #e9ecef;
}

.meta-icon {
    font-size: 1.2rem;
}

.meta-text {
    color: #666;
    font-weight: 500;
}

.category-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

/* サムネイル画像 */
.article-thumbnail {
    margin: 3rem 0;
    text-align: center;
}

.article-thumbnail img {
    display: block;
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.article-thumbnail img:hover {
    transform: scale(1.02);
}

/* リード文 */
.article-lead {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #667eea;
}

.article-lead p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #444;
    margin: 0;
}

.article-lead h2,
.article-lead h3,
.article-lead h4 {
    color: #2c3e50;
    margin: 1.5rem 0 1rem 0;
}

.article-lead h2 {
    font-size: 1.6rem;
}

.article-lead h3 {
    font-size: 1.4rem;
}

.article-lead ul,
.article-lead ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-lead li {
    margin-bottom: 0.8rem;
    padding-left: 0.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}

.article-lead table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.article-lead thead th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: bold;
}

.article-lead tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.article-lead tbody tr:hover {
    background-color: #f8f9fa;
}

.article-lead tbody tr:last-child {
    border-bottom: none;
}

.article-lead td,
.article-lead th {
    padding: 1rem;
    text-align: left;
    vertical-align: top;
}

.article-lead td {
    color: #555;
    line-height: 1.6;
}

/* メインコンテンツ */
.article-content {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.content-section {
    margin-bottom: 3rem;
}

.content-section:last-child {
    margin-bottom: 0;
}

.content-section h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #667eea;
    display: inline-block;
}

.content-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

.content-body h3 {
    color: #2c3e50;
    margin: 2rem 0 1rem 0;
}

.content-body h4 {
    color: #34495e;
    margin: 1.5rem 0 0.8rem 0;
}

.content-body p {
    margin-bottom: 1.2rem;
}

.content-body ul, .content-body ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.content-body li {
    margin-bottom: 0.8rem;
    padding-left: 0.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}

.content-body code {
    background: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #e83e8c;
}

.content-body pre {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.content-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.content-body thead th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: bold;
}

.content-body tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.content-body tbody tr:hover {
    background-color: #f8f9fa;
}

.content-body tbody tr:last-child {
    border-bottom: none;
}

.content-body td,
.content-body th {
    padding: 1rem;
    text-align: left;
    vertical-align: top;
}

.content-body td {
    color: #555;
    line-height: 1.6;
}

.queries-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    border-left: 4px solid #28a745;
}

/* 特徴リスト */
.features-list {
    display: grid;
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #28a745;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 1.3rem;
    color: #28a745;
}

/* アクションボタン */
.article-actions {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.download-button {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 3rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
    border: none;
    cursor: pointer;
}

.download-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.download-note {
    color: #666;
    font-size: 0.9rem;
    margin: 1rem 0 2rem 0;
    font-style: italic;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: #f8f9fa;
    color: #495057;
    padding: 1rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
    font-weight: 500;
    cursor: pointer;
}

.secondary-button:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    text-decoration: none;
}

.button-icon {
    font-size: 1.1rem;
}

.button-text {
    font-size: 1rem;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .article-detail {
        padding: 2rem 0;
    }

    .article-header {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .article-content {
        padding: 2rem;
    }

    .article-lead {
        padding: 2rem;
    }

    .article-actions {
        padding: 2rem;
    }

    .article-meta {
        gap: 1rem;
    }

    .meta-item {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

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

    .secondary-button {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .download-button {
        padding: 1.2rem 2rem;
        font-size: 1.1rem;
    }

    /* モーダルのレスポンシブ対応 */
    .modal-content {
        margin: 10% auto;
        padding: 2rem;
        width: 95%;
        max-width: 400px;
    }

    .modal-content h3 {
        font-size: 1.5rem;
    }

    .close {
        top: 0.5rem;
        right: 1rem;
        font-size: 1.8rem;
    }

    .form-actions {
        flex-direction: column;
        gap: 0.8rem;
    }

    .submit-button,
    .cancel-button {
        width: 100%;
        justify-content: center;
        padding: 1rem 1.5rem;
    }

    /* 使用用途説明のレスポンシブ */
    .usage-notice {
        padding: 1.2rem;
        margin: 1rem 0 1.5rem 0;
    }

    .usage-notice p strong {
        font-size: 1rem;
    }

    .usage-notice li {
        font-size: 0.9rem;
        padding: 0.4rem 0;
    }

    .goal-images-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .goal-image {
        height: 180px;
    }
    
    .youtube-section {
        padding: 1.5rem;
    }
    
    .youtube-section .section-title {
        font-size: 1.3rem;
    }
    
    .image-modal-content {
        max-width: 95vw;
        max-height: 95vh;
        padding: 0.5rem;
    }
    
    .image-modal-content img {
        max-height: 70vh;
    }
    
    .image-modal-caption {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 1.8rem;
    }

    .article-content {
        padding: 1.5rem;
    }

    .article-lead {
        padding: 1.5rem;
    }

    .article-actions {
        padding: 1.5rem;
    }

    .download-button {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    .content-section h2 {
        font-size: 1.5rem;
    }

    /* 小画面でのモーダル調整 */
    .modal-content {
        margin: 20% auto;
        padding: 1.5rem;
        width: 90%;
    }

    .modal-content h3 {
        font-size: 1.3rem;
    }

    .modal-content p {
        font-size: 0.9rem;
    }

    .form-group input[type="email"] {
        padding: 0.8rem;
        font-size: 1rem;
    }

    .submit-button,
    .cancel-button {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }

    /* 使用用途説明の小画面対応 */
    .usage-notice {
        padding: 1rem;
        margin: 0.8rem 0 1.2rem 0;
    }

    .usage-notice p strong {
        font-size: 0.95rem;
    }

    .usage-notice li {
        font-size: 0.85rem;
        padding: 0.3rem 0;
    }

    .privacy-note {
        font-size: 0.8rem !important;
    }

    .goal-images-section {
        padding: 1.5rem;
    }
    
    .goal-images-section .section-title {
        font-size: 1.3rem;
    }
    
    .youtube-section {
        padding: 1.2rem;
    }
    
    .youtube-section .section-title {
        font-size: 1.2rem;
    }
    
    .goal-image {
        height: 160px;
    }
    
    .image-modal-content {
        padding: 0.3rem;
    }
    
    .image-modal-content img {
        max-height: 60vh;
    }
    
    .image-modal .close {
        top: 5px;
        right: 10px;
        font-size: 1.5rem;
        width: 35px;
        height: 35px;
    }
}

/* 印刷用スタイル */
@media print {
    .article-actions,
    .breadcrumb,
    header,
    footer {
        display: none;
    }

    .article-detail {
        background: white;
        padding: 0;
    }

    .article-header,
    .article-content,
    .article-lead {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ダウンロードモーダル */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 3rem;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 2rem;
    font-weight: bold;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #667eea;
}

.modal-content h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    text-align: center;
}

.modal-content p {
    color: #666;
    margin-bottom: 2rem;
    text-align: center;
    line-height: 1.6;
}

/* 使用用途説明 */
.usage-notice {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0 2rem 0;
    text-align: left;
}

.usage-notice p strong {
    color: #2c3e50;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 1rem;
}

.usage-notice ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.usage-notice li {
    padding: 0.5rem 0;
    color: #495057;
    font-size: 0.95rem;
    line-height: 1.5;
}

.privacy-note {
    margin-top: 1rem !important;
    margin-bottom: 0 !important;
    font-size: 0.85rem !important;
    color: #6c757d !important;
    font-style: italic;
    text-align: center !important;
    border-top: 1px solid #e9ecef;
    padding-top: 1rem;
}

/* フォームスタイル */
.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    color: #2c3e50;
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.required {
    color: #e74c3c;
}

.form-group input[type="email"] {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input[type="email"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.submit-button {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.2rem 2rem;
    border: none;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.cancel-button {
    display: inline-flex;
    align-items: center;
    padding: 1.2rem 2rem;
    border: 2px solid #dee2e6;
    background: white;
    color: #666;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 1rem;
}

.cancel-button:hover {
    border-color: #adb5bd;
    color: #495057;
    transform: translateY(-1px);
}

/* ダウンロード状態表示 */
.download-status {
    text-align: center;
    padding: 2rem 0;
}

.status-loading,
.status-success,
.status-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.success-icon,
.error-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.status-success p {
    color: #28a745;
    font-weight: bold;
    font-size: 1.1rem;
}

.status-error p {
    color: #dc3545;
    font-weight: bold;
    font-size: 1.1rem;
}

.status-loading p {
    color: #667eea;
    font-weight: bold;
    font-size: 1.1rem;
}

/* 目標画像セクション */
.goal-images-section {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #667eea;
}

.goal-images-section .section-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* YouTube埋め込みセクション */
.youtube-section {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #ff4757;
}

.youtube-section .section-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
}

.youtube-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9のアスペクト比 */
    height: 0;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.youtube-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.youtube-embed:hover iframe {
    transform: scale(1.02);
}

.goal-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.goal-image-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.goal-image-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.goal-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.goal-image:hover {
    transform: scale(1.05);
}

/* 画像拡大モーダル */
.image-modal {
    z-index: 1001;
}

.image-modal-content {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    position: relative;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.image-modal-caption {
    margin-top: 1rem;
    font-size: 1.1rem;
    color: #2c3e50;
    text-align: center;
    font-weight: 500;
}

.image-modal .close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1002;
}

.image-modal .close:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .goal-images-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .goal-image {
        height: 180px;
    }
    
    .youtube-section {
        padding: 1.5rem;
    }
    
    .youtube-section .section-title {
        font-size: 1.3rem;
    }
    
    .image-modal-content {
        max-width: 95vw;
        max-height: 95vh;
        padding: 0.5rem;
    }
    
    .image-modal-content img {
        max-height: 70vh;
    }
    
    .image-modal-caption {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .goal-images-section {
        padding: 1.5rem;
    }
    
    .goal-images-section .section-title {
        font-size: 1.3rem;
    }
    
    .youtube-section {
        padding: 1.2rem;
    }
    
    .youtube-section .section-title {
        font-size: 1.2rem;
    }
    
    .goal-image {
        height: 160px;
    }
    
    .image-modal-content {
        padding: 0.3rem;
    }
    
    .image-modal-content img {
        max-height: 60vh;
    }
    
    .image-modal .close {
        top: 5px;
        right: 10px;
        font-size: 1.5rem;
        width: 35px;
        height: 35px;
    }
}
