/*
 * === Modern Blog Layout with Ads & Product Sales ===
 * Author: Gemini & Ton
 * Description: A modern blog layout optimized for ads, Google AdSense, and product sales
 */

/* TEST: If you see this background color, the CSS is loading */
.blog-layout-container {
    background-color: #f0f8ff !important;
}

/* --- 1. Root Variables & Fonts --- */
:root {
  --blog-primary-color: #113f4b;
  --blog-secondary-color: #28a745;
  --blog-accent-color: #007bff;
  --blog-danger-color: #dc3545;
  --blog-warning-color: #ffc107;
  --blog-text-color: #343a40;
  --blog-secondary-text-color: #6c757d;
  --blog-light-text-color: #8e9297;
  --blog-border-color: #e9ecef;
  --blog-light-border-color: #f1f3f4;
  --blog-background-light: #f8f9fa;
  --blog-background-white: #ffffff;
  --blog-shadow-light: 0 2px 10px rgba(0,0,0,0.08);
  --blog-shadow-medium: 0 4px 20px rgba(0,0,0,0.12);
  --blog-shadow-heavy: 0 8px 30px rgba(0,0,0,0.15);
  --blog-gradient-primary: linear-gradient(135deg, #113f4b 0%, #1e6b7a 100%);
  --blog-gradient-cta: linear-gradient(135deg, #28a745 0%, #34ce57 100%);
}

/* --- 2. Global Layout Structure --- */
.blog-layout-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    font-family: 'Lato', sans-serif;
    /* Minimal top margin to fix the big gap */
    margin-top: 0 !important;
    /* Ensure grid items can be sticky */
    align-items: start;
    /* Force sticky to work */
    position: relative;
}

/* Force body and main content to have proper spacing */
body {
    padding-top: 80px !important;
    /* Ensure sticky works */
    position: relative;
}

main {
    padding-top: 0 !important;
}

.main-content-column {
    min-width: 0; /* Prevents grid overflow */
    padding-top: 0 !important;
}

.sidebar-column {
    min-width: 0; /* Prevents grid overflow */
    position: relative;
    height: fit-content;
    /* Force sticky container */
    display: flex;
    flex-direction: column;
    /* Ensure proper alignment */
    align-items: stretch;
}

.sidebar-sticky {
    position: sticky !important;
    top: 20px !important; /* Reduced from 100px to be closer to header */
    max-height: calc(350vh - 40px); /* Doubled from calc(100vh - 40px) to make it double height */
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--blog-border-color) transparent;
    /* Ensure sticky positioning works */
    align-self: flex-start;
    z-index: 10;
    /* Force sticky behavior */
    will-change: transform;
    /* Ensure it doesn't get cut off */
    margin-bottom: 20px;
}

.sidebar-sticky::-webkit-scrollbar {
    width: 6px;
}

.sidebar-sticky::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-sticky::-webkit-scrollbar-thumb {
    background-color: var(--blog-border-color);
    border-radius: 3px;
}

