/* ==========================================================================
   ADI Gadget – Blog & Single Article Custom Stylesheet (blog.css)
   ========================================================================== */

:root {
    --blog-card-bg-light: #ffffff;
    --blog-card-bg-dark: #1e1e2d;
    --blog-text-primary-light: #0f172a;
    --blog-text-primary-dark: #f8fafc;
    --blog-text-secondary-light: #475569;
    --blog-text-secondary-dark: #94a3b8;
    --blog-border-color-light: #f1f5f9;
    --blog-border-color-dark: #2d2d3f;
    --blog-primary-color: var(--theme-palette-color-1, #3c3fde);
}

/* -----------------------------------------------------------------------
   1. General Layout & Grid System
   ----------------------------------------------------------------------- */

.blog-main-wrapper {
    background-color: #ffffff !important;
}

.blog-layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 2rem;
    padding-bottom: 3rem;
}

@media (min-width: 992px) {
    .blog-layout-grid {
        grid-template-columns: repeat(12, 1fr);
        direction: rtl; /* Force RTL layout */
    }

    .blog-content-col {
        grid-column: span 8;
    }

    .blog-sidebar-col {
        grid-column: span 4;
    }
}

/* -----------------------------------------------------------------------
   2. Blog Page Header (Archives)
   ----------------------------------------------------------------------- */

/* Featured Brand Blue Glassmorphic Blog Hero Header (Flush Extension of Header Inside Container) */
.blog-hero-featured,
header.blog-hero-featured,
div.blog-hero-featured {
    position: relative !important;
    overflow: hidden !important;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #1d4ed8 100%) !important;
    padding: 3.5rem 2rem !important;
    text-align: center !important;
    border-radius: 0 0 24px 24px !important;
    border-top: none !important;
    margin-top: 0 !important;
    margin-bottom: 2.5rem !important;
    box-shadow: 0 16px 40px -10px rgba(37, 99, 235, 0.4) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    left: auto !important;
    right: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Force zero gap between site header and hero banner */
#page-content,
.site-content,
.blog-main-wrapper {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.blog-main-wrapper > .container {
    padding-top: 0 !important;
}

@media (max-width: 767px) {
    .blog-hero-featured,
    header.blog-hero-featured,
    div.blog-hero-featured {
        padding: 2.25rem 1.25rem !important;
        margin-bottom: 1.5rem !important;
        border-radius: 0 0 20px 20px !important;
    }
    .blog-hero-featured .blog-page-title,
    .blog-hero-featured h1,
    .blog-hero-featured h2 {
        font-size: 1.75rem !important;
    }
}

.blog-hero-glow-bg {
    position: absolute !important;
    top: -50% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 600px !important;
    height: 300px !important;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.35) 0%, rgba(147, 197, 253, 0.2) 50%, rgba(0, 0, 0, 0) 80%) !important;
    filter: blur(50px) !important;
    pointer-events: none !important;
    z-index: 1 !important;
}

.blog-hero-content {
    position: relative !important;
    z-index: 2 !important;
    max-width: 780px !important;
    margin: 0 auto !important;
}

.blog-hero-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    padding: 6px 18px !important;
    border-radius: 30px !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin-bottom: 1.25rem !important;
}

.blog-hero-badge .badge-icon {
    font-size: 1rem !important;
}

.blog-hero-featured .blog-page-title,
.blog-hero-featured h1,
.blog-hero-featured h2 {
    font-size: 2.5rem !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    margin-bottom: 1rem !important;
    line-height: 1.2 !important;
    letter-spacing: -0.5px !important;
}

.blog-hero-featured .blog-brand-highlight {
    background: linear-gradient(135deg, #ffffff 0%, #93c5fd 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: #ffffff !important;
    font-weight: 900 !important;
    display: inline-block !important;
}

.blog-hero-featured .blog-page-description,
.blog-hero-featured p {
    font-size: 1.1rem !important;
    color: #e0f2fe !important;
    max-width: 660px !important;
    margin: 0 auto 1.5rem auto !important;
    line-height: 1.7 !important;
    font-weight: 500 !important;
}

.blog-hero-featured .desc-brand-tag {
    color: #ffffff !important;
    font-weight: 700 !important;
    background: rgba(255, 255, 255, 0.22) !important;
    padding: 2px 10px !important;
    border-radius: 6px !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    display: inline-block !important;
}

.blog-hero-tags {
    display: flex !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-top: 1rem !important;
}

.hero-tag-item {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    padding: 6px 16px !important;
    border-radius: 20px !important;
    transition: all 0.25s ease !important;
    text-decoration: none !important;
}

.hero-tag-item:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
}

