/**
 * Document Download Page Styles
 * 資料ダウンロードページ専用スタイル
 *
 * @package YoungBush
 */

.single-document-page {
    background: #ffffff;
}

/* ========================================
   Document Content Layout
======================================== */
.document-content {
    padding: 60px 0;
}

.document-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ========================================
   Document Main (Left Side)
======================================== */
.document-main {
    min-width: 0; /* グリッドオーバーフロー対策 */
}

.document-thumbnail {
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.document-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.thumbnail-placeholder {
    width: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    padding: 40px;
    line-height: 1.4;
}

/* Document Details */
.document-details {
    background: #f8faf9;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
}

.document-details h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a4d3a;
    margin: 0 0 20px 0;
}

.detail-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #569578;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a4d3a;
}

/* Document Body */
.document-body {
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
}

.document-body h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a4d3a;
    margin: 40px 0 20px;
}

.document-body h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a4d3a;
    margin: 30px 0 15px;
}

.document-body p {
    margin-bottom: 20px;
}

.document-body ul,
.document-body ol {
    margin: 20px 0;
    padding-left: 30px;
}

.document-body li {
    margin-bottom: 10px;
}

/* ========================================
   Download Box (Right Sidebar)
======================================== */
.document-sidebar {
    min-width: 0;
}

.download-box {
    background: #ffffff;
    border: 2px solid #1a4d3a;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(26, 77, 58, 0.1);
}

.sticky-box {
    position: sticky;
    top: calc(var(--header-h) + 20px);
}

.download-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a4d3a;
    margin: 0 0 15px 0;
    text-align: center;
}

.download-description {
    font-size: 0.875rem;
    color: #5a6a62;
    margin-bottom: 25px;
    text-align: center;
}

/* Download Form */
.download-form .form-group {
    margin-bottom: 20px;
}

.download-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a4d3a;
    margin-bottom: 8px;
}

.download-form .required {
    color: #e74c3c;
    font-weight: 700;
}

.download-form input[type="text"],
.download-form input[type="email"],
.download-form input[type="tel"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.download-form input:focus {
    outline: none;
    border-color: #569578;
    box-shadow: 0 0 0 3px rgba(86, 149, 120, 0.1);
}

.download-form .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: normal;
    cursor: pointer;
}

.download-form .checkbox-label input[type="checkbox"] {
    margin-top: 4px;
    flex-shrink: 0;
}

.download-form .checkbox-label a {
    color: #569578;
    text-decoration: underline;
}

.download-form .btn-block {
    width: 100%;
    padding: 15px;
    font-size: 1rem;
    font-weight: 700;
    margin-top: 10px;
}

/* Download Message */
.download-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    font-size: 0.875rem;
    text-align: center;
}

.download-message.loading {
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.download-message.success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.download-message.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* ========================================
   Related Documents Section
======================================== */
.related-documents {
    padding: 80px 0;
    background: #f8faf9;
}

.related-documents .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.related-documents .section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a4d3a;
    text-align: center;
    margin-bottom: 50px;
}

.document-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.document-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.document-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(26, 77, 58, 0.15);
}

.document-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-thumbnail {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    padding: 20px;
    line-height: 1.4;
}

.card-content {
    padding: 25px;
}

.card-content h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a4d3a;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.card-content p {
    font-size: 0.875rem;
    color: #5a6a62;
    margin: 0 0 15px 0;
    line-height: 1.6;
}

.card-link {
    display: inline-block;
    color: #569578;
    font-size: 0.875rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.document-card:hover .card-link {
    color: #1a4d3a;
}

/* Page Header Override for Document Page */
.single-document-page .page-header .doc-category {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    margin-left: 10px;
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 1024px) {
    .document-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .sticky-box {
        position: static;
    }
    
    .document-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .document-content {
        padding: 40px 0;
    }
    
    .document-layout {
        padding: 0 20px;
    }
    
    .thumbnail-placeholder {
        min-height: 300px;
        font-size: 1.5rem;
    }
    
    .detail-items {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .download-box {
        padding: 25px 20px;
    }
    
    .document-grid {
        grid-template-columns: 1fr;
    }
    
    .related-documents .container {
        padding: 0 20px;
    }
}

