/* RESET AND BASE STYLES */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --text-light: #777;
    --border-color: #e0e0e0;
    --bg-light: #f9f9f9;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* HEADER STYLES */
header {
    background-color: #fff;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.blog-logo img {
    max-width: 250px;
    width: 100%;
    height: auto;
    display: block;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--dark-color);
    margin: 3px 0;
    transition: var(--transition);
}

.main-nav ul {
    display: flex;
    list-style: none;
    align-items: center;
}

.main-nav li {
    margin-left: 20px;
}

.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.main-nav a:hover {
    color: var(--primary-color);
}

.search-item {
    position: relative;
}

.search-form {
    display: flex;
    align-items: center;
}

.search-form input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
    width: 200px;
}

.search-form button {
    background: none;
    border: none;
    margin-left: 5px;
    cursor: pointer;
    font-size: 1rem;
}

.category-nav {
    background-color: var(--bg-light);
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
}

.category-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.category-nav-header h3 {
    font-size: 1rem;
    color: var(--text-light);
}

.category-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    display: none;
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-list a {
    padding: 5px 12px;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.9rem;
    transition: var(--transition);
}

.category-list a:hover,
.category-list a.active-category {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* CRITICAL LAYOUT FIX - MOBILE FIRST APPROACH */
.main-content {
    display: block; /* Default to block for mobile */
    padding: 30px 0;
    flex: 1;
}

/* On mobile: natural flow - posts first, sidebar second */
.posts-container {
    width: 100%;
    margin-bottom: 30px;
}

.sidebar {
    width: 100%;
}

/* Hide search modal */
.search-modal {
    display: none;
}

/* Desktop styles */
@media (min-width: 993px) {
    .main-content {
        display: grid;
        grid-template-columns: 1fr 300px;
        gap: 40px;
        align-items: start;
    }
    
    .posts-container {
        flex: 1;
        margin-bottom: 0;
    }
    
    .sidebar {
        position: sticky;
        top: 20px;
        align-self: flex-start;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .sidebar {
        position: static;
        order: -1;
    }
}

/* POST STYLES */
.post {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.post:last-child {
    border-bottom: none;
}

.post-featured-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
}

.post-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.post-title a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-meta {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 15px;
}

.post-meta a {
    color: var(--primary-color);
    text-decoration: none;
}

.post-excerpt {
    margin-bottom: 15px;
    line-height: 1.7;
}

.post-read-more {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: var(--transition);
}

.post-read-more:hover {
    background-color: var(--secondary-color);
}

.single-post {
    border-bottom: none;
    padding-bottom: 0;
}

.post-content {
    line-height: 1.8;
    margin-bottom: 30px;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    margin: 25px 0 15px;
    color: var(--secondary-color);
}

.post-content p {
    margin-bottom: 15px;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
}

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: var(--text-light);
}

.post-content ul,
.post-content ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

.post-content li {
    margin-bottom: 8px;
}

.author-bio {
    display: flex;
    gap: 20px;
    padding: 20px;
    background-color: var(--bg-light);
    border-radius: 8px;
    margin: 30px 0;
}

.author-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.author-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.author-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.5rem;
}