/* -----------------------------------------------------------------------
   3. Card Grid & Blog Cards (Inspired by techxreviews.com)
   ----------------------------------------------------------------------- */

.blog-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
}

@media (min-width: 640px) {
    .blog-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.blog-card {
    background-color: var(--blog-card-bg-light);
    border: 1px solid var(--blog-border-color-light);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.01);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] .blog-card {
    background-color: var(--blog-card-bg-dark);
    border-color: var(--blog-border-color-dark);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 20px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    border-color: rgba(60, 63, 222, 0.15);
}

[data-theme="dark"] .blog-card:hover {
    border-color: rgba(60, 63, 222, 0.3);
    box-shadow: 0 12px 25px -3px rgba(0, 0, 0, 0.4), 0 4px 10px -2px rgba(0, 0, 0, 0.3);
}

/* Card Thumbnail Layout 16:9 */
.blog-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background-color: #f1f5f9;
}

[data-theme="dark"] .blog-card-media {
    background-color: #1a1a26;
}

.blog-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-img {
    transform: scale(1.05);
}

/* Category Overlay Badge */
.blog-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: var(--blog-primary-color);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 9999px;
    box-shadow: 0 2px 8px rgba(60, 63, 222, 0.3);
    z-index: 2;
    transition: background-color 0.2s ease;
}

.blog-card-badge:hover {
    background-color: #e63946; /* Accent color change */
}

/* Card Content */
.blog-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: right;
}

/* Card Meta Details */
.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--blog-text-secondary-light);
    margin-bottom: 0.75rem;
}

[data-theme="dark"] .blog-card-meta {
    color: var(--blog-text-secondary-dark);
}

.blog-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.blog-meta-sep::before {
    content: "•";
    color: rgba(148, 163, 184, 0.5);
}

/* Card Title */
.blog-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--blog-text-primary-light);
    margin-bottom: 0.75rem;
    transition: color 0.2s ease;
}

[data-theme="dark"] .blog-card-title {
    color: var(--blog-text-primary-dark);
}

.blog-card-title a {
    color: inherit;
    text-decoration: none;
}

.blog-card:hover .blog-card-title {
    color: var(--blog-primary-color);
}

/* Card Excerpt */
.blog-card-excerpt {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--blog-text-secondary-light);
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[data-theme="dark"] .blog-card-excerpt {
    color: var(--blog-text-secondary-dark);
}

/* Read More button */
.blog-card-btn {
    margin-top: auto;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--blog-primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    align-self: flex-start;
    transition: gap 0.2s ease;
}

.blog-card-btn svg {
    transition: transform 0.2s ease;
}

.blog-card:hover .blog-card-btn svg {
    transform: translateX(-4px); /* Move left for RTL */
}

/* -----------------------------------------------------------------------
   4. Sidebar Widgets
   ----------------------------------------------------------------------- */

.blog-sidebar-col {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.blog-sidebar-widget {
    background-color: var(--blog-card-bg-light);
    border: 1px solid var(--blog-border-color-light);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .blog-sidebar-widget {
    background-color: var(--blog-card-bg-dark);
    border-color: var(--blog-border-color-dark);
}

.widget-title-wrapper {
    border-bottom: 2px solid var(--blog-border-color-light);
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
}

[data-theme="dark"] .widget-title-wrapper {
    border-bottom-color: var(--blog-border-color-dark);
}

.widget-title-custom {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--blog-text-primary-light);
    border-right: 4px solid var(--blog-primary-color);
    padding-right: 10px;
    margin: 0;
    line-height: 1;
}

[data-theme="dark"] .widget-title-custom {
    color: var(--blog-text-primary-dark);
}

/* Tiny Recent/Top Posts List (Inspired by techxreviews.com) */
.mini-posts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mini-post-card {
    display: flex;
    gap: 12px;
    align-items: center;
    text-decoration: none;
    direction: rtl;
}

.mini-post-thumb {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    background-color: #f1f5f9;
    flex-shrink: 0;
}

[data-theme="dark"] .mini-post-thumb {
    background-color: #1a1a26;
}

.mini-post-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: right;
}

