/* ====================================================
   CODE SIYA9A — BLOG POSTS & SIDEBAR LAYOUT
   ==================================================== */

/* ── Mobile Optimization & Responsive Fixes ── */
img, svg, video {
    max-width: 100%;
    height: auto;
}

.compare-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 20px 0 28px;
    border-radius: var(--radius, 14px);
    box-shadow: 0 2px 16px var(--shadow, rgba(44,62,80,0.08));
}

.compare-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    min-width: 600px; /* Forces scroll on small screens */
}

/* ── Left Sidebar & Post Grid ── */
.container {
    max-width: 1200px !important;
    margin: 0 auto;
    padding: 0 20px;
}

.post-layout-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start;
    width: 100%;
}

.post-main-content {
    min-width: 0;
}

.post-sidebar {
    position: sticky;
    top: 24px;
}

.sidebar-card {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border, #d5dce6);
    border-radius: var(--radius, 14px);
    padding: 24px;
    box-shadow: var(--shadow, 0 2px 12px rgba(44,62,80,0.08));
}

.sidebar-title {
    font-size: 18px;
    font-weight: 900;
    color: var(--text-dark, #2c3e50);
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border, #d5dce6);
    position: relative;
    text-align: right;
    font-family: 'Cairo', system-ui, sans-serif;
}

.sidebar-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 50px;
    height: 2px;
    background: var(--blue, #3a7bd5);
}

.sidebar-links-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-link-item {
    border-bottom: 1px dashed var(--border, #d5dce6);
    padding-bottom: 12px;
    margin: 0 !important;
    list-style: none !important;
}

.sidebar-link-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar-link {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-decoration: none;
    color: var(--text-dark, #2c3e50);
    transition: color 0.2s;
    text-align: right;
}

.sidebar-link-title {
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--text-dark, #2c3e50);
    transition: color 0.2s;
}

.sidebar-link:hover .sidebar-link-title {
    color: var(--blue, #3a7bd5);
}

.sidebar-link-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    color: var(--text-light, #8899aa);
}

.sidebar-link-tag {
    background: #edf2ff;
    color: var(--blue, #3a7bd5);
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 700;
}

@media (max-width: 900px) {
    .post-layout-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .post-sidebar {
        position: static;
        margin-top: 20px;
    }
}

/* ── Featured Image ── */
.featured-image-wrapper {
    width: 100%;
    margin-bottom: 28px;
    border-radius: var(--radius, 14px);
    overflow: hidden;
    border: 1px solid var(--border, #d5dce6);
    box-shadow: var(--shadow, 0 2px 12px rgba(44,62,80,0.08));
}

.featured-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 480px;
}

/* ── Google AdSense Cards ── */
.site-ad-card {
    max-width: 860px;
    margin: 32px auto;
    background: #f8fafc;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 16px;
    padding: 10px 16px 16px;
    text-align: center;
    box-sizing: border-box;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    position: relative;
    transition: border-color 0.2s ease;
}

.site-ad-card ins.adsbygoogle {
    max-width: 100% !important;
    margin: 0 auto;
}

.ad-card-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 8px;
    padding: 0 4px;
}

.ad-badge {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    background: #edf2f7;
    padding: 2px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.ad-slot-body {
    min-height: 90px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

@media print {
    .site-ad-card, .ad-container {
        display: none !important;
    }
}

@media (max-width: 600px) {
    .site-ad-card {
        margin: 20px 12px;
        padding: 8px 10px 12px;
        border-radius: 12px;
    }
}