/* --- 3. Banner Ad Containers --- */
.top-banner-container,
.bottom-banner-container {
    text-align: center;
    margin: 0.5rem 0; /* Minimal margin */
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.ad-banner {
    margin: 0.5rem 0; /* Reduced margin */
    margin-top: 0.5rem; /* Minimal top margin */
    text-align: center;
}

.top-banner,
.bottom-banner,
.horizontal-ad {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rectangle-ad {
    min-height: 250px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.ad-placeholder {
    color: var(--blog-secondary-text-color);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

/* --- 4. Post Header & Content --- */
.post-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--blog-light-border-color);
    /* Add top padding to ensure content is not cut off */
    padding-top: 1rem !important;
    margin-top: 0 !important;
}

.post-full-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--blog-primary-color);
    line-height: 1.3;
    margin-bottom: 1.5rem;
    text-align: left;
    /* Ensure title is not cut off by header */
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.post-full-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.post-full-meta {
    font-size: 1rem;
    color: var(--blog-secondary-text-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-tag {
    display: inline-block;
    background: var(--blog-gradient-primary);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--blog-shadow-light);
}

.post-tag:hover {
    transform: translateY(-2px);
    box-shadow: var(--blog-shadow-medium);
    color: #fff;
}

/* --- 5. Social Share Buttons --- */
.social-share-container {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--blog-background-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-label {
    font-weight: 600;
    color: var(--blog-text-color);
    margin-right: 0.5rem;
}

.social-share-buttons {
    display: flex;
    gap: 0.75rem;
}

.share-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: var(--blog-shadow-light);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--blog-shadow-medium);
    color: #fff;
}

.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.linkedin { background: #0077b5; }
.share-btn.whatsapp { background: #25d366; }

/* --- 6. Post Content & Images --- */
.post-full-image {
    margin: 2rem 0;
    text-align: center;
}

.post-full-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: var(--blog-shadow-heavy);
}

.post-content {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--blog-text-color);
    margin-bottom: 3rem;
    text-align: justify;
    word-spacing: 0.1em;
    letter-spacing: 0.01em;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: var(--blog-primary-color);
    line-height: 1.3;
}

.post-content h2 {
    font-size: 1.8rem;
    border-bottom: 2px solid var(--blog-accent-color);
    padding-bottom: 0.5rem;
    margin-top: 2.5rem;
}

.post-content h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
}

.post-content h4 {
    font-size: 1.2rem;
    margin-top: 1.8rem;
}

.post-content p {
    margin-bottom: 1.5rem;
    text-indent: 0;
}

.post-content p:first-of-type {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--blog-secondary-text-color);
    line-height: 1.6;
}

.post-content a {
    color: var(--blog-accent-color);
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.3s ease;
}

.post-content a:hover {
    color: var(--blog-primary-color);
    text-decoration: none;
}

.post-content ul,
.post-content ol {
    padding-left: 2rem;
    margin-bottom: 2rem;
}

.post-content li {
    margin-bottom: 0.75rem;
}

.post-content blockquote {
    border-left: 4px solid var(--blog-accent-color);
    background: var(--blog-background-light);
    padding: 1.5rem 2rem;
    margin: 2.5rem 0;
    font-style: italic;
    color: #495057;
    border-radius: 0 12px 12px 0;
    box-shadow: var(--blog-shadow-light);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2.5rem 0;
    box-shadow: var(--blog-shadow-medium);
}

/* --- 7. In-Content Ads --- */
.in-content-ad {
    margin: 3rem 0;
    text-align: center;
}

.top-content-ad {
    margin-top: 2rem;
}

.mid-content-ad {
    margin: 4rem 0;
}

/* --- 8. CTA Section --- */
.post-cta-section {
    margin: 4rem 0;
}

.cta-card {
    background: var(--blog-gradient-cta);
    color: #fff;
    padding: 3rem 2.5rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--blog-shadow-heavy);
}

.cta-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.cta-card p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn.btn-cta {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn.btn-cta.primary {
    background: #fff;
    color: var(--blog-secondary-color);
}

.btn.btn-cta.secondary {
    background: transparent;
    color: #fff;
    border-color: #fff;
}

.btn.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--blog-shadow-medium);
}

/* --- 9. Author Bio --- */
.author-bio-section {
    margin: 4rem 0;
}

.author-bio-card {
    background: var(--blog-background-white);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--blog-shadow-medium);
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.author-avatar {
    flex-shrink: 0;
}

.author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--blog-shadow-light);
}

.author-info h4 {
    font-size: 1.4rem;
    color: var(--blog-primary-color);
    margin-bottom: 0.5rem;
}