.mini-post-title {
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--blog-text-primary-light);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

[data-theme="dark"] .mini-post-title {
    color: var(--blog-text-primary-dark);
}

.mini-post-card:hover .mini-post-title {
    color: var(--blog-primary-color);
}

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

[data-theme="dark"] .mini-post-date {
    color: var(--blog-text-secondary-dark);
}

/* Category Widget List */
.sidebar-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-cat-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--blog-text-primary-light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 4px 0;
    transition: color 0.2s ease;
}

[data-theme="dark"] .sidebar-cat-item a {
    color: var(--blog-text-primary-dark);
}

.sidebar-cat-item a:hover {
    color: var(--blog-primary-color);
}

.sidebar-cat-count {
    background-color: #f1f5f9;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 9999px;
    transition: all 0.2s ease;
}

[data-theme="dark"] .sidebar-cat-count {
    background-color: #2d2d3f;
    color: #94a3b8;
}

.sidebar-cat-item a:hover .sidebar-cat-count {
    background-color: var(--blog-primary-color);
    color: #ffffff;
}

/* Ads / Store promo Banner */
.sidebar-promo-banner {
    background: linear-gradient(135deg, #1e1e2d 0%, #11111b 100%);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.sidebar-promo-banner::before {
    content: "";
    position: absolute;
    top: -50px;
    left: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(60, 63, 222, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
}

.sidebar-promo-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.sidebar-promo-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.sidebar-promo-btn {
    background-color: var(--blog-primary-color);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(60, 63, 222, 0.3);
    transition: all 0.2s ease;
}

.sidebar-promo-btn:hover {
    background-color: #e63946;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
    transform: translateY(-2px);
}

/* -----------------------------------------------------------------------
   5. Pagination
   ----------------------------------------------------------------------- */

.blog-pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.blog-pagination-wrapper .nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.blog-pagination-wrapper .page-numbers {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: var(--blog-card-bg-light);
    border: 1px solid var(--blog-border-color-light);
    color: var(--blog-text-primary-light);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

[data-theme="dark"] .blog-pagination-wrapper .page-numbers {
    background-color: var(--blog-card-bg-dark);
    border-color: var(--blog-border-color-dark);
    color: var(--blog-text-primary-dark);
}

.blog-pagination-wrapper .page-numbers:hover {
    border-color: var(--blog-primary-color);
    color: var(--blog-primary-color);
}

.blog-pagination-wrapper .page-numbers.current {
    background-color: var(--blog-primary-color);
    border-color: var(--blog-primary-color);
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(60, 63, 222, 0.25);
}

.blog-pagination-wrapper .page-numbers.dots {
    background: transparent;
    border: none;
}

/* -----------------------------------------------------------------------
   6. Single Article Template (single.php)
   ----------------------------------------------------------------------- */

.single-post-card {
    background-color: var(--blog-card-bg-light);
    border: 1px solid var(--blog-border-color-light);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

@media (min-width: 768px) {
    .single-post-card {
        padding: 2.5rem;
    }
}

[data-theme="dark"] .single-post-card {
    background-color: var(--blog-card-bg-dark);
    border-color: var(--blog-border-color-dark);
}

/* Breadcrumbs */
.blog-breadcrumbs-wrapper {
    font-size: 0.8rem;
    color: var(--blog-text-secondary-light);
    margin-bottom: 1.25rem;
    text-align: right;
}

[data-theme="dark"] .blog-breadcrumbs-wrapper {
    color: var(--blog-text-secondary-dark);
}

.blog-breadcrumbs-wrapper a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-breadcrumbs-wrapper a:hover {
    color: var(--blog-primary-color);
}

.blog-breadcrumbs-sep {
    margin: 0 6px;
}

/* Post Title */
.single-post-title {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.35;
    color: var(--blog-text-primary-light);
    margin-top: 0;
    margin-bottom: 1.5rem;
    text-align: right;
}

@media (min-width: 768px) {
    .single-post-title {
        font-size: 2.5rem;
    }
}

[data-theme="dark"] .single-post-title {
    color: var(--blog-text-primary-dark);
}

/* Single Meta details (with avatar) */
.single-post-meta-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 1.25rem;
    border-top: 1px solid var(--blog-border-color-light);
    border-bottom: 1px solid var(--blog-border-color-light);
    padding: 1rem 0;
    margin-bottom: 2rem;
    font-size: 0.85rem;
    color: var(--blog-text-secondary-light);
}

[data-theme="dark"] .single-post-meta-wrapper {
    border-color: var(--blog-border-color-dark);
    color: var(--blog-text-secondary-dark);
}

.single-meta-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--blog-text-primary-light);
}

[data-theme="dark"] .single-meta-author {
    color: var(--blog-text-primary-dark);
}

.single-meta-author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--blog-border-color-light);
}

