/*
Main stylesheet
*/

/* CSS Variables for Dark Mode */
:root {
    /* Light mode colors (default) */
    --bg-color: #ffffff;
    --text-color: rgba(0, 0, 0, 0.9);
    --text-color-secondary: rgba(0, 0, 0, 0.75);
    --text-color-muted: rgba(0, 0, 0, 0.6);
    --heading-color: #222;
    --border-color: rgba(0, 0, 0, 0.125);
    --border-color-light: #e9ecef;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #fafafa;
    --link-color: #007549;
    --link-hover-color: #038252;
    --nav-bg: rgba(255, 255, 255, 0.97);
    --footer-bg: #fff;
    --card-bg: #f8f9fa;
    --card-hover-bg: #fff;
    --code-bg: #fff;
    --code-border: #E3EDF3;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.15);
    --newsletter-bg: #1a1a1a;
    --newsletter-text: #ffffff;
    --newsletter-text-secondary: #e0e0e0;
    --syntax-bg: #fff;
}

[data-theme="dark"] {
    /* Dark mode colors */
    --bg-color: #1a1a1a;
    --text-color: rgba(255, 255, 255, 0.87);
    --text-color-secondary: rgba(255, 255, 255, 0.7);
    --text-color-muted: rgba(255, 255, 255, 0.5);
    --heading-color: #e0e0e0;
    --border-color: rgba(255, 255, 255, 0.125);
    --border-color-light: #333;
    --bg-secondary: #2a2a2a;
    --bg-tertiary: #333;
    --link-color: #4db894;
    --link-hover-color: #66d4a7;
    --nav-bg: rgba(26, 26, 26, 0.97);
    --footer-bg: #1a1a1a;
    --card-bg: #2a2a2a;
    --card-hover-bg: #333;
    --code-bg: #2a2a2a;
    --code-border: #444;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.5);
    --newsletter-bg: #2a2a2a;
    --newsletter-text: #ffffff;
    --newsletter-text-secondary: #e0e0e0;
    --syntax-bg: #2a2a2a;
}

@media screen and (min-width:1500px) {
    html { font-size:18px; } /* Increase the font size on higher resolutions */
    .container {max-width:80%;}
}

/* Dark Mode Transition */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Theme Switch Toggle Styling */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    margin-left: 15px;
    position: relative;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 28px;
}

/* Custom Tooltip for Theme Switch */
.theme-switch::before {
    content: "Toggle Dark Mode";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    padding: 6px 12px;
    background-color: #333;
    color: white;
    font-size: 12px;
    font-weight: normal;
    white-space: nowrap;
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 1000;
}

.theme-switch::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 2px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #333;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 1000;
}

.theme-switch:hover::before,
.theme-switch:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Dark mode tooltip styling */
[data-theme="dark"] .theme-switch::before {
    background-color: #f8f9fa;
    color: #333;
}

[data-theme="dark"] .theme-switch::after {
    border-bottom-color: #f8f9fa;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-switch input:focus + .slider {
    box-shadow: 0 0 0 2px var(--link-color);
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: all 0.4s;
    border-radius: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: all 0.4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider i {
    font-size: 14px;
    z-index: 1;
}

.slider .fa-sun {
    color: #f39c12;
}

.slider .fa-moon {
    color: #fff;
    opacity: 0.3;
}

input:checked + .slider {
    background-color: #2d3748;
}

input:checked + .slider:before {
    transform: translateX(32px);
}

input:checked + .slider .fa-sun {
    opacity: 0.3;
    color: #fff;
}

input:checked + .slider .fa-moon {
    opacity: 1;
    color: #f1c40f;
}

/* Dark mode navbar adjustments */
[data-theme="dark"] .slider {
    background-color: #4a5568;
}

[data-theme="dark"] .slider:before {
    background-color: #e2e8f0;
}

/* Mobile Theme Switch */
.mobile-theme-switch {
    margin-right: auto;
}

/* Mobile Responsive */
@media (max-width: 991px) {
    /* Fixed mobile navbar layout */
    .mediumnavigation .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: relative;
        min-height: 67px; /* Maintain consistent height */
    }
    
    /* Keep mobile theme switch on the left */
    .mobile-theme-switch {
        flex: 0 0 auto;
        order: 1;
    }
    
    /* Center the logo */
    .navbar-brand {
        flex: 1 1 auto;
        display: flex;
        justify-content: center;
        order: 2;
        margin: 0; /* Remove default margins */
        position: static; /* Override absolute positioning */
        transform: none; /* Remove transform */
    }
    
    /* Keep hamburger on the right */
    .navbar-toggler {
        flex: 0 0 auto;
        order: 3;
        margin-left: 0; /* Remove auto margin */
    }
    
    /* Ensure collapsed menu doesn't affect header layout */
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--nav-bg);
        border-top: 1px solid var(--border-color-light);
        box-shadow: 0 4px 6px var(--shadow-color);
        z-index: 1000;
    }
    
    /* Mobile menu styling */
    .navbar-collapse.show {
        display: block !important;
    }
    
    .navbar-collapse .navbar-nav {
        padding: 1rem 0;
    }
    
    .navbar-collapse .nav-item {
        text-align: center;
        padding: 0.5rem 0;
    }
    
    .theme-switch-wrapper {
        margin-left: 10px;
        margin-right: 10px;
    }
    
    .theme-switch {
        width: 50px;
        height: 24px;
    }
    
    /* Hide tooltip on mobile to avoid overlap issues */
    .theme-switch::before,
    .theme-switch::after {
        display: none;
    }
    
    .slider:before {
        height: 16px;
        width: 16px;
    }
    
    .slider i {
        font-size: 12px;
    }
    
    input:checked + .slider:before {
        transform: translateX(26px);
    }
    
    /* Mobile menu adjustments */
    .navbar-collapse .theme-switch-wrapper {
        margin-top: 10px;
        margin-bottom: 10px;
        justify-content: center;
    }
}