.author-title {
    color: var(--blog-accent-color);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.author-description {
    color: var(--blog-secondary-text-color);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.author-social {
    display: flex;
    gap: 1rem;
}

.author-social-link {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--blog-border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blog-secondary-text-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.author-social-link:hover {
    background: var(--blog-primary-color);
    color: #fff;
}

/* --- 10. Affiliate Components --- */

/* Banner Ad Component */
.banner-link {
    display: block;
    width: 100%;
    height: 100%;
}

.banner-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.banner-link:hover .banner-image {
    transform: scale(1.02);
}

/* Affiliate Widget Component */
.affiliate-card {
    text-align: center;
}

.affiliate-image-link {
    display: block;
    margin-bottom: 1rem;
}

.affiliate-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.affiliate-image-link:hover .affiliate-image {
    transform: scale(1.05);
}

.affiliate-content {
    margin-bottom: 1.5rem;
}

.affiliate-description {
    color: var(--blog-secondary-text-color);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0;
}

.btn.btn-affiliate {
    background: var(--blog-gradient-cta);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-block;
    width: 100%;
}

.btn.btn-affiliate:hover {
    transform: translateY(-2px);
    box-shadow: var(--blog-shadow-medium);
    color: #fff;
}

/* Tracking and Analytics */
[data-tracking] {
    cursor: pointer;
}

/* --- 11. Sidebar Widgets --- */
.widget {
    background: var(--blog-background-white);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--blog-shadow-light);
    transition: box-shadow 0.3s ease;
    /* Ensure widgets don't break sticky */
    position: relative;
    z-index: 1;
}

.widget:hover {
    box-shadow: var(--blog-shadow-medium);
}

.widget-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--blog-primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Service Promotion Widget */
.service-card {
    margin-bottom: 2rem;
    text-align: center;
}

.service-card:last-child {
    margin-bottom: 0;
}

.service-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.service-card h4 {
    font-size: 1.1rem;
    color: var(--blog-text-color);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.service-card p {
    color: var(--blog-secondary-text-color);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.btn.btn-cta {
    background: var(--blog-gradient-primary);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--blog-shadow-light);
    color: #fff;
}

/* Contact CTA Widget */
.contact-cta {
    background: var(--blog-gradient-primary);
    color: #fff;
}

.contact-cta .widget-title {
    color: #fff;
}

.cta-content p {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.contact-btn:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.contact-btn.whatsapp:hover {
    background: #25d366;
}

.contact-btn.email:hover {
    background: var(--blog-accent-color);
}

.guarantee-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Product/Course Widget */
.product-card {
    text-align: center;
}

.product-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.product-card h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--blog-text-color);
    margin-bottom: 1rem;
}

.price {
    margin-bottom: 1.5rem;
}

.original-price {
    color: var(--blog-secondary-text-color);
    text-decoration: line-through;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.current-price {
    color: var(--blog-secondary-color);
    font-size: 1.4rem;
    font-weight: 700;
}

.product-features {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    text-align: left;
}

.product-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--blog-text-color);
}

.product-features .bi-check {
    color: var(--blog-secondary-color);
    font-weight: bold;
}

.btn.btn-product {
    background: var(--blog-gradient-cta);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-block;
    margin-bottom: 1rem;
    width: 100%;
}

.btn.btn-product:hover {
    transform: translateY(-2px);
    box-shadow: var(--blog-shadow-medium);
    color: #fff;
}

.product-guarantee {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--blog-secondary-text-color);
    font-size: 0.85rem;
}

/* Newsletter Widget */
.newsletter p {
    color: var(--blog-secondary-text-color);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    text-align: center;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.newsletter-form input {
    padding: 1rem;
    border: 2px solid var(--blog-border-color);
    border-radius: 12px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--blog-accent-color);
}

.btn.btn-newsletter {
    background: var(--blog-gradient-primary);
    color: #fff;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn.btn-newsletter:hover {
    transform: translateY(-2px);
    box-shadow: var(--blog-shadow-light);
}

.newsletter-benefits {
    text-align: center;
}

.newsletter-benefits small {
    color: var(--blog-secondary-text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Related Posts Widget */
.related-post-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--blog-light-border-color);
}

