/**
 * SL Blog Theme - Additional Styles
 */

/* Enhanced Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--primary-black);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-gold), var(--accent-orange));
    border-radius: 0;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent-gold-light), var(--accent-orange));
}

/* Selection */
::selection {
    background: var(--accent-gold);
    color: var(--primary-black);
}

/* Focus Styles */
:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 4px;
}

/* Article Card Hover Glow */
.article-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, var(--accent-gold), transparent, var(--accent-orange), transparent);
    animation: rotate-glow 10s linear infinite;
    opacity: 0;
    transition: var(--transition-medium);
    z-index: -1;
}
.article-card:hover::after {
    opacity: 0.05;
}
@keyframes rotate-glow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Stats Number Glow */
.stat-number {
    text-shadow: 0 0 30px var(--gold-glow);
}

/* Category Card Gradient Border */
.category-card {
    position: relative;
}
.category-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), var(--accent-orange), transparent);
    transform: scaleX(0);
    transition: var(--transition-medium);
}
.category-card:hover::after {
    transform: scaleX(1);
}

/* Button Shine Effect */
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: skewX(-25deg);
}
.btn-primary:hover::after {
    animation: shine 0.6s ease forwards;
}
@keyframes shine {
    to { left: 150%; }
}

/* Hero Grid Perspective */
.hero-section {
    perspective: 1000px;
}

/* Loading Animation */
.loading {
    position: relative;
    overflow: hidden;
}
.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212,168,83,0.1), transparent);
    animation: loading-sweep 1.5s infinite;
}
@keyframes loading-sweep {
    to { left: 100%; }
}

/* Article Featured Badge */
.article-card.featured .article-category::after {
    content: '★';
    margin-left: 5px;
}

/* Print Styles */
@media print {
    body { background: white; color: black; }
    .site-header, .site-footer, .hero-section { display: none; }
    .article-card { break-inside: avoid; border: 1px solid #ccc; }
}

/* =====================================================
   Infinite Scroll Loader
===================================================== */
.infinite-scroll-loader {
    text-align: center;
    padding: 3rem 0;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.infinite-scroll-loader p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.no-more-posts {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Load More Button & Spinner */
.load-more-container {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem 0;
}

#load-more-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

#load-more-trigger svg {
    transition: transform 0.3s ease;
}

#load-more-trigger:hover svg {
    transform: translateY(3px);
}

.loading-spinner {
    display: inline-block;
    margin-left: 1rem;
}

.spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Single Article Styles */
.single-article {
    padding-bottom: 4rem;
}

.single-hero {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    height: 50vh;
    min-height: 400px;
    overflow: hidden;
}

.single-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.single-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, var(--primary-black), transparent);
}

.single-content {
    max-width: 800px;
    margin: -80px auto 0;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.single-header {
    margin-bottom: 2rem;
}

.single-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.single-category {
    background: var(--accent-gold);
    color: var(--primary-black);
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.single-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.single-date svg {
    width: 16px;
    height: 16px;
}

.single-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin: 0;
}

.single-body {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.single-body p {
    margin-bottom: 1.5rem;
}

.single-body h2,
.single-body h3,
.single-body h4 {
    color: var(--text-primary);
    margin: 2rem 0 1rem;
}

.single-body a {
    color: var(--accent-gold);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.single-body a:hover {
    color: var(--accent-gold-light);
}

.single-body img {
    border-radius: 8px;
    margin: 2rem 0;
}

.single-body blockquote {
    border-left: 4px solid var(--accent-gold);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-muted);
}

.single-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
}

.single-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.single-tags .tag {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
    border: 1px solid var(--border-subtle);
    transition: var(--transition-fast);
}

.single-tags .tag:hover {
    background: var(--accent-gold);
    color: var(--primary-black);
    border-color: var(--accent-gold);
}

.single-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.single-navigation .nav-link {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    transition: var(--transition-fast);
}

.single-navigation .nav-link:hover {
    border-color: var(--accent-gold);
}

.single-navigation .nav-prev {
    grid-column: 1;
}

.single-navigation .nav-next {
    grid-column: 2;
    text-align: right;
}

.single-navigation .nav-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.single-navigation .nav-title {
    font-weight: 600;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .single-content {
        margin-top: -50px;
        padding: 1rem;
    }
    
    .single-navigation {
        grid-template-columns: 1fr;
    }
    
    .single-navigation .nav-prev,
    .single-navigation .nav-next {
        grid-column: 1;
        text-align: left;
    }
}

/* =====================================================
   Page Template
===================================================== */
.page-header {
    padding: 8rem 0 4rem;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--primary-black) 100%);
}

.page-header h1 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.page-content {
    padding: 3rem 0;
}

.page-content .entry-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.page-content .entry-content p {
    margin-bottom: 1.5rem;
}

.page-content .entry-content h2,
.page-content .entry-content h3,
.page-content .entry-content h4 {
    color: var(--text-primary);
    margin: 2rem 0 1rem;
}

.page-content .entry-content a {
    color: var(--accent-gold);
}

.page-content .entry-content a:hover {
    color: var(--accent-gold-light);
}

.page-content .entry-content img {
    border-radius: 8px;
    margin: 2rem 0;
}

.page-content .entry-content blockquote {
    border-left: 4px solid var(--accent-gold);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-muted);
}

/* Comments Section */
.comments-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 0;
}

.comments-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

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

.comment {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.comment-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.comment-author cite {
    font-style: normal;
    font-weight: 600;
    color: var(--text-primary);
}

.comment-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.comment-content {
    color: var(--text-secondary);
    line-height: 1.6;
}

.reply {
    margin-top: 1rem;
}

.reply a {
    color: var(--accent-gold);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.reply a:hover {
    color: var(--accent-gold-light);
}

#respond {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
}

#respond h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.comment-form label {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.form-submit .submit {
    background: var(--accent-gold);
    color: var(--primary-black);
    padding: 0.75rem 2rem;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.form-submit .submit:hover {
    background: var(--accent-gold-light);
}

/* Page Header - visible below fixed header */
.page-header {
    padding: 12rem 0 4rem !important;
    margin-top: 0 !important;
}

/* Single Article Header - visible below fixed header */
.single-header {
    padding-top: 2rem;
}

/* Single Content - add top padding for visibility */
.single-content {
    padding-top: 2rem;
}

.single-content-wrapper {
    min-width: 0;
}

/* Sidebar Styles */
.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    align-items: start;
}

.single-article .content-with-sidebar {
    padding-top: 2rem;
}

.page-content .content-with-sidebar {
    padding-top: 2rem;
}

.sidebar {
    padding: 1.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    height: fit-content;
    position: sticky;
    top: 120px;
}

.sidebar .widget {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.sidebar .widget:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sidebar .widget-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.sidebar ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.sidebar ul li:last-child {
    border-bottom: none;
}

.sidebar ul li a {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.sidebar ul li a:hover {
    color: var(--accent-gold);
}

@media (max-width: 900px) {
    .content-with-sidebar {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
}
