/* ===== Page Template Styles ===== */
/* Additional styles for text/article pages */

/* ===== Page Banner ===== */
.page-banner {
    position: relative;
    min-height: 50vh;
    background: linear-gradient(302deg, rgba(5, 2, 5, 1) 0%, rgba(5, 2, 5, 1) 79%, rgba(0, 49, 79, 1) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    padding: 120px 0 60px;
}

.page-banner-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.page-banner-content .container {
    max-width: 900px;
}

/* ===== Breadcrumbs ===== */
.breadcrumbs {
    margin-bottom: 32px;
}

.breadcrumbs-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumbs-item {
    display: flex;
    align-items: center;
}

.breadcrumbs-link {
    font-family: var(--font-body);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 1px;
}

.breadcrumbs-link:hover {
    color: #9bdaff;
    border-color: transparent;
}

.breadcrumbs-separator {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.4);
}

.breadcrumbs-separator svg {
    width: 14px;
    height: 14px;
}

.breadcrumbs-current {
    font-family: var(--font-body);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

/* ===== Page Banner Title ===== */
.page-banner-title {
    font-family: var(--font-body);
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 400;
    line-height: 1.1;
    color: var(--text-light);
    margin-bottom: 20px;
}

.page-banner-subtitle {
    font-family: var(--font-body);
    font-size: clamp(16px, 2vw, 20px);
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    max-width: 700px;
    margin-bottom: 32px;
}

/* ===== Article Meta ===== */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
}

.article-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
}

.article-meta svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.article-category {
    background: rgba(155, 218, 255, 0.15);
    padding: 4px 12px;
    border-radius: var(--radius-full);
}

/* ===== Page Main Layout ===== */
.page-main {
    padding: 80px 0;
    background: var(--bg-light);
}

.page-layout {
    display: grid;
    gap: 60px;
}

/* ===== Sidebar ===== */
.page-sidebar {
    order: 2;
}

.sidebar-widget {
    background: var(--bg-light-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.widget-title {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

/* ===== Table of Contents ===== */
.table-of-contents {
    font-family: var(--font-body);
}

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

.toc-item {
    margin-bottom: 8px;
}

.toc-link {
    display: block;
    font-size: 16px;
    color: var(--text-dark);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.toc-link:hover {
    background: rgba(59, 130, 246, 0.08);
    color: var(--accent-blue);
}

.toc-link.active {
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent-blue);
    border-left-color: var(--accent-blue);
    font-weight: 500;
}

.toc-sublist {
    list-style: none;
    margin: 8px 0 8px 16px;
    padding: 0;
}

.toc-sublink {
    display: block;
    font-size: 16px;
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.toc-sublink:hover {
    color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.05);
}

/* ===== Sidebar Menu ===== */
.sidebar-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-menu-item {
    margin-bottom: 4px;
}

.sidebar-menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text-dark);
    text-decoration: none;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    background: transparent;
}

.sidebar-menu-link:hover {
    background: rgba(59, 130, 246, 0.08);
    color: var(--accent-blue);
}

.sidebar-menu-link svg {
    width: 16px;
    height: 16px;
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s ease;
}

.sidebar-menu-link:hover svg {
    opacity: 1;
    transform: translateX(0);
}

.menu-link-text {
    flex: 1;
    padding-right: 12px;
    font-size: 16px;
}

/* ===== CTA Widget ===== */
.cta-widget {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.cta-text {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
}

.btn-full {
    width: 100%;
}

/* ===== Page Content (Article) ===== */
.page-content {
    order: 1;
}

.article-intro {
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
}

.lead-text {
    font-family: var(--font-body);
    font-size: clamp(18px, 2.5vw, 22px);
    color: var(--text-dark);
    line-height: 1.6;
    font-weight: 400;
}

/* ===== Article Sections ===== */
.article-section {
    margin-bottom: 56px;
}

.section-heading {
    font-family: var(--font-body);
    font-size: clamp(28px, 3.5vw, 36px);
    font-weight: 400;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 24px;
    scroll-margin-top: 120px;
}

.subsection-heading {
    font-family: var(--font-body);
    font-size: clamp(20px, 2.5vw, 24px);
    font-weight: 400;
    color: var(--text-dark);
    line-height: 1.3;
    margin: 40px 0 20px;
    scroll-margin-top: 120px;
}

/* ===== Article Typography ===== */
.page-content p {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 20px;
}

.page-content strong {
    font-weight: 700;
    color: var(--text-dark);
}

.page-content mark {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-dark);
}

/* ===== Lists ===== */
.article-list {
    list-style: none;
    margin: 24px 0;
    padding: 0;
}

.article-list li {
    position: relative;
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--text-dark);
    line-height: 1.7;
    padding-left: 28px;
    margin-bottom: 12px;
}

.article-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    border-radius: 50%;
}

.article-list.numbered {
    counter-reset: article-counter;
}

.article-list.numbered li {
    counter-increment: article-counter;
    padding-left: 40px;
}