.related-post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.related-post-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.related-post-content h5 {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.related-post-content h5 a {
    color: var(--blog-text-color);
    text-decoration: none;
    font-weight: 600;
}

.related-post-content h5 a:hover {
    color: var(--blog-accent-color);
}

.post-date {
    font-size: 0.8rem;
    color: var(--blog-light-text-color);
}

/* --- 12. Comments Section --- */
.comments-section {
    margin-top: 4rem;
    background: var(--blog-background-white);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--blog-shadow-light);
}

.comments-section h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--blog-primary-color);
    border-bottom: 2px solid var(--blog-light-border-color);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.comment-form {
    background: var(--blog-background-light);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
}

.comment-form h4 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--blog-primary-color);
    font-size: 1.3rem;
}

.comment-form .form-control {
    border: 2px solid var(--blog-border-color);
    border-radius: 8px;
    padding: 0.875rem;
    transition: border-color 0.3s ease;
}

.comment-form .form-control:focus {
    border-color: var(--blog-accent-color);
    box-shadow: none;
}

.comment {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--blog-light-border-color);
}

.comment:last-child {
    border-bottom: none;
}

.comment-avatar {
    flex-shrink: 0;
    font-size: 2.5rem;
    color: var(--blog-border-color);
}

.comment-body {
    flex: 1;
}

.comment-header {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.comment-author {
    font-weight: 700;
    color: var(--blog-text-color);
}

.comment-date {
    font-size: 0.85rem;
    color: var(--blog-light-text-color);
}

.comment-text {
    line-height: 1.7;
    color: var(--blog-secondary-text-color);
}

.no-comments-message {
    text-align: center;
    padding: 3rem 0;
    color: var(--blog-secondary-text-color);
}

.no-comments-message i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--blog-border-color);
    display: block;
}

/* --- 13. Blog Index Styles --- */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    font-family: 'Lato', sans-serif;
}

.blog-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--blog-border-color);
}

.blog-header .blog-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--blog-primary-color);
    margin-bottom: 1rem;
}

.blog-header .blog-subtitle {
    font-size: 1.2rem;
    color: var(--blog-secondary-text-color);
}

/* Table Layout for Posts */
.posts-table {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.posts-table-mobile {
    display: none; /* Hidden by default, shown on mobile */
    flex-direction: column;
    gap: 1.5rem;
}

.posts-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.posts-row-mobile {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: start;
}

.post-cell {
    display: flex;
    flex-direction: column;
}

.post-card {
    background: var(--blog-background-white);
    border-radius: 16px;
    box-shadow: var(--blog-shadow-light);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--blog-shadow-heavy);
}

.post-card-body {
    padding: 1.25rem; /* Reduced from 1.5rem to give more space */
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem; /* Add consistent gap between elements */
}

.post-card .post-title a {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--blog-text-color);
    text-decoration: none;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Increased from 3 to 4 lines for more space */
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 6.2rem; /* Increased height for 4 lines */
    margin-bottom: 0.5rem;
}

.post-card .post-title a:hover {
    color: var(--blog-accent-color);
}

.post-card-image-link {
    display: block;
    overflow: hidden;
}

.post-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card-image {
    transform: scale(1.05);
}

.post-meta {
    font-size: 0.85rem;
    color: var(--blog-secondary-text-color);
    margin-bottom: 1rem;
}

.post-excerpt {
    color: var(--blog-secondary-text-color);
    line-height: 1.5;
    margin: 0.5rem 0; /* Reduced margin to give more space to title */
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Increased from 2 to 3 lines for more space */
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    min-height: 4rem; /* Increased height for 3 lines */
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.post-tag {
    display: inline-block;
    background: var(--blog-gradient-primary);
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.post-tag:hover {
    transform: translateY(-1px);
    color: #fff;
}

.btn.btn-primary {
    background: var(--blog-gradient-primary);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    margin-top: auto;
}

.btn.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--blog-shadow-medium);
    color: #fff;
}

