/* Blog Post Page Styles */

/* Import font at the top */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* EXACT BACKGROUND FROM HOMEPAGE & PORTFOLIO */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #ffffff 100%) !important;
    background-attachment: fixed !important;
    color: #1a1a1a;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    margin: 0;
    padding: 0;
    max-width: 100vw;
}

/* TNAADO RED COLORS */
:root {
    --tnaado-red: #A81327;
    --tnaado-dark: #121212;
    --gradient-red: linear-gradient(135deg, #A01D26 0%, #A01D26 100%);
}

/* Sidebar Ads */
.sidebar-ad {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
    z-index: 100;
}

.sidebar-ad-left {
    left: 10px;
}

.sidebar-ad-right {
    right: 10px;
}

/* Hide sidebar ads on smaller screens */
@media (max-width: 1400px) {
    .sidebar-ad {
        display: none;
    }
}

.page-wrapper {
    position: relative;
    z-index: 1;
    padding-top: 120px;
    padding-bottom: 4rem;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Blog Post Container */
#blog-post-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 3rem;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.1);
    margin-bottom: 3rem;
}

/* Category Badge */
.post-category-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(168, 19, 39, 0.2);
    color: #A81327;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(168, 19, 39, 0.3);
}

/* Blog Content Styles */
.blog-content {
    color: #1a1a1a;
    font-size: 1.125rem;
    line-height: 1.8;
}

.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4,
.blog-content h5,
.blog-content h6 {
    color: #121212;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.blog-content h1 {
    font-size: 2.5rem;
    border-bottom: 2px solid rgba(168, 19, 39, 0.3);
    padding-bottom: 0.5rem;
}

.blog-content h2 {
    font-size: 2rem;
}

.blog-content h3 {
    font-size: 1.5rem;
}

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

.blog-content a {
    color: #A81327;
    text-decoration: underline;
    transition: color 0.3s;
}

.blog-content a:hover {
    color: #dc2622;
}

.blog-content ul,
.blog-content ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.blog-content li {
    margin-bottom: 0.5rem;
}

.blog-content blockquote {
    border-left: 4px solid #A81327;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #4a4a4a;
    background: rgba(168, 19, 39, 0.05);
    padding: 1rem 1.5rem;
    border-radius: 8px;
}

.blog-content code {
    background: rgba(168, 19, 39, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
    color: #A81327;
}

.blog-content pre {
    background: rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.blog-content pre code {
    background: none;
    padding: 0;
    color: #1a1a1a;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.blog-content th,
.blog-content td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.blog-content th {
    background: rgba(168, 19, 39, 0.1);
    color: #121212;
    font-weight: 700;
}

/* Related Posts Section */
#related-posts-section {
    display: none;
    max-width: 1400px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.related-posts-header {
    text-align: center;
    margin-bottom: 2rem;
}

.related-posts-title {
    font-size: 2rem;
    font-weight: 800;
    color: #121212;
    margin-bottom: 0.5rem;
}

.related-posts-subtitle {
    font-size: 1rem;
    color: #4a4a4a;
}

#related-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1200px) {
    #related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    #related-posts-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading State */
.loading {
    text-align: center;
    padding: 4rem 2rem;
}

.loading p {
    color: #4a4a4a !important;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(168, 19, 39, 0.2);
    border-top-color: #A81327;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

@keyframes float {
    0%, 100% {
        transform: translateY(0px) scale(1) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-20px) scale(1.05) rotate(5deg);
        opacity: 0.5;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .page-wrapper {
        padding-top: 100px;
    }

    #blog-post-container {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }

    .container {
        padding: 0 1rem;
    }

    .blog-content {
        font-size: 1rem;
    }

    .blog-content h1 {
        font-size: 2rem;
    }

    .blog-content h2 {
        font-size: 1.5rem;
    }

    .blog-content h3 {
        font-size: 1.25rem;
    }

    #related-posts-grid {
        grid-template-columns: 1fr;
    }
}