.article-list.numbered li::before {
    content: counter(article-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    background: var(--text-dark);
    color: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
}

/* ===== Blockquote ===== */
.article-quote {
    margin: 40px 0;
    padding: 32px 40px;
    background: var(--bg-light-secondary);
    border-left: 4px solid var(--accent-blue);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.article-quote p {
    font-family: var(--font-body);
    font-size: 16px;
    font-style: italic;
    color: var(--text-dark);
    line-height: 1.5;
    margin-bottom: 16px;
}

.article-quote cite {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--text-muted);
    font-style: normal;
}

/* ===== Article Images ===== */
.article-image {
    margin: 40px 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: auto;
    display: block;
}

.article-image figcaption {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--text-muted);
    padding: 16px;
    background: var(--bg-light-secondary);
    text-align: center;
}

/* ===== Info Box ===== */
.info-box {
    display: flex;
    gap: 20px;
    margin: 32px 0;
    padding: 24px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-md);
}

.info-box-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.info-box-content h4 {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.info-box-content p {
    font-size:20px;
    margin-bottom: 0;
    color: var(--text-muted);
}

/* ===== Article Table ===== */
.article-table-wrapper {
    margin: 32px 0;
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.article-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-body);
}

.article-table thead {
    background: var(--text-dark);
}

.article-table th {
    font-size: 16px;
    font-weight: 700;
    color: var(--bg-light);
    text-align: left;
    padding: 16px 20px;
}

.article-table td {
    font-size: 16px;
    color: var(--text-dark);
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

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

.article-table tbody tr:nth-child(even) {
    background: var(--bg-light-secondary);
}

/* ===== Conclusion Box ===== */
.conclusion-box {
    margin: 32px 0;
    padding: 32px;
    background: var(--text-dark);
    border-radius: var(--radius-lg);
}

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

.check-list li {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--bg-light);
    margin-bottom: 16px;
}

.check-list li:last-child {
    margin-bottom: 0;
}

.check-list svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: #9bdaff;
    margin-top: 2px;
}

/* ===== Text Link ===== */
.text-link {
    color: var(--accent-blue);
    text-decoration: none;
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.text-link:hover {
    color: var(--accent-purple);
    border-color: var(--accent-purple);
}

/* ===== Article Footer ===== */
.article-footer {
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: space-between;
    align-items: center;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.tags-label {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--text-muted);
}

.tag {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--text-dark);
    background: var(--bg-light-secondary);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.tag:hover {
    background: var(--text-dark);
    color: var(--bg-light);
    border-color: var(--text-dark);
}

.article-share {
    display: flex;
    align-items: center;
    gap: 16px;
}

.share-label {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--text-muted);
}

.share-buttons {
    display: flex;
    gap: 8px;
}

.share-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light-secondary);
    border-radius: var(--radius-full);
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.share-btn:hover {
    background: var(--text-dark);
    color: var(--bg-light);
    transform: translateY(-2px);
}

/* ===== Related Articles ===== */
.related-articles {
    background: var(--bg-light-secondary);
    padding: 80px 0;
}

.related-articles .section-title {
    font-family: var(--font-body);
    font-size: clamp(28px, 3.5vw, 36px);
    font-weight: 400;
    color: var(--text-dark);
    margin-bottom: 48px;
}

.articles-grid {
    display: grid;
    gap: 24px;
}

.article-card {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.article-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.article-card-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-card-image img {
    transform: scale(1.05);
}

.article-card-content {
    padding: 24px;
}

.article-card-category {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-blue);
    margin-bottom: 12px;
}

.article-card-title {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 12px;
}

.article-card-excerpt {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
}

.article-card-date {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--text-muted-light);
}

/* ===== Responsive Design ===== */
@media (min-width: 768px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .page-layout {
        grid-template-columns: 320px 1fr;
        gap: 80px;
    }
    
    .page-sidebar {
        order: 1;
    }
    
    .page-content {
        order: 2;
    }
    
    .sidebar-widget {
        position: sticky;
        top: 100px;
    }
    
    .toc-widget {
        position: sticky;
        top: 100px;
    }
    
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .page-banner {
        padding: 100px 0 40px;
        min-height: auto;
    }
    
    .page-main {
        padding: 40px 0;
    }
    
    .breadcrumbs {
        margin-bottom: 20px;
    }
    
    .article-meta {
        gap: 12px;
    }
    
    .article-quote {
        padding: 24px;
        margin: 24px 0;
    }
    
    .article-quote p {
        font-size: 16px;
    }
    
    .info-box {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }
    
    .conclusion-box {
        padding: 24px;
    }
    
    .article-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .related-articles {
        padding: 40px 0;
    }
}

/* ===== Smooth Scroll ===== */
html {
    scroll-behavior: smooth;
}

/* ===== Print Styles ===== */
@media print {
    .page-sidebar,
    .mobile-menu-btn,
    .nav-right,
    .mobile-nav-bar,
    .article-share,
    .related-articles,
    .footer {
        display: none !important;
    }
    
    .page-layout {
        grid-template-columns: 1fr;
    }
    
    .page-content {
        order: 1;
    }
    
    .page-banner {
        background: white !important;
        color: black !important;
        padding: 20px 0;
    }
    
    .page-banner-title,
    .page-banner-subtitle {
        color: black !important;
    }
}
