/* ============================================
   BLOG POST CONTENT STYLESHEET
   ============================================ */

.blog-post-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    line-height: 1.8;
}

.blog-post-layout {
    display: grid;
    grid-template-columns: 20% 1fr 20%;
    gap: 40px;
    align-items: start;
}

.blog-post-sidebar {
    position: sticky;
    top: 20px;
}

.blog-post-content {
    max-width: 900px;
    width: 100%;
    overflow: hidden;
}

.blog-post-header {
    margin-bottom: 40px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 20px;
}

.blog-post-header h1 {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 15px;
}

.blog-post-meta {
    color: #666;
    font-size: 0.95em;
    margin-bottom: 10px;
}

.blog-category {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    margin-right: 10px;
}

.blog-content {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.blog-video-container {
    width: 100%;
    max-width: 100%;
    margin: 30px 0 40px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.blog-video-container iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border: none;
    border-radius: 8px;
    display: block;
}

.blog-content h2 {
    font-size: 1.8em;
    color: #333;
    margin-top: 35px;
    margin-bottom: 20px;
    border-left: 4px solid #007bff;
    padding-left: 15px;
}

.blog-content h3 {
    font-size: 1.3em;
    color: #555;
    margin-top: 25px;
    margin-bottom: 15px;
}

.blog-content h4 {
    font-size: 1.1em;
    color: #666;
    margin-top: 20px;
    margin-bottom: 10px;
}

.blog-content p {
    margin-bottom: 15px;
    color: #444;
}

.blog-content ul, .blog-content ol {
    margin-left: 25px;
    margin-bottom: 15px;
}

.blog-content li {
    margin-bottom: 8px;
    color: #444;
}

.code-block {
    background-color: #f5f5f5;
    border-left: 4px solid #007bff;
    padding: 15px;
    margin: 20px 0;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    border-radius: 4px;
}

.highlight {
    background-color: #fffacd;
    padding: 2px 6px;
    border-radius: 3px;
}

.table-container {
    overflow-x: auto;
    margin: 20px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table th {
    background-color: #007bff;
    color: white;
    padding: 12px;
    text-align: left;
}

table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

table tr:hover {
    background-color: #f5f5f5;
}

.cta-box {
    background-color: #e8f4f8;
    border-left: 4px solid #007bff;
    padding: 20px;
    margin: 30px 0;
    border-radius: 4px;
}

.cta-box h3 {
    margin-top: 0;
    color: #007bff;
}

.back-to-blogs {
    margin: 40px 0;
    text-align: center;
}

.back-to-blogs a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
    padding: 10px 20px;
    border: 1px solid #007bff;
    border-radius: 4px;
    transition: all 0.3s;
}

.back-to-blogs a:hover {
    background-color: #007bff;
    color: white;
}

/* ============================================
   SIDEBAR SECTIONS
   ============================================ */

.sidebar-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.sidebar-section h3 {
    font-size: 1.2em;
    color: #333;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
}

/* Google Ads Container */
.sidebar-ads {
    margin-bottom: 20px;
}

.ad-container {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    font-size: 0.85em;
    color: #999;
    text-align: center;
}

.ad-container:empty::before {
    content: "Advertisement Space\AGoogle AdSense or Custom Ads";
    white-space: pre;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* ============================================
   FEATURED POSTS
   ============================================ */
.random-blogs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    line-height: 1.4;
}

.random-blog-item {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    height: 100%;
    max-width: 100%;
    width: 100%;
    min-height: 250px;
}

.random-blog-item:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.blog-item-image {
    width: 100%;
    height: auto;
    overflow: hidden;
    background: #f0f0f0;
    display: block;
    position: relative;
}

.blog-item-image img {
    width: 100% !important;
    height: auto !important;
    display: block;
    border: none;
    padding: 0 !important;
    margin: 0 !important;
}

.random-blog-item:hover .blog-item-image img {
    transform: scale(1.05);
}

.blog-item-title {
    padding: 10px 12px 0 12px;
    color: #333;
    font-weight: 600;
    font-size: 0.85em;
    line-height: 1.3;
    transition: color 0.3s ease;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.blog-item-description {
    padding: 6px 12px 10px 12px;
    color: #666;
    font-size: 0.75em;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    text-overflow: ellipsis;
}

.random-blog-item:hover .blog-item-title {
    color: #007bff;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .blog-post-layout {
        grid-template-columns: 18% 1fr;
        gap: 30px;
    }

    .blog-post-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .blog-post-layout {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }

    .blog-post-sidebar {
        order: 2;
        position: static;
    }

    .blog-post-content {
        order: 1;
        max-width: 100%;
    }

    .blog-post-header h1 {
        font-size: 1.8em;
    }

    .blog-content h2 {
        font-size: 1.4em;
    }

    .blog-post-container {
        padding: 15px;
        margin: 20px auto;
    }
}

/* Featured Image - Responsive Design */
.blog-featured-image {
    width: 100%;
    max-width: 100%;
    margin: 30px 0 40px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: block;
}

.blog-featured-image picture {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.blog-featured-image img {
    width: 100% !important;
    height: auto !important;
    display: block;
    border-radius: 8px;
    max-width: 100%;
    border: none;
    padding: 0;
    margin: 0;
}

/* Responsive adjustments for featured image */
@media (max-width: 1024px) {
    .blog-featured-image {
        margin: 25px 0 30px 0;
    }
}

@media (max-width: 768px) {
    .blog-featured-image {
        margin: 20px 0 25px 0;
        border-radius: 6px;
    }
}