/* Ensure proper spacing in navbar */
@media (min-width: 769px) {
    .navbar-nav .nav-item:last-child {
        margin-left: auto;
    }
}

/* Vertically center nav items */
.navbar-nav {
    align-items: center;
}

.navbar-nav .nav-item {
    display: flex;
    align-items: center;
}

/* Dark mode specific adjustments */
[data-theme="dark"] .navbar-toggler-icon {
    filter: invert(1);
}

/* Dark mode navbar text */
[data-theme="dark"] .navbar-light .navbar-nav .nav-link {
    color: var(--text-color) !important;
}

[data-theme="dark"] .navbar-light .navbar-nav .nav-link:hover {
    color: var(--link-color) !important;
}

[data-theme="dark"] .navbar-light .navbar-nav .active .nav-link {
    color: var(--link-color) !important;
}

[data-theme="dark"] img {
    opacity: 0.9;
}

/* Make logo bright white in dark mode */
[data-theme="dark"] .navbar-logo {
    filter: brightness(0) invert(1);
    opacity: 1;
}

[data-theme="dark"] .newsletter-input {
    background-color: var(--bg-tertiary);
    color: var(--text-color);
    border: 1px solid var(--border-color-light);
}

[data-theme="dark"] .newsletter-input::placeholder {
    color: var(--text-color-muted);
}

[data-theme="dark"] .newsletter-input:focus {
    background-color: #3a3a3a;
    border-color: var(--link-color);
    box-shadow: 0 0 0 0.2rem rgba(77, 184, 148, 0.25);
}

[data-theme="dark"] .btn-newsletter {
    background-color: #00ab6b;
}

[data-theme="dark"] .alertbar {
    background-color: var(--bg-secondary);
    color: var(--text-color);
    box-shadow: 0 -3px 10px 0 rgba(0, 0, 0, .3);
}

[data-theme="dark"] .alertbar input[type="email"] {
    background-color: var(--bg-tertiary);
    border-color: var(--border-color-light);
    color: var(--text-color);
}

[data-theme="dark"] .alertbar input[type="email"]::placeholder {
    color: var(--text-color-muted);
}

[data-theme="dark"] .alertbar input[type="email"]:focus {
    background-color: #3a3a3a;
    border-color: var(--link-color);
    color: var(--text-color);
}

[data-theme="dark"] .alertbar input[type="submit"] {
    background-color: var(--link-color);
    border-color: var(--link-color);
}

[data-theme="dark"] .alertbar input[type="submit"]:hover {
    background-color: var(--link-hover-color);
    border-color: var(--link-hover-color);
}

[data-theme="dark"] .dropdown-item {
    color: var(--text-color);
}

[data-theme="dark"] .dropdown-item:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-color);
}

.mainheading {
    padding: 1rem 0rem;
}

/* Apply dark mode to body */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

a, .navbar-collapse .navbar-nav .nav-item .nav-link {
    color: var(--link-color);
    transition: all 0.2s;
}

.nav-item.active .nav-link {
    text-decoration: none;
    color: var(--link-hover-color);
    font-weight: 600;
}

a:hover, a, .navbar-collapse .navbar-nav .nav-item .nav-link:hover {
    color: var(--link-hover-color);
    text-decoration: none;
}

pre {
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    border: 1px solid var(--code-border);
    width: 100%;
    padding: 7px;
    font-family: monospace, sans-serif;
    font-size: .9rem;
    white-space: pre;
    overflow: auto;
    background: var(--code-bg);
    border-radius: 0px;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: -rem;
}

.mediumnavigation {
    background: var(--nav-bg) !important;
    box-shadow: 0 2px 2px -2px var(--shadow-color);
    transition: top 0.2s ease-in-out, background-color 0.3s ease;
}

.main-content {
    min-height: 300px;
}

.site-content {
    min-height: 60vh;
    padding-top: 1.5rem;
    margin-top: 67px;
    transition: all 0.4s;
}

section {
    margin-bottom: 20px;
}

section.recent-posts {
    margin-bottom: 0;
}

.section-title h2 {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 25px;
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 27px;
    color: var(--heading-color);
}

.section-title span {
    border-bottom: 1px solid var(--text-color-muted);
    display: inline-block;
    padding-bottom: 20px;
    margin-bottom: -1px;
}

.article-post ol,
.article-post ul {
    margin-bottom: 1.5rem;
}

.article-post ol ol,
.article-post ul ul {
    list-style: disc;
    margin-bottom: 0rem;
}

@media (min-width:576px) {
    .card-columns.listfeaturedtag {
        -webkit-column-count: 2;
        -moz-column-count: 2;
        column-count: 2;
    }
}

@media (min-width:992px) {
    .navbar-expand-lg .navbar-nav .nav-link {
        padding-right: 0.8rem;
        padding-left: 0.8rem;
    }
}

.listfeaturedtag {
    border: 1px solid var(--border-color);
    border-radius: .25rem;
    transition: all 0.3s cubic-bezier(.25, .8, .25, 1);
}

