/* HRV Global Life Sciences Blog CSS - Dark Theme Compatible */

/* ===== CORE VARIABLES ===== */
:root {
    /* Ensure RGB versions of colors for alpha usage */
    --hrv-orange-rgb: 239, 114, 31;
    --hrv-orange-light-rgb: 255, 174, 47;
    --hrv-blue-rgb: 0, 114, 188;
    --hrv-blue-light-rgb: 0, 160, 227;
    --hrv-green-rgb: 57, 181, 74;
}

/* ===== BLOG HERO SECTION ===== */
.blog-hero-section {
    position: relative;
    padding: 100px 0 120px;
    background: var(--background-primary);
    color: var(--text-primary);
    overflow: hidden;
    z-index: 1;
}

.blog-hero-section.dark-theme {
    background: linear-gradient(135deg, #1A1A1A 0%, #252525 100%);
    color: #ffffff;
}

/* Main colored overlay */
.blog-hero-section:after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
                rgba(var(--hrv-orange-rgb), 0.05) 0%,
                rgba(var(--hrv-blue-light-rgb), 0.03) 100%);
    z-index: -1;
}

.blog-hero-section.dark-theme:after {
    background: linear-gradient(135deg, 
                rgba(var(--hrv-orange-rgb), 0.12) 0%,
                rgba(var(--hrv-blue-light-rgb), 0.08) 100%);
}

/* Geometric elements container */
.blog-hero-section .blog-hero-geometric {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Left side pixel pattern */
.blog-hero-section .pixel-group-left {
    position: absolute;
    left: 5%;
    top: 15%;
    z-index: 1;
}

.blog-hero-section .pixel {
    position: absolute;
    border-radius: 4px;
    box-shadow: 0 2px 20px var(--shadow-color);
    transition: all 0.5s ease;
    opacity: 0.85;
}

.blog-hero-section .pixel-1 {
    width: 60px;
    height: 60px;
    background: var(--theme-gradient);
    left: 0;
    top: 0;
}

.blog-hero-section .pixel-2 {
    width: 40px;
    height: 40px;
    background: var(--theme-gradient-reversed);
    left: 70px;
    top: 20px;
}

.blog-hero-section .pixel-3 {
    width: 30px;
    height: 30px;
    background: rgba(var(--hrv-orange-rgb), 0.7);
    left: 25px;
    top: 70px;
}

.blog-hero-section .pixel-4 {
    width: 25px;
    height: 25px;
    background: rgba(var(--hrv-orange-light-rgb), 0.8);
    left: 65px;
    top: 80px;
}

/* Right side pixel pattern */
.blog-hero-section .pixel-group-right {
    position: absolute;
    right: 7%;
    bottom: 20%;
    z-index: 1;
}

.blog-hero-section .pixel-5 {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--hrv-blue-light) 0%, var(--hrv-green) 100%);
    right: 0;
    bottom: 0;
}

.blog-hero-section .pixel-6 {
    width: 35px;
    height: 35px;
    background: rgba(var(--hrv-blue-light-rgb), 0.8);
    right: 60px;
    bottom: 15px;
}

.blog-hero-section .pixel-7 {
    width: 25px;
    height: 25px;
    background: rgba(var(--hrv-green-rgb), 0.9);
    right: 20px;
    bottom: 60px;
}

.blog-hero-section .pixel-8 {
    width: 20px;
    height: 20px;
    background: rgba(var(--hrv-blue-light-rgb), 0.7);
    right: 55px;
    bottom: 65px;
}

/* Enhanced floating animation for pixels */
@keyframes pixel-float-glow {
    0%, 100% {
        transform: translateY(0);
        box-shadow: 0 5px 15px var(--shadow-color);
    }
    50% {
        transform: translateY(-10px);
        box-shadow: 0 15px 25px var(--shadow-color);
    }
}