[data-theme="dark"] .single-meta-author-avatar {
    border-color: var(--blog-border-color-dark);
}

/* Featured image 16:9 */
.single-post-featured-media {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.single-post-featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* -----------------------------------------------------------------------
   7. Typography for Article Content (.adigadget-article-body)
   ----------------------------------------------------------------------- */

.adigadget-article-body {
    font-size: 1.15rem;
    line-height: 1.85;
    color: var(--blog-text-primary-light);
    text-align: right;
}

[data-theme="dark"] .adigadget-article-body {
    color: #e2e8f0;
}

.adigadget-article-body p {
    margin-bottom: 1.75rem;
}

.adigadget-article-body p:last-child {
    margin-bottom: 0;
}

.adigadget-article-body a {
    color: var(--blog-primary-color);
    text-decoration: underline;
    text-underline-offset: 4px;
    font-weight: 700;
}

.adigadget-article-body a:hover {
    color: #e63946;
}

/* Headings in content */
.adigadget-article-body h2,
.adigadget-article-body h3,
.adigadget-article-body h4 {
    color: var(--blog-text-primary-light);
    font-weight: 800;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.35;
}

[data-theme="dark"] .adigadget-article-body h2,
[data-theme="dark"] .adigadget-article-body h3,
[data-theme="dark"] .adigadget-article-body h4 {
    color: var(--blog-text-primary-dark);
}

.adigadget-article-body h2 {
    font-size: 1.75rem;
    border-bottom: 1px solid var(--blog-border-color-light);
    padding-bottom: 0.5rem;
}

[data-theme="dark"] .adigadget-article-body h2 {
    border-bottom-color: var(--blog-border-color-dark);
}

.adigadget-article-body h3 {
    font-size: 1.4rem;
}

/* Lists */
.adigadget-article-body ul,
.adigadget-article-body ol {
    margin-bottom: 1.75rem;
    padding-right: 1.5rem; /* Indent for RTL lists */
    padding-left: 0;
}

.adigadget-article-body li {
    margin-bottom: 0.5rem;
}

/* Blockquotes */
.adigadget-article-body blockquote {
    background-color: #f8fafc;
    border-right: 4px solid var(--blog-primary-color);
    border-left: none;
    padding: 1.25rem 2rem;
    margin: 2rem 0;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--blog-text-secondary-light);
}

[data-theme="dark"] .adigadget-article-body blockquote {
    background-color: #161622;
    color: var(--blog-text-secondary-dark);
}

.adigadget-article-body blockquote p {
    margin-bottom: 0;
}

/* Image wrappers inside content */
.adigadget-article-body figure {
    margin: 2.25rem 0;
    text-align: center;
}

.adigadget-article-body figure img {
    border-radius: 12px;
    max-width: 100%;
    height: auto;
}

.adigadget-article-body figcaption {
    font-size: 0.85rem;
    color: var(--blog-text-secondary-light);
    margin-top: 0.75rem;
}

[data-theme="dark"] .adigadget-article-body figcaption {
    color: var(--blog-text-secondary-dark);
}

/* Table inside content */
.adigadget-article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
}

.adigadget-article-body th,
.adigadget-article-body td {
    padding: 10px 15px;
    border: 1px solid var(--blog-border-color-light);
    text-align: right;
}

[data-theme="dark"] .adigadget-article-body th,
[data-theme="dark"] .adigadget-article-body td {
    border-color: var(--blog-border-color-dark);
}