.listfeaturedtag .wrapthumbnail {
    height: 290px;
    flex: 0 0 auto;
    height: 100%;
}

.maxthumb {
    max-height: 300px;
    overflow: hidden;
}

.listfeaturedtag .card,
.card-footer {
    border: 0;
}

.listfeaturedtag .thumbnail {
    background-size: cover;
    height: 100%;
    display: block;
    background-position: 38% 22% !important;
    background-origin: border-box !important;
    border-top-left-radius: .25rem;
    border-bottom-left-radius: .25rem;
}

.listfeaturedtag .card-block {
    padding-left: 0;
}

.listfeaturedtag h2.card-title,
.listrecent h2.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: break-word;
    word-break: break-word;
}

.listrecent h2.card-title,
.listrecent h2.card-title a,
.listfeaturedtag h2.card-title,
.listfeaturedtag h2.card-title a {
    color: var(--heading-color) !important;
}

.listfeaturedtag h4.card-text,
.listrecent h4.card-text {
    color: var(--text-color-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    font-weight: 400;
    overflow-wrap: break-word;
    word-break: break-word;
}

.featured-box-img-cover {
    object-fit: cover;
    width: 100%;
    height: 100%;
    max-height: 100%;
}

@media (max-width:991px) {
    .featured-box-img-cover {
        height: auto;
        width: 100%;
    }
}

.wrapfooter {
    font-size: .8rem;
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.author-thumb {
    width: 40px;
    height: 40px;
    margin-right: 13px;
    border-radius: 100%;
}

.post-bottom-meta {
    margin-bottom: 2rem;
}

.post-bottom-meta .author-thumb {
    width: 90px;
    height: 90px;
}

.post-bottom-meta .author-socials {
    display: inline-block;
    font-size: 1.5rem;
}

.post-bottom-meta.authorpage .author-thumb {
    margin-top: 40px;
}

.post-bottom-meta span {
    font-size: 0.9rem;
    color: rgba(0, 0, 0, .44);
    display: inline-block;
}

.post-bottom-meta .author-description {
    margin-bottom: 5px;
    margin-top: 5px;
    font-size: 0.95rem;
}

.toc ul {
    list-style: decimal;
    font-weight: 400;
}

.author-meta {
    flex: 1 1 auto;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    overflow: hidden !important;
}

span.post-name,
span.post-date,
span.author-meta {
    display: inline-block;
}

span.post-date,
span.post-read {
    color: var(--text-color-muted);
}

span.post-read-more {
    align-items: center;
    display: inline-block;
    float: right;
    margin-top: 8px;
}

span.post-read-more a {
    color: var(--text-color-muted);
}

span.post-name a,
span.post-read-more a:hover {
    color: var(--text-color);
}

.dot:after {
    content: "·";
    margin-left: 3px;
    margin-right: 3px;
}

.mediumnavigation .form-control {
    font-size: 0.8rem;
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    min-width: 180px;
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* Dark mode search input styling */
[data-theme="dark"] .mediumnavigation .form-control {
    background-color: var(--bg-secondary);
    border-color: var(--border-color-light);
    color: var(--text-color);
}

[data-theme="dark"] .mediumnavigation .form-control:focus {
    background-color: var(--bg-tertiary);
    border-color: var(--link-color);
    color: var(--text-color);
    box-shadow: 0 0 0 0.2rem rgba(77, 184, 148, 0.25);
}

[data-theme="dark"] .mediumnavigation .form-control::placeholder {
    color: var(--text-color-muted);
    opacity: 0.8;
}

.mediumnavigation .form-inline {
    margin-left: 15px;
    display: flex;
    align-items: center;
}

.mediumnavigation .form-inline .btn {
    margin-left: -50px;
    border: 0;
    border-radius: 30px;
    cursor: pointer;
}

.mediumnavigation .form-inline .btn:hover,
.mediumnavigation .form-inline .btn:active {
    background: transparent;
    color: var(--link-color);
}

/* Dark mode search button */
[data-theme="dark"] .mediumnavigation .form-inline .btn {
    color: var(--text-color-muted);
}

[data-theme="dark"] .mediumnavigation .form-inline .btn:hover {
    color: var(--link-color);
}

.mediumnavigation .navbar-brand {
    font-weight: 500;
}

.mediumnavigation .dropdown-menu {
    border: 1px solid var(--border-color);
    margin: .5rem 0 0;
    background-color: var(--bg-color);
}

.mediumnavigation .nav-item,
.dropdown-menu {
    font-size: 0.9rem;
}

.mediumnavigation .search-icon {
    margin-left: -40px;
    display: inline-block;
    margin-top: 3px;
    cursor: pointer;
}

.mediumnavigation .navbar-brand img {
    max-height: 50px;
    margin-right: 5px;
}

.navbar-logo {
    display: inline;
}

.sitetitle {
    font-family: Righteous;
    display: inline-block;
    font-display: swap;
}

.mainheading h1.posttitle {
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer {
    border-top: 1px solid var(--border-color) !important;
    padding-top: 40px;
    padding-bottom: 12px;
    font-size: 0.8rem;
    color: var(--text-color-muted);
    margin-top: 50px;
    margin-bottom: 62px;
    position: relative;
    background: var(--footer-bg);
}

/* Contact Section in Footer */
.contact-section {
    margin-bottom: 2rem;
}

.contact-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.contact-subtitle {
    font-size: 1rem;
    color: var(--text-color-secondary);
    margin-bottom: 1.5rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.contact-link {
    color: var(--link-color);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 0.5rem 0;
}

.contact-link:hover {
    color: var(--link-hover-color);
    text-decoration: none;
    transform: translateY(-1px);
}

.contact-link i {
    margin-right: 0.3rem;
}

.email-link {
    font-weight: 600;
}

.contact-divider {
    color: var(--text-color-muted);
    margin: 0 0.5rem;
}

.footer-divider {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 2rem 0 1.5rem;
}

@media (max-width: 768px) {
    .contact-links {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .contact-divider {
        display: none;
    }
    
    .contact-title {
        font-size: 1.3rem;
    }
    
    .contact-subtitle {
        font-size: 0.9rem;
    }
}

.link-dark {
    color: var(--text-color);
}

.article-post {
    font-family: Merriweather;
    font-size: 1.1rem;
    line-height: 1.84;
    color: var(--text-color);
    font-display: swap;
}

blockquote {
    border-left: 4px solid var(--link-color);
    padding: 0 20px;
    font-style: italic;
    color: var(--text-color-muted);
}

.article-post p,
.article-post blockquote {
    margin: 0 0 1.5rem 0;
}

.featured-image {
    display: block;
    margin-bottom: 1.5rem;
}

.share {
    text-align: center;
}

.share p.share-label {
    margin-bottom: 10px;
    font-size: 0.95rem;
    display: none; /* Hidden by default on desktop */
}

.share ul li {
    display: inline-block;
    margin-bottom: 9px;
}

.share ul {
    padding-left: 0;
    margin-left: 0;
}

/* Mobile share section */
.share-mobile {
    margin: 30px 0;
}

/* Mobile responsive layout */
@media (max-width: 767px) {
    .share-mobile .share {
        position: static !important;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        padding: 20px;
        background: var(--bg-secondary);
        border-radius: 8px;
        border: 1px solid var(--border-color-light);
        text-align: center;
    }
    
    .share-mobile .share p.share-label {
        display: block;
        width: 100%;
        margin-bottom: 15px;
        font-weight: 600;
        color: var(--heading-color);
        font-size: 1.1rem;
        text-align: center;
    }
    
    .share-mobile .share ul {
        display: flex;
        gap: 20px;
        margin: 0;
        justify-content: center;
        width: 100%;
    }
    
    .share-mobile .share ul li {
        margin: 0;
    }
    
    .share-mobile .sticky-top,
    .share-mobile .sticky-top-offset {
        position: static !important;
        top: auto !important;
    }
    
    /* Increase icon size on mobile */
    .share-mobile .share ul li i {
        font-size: 22px;
        width: 35px;
        height: 35px;
        line-height: 35px;
    }
}

.share ul li i.fa,
.share ul li i.fab,
.share ul li i.fas,
.share ul li i.fa-brands,
.share ul li i.fa-solid,
.share ul li i.fa-regular {
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    font-size: 24px;
    color: #666;
    transition: all 0.2s ease;
}

.share ul li i:hover {
    color: var(--text-color);
    font-weight: bold;
}

.svgIcon {
    vertical-align: middle;
}

.sticky-top-offset {
    top: 100px;
}

/* Article container to constrain sticky behavior */
#article-container {
    position: relative;
}

/* Share wrapper to contain sticky behavior within blog content */
.share-wrapper {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

/* Sticky share positioning */
.share.sticky-top {
    position: sticky;
    top: 100px;
    z-index: 50;
}

/* Skip Links for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--link-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 9999; /* Higher than navbar */
    font-weight: 600;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 6px;
    color: white;
    text-decoration: none;
}

/* Enhanced Focus Outlines */
a:focus, 
button:focus, 
input:focus, 
textarea:focus, 
select:focus,
.nav-link:focus,
.theme-switch input:focus + .slider {
    outline: 2px solid var(--link-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 2px rgba(0, 117, 73, 0.2);
}

/* Ensure alertbar is above share section */
.alertbar {
    position: relative;
    z-index: 100;
    background: #1C1C1C;
}

@media (min-width:1024px) {
    .share ul li {
        display: block;
    }
}

@media (max-width:999px) {
    .featured-box-img-cover {
        height: 359px;
    }

    .alertbar {
        position: relative !Important;
        margin-bottom: 20px;
        margin-top: 20px;
        box-shadow: none !Important;
        padding-right: 14px !Important;
    }

    #comments {
        margin-right: 15px;
    }

    .alertbar form {
        margin-top: 20px;
    }

    .alertbar span,
    .alertbar form {
        display: block;
    }

    .alertbar input[type="submit"] {
        border-radius: 3px !Important;
    }

    .alertbar input[type="email"] {
        margin-right: 0px !Important;
        display: block;
        border-right: 1px solid #ddd !Important;
        margin-bottom: 10px;
    }

    .listfeaturedtag .card {
        height: auto;
    }

    .listfeaturedtag .wrapfooter {
        position: relative;
        margin-top: 30px;
    }

    .listfeaturedtag .card-block {
        padding: 20px;
    }

    .footer {
        margin-top: 0px;
        margin-bottom: 0px;
    }
}

@media (max-width:1024px) {
    .post-bottom-meta .col-md-10 {
        text-align: center;
    }
}

@media (max-width:767px) {
    .post-bottom-meta.authorpage {
        text-align: center;
    }
}

.share,
.share a {
    color: var(--text-color-muted);
    fill: var(--text-color-muted);
}

.graybg {
    background-color: var(--bg-tertiary);
    padding: 40px 0 46px;
    position: relative;
}

.listrelated .card {
    box-shadow: 0 1px 7px rgba(0, 0, 0, .05);
    border: 0;
}

/* Related Articles Dark Mode Styling */
[data-theme="dark"] .related-posts h2,
[data-theme="dark"] .related-posts h3 {
    color: var(--heading-color);
}

[data-theme="dark"] .related-posts .card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px var(--shadow-color);
}

[data-theme="dark"] .related-posts .card:hover {
    background: var(--card-hover-bg);
    box-shadow: 0 4px 8px var(--shadow-hover);
    transform: translateY(-2px);
}

[data-theme="dark"] .related-posts .card-body {
    background: transparent;
}

[data-theme="dark"] .related-posts .card-title a {
    color: var(--heading-color);
}

[data-theme="dark"] .related-posts .card-title a:hover {
    color: var(--link-color);
}

[data-theme="dark"] .related-posts .card-text {
    color: var(--text-color-muted);
}

[data-theme="dark"] .listrelated .card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

ul.tags {
    list-style: none;
    padding-left: 0;
    margin: 0 0 3rem 0;
}

ul.tags li {
    display: inline-block;
    font-size: 0.9rem;
}

ul.tags li a {
    background: var(--bg-secondary);
    color: var(--text-color-secondary);
    border-radius: 3px;
    padding: 5px 10px;
}

ul.tags li a:hover {
    background: var(--bg-tertiary);
    text-decoration: none;
}

.margtop3rem {
    margin-top: 3rem;
}

.sep {
    height: 1px;
    width: 20px;
    background: #999;
    margin: 0px auto;
    margin-bottom: 1.2rem;
}

.btn.follow {
    border-color: #02B875;
    color: #1C9963;
    padding: 3px 10px;
    text-align: center;
    border-radius: 999em;
    font-size: 0.85rem;
    display: inline-block;
}

.btn.subscribe {
    background-color: var(--link-color);
    border-color: var(--link-color);
    color: rgba(255, 255, 255, 1);
    fill: rgba(255, 255, 255, 1);
    border-radius: 30px;
    font-size: 0.85rem;
    margin-left: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.post-bottom-meta .btn.follow {
    margin-left: 5px;
    margin-top: -4px;
}

.alertbar {
    box-shadow: 0 -3px 10px 0 rgba(0, 0, 0, .0785);
    position: fixed;
    bottom: 0;
    left: 0;
    background-color: #fff;
    width: 100%;
    padding: 14px 0;
    z-index: 1;
    display: none;
}

.alertbar form {
    display: inline-block;
}

.alertbar input[type="email"] {
    font-size: 0.85rem;
    padding: 3px 5px 3px 10px;
    border-top-left-radius: 3px;
    border-bottom-left-radius: 3px;
    border: 1px solid #ddd;
    border-right: 0;
    margin-right: -10px;
    height: 34px;
    letter-spacing: 0.5px;
    margin-left: 5px;
}

.alertbar input[type="submit"] {
    background-color: #1C9963;
    border: 1px solid #1C9963;
    color: rgba(255, 255, 255, 1);
    fill: rgba(255, 255, 255, 1);
    font-size: 0.85rem;
    border-radius: 0;
    padding: 4px 10px;
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
    font-weight: 600;
    height: 34px;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.form-control::-webkit-input-placeholder {
    color: rgba(0, 0, 0, .5);
}

.form-control:-moz-placeholder {
    color: rgba(0, 0, 0, .5);
}

.form-control::-moz-placeholder {
    color: rgba(0, 0, 0, .5);
}

.form-control:-ms-input-placeholder {
    color: rgba(0, 0, 0, .5);
}

.form-control::-ms-input-placeholder {
    color: rgba(0, 0, 0, .5);
}

.authorpage h1 {
    font-weight: 700;
    font-size: 30px;
}

.post-bottom-meta.authorpage .author-thumb {
    float: none;
}

.authorpage .author-description {
    font-size: 1rem;
    color: var(--text-color-secondary);
}

.post-bottom-meta.authorpage .btn.follow {
    padding: 7px 20px;
    margin-top: 10px;
    margin-left: 0;
    font-size: 0.9rem;
}

.graybg.authorpage {
    border-top: 1px solid #f0f0f0;
}

.authorpostbox {
    width: 760px;
    margin: 0px auto;
    margin-bottom: 1.5rem;
    max-width: 100%;
}

.authorpostbox .img-thumb {
    width: 100%;
}

.sociallinks {
    margin: 1rem 0;
}

.sociallinks a {
    background: #666;
    color: #fff;
    width: 22px;
    height: 22px;
    display: inline-block;
    text-align: center;
    line-height: 22px;
    border-radius: 50%;
    font-size: 12px;
}

#comments {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--heading-color);
}

.article-post .h1,
.article-post .h2,
.article-post .h3,
.article-post .h4,
.article-post .h5,
.article-post .h6,
.article-post h1,
.article-post h2,
.article-post h3,
.article-post h4,
.article-post h5,
.article-post h6 {
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--heading-color);
}

/* Make headers with IDs clickable */
.article-post h1[id],
.article-post h2[id],
.article-post h3[id],
.article-post h4[id],
.article-post h5[id],
.article-post h6[id] {
    cursor: pointer;
    scroll-margin-top: 70px; /* Account for fixed header if any */
}


/* Tooltip for copy action */
.copy-tooltip {
    position: absolute;
    left: -80px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 300;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    z-index: 1000;
}

.copy-tooltip.show {
    opacity: 1;
}

.copy-tooltip::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid rgba(0, 0, 0, 0.75);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
}


.article-post img.shadow {
    -webkit-box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.30);
    -moz-box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.30);
    box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.30);
}