.blog-hero-section .pixel:nth-child(odd) {
    animation: pixel-float-glow 5s ease-in-out infinite;
}

.blog-hero-section .pixel:nth-child(even) {
    animation: pixel-float-glow 7s ease-in-out infinite reverse;
}

/* Molecular patterns */
.blog-hero-section .molecular-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23000000' fill-opacity='0.3'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.blog-hero-section.dark-theme .molecular-pattern {
    opacity: 0.07;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.3'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Large brand accent */
.blog-hero-section .brand-accent {
    position: absolute;
    right: -150px;
    bottom: -150px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, 
        rgba(var(--hrv-orange-rgb), 0.08) 0%, 
        rgba(var(--hrv-blue-light-rgb), 0.05) 40%, 
        rgba(var(--hrv-green-rgb), 0.03) 70%,
        rgba(0, 0, 0, 0) 100%);
    border-radius: 100%;
    z-index: 0;
    filter: blur(40px);
}

.blog-hero-section.dark-theme .brand-accent {
    background: radial-gradient(circle, 
        rgba(var(--hrv-blue-light-rgb), 0.15) 0%, 
        rgba(var(--hrv-green-rgb), 0.1) 40%, 
        rgba(var(--hrv-orange-rgb), 0.05) 70%,
        rgba(0, 0, 0, 0) 100%);
}

/* Content styling */
.blog-hero-section .auto-container {
    position: relative;
    z-index: 10;
}