.adigadget-article-body th {
    background-color: #f1f5f9;
    font-weight: 700;
}

[data-theme="dark"] .adigadget-article-body th {
    background-color: #1d1d2b;
}

.adigadget-article-body tr:nth-child(even) {
    background-color: rgba(241, 245, 249, 0.5);
}

[data-theme="dark"] .adigadget-article-body tr:nth-child(even) {
    background-color: rgba(29, 29, 43, 0.3);
}

/* Related articles at the bottom */
.blog-related-section {
    margin-top: 4rem;
    border-top: 1px solid var(--blog-border-color-light);
    padding-top: 2.5rem;
}

[data-theme="dark"] .blog-related-section {
    border-top-color: var(--blog-border-color-dark);
}

.blog-related-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--blog-text-primary-light);
    margin-bottom: 1.5rem;
    text-align: right;
}

[data-theme="dark"] .blog-related-title {
    color: var(--blog-text-primary-dark);
}

/* Post tags */
.blog-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2.5rem;
}

.blog-post-tag {
    background-color: #f1f5f9;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

[data-theme="dark"] .blog-post-tag {
    background-color: #2d2d3f;
    color: #94a3b8;
}

.blog-post-tag:hover {
    background-color: var(--blog-primary-color);
    color: #ffffff;
}

/* -----------------------------------------------------------------------
   8. Comments Section & Form
   ----------------------------------------------------------------------- */

.blog-comments-area {
    margin-top: 4rem;
    border-top: 1px solid var(--blog-border-color-light);
    padding-top: 2.5rem;
    text-align: right;
}

[data-theme="dark"] .blog-comments-area {
    border-top-color: var(--blog-border-color-dark);
}

.comments-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--blog-text-primary-light);
    margin-bottom: 1.5rem;
}

[data-theme="dark"] .comments-title {
    color: var(--blog-text-primary-dark);
}

.comment-list-custom {
    list-style: none;
    padding: 0;
    margin: 0 0 3rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comment-item-custom {
    background-color: var(--blog-card-bg-light);
    border: 1px solid var(--blog-border-color-light);
    border-radius: 12px;
    padding: 1.25rem;
}

[data-theme="dark"] .comment-item-custom {
    background-color: var(--blog-card-bg-dark);
    border-color: var(--blog-border-color-dark);
}

.comment-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.comment-item-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--blog-text-primary-light);
}

[data-theme="dark"] .comment-item-author {
    color: var(--blog-text-primary-dark);
}

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

[data-theme="dark"] .comment-item-date {
    color: var(--blog-text-secondary-dark);
}

.comment-item-body {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--blog-text-secondary-light);
}

[data-theme="dark"] .comment-item-body {
    color: #cbd5e1;
}

/* Comment Form & Respond Box styling */
.comment-respond-custom,
.comment-respond,
#respond {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.75rem;
    margin-top: 2.5rem;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04);
}

.comment-reply-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 1.25rem;
    margin-top: 0;
}

.comment-form-custom {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.comment-form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .comment-form-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.comment-form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.comment-form-field label {
    font-size: 0.88rem;
    font-weight: 700;
    color: #334155;
}

.comment-form-field input,
.comment-form-field textarea {
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.95rem;
    color: #0f172a;
    outline: none;
    transition: all 0.25s ease;
    font-family: inherit;
    text-align: right;
    width: 100%;
    box-sizing: border-box;
}

.comment-form-field input:focus,
.comment-form-field textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    background-color: #ffffff;
}

.logged-in-user-bar {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.88rem;
    color: #475569;
    margin-bottom: 1.25rem;
}

.logged-in-user-bar .user-name-tag {
    color: #0f172a;
    font-weight: 700;
}

.logged-in-user-bar .user-bar-dots {
    color: #cbd5e1;
    font-size: 0.75rem;
}

.logged-in-user-bar .user-bar-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.logged-in-user-bar .user-bar-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.logged-in-user-bar .user-bar-link.logout {
    color: #ef4444;
}

.logged-in-user-bar .user-bar-link.logout:hover {
    color: #dc2626;
}

.comment-form-submit-btn {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 12px 30px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    align-self: flex-start;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
    transition: all 0.25s ease;
}

.comment-form-submit-btn:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
    transform: translateY(-2px);
}