/* Code block copy button styles */
.article-post pre[class*="language-"] {
    position: relative;
}

.article-post .code-copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 30px;
    height: 30px;
    padding: 0;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color-light);
    border-radius: 3px;
    color: var(--text-color-secondary);
    cursor: pointer;
    opacity: 1;
    transition: all 0.2s ease-in-out;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-post .code-copy-btn:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--text-color-secondary);
}

.article-post .code-copy-btn:focus,
.article-post .code-copy-btn:active {
    outline: none;
    border-color: var(--link-color);
}

.article-post .code-copy-btn.copied {
    color: var(--link-color);
    border-color: var(--link-color);
}

.article-post .code-copy-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 0.5;
}

/* For inline code */
.article-post code:not([class*="language-"]) {
    position: relative;
    background: var(--bg-secondary);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.875em;
}

.layout-page .article-post {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-size: 1rem;
}

.layout-page .article-post p {
    margin-bottom: 1rem;
}

img {
    max-width: 100%;
}

.bottompagination span.navigation {
    display: block;
    font-size: 0.93rem;
    padding: 15px 0 0 0;
    text-align: center;
    margin-bottom: 0rem;
    color: #999;
    border-top: 1px solid #ddd;
}

.pointerup {
    margin-bottom: -17px;
    margin-left: 49%;
    font-size: 30px;
}