.blog-hero-section .content-box {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.blog-hero-section h1 {
    font-size: 48px;
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.blog-hero-section.dark-theme h1 {
    background: linear-gradient(to right, var(--hrv-orange), var(--hrv-orange-light), var(--hrv-blue-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.blog-hero-section p {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.blog-hero-section.dark-theme p {
    color: #f0f0f0;
    opacity: 0.9;
}

/* Search box styling */
.blog-hero-section .search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.blog-hero-section .search-box input {
    width: 100%;
    height: 60px;
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 10px 60px 10px 30px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.blog-hero-section.dark-theme .search-box input {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.blog-hero-section .search-box input::placeholder {
    color: var(--text-muted);
}

.blog-hero-section.dark-theme .search-box input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.blog-hero-section .search-box input:focus {
    background: var(--background-primary);
    border-color: var(--hrv-orange);
    box-shadow: 0 5px 20px var(--shadow-color), 0 0 0 2px rgba(var(--hrv-orange-rgb), 0.1);
    outline: none;
}

.blog-hero-section.dark-theme .search-box input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(var(--hrv-orange-rgb), 0.5);
    box-shadow: 0 5px 20px rgba(var(--hrv-orange-rgb), 0.2), 0 0 0 2px rgba(var(--hrv-orange-rgb), 0.1);
}

.blog-hero-section .search-box button {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: var(--theme-gradient);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.blog-hero-section .search-box button:hover {
    background: linear-gradient(135deg, var(--hrv-blue-light) 0%, var(--hrv-green) 100%);
    transform: translateY(-50%) scale(1.05);
}

/* Enhanced animation for the search button */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--hrv-orange-rgb), 0.6);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(var(--hrv-orange-rgb), 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(var(--hrv-orange-rgb), 0);
    }
}

.blog-hero-section .search-box button {
    animation: pulse-glow 2s infinite;
}

/* Added element: data particles */
.blog-hero-section:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 35%, rgba(var(--hrv-orange-rgb), 0.05) 0%, transparent 20%),
        radial-gradient(circle at 75% 65%, rgba(var(--hrv-blue-light-rgb), 0.05) 0%, transparent 20%),
        radial-gradient(circle at 85% 25%, rgba(var(--hrv-green-rgb), 0.03) 0%, transparent 15%);
    z-index: 0;
}

.blog-hero-section.dark-theme:before {
    background-image: 
        radial-gradient(circle at 20% 35%, rgba(var(--hrv-orange-rgb), 0.1) 0%, transparent 20%),
        radial-gradient(circle at 75% 65%, rgba(var(--hrv-blue-light-rgb), 0.1) 0%, transparent 20%),
        radial-gradient(circle at 85% 25%, rgba(var(--hrv-green-rgb), 0.05) 0%, transparent 15%);
}

/* ===== FILTER STATUS SECTION ===== */
.filter-status-section {
    background: var(--background-secondary);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.filter-status {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-status .status-label {
    font-weight: 600;
    color: var(--text-primary);
}

.filter-status .active-filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-status .no-filters {
    color: var(--text-muted);
    font-style: italic;
}

.filter-status .filter-tag {
    display: inline-flex;
    align-items: center;
    background: var(--background-tertiary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-primary);
}

.filter-status .filter-label {
    margin-right: 8px;
}

.filter-status .remove-filter {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.filter-status .remove-filter:hover {
    color: var(--hrv-orange);
}

.filter-status .clear-all-btn {
    margin-left: auto;
    background: var(--background-tertiary);
    border: none;
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-status .clear-all-btn:hover {
    background: var(--background-accent);
    color: var(--hrv-orange);
}

/* ===== BLOG SECTION ===== */
.blog-section {
    position: relative;
    padding: 100px 0 70px;
    background-color: var(--background-primary);
    color: var(--text-primary);
}

/* Blog Filter */
.blog-filter {
    text-align: center;
    margin-bottom: 40px;
}

.filter-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.filter-tabs li {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.filter-tabs li.active {
    color: #fff;
    background-color: var(--hrv-orange);
    border-color: var(--hrv-orange);
    box-shadow: 0 4px 12px rgba(var(--hrv-orange-rgb), 0.2);
}

.filter-tabs li:not(.active):hover {
    border-color: var(--border-color);
    background-color: var(--background-secondary);
}

/* Blog Sort */
.blog-sort {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.sort-by {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-by label {
    font-weight: 600;
    color: var(--text-primary);
}

.sort-by select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    background-color: var(--background-secondary);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.sort-by select:focus {
    border-color: var(--hrv-orange);
    outline: none;
}

.view-switch {
    display: flex;
    gap: 10px;
}

.view-switch button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--background-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-switch button.active,
.view-switch button:hover {
    background: var(--hrv-orange);
    border-color: var(--hrv-orange);
    color: #fff;
}

/* Search Results Alert */
.search-results-alert {
    background: var(--background-secondary);
    border-left: 4px solid var(--hrv-orange);
    padding: 15px 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 6px;
    color: var(--text-primary);
}

.clear-search-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.clear-search-btn:hover {
    color: var(--hrv-orange);
}

/* No Results Message */
.no-results-message {
    text-align: center;
    padding: 60px 20px;
    background: var(--background-secondary);
    border-radius: 10px;
    margin-bottom: 30px;
}

.no-results-message .no-results-icon {
    font-size: 60px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.no-results-message h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.no-results-message p {
    color: var(--text-muted);
    margin-bottom: 20px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.btn-reset {
    background: var(--hrv-orange);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-reset:hover {
    background: var(--hrv-orange-dark);
}

/* Loading Animation */
.loading-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
}

.loading-animation .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(var(--hrv-orange-rgb), 0.2);
    border-top: 4px solid var(--hrv-orange);
    border-radius: 50%;
    margin: 0 auto 10px;
    animation: spin 1s linear infinite;
}

.loading-animation p {
    color: var(--hrv-orange);
    font-weight: 600;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== BLOG GRID & CARDS ===== */
/* Blog Grid in List View */
#blog-grid.list-view-active {
    display: block;
}

#blog-grid.list-view-active .blog-item {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
    margin-bottom: 30px;
}

#blog-grid.list-view-active .blog-card {
    display: flex;
    flex-direction: row;
    height: auto;
    align-items: stretch;
}

#blog-grid.list-view-active .blog-card .image-box {
    width: 300px;
    min-width: 300px;
    max-width: 300px;
    height: 350px;        
    min-height: 350px;
    max-height: 350px;    
    overflow: hidden; 
    position: relative; 
    border-radius: 12px 0 0 12px;
    padding-bottom: 0;
}

#blog-grid.list-view-active .blog-card .image-box figure,
#blog-grid.list-view-active .blog-card .image-box .image {
    width: 100%;
    height: 100%;
    position: absolute;  /* Position absolutely within container */
    top: 0;
    left: 0;
    margin: 0;
    display: block;
}


#blog-grid.list-view-active .blog-card .image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

#blog-grid.list-view-active .blog-card .content-box {
    display: flex;
    flex-direction: column;
    padding: 30px;
    width: calc(100% - 300px);
}

/* Blog Card */
.blog-card {
    position: relative;
    background: var(--background-primary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow-color);
    transition: all 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px var(--shadow-color);
}

.blog-card .image-box {
    position: relative;
    overflow: hidden;
    height: 0;
    padding-bottom: 66.7%; /* 2:3 aspect ratio */
}

.blog-card .image-box .image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
}

.blog-card .image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.8s ease;
    display: block;
}

.blog-card:hover .image-box img {
    transform: scale(1.08);
}

.blog-card .post-date {
    position: absolute;
    left: 20px;
    top: 20px;
    background: var(--hrv-orange);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    z-index: 1;
}

.blog-card .category-badge {
    position: absolute;
    right: 20px;
    top: 20px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    z-index: 1;
}

[data-theme="dark"] .blog-card .category-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.blog-card .content-box {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-card .meta-info {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-muted);
}

.blog-card .meta-info span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-card .meta-info i {
    color: var(--hrv-orange);
    font-size: 14px;
}

.blog-card h3 {
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.blog-card h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card h3 a:hover {
    color: var(--hrv-orange);
}

.blog-card p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.blog-card .link-box {
    margin-top: auto;
}

.blog-card .read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--hrv-orange);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.blog-card .read-more i {
    transition: transform 0.3s ease;
}

.blog-card .read-more:hover {
    color: var(--hrv-orange-dark);
}

.blog-card .read-more:hover i {
    transform: translateX(5px);
}

/* ===== PAGINATION ===== */
.pagination-wrapper {
    margin-top: 40px;
    text-align: center;
}

.results-count {
    color: var(--text-muted);
    margin-bottom: 15px;
}

.pagination {
    display: inline-flex;
    justify-content: center;
    gap: 5px;
    list-style: none;
    padding: 0;
}

.pagination li {
    display: inline-block;
}

.pagination li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: var(--background-primary);
    color: var(--text-primary);
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.pagination li a.active,
.pagination li a:hover {
    background: var(--hrv-orange);
    color: #fff;
    border-color: var(--hrv-orange);
}

.pagination li a.prev,
.pagination li a.next {
    width: auto;
    padding: 0 15px;
}

/* ===== BLOG SIDEBAR ===== */
.blog-sidebar {
    position: relative;
}

.blog-sidebar .sidebar-widget {
    position: relative;
    background: var(--background-primary);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.blog-sidebar .widget-title {
    position: relative;
    margin-bottom: 20px;
    padding-bottom: 12px;
}

.blog-sidebar .widget-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--hrv-orange);
}

.blog-sidebar .widget-title h3 {
    font-size: 22px;
    line-height: 1.3;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

/* Search Widget */
.blog-sidebar .search-widget .search-form .form-group {
    position: relative;
    margin-bottom: 0;
}

.blog-sidebar .search-widget .search-form .form-group input[type='search'] {
    position: relative;
    display: block;
    width: 100%;
    height: 56px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
    color: var(--text-primary);
    padding: 10px 60px 10px 20px;
    background: var(--background-secondary);
    transition: all 0.3s ease;
}

.blog-sidebar .search-widget .search-form .form-group button[type='submit'] {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.blog-sidebar .search-widget .search-form .form-group input:focus {
    border-color: var(--hrv-orange);
    box-shadow: 0 0 10px rgba(var(--hrv-orange-rgb), 0.1);
    background: var(--background-primary);
    outline: none;
}

.blog-sidebar .search-widget .search-form .form-group input:focus + button,
.blog-sidebar .search-widget .search-form .form-group button:hover {
    color: var(--hrv-orange);
}

/* Category Widget */
.blog-sidebar .category-widget .category-list li {
    position: relative;
    display: block;
    margin-bottom: 12px;
}

.blog-sidebar .category-widget .category-list li:last-child {
    margin-bottom: 0;
}

.blog-sidebar .category-widget .category-list li a {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    line-height: 26px;
    font-weight: 500;
    color: var(--text-primary);
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.blog-sidebar .category-widget .category-list li a .count {
    background: var(--background-tertiary);
    padding: 3px 8px;
    border-radius: 15px;
    font-size: 12px;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.blog-sidebar .category-widget .category-list li a i {
    font-size: 12px;
    transition: all 0.3s ease;
    color: var(--text-muted);
}

.blog-sidebar .category-widget .category-list li a:hover {
    color: #fff;
    background: var(--hrv-orange);
    border-color: var(--hrv-orange);
    box-shadow: 0 5px 15px rgba(var(--hrv-orange-rgb), 0.2);
}

.blog-sidebar .category-widget .category-list li a:hover .count {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.blog-sidebar .category-widget .category-list li a:hover i {
    transform: translateX(5px);
    color: #fff;
}

/* Post Widget */
.blog-sidebar .post-widget .post {
    position: relative;
    display: flex;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    gap: 15px;
}

.blog-sidebar .post-widget .post:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.blog-sidebar .post-widget .post .post-thumb {
    position: relative;
    display: inline-block;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    margin: 0;
}

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

.blog-sidebar .post-widget .post:hover .post-thumb img {
    transform: scale(1.08);
}

.blog-sidebar .post-widget .post h4 {
    font-size: 16px;
    line-height: 1.4;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.blog-sidebar .post-widget .post h4 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-sidebar .post-widget .post h4 a:hover {
    color: var(--hrv-orange);
}

.blog-sidebar .post-widget .post .post-date {
    position: relative;
    display: block;
    font-size: 14px;
    color: var(--text-muted);
}

/* Newsletter Widget */
.blog-sidebar .newsletter-widget p {
    margin-bottom: 20px;
    color: var(--text-primary);
}

.blog-sidebar .newsletter-widget .form-group {
    position: relative;
}

.blog-sidebar .newsletter-widget .form-group input[type="email"] {
    width: 100%;
    height: 56px;
    padding: 10px 140px 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--background-secondary);
    font-size: 15px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.blog-sidebar .newsletter-widget .form-group input[type="email"]::placeholder {
    color: var(--text-muted);
}

.blog-sidebar .newsletter-widget .form-group input[type="email"]:focus {
    border-color: var(--hrv-orange);
    background: var(--background-primary);
    box-shadow: 0 5px 15px var(--shadow-color);
    outline: none;
}

.blog-sidebar .newsletter-widget .form-group .subscribe-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--hrv-orange);
    color: #fff;
    border: none;
    height: 40px;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.blog-sidebar .newsletter-widget .form-group .subscribe-btn:hover {
    background: var(--hrv-orange-dark);
}

.blog-sidebar .newsletter-widget .success-message {
    color: var(--success-color);
    padding: 10px 15px;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 6px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-sidebar .newsletter-widget .success-message i {
    font-size: 18px;
}

/* Tags Widget */
.blog-sidebar .category-widget .tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.blog-sidebar .category-widget .tags-list li {
    position: relative;
    margin: 0;
}

.blog-sidebar .category-widget .tags-list li a {
    position: relative;
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--background-tertiary);
    border-radius: 6px;
    padding: 8px 15px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.blog-sidebar .category-widget .tags-list li a .count {
    margin-left: 5px;
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.blog-sidebar .category-widget .tags-list li a:hover {
    color: #fff;
    background: var(--hrv-orange);
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(var(--hrv-orange-rgb), 0.2);
}

.blog-sidebar .category-widget .tags-list li a:hover .count {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--hrv-orange);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(var(--hrv-orange-rgb), 0.3);
    transform: scale(0);
    transition: all 0.3s ease;
    opacity: 0.9;
}

.back-to-top.show {
    transform: scale(1);
}

.back-to-top a {
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.back-to-top:hover {
    background: var(--hrv-orange-dark);
    transform: scale(1.1);
    opacity: 1;
}

/* ===== ANIMATION CLASSES ===== */
.fadeInUp {
    animation: fadeInUp 1s ease forwards;
}

.fadeInLeft {
    animation: fadeInLeft 1s ease forwards;
}

.fadeInRight {
    animation: fadeInRight 1s ease forwards;
}

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading Animation for Blog Items */
.blog-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: calc(var(--order) * 0.1s);
}

.blog-item:nth-child(1) { --order: 1; }
.blog-item:nth-child(2) { --order: 2; }
.blog-item:nth-child(3) { --order: 3; }
.blog-item:nth-child(4) { --order: 4; }
.blog-item:nth-child(5) { --order: 5; }
.blog-item:nth-child(6) { --order: 6; }
.blog-item:nth-child(7) { --order: 7; }
.blog-item:nth-child(8) { --order: 8; }

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 1024px) {
    .blog-hero-section .pixel-group-left {
        transform: scale(0.8);
        left: 5%;
        top: 25%;
    }
    
    .blog-hero-section .pixel-group-right {
        transform: scale(0.8);
        right: 2%;
        bottom: 5%;
    }
    
    .blog-hero-section .brand-accent {
        right: -200px;
        bottom: -200px;
    }
}

@media (max-width: 991px) {
    .blog-section {
        padding: 80px 0 50px;
    }

    .blog-sidebar {
        margin-top: 60px;
    }
    
    .blog-sort {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .view-switch {
        display: none;
    }

    .blog-card .image-box {
        height: 0;
        padding-bottom: 60%; /* Adjust aspect ratio for better mobile view */
    }
}

@media (max-width: 767px) {
    .blog-hero-section {
        padding: 80px 0;
    }
    
    .blog-hero-section h1 {
        font-size: 32px;
    }
    
    .blog-hero-section p {
        font-size: 16px;
    }
    
    .blog-hero-section .search-box input {
        height: 50px;
        font-size: 14px;
    }
    
    .blog-hero-section .pixel-group-left {
        transform: scale(0.6);
        left: 0;
    }
    
    .blog-hero-section .pixel-group-right {
        transform: scale(0.6);
        right: 0;
    }
    
    .blog-hero-section .connection-lines {
        display: none;
    }

    .filter-status {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-status .clear-all-btn {
        margin-left: 0;
    }
    
    .filter-tabs {
        gap: 5px;
    }
    
    .filter-tabs li {
        font-size: 14px;
        padding: 6px 12px;
        margin-bottom: 8px;
    }

    .blog-section {
        padding: 60px 0 30px;
    }

    .blog-card .content-box {
        padding: 20px 15px;
    }

    .blog-card h3 {
        font-size: 18px;
    }

    .blog-card p {
        font-size: 14px;
    }

    .blog-sidebar .sidebar-widget {
        padding: 20px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }

    /* Fix for list view on mobile */
    #blog-grid.list-view-active .blog-card {
        flex-direction: column;
    }
    
    #blog-grid.list-view-active .blog-card .image-box {
        width: 100%;
        min-width: 100%;
        height: 200px;        
        min-height: 200px;
        max-height: 200px; 
        border-radius: 12px 12px 0 0;
        height: 0;
        padding-bottom: 60%;
    }

    #blog-grid.list-view-active .blog-card .content-box {
        width: 100%;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .blog-hero-section .content-box {
        margin-top: 40px;
        padding: 0 15px;
    }
    
    .blog-hero-section h1 {
        font-size: 28px;
    }
    
    .blog-hero-section .search-box input {
        padding: 10px 50px 10px 20px;
    }

    .blog-card {
        margin-bottom: 20px;
    }

    .blog-card .image-box {
        padding-bottom: 66%; /* Return to standard ratio on very small screens */
    }

    .blog-card .post-date {
        left: 10px;
        top: 10px;
        font-size: 12px;
        padding: 4px 10px;
    }
    
    .blog-card .category-badge {
        right: 10px;
        top: 10px;
        font-size: 12px;
        padding: 4px 10px;
    }

    .blog-card h3 {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .blog-card .meta-info {
        font-size: 12px;
        margin-bottom: 8px;
    }

    .pagination li a {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

/* ===== DARK MODE SPECIFIC ENHANCEMENTS ===== */
[data-theme="dark"] .blog-hero-section:not(.dark-theme) {
    background: #121212;
}

[data-theme="dark"] .blog-hero-section:not(.dark-theme):after {
    background: linear-gradient(135deg, 
                rgba(var(--hrv-orange-rgb), 0.12) 0%,
                rgba(var(--hrv-blue-light-rgb), 0.08) 100%);
}

[data-theme="dark"] .blog-hero-section:not(.dark-theme) h1 {
    background: linear-gradient(to right, var(--hrv-orange), var(--hrv-orange-light), var(--hrv-blue-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .blog-hero-section:not(.dark-theme) p {
    color: #f0f0f0;
    opacity: 0.9;
}

[data-theme="dark"] .blog-hero-section:not(.dark-theme) .molecular-pattern {
    opacity: 0.07;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.3'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

[data-theme="dark"] .blog-hero-section:not(.dark-theme) .search-box input {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

[data-theme="dark"] .blog-hero-section:not(.dark-theme) .search-box input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .blog-hero-section:not(.dark-theme) .search-box input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(var(--hrv-orange-rgb), 0.5);
    box-shadow: 0 5px 20px rgba(var(--hrv-orange-rgb), 0.2), 0 0 0 2px rgba(var(--hrv-orange-rgb), 0.1);
}

/* ===== UTILITY CLASSES ===== */
.pt_60 {
    padding-top: 60px;
}

.pb_90 {
    padding-bottom: 90px;
}

.mb_40 {
    margin-bottom: 40px;
}

.mb_30 {
    margin-bottom: 30px;
}

.mt_40 {
    margin-top: 40px;
}

@media (max-width: 767px) {
    .pt_60 {
        padding-top: 40px;
    }
    
    .pb_90 {
        padding-bottom: 60px;
    }
    
    .mb_40 {
        margin-bottom: 25px;
    }
    
    .mb_30 {
        margin-bottom: 20px;
    }
    
    .mt_40 {
        margin-top: 25px;
    }
}

/* Fix for spacing and containers */
.container, .auto-container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) {
    .container, .auto-container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container, .auto-container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container, .auto-container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container, .auto-container {
        max-width: 1140px;
    }
}

/* Add missing theme variables if needed */
:root {
    --theme-gradient: linear-gradient(84.25deg, var(--hrv-orange) 0%, var(--hrv-orange-light) 100%);
    --theme-gradient-reversed: linear-gradient(84.25deg, var(--hrv-orange-light) 0%, var(--hrv-orange) 100%);
}

/* Clear fix for proper display */
.clearfix::after {
    display: block;
    clear: both;
    content: "";
}