/**
 * Single Thesis Page Styles
 */

.single-thesis-page {
    padding: var(--spacing-xl) 0 var(--spacing-xxl);
    background: #f8fafb;
}

/* ============================================
   Back Navigation
   ============================================ */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6b7b89;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: #154D8C;
}

.back-link svg {
    transition: transform 0.2s ease;
}

.back-link:hover svg {
    transform: translateX(-2px);
}

/* ============================================
   Thesis Header
   ============================================ */

.thesis-header {
    background: transparent;
    border-radius: 0;
    padding: var(--spacing-xxl) 0;
    margin-bottom: var(--spacing-xl);
    box-shadow: none;
    display: flex;
    gap: var(--spacing-xl);
    align-items: flex-start;
    position: relative;
}

.thesis-header-main {
    flex: 1;
}

.thesis-categories {
    margin-bottom: var(--spacing-md);
}

.category-badge {
    display: inline-block;
    background: #E8F4F8;
    color: #154D8C;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    margin-right: 8px;
}

.thesis-title {
    font-size: 36px;
    font-weight: 700;
    padding-right: 15rem;
    color: #111827;
    line-height: 1.3;
    margin: 0 0 var(--spacing-lg) 0;
}

.thesis-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6b7b89;
    font-size: 14px;
}

.meta-item svg {
    color: #9ca3af;
    flex-shrink: 0;
}

.thesis-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #154D8C;
    color: #fff;
}

.btn-primary:hover {
    background: #0f3a6b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(21, 77, 140, 0.3);
}

.btn-secondary {
    background: #fff;
    color: #374151;
    border: 1.5px solid #e5e7eb;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.btn svg {
    width: 16px;
    height: 16px;
}

/* Year Badge */
.thesis-year-badge {
    background: #154D8C1A;
    color: #154D8C;
    padding: 3rem 25px;
    border-radius: 8px;
    border: 2px solid #154D8C33;
    text-align: center;
    min-width: 120px;
}

.year-number {
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
}

/* Mobile Year Badge (hidden on desktop) */
.thesis-header-flex {
    display: flex;
    gap: var(--spacing-lg);
    align-items: flex-start;
}

.thesis-header-text {
    flex: 1;
}

.thesis-year-badge-phone {
    display: none;
}

/* ============================================
   Content Layout
   ============================================ */

.thesis-content-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--spacing-xl);
}

/* ============================================
   Main Content
   ============================================ */

.thesis-main-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.thesis-section {
    background: #fff;
    border-radius: 12px;
    padding: var(--spacing-xl);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #DFE6EB;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 var(--spacing-md) 0;
}

.section-content {
    color: #4b5563;
    font-size: 16px;
    line-height: 1.8;
}

.section-content p {
    margin-bottom: var(--spacing-md);
}

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

/* Keywords */
.keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.keyword-tag {
    display: inline-block;
    background: #f3f4f6;
    color: #374151;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* ============================================
   Sidebar
   ============================================ */

.thesis-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.sidebar-card {
    background: #fff;
    border-radius: 12px;
    padding: var(--spacing-lg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #DFE6EB;
}

.sidebar-card-downloads {
    background: #154D8C0D;
    border-radius: 12px;
    padding: var(--spacing-lg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #DFE6EB;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 var(--spacing-md) 0;
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid #f3f4f6;
}

.detail-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7b89;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-value {
    font-size: 15px;
    color: #111827;
    font-weight: 500;
}

/* Citation */
.citation-format {
    position: relative;
}

.format-label {
    font-size: 13px;
    font-weight: 600;
    color: #6b7b89;
    margin-bottom: 8px;
}

.citation-text {
    background: #E9F0F5;
    padding: 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 12px;
}

.copy-citation-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f3f4f6;
    color: #374151;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-citation-btn:hover {
    background: #e5e7eb;
}

.copy-citation-btn svg {
    width: 14px;
    height: 14px;
}

/* ============================================
   Download Options
   ============================================ */

.download-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.download-action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #154D8C0D;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
}

.download-action-btn:hover {
    background: #154D8C1A;
    border-color: #d1d5db;
}

.download-action-btn svg {
    color: #154D8C;
    flex-shrink: 0;
}

/* ============================================
   Key Findings
   ============================================ */

.key-findings-list {
    list-style: none;
    counter-reset: findings-counter;
    padding: 0;
    margin: 0;
}

.key-findings-list li {
    counter-increment: findings-counter;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
    line-height: 1.6;
    color: #6b7b89;
    font-size: 15px;
}

.key-findings-list li::before {
    content: counter(findings-counter);
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: #E8F4F8;
    color: #154D8C;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
}

/* ============================================
   Table of Contents
   ============================================ */

.table-of-contents-list {
    background: transparent;
    border-radius: 0;
    padding: 0;
    border: none;
}

.toc-item {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #e5e7eb;
}

.toc-item:first-child {
    padding-top: 0;
}

.toc-item:last-child {
    border-bottom: none;
}

.toc-chapter {
    color: #154D8C;
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
    flex-shrink: 0;
}

.toc-chapter span {
    font-weight: 700;
    margin-right: 4px;
}

.toc-title {
    color: #111827;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.5;
    flex: 1;
}

.toc-pages {
    color: #6b7b89;
    font-size: 14px;
    font-weight: 400;
    white-space: nowrap;
    margin-left: auto;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1200px) {
    .thesis-content-layout {
        grid-template-columns: 1fr 320px;
        gap: var(--spacing-lg);
    }
}

@media (max-width: 992px) {
    .thesis-header {
        flex-direction: column;
    }
    
    .thesis-year-badge {
        align-self: flex-start;
    }
    
    .thesis-content-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .thesis-header {
        padding: var(--spacing-lg);
    }
    
    .thesis-title {
        font-size: 28px;
        padding-right: 0;
    }
    
    .thesis-meta-info {
        flex-direction: column;
        gap: 8px;
    }
    
    .thesis-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .year-number {
        font-size: 40px;
    }
    
    /* Hide desktop year badge */
    .thesis-year-badge {
        display: none;
    }
    
    /* Show mobile year badge */
    .thesis-year-badge-phone {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: #154D8C1A;
        border: 2px solid #154D8C33;
        border-radius: 8px;
        padding: 35px 20px;
        min-width: 80px;
    }
    
    .thesis-year-badge-phone .year-number {
        font-size: 32px;
        font-weight: 800;
        color: #154D8C;
        line-height: 1;
    }
    
    .thesis-section {
        padding: var(--spacing-md);
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .sidebar-card {
        padding: var(--spacing-md);
    }

    .sidebar-card-downloads {
        padding: var(--spacing-md);
    }
    
    .toc-item {
        flex-wrap: wrap;
    }
    
    .toc-pages {
        flex-basis: 100%;
        margin-left: 0;
        margin-top: 4px;
    }
}

@media (max-width: 640px) {
    .single-thesis-page {
        padding: var(--spacing-md) 0 var(--spacing-xl);
    }
    
    .thesis-title {
        font-size: 24px;
    }
    
    .section-content {
        font-size: 15px;
    }
}