.pointerup i.fa {
    color: #eaeaea;
}

.bottompagination span.navigation i {
    display: inline-block;
}

span.navigation {
    display: inline-block;
    font-size: 0.93rem;
    font-weight: 700;
    text-align: center;
}

.pagination {
    display: block;
}

iframe {
    max-width: 100%;
}

.transpdark {
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
}

.mb-30px {
    margin-bottom: 30px;
}

.flex-first {
    -webkit-box-ordinal-group: 0;
    -webkit-order: -1;
    -ms-flex-order: -1;
    order: -1;
}

@media (min-width: 768px) {
    .flex-md-unordered {
        -webkit-box-ordinal-group: 1;
        -webkit-order: 1;
        -ms-flex-order: 1;
        order: 1;
    }

    .flex-first {
        -webkit-box-ordinal-group: 0;
        -webkit-order: 1;
        -ms-flex-order: 1;
        order: 1;
    }
}

@media (max-width: 768px) {
    .share {
        margin-top: 30px;
    }
}

.card .img-fluid {
    width: 100%;
}

/* Card Enhancements - Merged from card-enhancements.css */
/* ================================================== */

/* Make entire card clickable */
.card-link-wrapper {
    text-decoration: none !important;
    color: inherit !important;
    display: block;
    height: 100%;
}