.author-info h4 {
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.author-social {
    margin-top: 10px;
}

.author-social a {
    display: inline-block;
    margin-right: 10px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.social-sharing {
    margin: 30px 0;
}

.social-sharing h4 {
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background-color: var(--bg-light);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.facebook:hover { background-color: #3b5998; color: #fff; }
.twitter:hover { background-color: #1da1f2; color: #fff; }
.linkedin:hover { background-color: #0077b5; color: #fff; }
.email:hover { background-color: #d44638; color: #fff; }
.whatsapp:hover { background-color: #25D366; color: #fff; }

.click-to-tweet {
    background-color: #e8f5fe;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #1da1f2;
}

.click-to-tweet p {
    margin-bottom: 10px;
    font-weight: 500;
}

.tweet-box {
    position: relative;
    padding: 15px;
    background-color: #fff;
    border-radius: 4px;
    font-style: italic;
}

.tweet-this {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 10px;
    background-color: #1da1f2;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-style: normal;
}

.like-section {
    margin: 20px 0;
}

.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    background-color: var(--bg-light);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.like-btn:hover {
    background-color: #ffe6e6;
    color: var(--accent-color);
}

.like-btn.liked {
    background-color: #ffe6e6;
    color: var(--accent-color);
}

.comments-section {
    margin: 40px 0;
}

.comments-section h3 {
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.comment {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.comment:last-child {
    border-bottom: none;
}

.comment-author {
    font-weight: 500;
    color: var(--secondary-color);
}

.comment-date {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.comment-content {
    line-height: 1.6;
}

.related-posts {
    margin: 40px 0;
}

.related-posts h3 {
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.related-post-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
}

.related-post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.related-post-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.related-post-content {
    padding: 15px;
}

.related-post-content h4 {
    margin-bottom: 10px;
    font-size: 1rem;
}

.related-post-content h4 a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

.related-post-content h4 a:hover {
    color: var(--primary-color);
}

.related-post-meta {
    font-size: 0.8rem;
    color: var(--text-light);
}

.sidebar-widget {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.sidebar-widget h3 {
    margin: 0 0 20px 0;
    font-size: 1.2rem;
    color: #2d3748;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

/* Sidebar Categories */
.sidebar-categories {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-categories a {
    display: block;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #495057;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    font-weight: 500;
}

.sidebar-categories a:hover {
    background: #e9ecef;
    transform: translateX(5px);
    color: #2d3748;
}

.sidebar-categories a.active-category {
    background: #4a5568;
    color: white;
    border-left-color: #667eea;
}

/* Subscription Form */
.subscription-form .form-group {
    margin-bottom: 15px;
}

.subscription-form .form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 1rem;
}

.btn-subscribe {
    width: 100%;
    background: #4a5568;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-subscribe:hover {
    background: #2d3748;
}

.subscription-note {
    font-size: 0.8rem;
    color: #a0aec0;
    margin-top: 10px;
    text-align: center;
}

/* Sidebar Lists */
.sidebar-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-widget ul li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.sidebar-widget ul li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sidebar-widget ul li a {
    text-decoration: none;
    color: #4a5568;
    transition: color 0.3s ease;
    display: block;
}

.sidebar-widget ul li a:hover {
    color: #2d3748;
    transform: translateX(5px);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn:hover {
    background-color: var(--secondary-color);
}

.btn-subscribe {
    width: 100%;
}

.pagination {
    display: flex;
    gap: 10px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.pagination a {
    padding: 8px 15px;
    background-color: var(--bg-light);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.pagination a:hover,
.pagination a.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

footer {
    background-color: var(--secondary-color);
    color: #fff;
    padding: 20px 0;
    text-align: center;
    margin-top: auto;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.tag-label {
    display: inline-block;
    background-color: #e0e0e0;
    padding: 4px 12px;
    margin-right: 8px;
    margin-bottom: 6px;
    border-radius: 16px;
    font-size: 0.85em;
    font-weight: 600;
    text-decoration: none;
    color: black;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.3);
}

.tag-label:hover,
.tag-label:focus {
    background-color: #0056b3;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.6);
    outline: none;
}

.post-views, .post-readtime {
    font-weight: 700;
    color: #007bff;
    margin-right: 12px;
    user-select: none;
    font-size: 0.9em;
}

.faq-section {
    background-color: var(--bg-light);
    border-radius: 8px;
    padding: 20px;
    margin: 40px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.07);
}

.faq-section h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.faq-section .faq-question {
    font-weight: 700;
    margin-top: 15px;
    cursor: pointer;
    color: var(--primary-color);
}

.faq-section .faq-answer {
    margin-top: 8px;
    padding-left: 15px;
    border-left: 3px solid var(--primary-color);
    display: none;
    color: var(--text-color);
}

.message {
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    font-weight: 500;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ===== CARD LAYOUT STYLES ===== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.post-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-image {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}
.card-image img,
.card-image picture {
    width: 100%;
    height: auto;
    display: block;
}

.post-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 25px;
}

.card-title {
    font-size: 1.3rem;
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.card-title a {
    color: #2d3748;
    text-decoration: none;
}

.card-title a:hover {
    color: #4a5568;
}

.card-excerpt {
    color: #718096;
    line-height: 1.6;
    margin-bottom: 20px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #a0aec0;
    border-top: 1px solid #e2e8f0;
    padding-top: 15px;
}

.read-more {
    background: #4a5568;
    color: white;
    padding: 1px 5px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
}

.read-more:hover {
    background: #2d3748;
}

/* Update existing single post styles */
.single-post .post-featured-image {
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Make tags look better */
.tag-label {
    background: #edf2f7;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    margin: 2px;
    display: inline-block;
}

/* ===== SINGLE POST CONTENT CONTAINMENT ===== */
.single-post .post-content {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

/* Contain images, tables, and other wide elements */
.single-post .post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
}

.single-post .post-content table {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    display: block;
    border-collapse: collapse;
    margin: 20px 0;
}

.single-post .post-content iframe,
.single-post .post-content video,
.single-post .post-content embed {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
}

/* Prevent code blocks from breaking layout */
.single-post .post-content pre {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.single-post .post-content code {
    word-break: break-word;
}

/* Ensure all content stays within bounds */
.single-post .post-content * {
    max-width: 100%;
}

/* Specific fix for WordPress-style content */
.single-post .post-content .wp-caption {
    max-width: 100%;
}

.single-post .post-content .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.single-post .post-content .alignleft {
    float: left;
    margin-right: 20px;
    max-width: 50%;
}

.single-post .post-content .alignright {
    float: right;
    margin-left: 20px;
    max-width: 50%;
}

/* Clear floats */
.single-post .post-content:after {
    content: "";
    display: table;
    clear: both;
}

/* ===== SINGLE POST LAYOUT ENHANCEMENTS ===== */
.posts-container {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.single-post {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.post-featured-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 30px;
}

.post-title {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Improved text readability */
.single-post .post-content {
    line-height: 1.7;
    font-size: 1.1rem;
    color: #333;
}

.single-post .post-content p {
    margin-bottom: 1.5em;
}

.single-post .post-content h1,
.single-post .post-content h2,
.single-post .post-content h3,
.single-post .post-content h4 {
    margin: 1.5em 0 0.8em 0;
    line-height: 1.3;
}

.single-post .post-content ul,
.single-post .post-content ol {
    margin: 1em 0;
    padding-left: 2em;
}

/* ===== AD CONTAINER BASE STYLES ===== */
.blog-ad {
    margin: 20px 0;
    width: 100%;
    display: block;
}

.ad-container {
    margin: 15px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    width: 100%;
    box-sizing: border-box;
}

/* Card Layout Styles */
.ad-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    max-width: 100%;
    margin-bottom: 20px;
}

.ad-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.ad-card-image-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.ad-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ad-card:hover .ad-card-image {
    transform: scale(1.05);
}

.ad-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff6b6b;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 2;
}

.ad-card-offer {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #4ecdc4;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 2;
}

.ad-card-content {
    padding: 15px;
}

.ad-card-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 8px;
    color: #2c3e50;
    line-height: 1.3;
}

.ad-card-title a {
    color: inherit;
    text-decoration: none;
}

.ad-card-title a:hover {
    color: #3498db;
}

.ad-card-description {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 12px;
    line-height: 1.4;
}

.ad-card-cta {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.ad-card-cta:hover {
    background: #2980b9;
    color: white;
    text-decoration: none;
}

.ad-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #ecf0f1;
}

.ad-card-type {
    font-size: 0.8rem;
    color: #95a5a6;
}

.ad-card-views {
    font-size: 0.8rem;
    color: #95a5a6;
}

.ad-card-views i {
    margin-right: 4px;
}

/* Banner Layout Styles */
.ad-banner {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    padding: 15px;
    margin-bottom: 20px;
}

.ad-banner-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ad-banner-image {
    flex: 0 0 100px;
    position: relative;
}

.ad-banner-image img {
    width: 100px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.ad-banner-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: #ff6b6b;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
}

.ad-banner-text {
    flex: 1;
}

.ad-banner-title {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: #2c3e50;
}

.ad-banner-title a {
    color: inherit;
    text-decoration: none;
}

.ad-banner-title a:hover {
    color: #3498db;
}

.ad-banner-description {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 8px;
}

.ad-banner-offer {
    background: #4ecdc4;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    display: inline-block;
}

.ad-banner-cta {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
}

.ad-banner-cta:hover {
    background: #2980b9;
    color: white;
    text-decoration: none;
}

/* Text Layout Styles */
.ad-text {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    padding: 15px;
    text-align: center;
    margin-bottom: 20px;
}

.ad-text-content {
    max-width: 100%;
}

.ad-text-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 8px;
    color: #2c3e50;
}

.ad-text-title a {
    color: inherit;
    text-decoration: none;
}

.ad-text-title a:hover {
    color: #3498db;
}

.ad-text-description {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 10px;
    line-height: 1.4;
}

.ad-text-badge {
    background: #ff6b6b;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    display: inline-block;
    margin-bottom: 10px;
}

.ad-text-offer {
    background: #4ecdc4;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    display: inline-block;
    margin-bottom: 10px;
    margin-left: 5px;
}

.ad-text-cta {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 10px;
}

.ad-text-cta:hover {
    background: #2980b9;
    color: white;
    text-decoration: none;
}

.ad-text-meta {
    font-size: 0.8rem;
    color: #95a5a6;
}

/* Ad Style Variations */
.ad-style-premium {
    border-left: 4px solid #e74c3c;
}

.ad-style-featured {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.ad-style-featured .ad-card-title,
.ad-style-featured .ad-card-description,
.ad-style-featured .ad-banner-title,
.ad-style-featured .ad-banner-description,
.ad-style-featured .ad-text-title,
.ad-style-featured .ad-text-description {
    color: white;
}

.ad-style-featured .ad-card-meta,
.ad-style-featured .ad-text-meta {
    color: rgba(255,255,255,0.8);
    border-top-color: rgba(255,255,255,0.2);
}

.ad-style-minimal {
    border: 2px solid #34495e;
    background: white;
}

/* ===== SIDEBAR-SPECIFIC AD STYLES ===== */
.ad-sidebar-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    margin-bottom: 20px;
    width: 100%;
    display: block;
}

.ad-sidebar-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.ad-sidebar-image-container {
    position: relative;
    width: 100%;
    background: #f8f9fa;
    overflow: hidden;
}

.ad-sidebar-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.ad-sidebar-card:hover .ad-sidebar-image {
    transform: scale(1.05);
}

.ad-sidebar-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #ff6b6b;
    color: white;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 2;
}

.ad-sidebar-offer {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #4ecdc4;
    color: white;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: bold;
}

.ad-sidebar-content {
    padding: 12px;
    display: block;
    width: 100%;
}

.ad-sidebar-title {
    font-size: 0.95rem;
    font-weight: bold;
    margin-bottom: 8px;
    color: #2c3e50;
    line-height: 1.3;
    text-align: left;
}

.ad-sidebar-title a {
    color: inherit;
    text-decoration: none;
}

.ad-sidebar-title a:hover {
    color: #3498db;
}

.ad-sidebar-description {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-bottom: 12px;
    line-height: 1.4;
    text-align: left;
}

.ad-sidebar-cta {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
    text-decoration: none;
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    margin-top: 8px;
}

.ad-sidebar-cta:hover {
    background: #2980b9;
    color: white;
    text-decoration: none;
}

.ad-sidebar-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #ecf0f1;
}

.ad-sidebar-type {
    font-size: 0.7rem;
    color: #95a5a6;
}

/* Sidebar Ad Style Variants */
.ad-sidebar-card.ad-style-premium {
    border-left: 3px solid #e74c3c;
}

.ad-sidebar-card.ad-style-featured {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.ad-sidebar-card.ad-style-featured .ad-sidebar-title,
.ad-sidebar-card.ad-style-featured .ad-sidebar-description,
.ad-sidebar-card.ad-style-featured .ad-sidebar-title a {
    color: white;
}

.ad-sidebar-card.ad-style-minimal {
    border: 1px solid #34495e;
    background: white;
}

/* Additional styles for new ad placements */

/* Related Posts Ads */
.related-post-ad {
    margin: 20px 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    grid-column: 1 / -1;
}

.related-post-ad .ad-container {
    margin: 0;
}

/* Recent Posts List Ads */
.recent-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-posts-list li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.recent-posts-list li:last-child {
    border-bottom: none;
}

.recent-post-ad {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    border: 1px solid #e0e0e0;
}

.recent-post-ad .ad-container {
    margin: 0;
}

/* Homepage Content Ads */
.home-content-ad {
    margin: 30px 0;
    grid-column: 1 / -1;
}

/* Search Results Ads */
.search-results-ad {
    margin: 30px 0;
    grid-column: 1 / -1;
}

/* Sidebar Ad Spacing */
.sidebar-middle-ad,
.sidebar-bottom-ad {
    margin: 20px 0;
}

/* Ensure ads don't break layout */
.blog-ad {
    width: 100%;
    overflow: hidden;
}

/* Ensure sidebar ads don't break layout */
.sidebar .blog-ad {
    width: 100%;
    margin-bottom: 20px;
}

/* Make sure images in sidebar ads are responsive */
.sidebar .ad-container img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Animation for ad appearance */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ad-container {
    animation: fadeInUp 0.5s ease;
}

/* Animation for smooth ad appearance */
@keyframes adFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-ad .ad-container {
    animation: adFadeIn 0.5s ease;
}

/* Ensure all links in ads have proper cursor */
.ad-container a {
    cursor: pointer;
}

/* Image error handling */
.ad-card-image:before,
.ad-banner-image img:before,
.ad-sidebar-image:before {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}

.ad-card-image:after,
.ad-banner-image img:after,
.ad-sidebar-image:after {
    content: "Image not available";
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #6c757d;
    font-size: 0.8rem;
}

/* Hide broken images gracefully */
.ad-container img:before {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: #f8f9fa;
}

.ad-container img:after {
    content: "Advertisement";
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: bold;
}

/* OVERRIDE FOR SIDEBAR ADS - STACKED LAYOUT */
.ad-sidebar-card {
    display: block !important;
}

.ad-sidebar-card .ad-sidebar-image-container,
.ad-sidebar-card .ad-sidebar-content {
    display: block !important;
    width: 100% !important;
    float: none !important;
}

.ad-sidebar-card .ad-sidebar-image {
    width: 100% !important;
    float: none !important;
}

.ad-sidebar-card .ad-sidebar-cta {
    display: block !important;
    width: 100% !important;
}

/* MOBILE STYLES */
@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #fff;
        box-shadow: var(--shadow);
        padding: 15px;
        display: none;
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .main-nav li {
        margin: 10px 0;
        width: 100%;
    }
    
    .search-form input {
        width: 100%;
    }
    
    .category-toggle {
        display: block;
    }
    
    .category-list {
        flex-direction: column;
        display: none;
        gap: 5px;
    }
    
    .category-list.active {
        display: flex;
    }
    
    .category-list a {
        display: block;
        border-radius: 4px;
        padding: 8px 12px;
    }
    
    .header-content {
        flex-wrap: wrap;
    }
    
    .author-bio {
        flex-direction: column;
        text-align: center;
    }
    
    .author-image {
        margin: 0 auto;
    }
    
    .share-buttons {
        justify-content: center;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .post-title {
        font-size: 1.5rem;
    }
    
    .share-btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
    
    .pagination {
        justify-content: center;
    }
    
    .blog-logo img {
        max-width: 200px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .card-image {
        height: 180px;
    }
    
    .card-content {
        padding: 20px;
    }
    
    .ad-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .ad-banner-image {
        flex: 0 0 auto;
    }
    
    .ad-card-image-container {
        height: 150px;
    }
    
    .ad-card-content {
        padding: 12px;
    }
    
    .ad-container {
        margin: 10px 0;
    }
    
    .sidebar .ad-sidebar-card {
        margin: 15px auto;
        max-width: 400px;
    }
    
    .sidebar .ad-sidebar-image {
        height: 180px;
    }
    
    .related-post-ad,
    .recent-post-ad,
    .home-content-ad,
    .search-results-ad {
        margin: 20px 0;
    }
    
    .recent-post-ad {
        padding: 10px;
    }
    
    /* Mobile horizontal scroll prevention */
    .container {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .main-content {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .single-post .post-content {
        word-wrap: break-word;
        overflow-wrap: break-word;
        padding: 0 10px;
    }
    
    /* Force table responsiveness */
    .single-post .post-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .single-post .post-content .alignleft,
    .single-post .post-content .alignright {
        float: none;
        margin: 10px auto;
        max-width: 100%;
        display: block;
    }
    
    .post-featured-image {
        height: auto;
        max-height: 300px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 10px;
    }
    
    .post-title {
        font-size: 1.3rem;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .share-btn {
        width: 100%;
    }
}
/* ===== ENHANCED HEADER AD STYLES FOR DESKTOP ===== */

/* Home Header Ad - Desktop Enhancement */
.blog-ad.home-header-ad {
    margin: 30px 0;
    position: relative;
}

.blog-ad.home-header-ad .ad-banner {
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    margin-bottom: 0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.blog-ad.home-header-ad .ad-banner:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

/* Add a subtle pattern overlay */
.blog-ad.home-header-ad .ad-banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none"/><path d="M0,0 L100,100 M100,0 L0,100" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></svg>');
    pointer-events: none;
}

.blog-ad.home-header-ad .ad-banner-content {
    display: flex;
    align-items: center;
    gap: 25px;
    position: relative;
    z-index: 2;
}

.blog-ad.home-header-ad .ad-banner-image {
    flex: 0 0 120px;
    position: relative;
}

.blog-ad.home-header-ad .ad-banner-image img {
    width: 120px;
    height: 100px;
    object-fit: fill;
    border-radius: 8px;
    border: 3px solid rgba(255,255,255,0.9);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.blog-ad.home-header-ad .ad-banner:hover .ad-banner-image img {
    transform: scale(1.05);
}

.blog-ad.home-header-ad .ad-banner-text {
    flex: 1;
    color: white;
}

.blog-ad.home-header-ad .ad-banner-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.blog-ad.home-header-ad .ad-banner-title a {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.blog-ad.home-header-ad .ad-banner-title a:hover {
    color: #f8f9fa;
    text-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.blog-ad.home-header-ad .ad-banner-description {
    font-size: 1rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 12px;
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.blog-ad.home-header-ad .ad-banner-cta {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.blog-ad.home-header-ad .ad-banner-cta:hover {
    background: linear-gradient(135deg, #ff7979 0%, #ff3838 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.blog-ad.home-header-ad .ad-banner-cta::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.blog-ad.home-header-ad .ad-banner-cta:hover::before {
    left: 100%;
}

/* Badge for header ads */
.blog-ad.home-header-ad .ad-banner-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #ffd93d 0%, #ff9a3d 100%);
    color: #2d3436;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Offer text styling */
.blog-ad.home-header-ad .ad-banner-offer {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 10px;
    border: 1px solid rgba(255,255,255,0.3);
}

/* Premium header ad variant */
.blog-ad.home-header-ad .ad-style-premium {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

.blog-ad.home-header-ad .ad-style-featured {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.blog-ad.home-header-ad .ad-style-minimal {
    background: white;
    border: 2px solid #e0e0e0;
}

.blog-ad.home-header-ad .ad-style-minimal .ad-banner-text {
    color: #2c3e50;
}

.blog-ad.home-header-ad .ad-style-minimal .ad-banner-title,
.blog-ad.home-header-ad .ad-style-minimal .ad-banner-description {
    color: #2c3e50;
    text-shadow: none;
}

.blog-ad.home-header-ad .ad-style-minimal .ad-banner-cta {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

/* Responsive adjustments for enhanced header ad */
@media (max-width: 768px) {
    .blog-ad.home-header-ad .ad-banner {
        padding: 20px;
    }
    
    .blog-ad.home-header-ad .ad-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .blog-ad.home-header-ad .ad-banner-image {
        flex: 0 0 auto;
    }
    
    .blog-ad.home-header-ad .ad-banner-image img {
        width: 100px;
        height: 80px;
    }
    
    .blog-ad.home-header-ad .ad-banner-title {
        font-size: 1.2rem;
    }
    
    .blog-ad.home-header-ad .ad-banner-description {
        font-size: 0.9rem;
    }
}
/* ===== MOBILE-OPTIMIZED CONTENT TOP AD ===== */
/* Add this to your existing CSS file */

.blog-ad.content-top-ad {
    width: 100%;
    margin: 20px 0;
}

.blog-ad.content-top-ad .ad-container.ad-card {
    border: none;
    border-radius: 12px;
    background: white;
    padding: 0;
    margin-bottom: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #eaeaea;
    display: flex;
    flex-direction: row;
    min-height: 180px;
}

.blog-ad.content-top-ad .ad-card-image-container {
    flex: 0 0 35%;
    position: relative;
    overflow: hidden;
}

.blog-ad.content-top-ad .ad-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-ad.content-top-ad .ad-card-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.blog-ad.content-top-ad .ad-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
    color: #2c3e50;
}

.blog-ad.content-top-ad .ad-card-title a {
    color: #2c3e50;
    text-decoration: none;
}

.blog-ad.content-top-ad .ad-card-description {
    font-size: 0.95rem;
    color: #5a6c7d;
    margin-bottom: 15px;
    line-height: 1.5;
}

.blog-ad.content-top-ad .ad-card-cta {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    align-self: flex-start;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .blog-ad.content-top-ad .ad-container.ad-card {
        flex-direction: column;
        min-height: auto;
    }
    
    .blog-ad.content-top-ad .ad-card-image-container {
        flex: 0 0 200px;
        width: 100%;
    }
    
    .blog-ad.content-top-ad .ad-card-cta {
        width: 100%;
        text-align: center;
    }
}
/* ===== MOBILE HOMEPAGE AD CARD FORCING ===== */
@media (max-width: 768px) {
    /* Target homepage specific ad containers */
    .home-header-ad .ad-banner,
    .home-content-ad .ad-banner,
    .home-header-ad .ad-banner-content,
    .home-content-ad .ad-banner-content {
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Convert banner ads to card layout on mobile homepage */
    .posts-grid .blog-ad .ad-banner {
        display: block !important;
        background: #ffffff !important;
        border: 1px solid #e9ecef !important;
        border-radius: 8px !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
    
    .posts-grid .blog-ad .ad-banner-content {
        display: flex !important;
        flex-direction: column !important;
    }
    
    .posts-grid .blog-ad .ad-banner-image {
        order: 1 !important;
        width: 100% !important;
        margin: 0 !important;
    }
    
    .posts-grid .blog-ad .ad-banner-text {
        order: 2 !important;
        padding: 15px !important;
    }
    
    .posts-grid .blog-ad .ad-banner-title {
        font-size: 16px !important;
        margin-bottom: 8px !important;
    }
    
    .posts-grid .blog-ad .ad-banner-description {
        font-size: 14px !important;
        margin-bottom: 12px !important;
    }
    
    .posts-grid .blog-ad .ad-banner-cta {
        order: 3 !important;
        margin: 0 15px 15px 15px !important;
        text-align: center !important;
    }
    
    /* Ensure images in mobile homepage ads display properly */
    .posts-grid .blog-ad img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
        border-radius: 8px 8px 0 0 !important;
    }
}
/* Enhanced mobile card ad styling */
@media (max-width: 768px) {
    /* Homepage ads in posts grid - force card layout */
    .posts-grid .blog-ad {
        background: #ffffff !important;
        border: 1px solid #e0e0e0 !important;
        border-radius: 8px !important;
        padding: 0 !important;
        overflow: hidden !important;
        margin: 15px 0 !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    }
    
    /* Structure the ad content in card format */
    .posts-grid .blog-ad .ad-container {
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Image at top */
    .posts-grid .blog-ad .ad-banner-image,
    .posts-grid .blog-ad .ad-card-image-container {
        order: 1 !important;
        width: 100% !important;
        margin: 0 !important;
    }
    
    /* Text content below image */
    .posts-grid .blog-ad .ad-banner-text,
    .posts-grid .blog-ad .ad-card-content {
        order: 2 !important;
        padding: 15px !important;
    }
    
    /* Title styling */
    .posts-grid .blog-ad .ad-banner-title,
    .posts-grid .blog-ad .ad-card-title {
        font-size: 16px !important;
        font-weight: 600 !important;
        margin-bottom: 8px !important;
        line-height: 1.3 !important;
    }
    
    /* Description styling */
    .posts-grid .blog-ad .ad-banner-description,
    .posts-grid .blog-ad .ad-card-description {
        font-size: 14px !important;
        line-height: 1.4 !important;
        color: #666 !important;
        margin-bottom: 12px !important;
    }
    
    /* CTA button styling */
    .posts-grid .blog-ad .ad-banner-cta,
    .posts-grid .blog-ad .ad-card-cta {
        order: 3 !important;
        display: block !important;
        text-align: center !important;
        background: #1e3c72 !important;
        color: white !important;
        padding: 10px 16px !important;
        border-radius: 4px !important;
        text-decoration: none !important;
        font-weight: 600 !important;
        margin: 0 15px 15px 15px !important;
    }
    
    /* Ensure all images are properly contained */
    .posts-grid .blog-ad img {
        width: 100% !important;
        height: 180px !important;
        object-fit: cover !important;
        display: block !important;
        border-radius: 8px 8px 0 0 !important;
    }
    
    /* Hide elements that don't fit mobile card layout */
    .posts-grid .blog-ad .ad-banner-badge,
    .posts-grid .blog-ad .ad-banner-cta-container {
        display: none !important;
    }
}
/* Fix image distortion and aspect ratios */
img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    object-position: center;
}

/* Ensure featured images maintain aspect ratio */
.post-featured-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    object-position: center;
}

/* Card images */
.card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
}

/* Sidebar images */
.sidebar-widget img {
    max-width: 100%;
    height: auto;
}

/* Prevent layout shift for images */
img[width][height] {
    height: auto;
}

/* Modern image formats support */
picture {
    display: block;
}

source {
    max-width: 100%;
}
/* ---- FAQ block ---- */
.faq-section        { margin: 2.5rem 0; font-family: inherit }
.faq-item           { border-bottom: 1px solid #e5e5e5; padding: 1rem 0 }
.faq-item summary   { font-weight: 600; cursor: pointer; font-size: 1.1rem;
                      list-style: none; display: flex; justify-content: space-between; align-items: center }
.faq-item summary::-webkit-details-marker { display:none }
.faq-item summary::after { content: "+"; font-size: 1.2rem; transition: transform .2s }
.faq-item[open] summary::after { content: "−" }
.faq-answer         { margin-top: .75rem; padding-left: 1.2rem; line-height: 1.6 }
.logo-link {
    display: inline-block;
    text-decoration: none;
    transition: transform 0.2s;
}

.logo-link:hover {
    transform: scale(1.05);
}
/* Add to your existing CSS styles */
.ai-suggestion {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 0 5px 5px 0;
}

.ai-suggestion h6 {
    color: #856404;
    margin-bottom: 5px;
}

.ai-suggestion ul {
    margin-bottom: 0;
    padding-left: 20px;
}

.ai-suggestion li {
    margin-bottom: 3px;
}