/* --- 14. Responsive Design --- */
@media (max-width: 1200px) {
    .posts-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
}

@media (max-width: 992px) {
    .blog-layout-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 70px; /* Slightly less margin on mobile */
    }
    
    .sidebar-column {
        order: 1; /* Place sidebar after content on mobile */
    }
    
    .sidebar-sticky {
        position: static;
        max-height: none;
        overflow-y: visible;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1rem;
    }
    
    .posts-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .blog-layout-container { 
        padding: 1rem; 
        margin-top: 60px; /* Even less margin on smaller screens */
    }
    
    /* Hide desktop table and show mobile table */
    .posts-table {
        display: none;
    }
    
    .posts-table-mobile {
        display: flex;
    }
    
    .posts-row {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 1rem;
    }
    
    .post-card-body {
        padding: 1.25rem;
    }
    
    .post-card .post-title a {
        font-size: 1.1rem;
    }
    
    .post-excerpt {
        font-size: 0.85rem;
        -webkit-line-clamp: 4;
    }
    
    .post-full-title { 
        font-size: 1.8rem;
        line-height: 1.3;
        text-align: left;
    }
    
    .post-content { 
        font-size: 1rem;
        line-height: 1.6;
        text-align: left;
        word-spacing: normal;
    }
    
    .post-content h2 {
        font-size: 1.5rem;
    }
    
    .post-content h3 {
        font-size: 1.3rem;
    }
    
    .post-content h4 {
        font-size: 1.1rem;
    }
    
    .post-content p {
        margin-bottom: 1.25rem;
    }
    
    .author-bio-card {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .social-share-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .btn.btn-cta {
        width: 100%;
        justify-content: center;
    }
    
    .sidebar-sticky {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .blog-header .blog-title { 
        font-size: 1.8rem; 
    }
    
    .post-card-body { 
        padding: 1rem; 
    }
    
    .widget {
        padding: 1.5rem;
    }
    
    .post-full-title {
        font-size: 1.5rem;
        line-height: 1.4;
    }
    
    .post-content {
        font-size: 0.95rem;
        line-height: 1.6;
        text-align: left;
    }
    
    .post-content h2 {
        font-size: 1.3rem;
        margin-top: 2rem;
    }
    
    .post-content h3 {
        font-size: 1.2rem;
        margin-top: 1.8rem;
    }
    
    .post-content h4 {
        font-size: 1.05rem;
        margin-top: 1.5rem;
    }
    
    .post-content p {
        margin-bottom: 1rem;
    }
    
    .cta-card {
        padding: 2rem 1.5rem;
    }
} 

/* Responsive Banner Images */
.banner-image {
    width: 100%;
    height: 100%; /* Make image fill the container's height */
    display: block;
    object-fit: cover; /* Maintain aspect ratio and cover the space */
    border-radius: 8px; /* Keep rounded corners */
}

/* Desktop banner - show on desktop, hide on mobile */
.desktop-banner {
    display: block;
}

.mobile-banner {
    display: none;
}

/* Mobile breakpoint - show mobile banner, hide desktop */
@media (max-width: 768px) {
    .desktop-banner {
        display: none;
    }
    
    .mobile-banner {
        display: block;
    }
    
    /* Mobile banner container sizing - INCREASED HEIGHT */
    .ad-banner.top-banner,
    .ad-banner.bottom-banner,
    .ad-banner.horizontal-ad {
        min-height: 120px; /* Increased from 80px for horizontal banners */
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }
    
    .ad-banner.rectangle-ad {
        min-height: 250px; /* Increased from 200px for rectangle banners */
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }
}

/* Tablet breakpoint */
@media (min-width: 769px) and (max-width: 1024px) {
    .ad-banner .banner-image {
        max-width: 100%;
        height: auto;
    }
}

/* Desktop - ensure proper sizing */
@media (min-width: 1025px) {
    .ad-banner .banner-image {
        max-width: 100%;
        height: auto;
    }
} 