.card-link-wrapper:hover {
    text-decoration: none !important;
    color: inherit !important;
}

/* Card styling improvements */
.listrecent .card {
    border: none !important;
    box-shadow: 0 2px 4px var(--shadow-color);
    transition: all 0.3s ease;
    overflow: hidden;
    cursor: pointer;
    background: var(--card-bg);
    color: var(--text-color);
}

.card-link-wrapper:hover .card {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px var(--shadow-hover);
    background: var(--card-hover-bg);
}

/* Better card body spacing */
.listrecent .card-body {
    padding: 1.5rem;
}

/* Card title hover effect */
.card-link-wrapper:hover .card-title {
    color: var(--link-color) !important;
}

/* Card text (excerpt) styling */
.listrecent .card-text {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    color: var(--text-color-secondary) !important;
    font-weight: normal !important;
}

/* Card footer improvements */
.listrecent .card-footer {
    background: var(--bg-secondary) !important;
    border-top: 1px solid var(--border-color-light) !important;
    padding: 1rem 1.5rem !important;
}

/* Add subtle background difference for dark mode card footers */
[data-theme="dark"] .listrecent .card-footer,
[data-theme="dark"] .listfeaturedtag .card-footer {
    background: rgba(255, 255, 255, 0.03) !important;
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

/* Author section enhancements */
.listrecent .wrapfooter {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.listrecent .author-thumb {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    margin-right: 10px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.listrecent .author-meta {
    font-size: 0.875rem !important;
}

.listrecent .post-name {
    color: var(--heading-color) !important;
    font-weight: 500 !important;
}

.listrecent .post-date {
    color: var(--text-color-muted) !important;
    font-size: 0.8rem !important;
}

/* Add subtle category badges */
.listrecent .card-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00ab6b 0%, #00d47f 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-link-wrapper:hover .card-body::before {
    opacity: 1;
}

/* Section title enhancement */
.section-title h2 {
    font-size: 2rem !important;
    margin-bottom: 2rem !important;
}

.section-title h2 span {
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title h2 span::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: #00ab6b;
}

/* Categories page specific improvements */
.categories-page .section-title {
    margin-top: 3rem;
    margin-bottom: 2rem;
}

.categories-page .section-title h2 {
    font-size: 1.5rem !important;
    color: var(--heading-color) !important;
}

/* Better spacing for card groups */
.card-group {
    margin-bottom: 2rem !important;
}

/* Future post visibility management */
.card-group.future-post-hidden {
    display: none !important;
}

/* Add loading animation */
.listrecent .card {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.listrecent .card:nth-child(1) { animation-delay: 0.1s; }
.listrecent .card:nth-child(2) { animation-delay: 0.2s; }
.listrecent .card:nth-child(3) { animation-delay: 0.3s; }
.listrecent .card:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
    from {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* Better pagination styling */
.bottompagination {
    margin-top: 3rem;
    margin-bottom: 0;
}

.bottompagination .navigation a {
    color: #00ab6b;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.bottompagination .navigation a:hover {
    background: #00ab6b;
    color: white;
    border-color: #00ab6b;
}

.sticky-top-80 {
    top: 80px;
}

.spoiler {
    color: transparent;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
    transition: all .4s;
    cursor: pointer;
    position: relative;
}

.spoiler:after {
    position: absolute;
    opacity: 0;
    content: 'Click to reveal spoiler';
    top: 45%;
    left: calc(50% - 100px);
    text-shadow: none;
    background: #222;
    color: #fff;
    display: inline-block;
    font-size: 13px;
    line-height: 1;
    padding: 2px 3px;
    width: 150px;
    font-family: Arial;
    text-align: center;
    border-radius: 3px;
    transition: all .4s;
}

.spoiler:hover:after {
    opacity: 1;
}

/** Lazy img **/
.lazyimg {
    display: block;
    border: 0 none;
    opacity: 1;
    transition: opacity .25s;
    background: #f2f2f2;
    outline: 0 none;
}

.lazyimg[data-src],
.lazyimg[data-srcset] {
    opacity: 0;
    transition: opacity .25s;
}

/* Newsletter Signup Styles */
.newsletter-signup {
    background-color: #f8f9fa;
    padding: 60px 0;
    margin: 40px 0;
}

/* Clean Newsletter Styles */
.newsletter-minimal {
    background-color: var(--newsletter-bg);
    padding: 80px 0;
    margin: 60px -15px 0 -15px;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.newsletter-box {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.newsletter-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.newsletter-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
}

.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form .form-control {
    font-size: 1rem;
    padding: 12px 20px;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.newsletter-form .form-control:focus {
    border-color: #00ab6b;
    box-shadow: none;
}

.newsletter-form .btn-primary {
    background-color: #00ab6b;
    border-color: #00ab6b;
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 30px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.newsletter-form .btn-primary:hover {
    background-color: #00d47f;
    border-color: #00d47f;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 171, 107, 0.3);
}

.newsletter-promise {
    margin-top: 15px;
}

.newsletter-promise small {
    font-size: 0.9rem;
}

/* Newsletter in post footer */
.post-newsletter {
    background-color: var(--bg-secondary);
    padding: 30px;
    border-radius: 8px;
    margin: 40px 0;
    text-align: center;
}

.post-newsletter .newsletter-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.post-newsletter .newsletter-subtitle {
    font-size: 1rem;
    margin-bottom: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .newsletter-box {
        padding: 30px 20px;
    }
    
    .newsletter-title {
        font-size: 1.5rem;
    }
    
    .newsletter-subtitle {
        font-size: 1rem;
    }
    
    .newsletter-form .form-row {
        flex-direction: column;
    }
    
    .newsletter-form .btn-primary {
        width: 100%;
        margin-top: 10px;
    }
}

/* Clean Newsletter Form Styles */
.newsletter-heading {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--newsletter-text);
    margin-bottom: 20px;
    line-height: 1.2;
}

.newsletter-subheading {
    font-size: 1.125rem;
    color: var(--newsletter-text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

.newsletter-form-minimal {
    max-width: 480px;
    margin: 0 auto;
}

.newsletter-form-minimal .form-inline {
    display: flex;
    justify-content: center;
    gap: 0;
}

.newsletter-input {
    font-size: 1rem;
    padding: 15px 20px;
    background-color: #ffffff;
    border: none;
    border-radius: 4px 0 0 4px;
    min-width: 280px;
    transition: all 0.3s ease;
    height: 50px;
}

.newsletter-input:focus {
    box-shadow: 0 0 0 3px rgba(0, 171, 107, 0.2);
    outline: none;
}

.btn-newsletter {
    background-color: var(--link-color);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    padding: 15px 32px;
    border: none;
    border-radius: 0 4px 4px 0;
    text-transform: none;
    letter-spacing: normal;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 50px;
    display: flex;
    align-items: center;
}

.btn-newsletter:hover {
    background-color: var(--link-hover-color);
    color: white;
    transform: none;
}

/* Standalone newsletter button */
.btn-newsletter-standalone {
    font-size: 1.125rem;
    padding: 16px 48px;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 171, 107, 0.2);
}

.btn-newsletter-standalone:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 171, 107, 0.3);
}


/* Responsive Design for Newsletter */
@media (max-width: 576px) {
    .newsletter-minimal {
        padding: 60px 20px;
    }
    
    .newsletter-heading {
        font-size: 1.75rem;
    }
    
    .newsletter-subheading {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    .newsletter-form-minimal .form-inline {
        flex-direction: column;
        gap: 10px;
    }
    
    .newsletter-input {
        border-radius: 4px;
        width: 100%;
        min-width: unset;
        height: 48px;
    }
    
    .btn-newsletter {
        border-radius: 4px;
        width: 100%;
        height: 48px;
        justify-content: center;
    }
    
}

/* Newsletter Message Styles */
.newsletter-message {
    margin-top: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 0.95rem;
    text-align: center;
    transition: opacity 0.3s ease;
}

.newsletter-success {
    background-color: rgba(0, 171, 107, 0.1);
    color: #00ab6b;
    border: 1px solid rgba(0, 171, 107, 0.2);
}

.newsletter-error {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.newsletter-info {
    background-color: rgba(0, 123, 255, 0.1);
    color: #007bff;
    border: 1px solid rgba(0, 123, 255, 0.2);
}

/* Dark background message styles */
.newsletter-minimal .newsletter-message {
    max-width: 480px;
    margin: 20px auto 0;
}

.newsletter-minimal .newsletter-success {
    background-color: rgba(0, 212, 127, 0.2);
    color: #00d47f;
    border-color: rgba(0, 212, 127, 0.3);
}

.newsletter-minimal .newsletter-error {
    background-color: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
    border-color: rgba(255, 107, 107, 0.3);
}

.newsletter-minimal .newsletter-info {
    background-color: rgba(100, 181, 246, 0.2);
    color: #64b5f6;
    border-color: rgba(100, 181, 246, 0.3);
}

/* Modern Pagination Styles
================================================== */
.pagination-container {
    display: flex;
    justify-content: center;
    margin: 3rem 0;
}

.pagination-list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-item {
    display: flex;
}

.pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-color);
    background-color: var(--bg-color);
    border: 2px solid var(--border-color-light);
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.pagination-link:hover {
    color: var(--link-color);
    background-color: var(--bg-secondary);
    border-color: var(--link-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
    text-decoration: none;
}

/* Current page styling */
.pagination-current {
    color: white;
    background-color: var(--link-color);
    border-color: var(--link-color);
    cursor: default;
}

.pagination-current:hover {
    transform: none;
    box-shadow: none;
}

/* Disabled state */
.pagination-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--bg-secondary);
}

.pagination-disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border-color-light);
    color: var(--text-color);
}

/* Previous/Next buttons */
.pagination-prev,
.pagination-next {
    gap: 0.5rem;
    padding: 0 16px;
    font-weight: 600;
}

.pagination-prev i,
.pagination-next i {
    font-size: 0.75rem;
}

/* Ellipsis styling */
.pagination-ellipsis .pagination-link {
    border: none;
    background: none;
    cursor: default;
    min-width: 30px;
    color: var(--text-color-muted);
}

.pagination-ellipsis .pagination-link:hover {
    transform: none;
    box-shadow: none;
    background: none;
}

/* Number pages specific */
.pagination-number .pagination-link {
    font-weight: 600;
}

/* Dark mode specific adjustments */
[data-theme="dark"] .pagination-link {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .pagination-link:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--link-color);
    box-shadow: 0 4px 12px rgba(77, 184, 148, 0.3);
}

[data-theme="dark"] .pagination-current {
    background-color: var(--link-color);
    border-color: var(--link-color);
    color: var(--bg-color);
}

[data-theme="dark"] .pagination-disabled {
    background-color: var(--bg-tertiary);
    opacity: 0.4;
}

/* Mobile responsive */
@media (max-width: 576px) {
    .pagination-list {
        gap: 0.25rem;
    }
    
    .pagination-link {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 0.875rem;
        border-radius: 6px;
    }
    
    .pagination-prev,
    .pagination-next {
        padding: 0 12px;
    }
    
    /* Hide "Previous" and "Next" text on mobile, show only icons */
    .pagination-text {
        display: none;
    }
    
    .pagination-prev i,
    .pagination-next i {
        font-size: 0.875rem;
    }
    
    /* Show fewer page numbers on mobile */
    .pagination-number:nth-child(n+8) {
        display: none;
    }
}

/* Remove the old pagination arrow and border */
.bottompagination {
    margin-top: 3rem;
    margin-bottom: 2rem;
}

.bottompagination .pointerup {
    display: none;
}

.bottompagination span.navigation {
    border: none;
    padding: 0;
    margin: 0;
    display: block;
}

/* Focus styles for accessibility */
.pagination-link:focus {
    outline: 2px solid var(--link-color);
    outline-offset: 2px;
}

/* Floating Subscribe Button
================================================== */
.floating-subscribe-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    z-index: 100;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
    animation-delay: 1s;
}

.floating-subscribe-btn:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.floating-subscribe-btn:active {
    transform: translateY(-1px);
}

.floating-subscribe-btn i {
    font-size: 1.1rem;
}

.floating-subscribe-text {
    display: inline-block;
}

/* Animation for button entrance */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hide text on smaller screens */
@media (max-width: 576px) {
    .floating-subscribe-btn {
        bottom: 20px;
        right: 20px;
        padding: 16px;
        border-radius: 50%;
        width: 56px;
        height: 56px;
        justify-content: center;
    }
    
    .floating-subscribe-text {
        display: none;
    }
    
    .floating-subscribe-btn i {
        font-size: 1.25rem;
        margin: 0;
    }
}

/* Dark mode adjustments */
[data-theme="dark"] .floating-subscribe-btn {
    background-color: #495057;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .floating-subscribe-btn:hover {
    background-color: #343a40;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

/* Hide button when newsletter section is visible */
.floating-subscribe-btn.hide {
    opacity: 0 !important;
    pointer-events: none;
    transform: translateY(20px) !important;
    visibility: hidden;
}

/* Focus styles for accessibility */
.floating-subscribe-btn:focus {
    outline: 2px solid var(--link-color);
    outline-offset: 4px;
}


