/* =========================================
   POPULAR POSTS SECTION (Modern Minimal)
   ========================================= */

.popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

/* Card Base */
.popular-card {
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Glass Panel Hover Effect */
.glass-panel-hover {
    background: var(--surface-glass);
    /* Define fallback or variable */
    border: 1px solid var(--border-light);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.glass-panel-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-primary);
}

/* Thumbnail */
.card-thumb-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
}

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

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

/* Category Badge */
.badge-cat-glass {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #1a202c;
    /* Always dark text for readability on light badge */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

[data-theme="dark"] .badge-cat-glass {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Card Body */
.card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Meta Data */
.card-meta-top {
    display: flex;
    align-items: center;
    gap: 8px;
    /* Consistent inner gap */
    flex-wrap: wrap;
    /* Prevent overflow on small screens */
    margin-bottom: 12px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.meta-author {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    /* Highlight author slightly more */
}

.meta-avatar {
    width: 24px !important;
    /* Explicit small size */
    height: 24px !important;
    /* Explicit small size */
    min-width: 24px !important;
    /* Prevent shrinking */
    border-radius: 50% !important;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: block;
    /* Eliminate inline-block spacing issues */
}

.dot-separator {
    opacity: 0.4;
    font-size: 1.2em;
    /* Slightly larger dot vertically centered */
    line-height: 0;
}

.card-title {
    font-family: var(--font-heading, sans-serif);
    line-height: 1.3;
}

.text-muted {
    color: var(--text-secondary);
}

/* Separator */
.border-white-10 {
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .border-white-10 {
    border-color: rgba(0, 0, 0, 0.05);
}


/* NEWSLETTER CARD SPECIAL STYLE */
.card-newsletter {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 50px rgba(14, 165, 164, 0.25);
}

.newsletter-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.icon-accent-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 32px;
    margin: 0 auto 24px;
}

.icon-accent-circle .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
}

.text-white-opacity {
    color: rgba(255, 255, 255, 0.9);
}

/* Newsletter Input */
.input-glass {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 10px 16px;
    color: #fff;
    width: 100%;
    transition: all 0.2s;
}

.input-glass::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.input-glass:focus {
    background: rgba(255, 255, 255, 0.3);
    outline: none;
    border-color: #fff;
}

.btn-icon-glass {
    width: 42px;
    height: 42px;
    /* Set fixed height to match input standard height approx */
    background: #fff;
    border: none;
    border-radius: 8px;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-icon-glass:hover {
    transform: scale(1.05);
    background: #f0fdfa;
    /* Slightly lighter */
}

/* Decorative Blob */
.blob-decoration {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
    z-index: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .popular-grid {
        grid-template-columns: 1fr;
    }
}