/* RedKnack Blog - Public Styles */

@font-face {
    font-family: 'Nunito Sans';
    src: url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;400;600;700&display=swap');
    font-display: swap;
}

:root {
    --primary: #BE120A;
    --primary-dark: #9A0F08;
    --secondary: #ff4741;
    --dark: #121212;
    --light: #f5f5f5;
    --gray: #333333;
    --overlay: rgba(0, 0, 0, 0.7);
    --accent-light: #ff8c87;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--dark);
    color: var(--light);
    line-height: 1.7;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-header {
    text-align: center;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    /* margin: 4rem 0; Why tf would you do that?*/
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.site-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255,255,255,0.1) 10px,
        rgba(255,255,255,0.1) 20px
    );
    animation: slide 20s linear infinite;
}

@keyframes slide {
    0% { transform: translate(-50px, -50px); }
    100% { transform: translate(0, 0); }
}

.container {
    position: relative;
    z-index: 2;
}

.site-title {
    font-size: 48px;
    margin-bottom: 10px;
    font-weight: 700;
    position: relative;
    z-index: 2;
}

.site-title a {
    color: var(--light);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.site-title a:hover {
    color: var(--accent-light);
    transform: scale(1.05);
}

.site-tagline {
    font-size: 18px;
    font-weight: 300;
    position: relative;
    font-style: italic;
    z-index: 2;
}

/* Main Container */
.main-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    margin: 40px auto;
}

/* Main Content */
.main-content {
    background: var(--gray);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(190, 18, 10, 0.1);
}

/* Post Lsit */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.post-preview {
    border-bottom: 1px solid rgba(190, 18, 10, 0.2);
    padding-bottom: 30px;
    transition: transform 0.3s ease;
}

.post-preview:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.post-preview:hover {
    transform: translateX(5px);
}

.post-preview h2,
.post-preview h3 {
    font-size: 28px;
    margin-bottom: 10px;
    line-height: 1.3;
}

.post-preview h2 a,
.post-preview h3 a {
    color: var(--light);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.post-preview h2 a::after,
.post-preview h3 a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.post-preview h2 a:hover,
.post-preview h3 a:hover {
    color: var(--primary);
}

.post-preview h2 a:hover::after,
.post-preview h3 a:hover::after {
    width: 100%;
}

.post-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #999;
}

.post-date,
.post-views {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-excerpt {
    color: #ccc;
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.6;
}

.read-more {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 8px 20px;
    border: 2px solid var(--primary);
    border-radius: 25px;
    position: relative;
    overflow: hidden;
}

.read-more::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.read-more:hover {
    color: var(--light);
}

.read-more:hover::before {
    left: 0;
}

/* Single Post */
.post-single {
    max-width: 800px;
}

.post-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--primary);
}

.post-single h1 {
    font-size: 42px;
    line-height: 1.2;
    margin-bottom: 15px;
    color: var(--light);
    font-weight: 700;
}

.post-content {
    font-size: 18px;
    line-height: 1.8;
    color: #ddd;
}

.post-content h1,
.post-content h2,
.post-content h3 {
    margin: 30px 0 15px;
    color: var(--light);
    font-weight: 600;
}

.post-content h1 {
    font-size: 32px;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
}

.post-content h2 {
    font-size: 28px;
}

.post-content h3 {
    font-size: 24px;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content strong {
    font-weight: 600;
    color: var(--primary);
}

.post-content em {
    font-style: italic;
    color: var(--accent-light);
}

.post-content u {
    text-decoration: underline;
    text-decoration-color: var(--primary);
}

.post-content a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid var(--primary);
    transition: all 0.3s ease;
}

.post-content a:hover {
    color: var(--secondary);
    border-bottom-color: var(--secondary);
}

.post-content hr {
    margin: 30px 0;
    border: none;
    border-top: 2px solid rgba(190, 18, 10, 0.3);
}

.post-content ul,
.post-content ol {
    margin: 20px 0 20px 30px;
}

.post-content li {
    margin: 8px 0;
    color: #ccc;
}

.post-content code {
    background: rgba(190, 18, 10, 0.1);
    color: var(--accent-light);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    border: 1px solid rgba(190, 18, 10, 0.2);
}

.post-content pre {
    background: #1a1a1a;
    color: var(--light);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid var(--primary);
}

.post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: 14px;
    border: none;
}

.blog-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 4px 16px rgba(190, 18, 10, 0.3);
    border: 2px solid var(--primary);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 20px 0;
    border-radius: 8px;
    border: 2px solid var(--primary);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.post-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--primary);
}

.back-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 10px 20px;
    border: 2px solid var(--primary);
    border-radius: 25px;
    display: inline-block;
}

.back-link:hover {
    background: var(--primary);
    color: var(--light);
    transform: translateX(-5px);
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.widget {
    background: var(--gray);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(190, 18, 10, 0.2);
    transition: all 0.3s ease;
}

.widget:hover {
    border-color: var(--primary);
    box-shadow: 0 6px 20px rgba(190, 18, 10, 0.4);
}

.widget h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--primary);
    font-weight: 600;
}

.archive-list {
    list-style: none;
}

.archive-list li {
    margin: 10px 0;
}

.archive-list a {
    color: #ccc;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    transition: all 0.3s ease;
    padding: 8px 10px;
    border-radius: 6px;
}

.archive-list a:hover,
.archive-list a.active {
    color: var(--primary);
    background: rgba(190, 18, 10, 0.1);
    font-weight: 600;
    transform: translateX(5px);
}

.archive-list .count {
    color: #999;
    font-size: 14px;
}

/* Archive Header */
.archive-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--primary);
}

.archive-header h2 {
    font-size: 32px;
    color: var(--light);
    margin-bottom: 10px;
}

/* No Posts */
.no-posts {
    text-align: center;
    padding: 60px 20px;
}

.no-posts h2 {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--light);
}

.no-posts p {
    color: #999;
    font-size: 16px;
}

/* Footer */
.site-footer {
    background: #0a0a0a;
    color: var(--light);
    padding: 40px 0;
    text-align: center;
    margin-top: 60px;
    border-top: 2px solid var(--primary);
}

.site-footer p {
    margin: 5px 0;
}

.site-footer a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.site-footer a:hover {
    border-bottom-color: var(--primary);
    color: var(--secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .site-title {
        font-size: 36px;
    }
    
    .site-tagline {
        font-size: 16px;
    }
    
    .main-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .main-content {
        padding: 25px;
    }
    
    .post-preview h2,
    .post-preview h3 {
        font-size: 24px;
    }
    
    .post-single h1 {
        font-size: 32px;
    }
    
    .post-content {
        font-size: 16px;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .site-header {
        padding: 40px 0;
    }
    
    .site-title {
        font-size: 28px;
    }
    
    .main-content {
        padding: 20px;
    }
}
