/* ===== Blog / Insights page redesign ===== */

.ehc-blog-search {
    max-width: 480px;
    margin: 32px auto 0;
    position: relative;
}
.ehc-blog-search::before {
    content: "🔍";
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 16px;
    opacity: 0.7;
}
.ehc-blog-search input {
    width: 100%;
    padding: 14px 20px 14px 52px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: var(--color-secondary);
    font-size: var(--text-base);
    font-family: var(--font-body);
    transition: all 0.3s ease;
    direction: rtl;
}
.ehc-blog-search input::placeholder { color: var(--color-text-muted); }
.ehc-blog-search input:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(197, 168, 128, 0.05);
    box-shadow: 0 0 0 3px rgba(197, 168, 128, 0.1);
}

/* ── Sticky category filter ── */
.ehc-cat-filter {
    position: sticky;
    top: 76px;
    z-index: 50;
    padding: 18px 0;
    background: linear-gradient(180deg, var(--color-primary) 0%, rgba(10, 10, 10, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 24px;
}
.ehc-cat-pills {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px max(20px, calc((100vw - 1200px) / 2));
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.ehc-cat-pills::-webkit-scrollbar { display: none; }
.ehc-cat-pill {
    flex-shrink: 0;
    padding: 9px 22px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.25s ease;
    cursor: pointer;
    user-select: none;
}
.ehc-cat-pill:hover {
    border-color: var(--color-accent);
    color: var(--color-secondary);
    background: rgba(197, 168, 128, 0.08);
}
.ehc-cat-pill.active {
    background: var(--gradient-accent);
    color: var(--color-primary);
    border-color: transparent;
    box-shadow: 0 0 24px rgba(197, 168, 128, 0.25);
    font-weight: 600;
}
.ehc-cat-pill .count {
    margin-right: 8px;
    font-size: var(--text-xs);
    opacity: 0.7;
}
.ehc-cat-pill.active .count { opacity: 0.85; }

/* ── Featured post ── */
.ehc-featured {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 0;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(197, 168, 128, 0.2);
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: 80px;
    transition: all 0.4s ease;
}
.ehc-featured:hover {
    border-color: var(--color-accent);
    transform: translateY(-4px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}
.ehc-featured-image {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}
.ehc-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}
.ehc-featured:hover .ehc-featured-image img { transform: scale(1.05); }
.ehc-featured-content {
    padding: 48px 48px 48px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.ehc-featured-tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--gradient-accent);
    color: #0a0a0a;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 700;
    margin-bottom: 18px;
    align-self: flex-start;
    letter-spacing: 0.05em;
}
.ehc-featured-title {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--color-secondary);
    line-height: 1.3;
    margin-bottom: 18px;
    font-weight: 400;
}
.ehc-featured-title a { color: inherit; text-decoration: none; }
.ehc-featured-title a:hover { color: var(--color-accent); }
.ehc-featured-excerpt {
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: 24px;
    font-size: var(--text-base);
}
.ehc-featured-meta {
    display: flex;
    gap: 12px;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.ehc-featured-meta .dot { color: var(--color-accent); }

/* ── Latest grid ── */
.ehc-latest-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* ── Blog card ── */
.ehc-blog-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}
.ehc-blog-card:hover {
    transform: translateY(-6px);
    border-color: rgba(197, 168, 128, 0.3);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}
.ehc-blog-card-img {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}
.ehc-blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}
.ehc-blog-card:hover .ehc-blog-card-img img { transform: scale(1.08); }
.ehc-blog-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.ehc-blog-card-cat {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(197, 168, 128, 0.12);
    color: var(--color-accent);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 600;
    margin-bottom: 12px;
    align-self: flex-start;
    letter-spacing: 0.03em;
}
.ehc-blog-card-title {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    color: var(--color-secondary);
    line-height: 1.4;
    margin-bottom: 12px;
    font-weight: 500;
}
.ehc-blog-card-title a { color: inherit; text-decoration: none; }
.ehc-blog-card-title a:hover { color: var(--color-accent); }
.ehc-blog-card-excerpt {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}
.ehc-blog-card-meta {
    display: flex;
    gap: 8px;
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ── Category sections ── */
.ehc-cat-section {
    margin-bottom: 80px;
    scroll-margin-top: 140px;
}
.ehc-cat-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(197, 168, 128, 0.2);
    flex-wrap: wrap;
    gap: 12px;
}
.ehc-cat-section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    color: var(--color-secondary);
    font-weight: 400;
}
.ehc-cat-section-title .count {
    margin-right: 12px;
    color: var(--color-accent);
    font-size: var(--text-sm);
    font-weight: 600;
}
.ehc-cat-section-link {
    color: var(--color-accent);
    font-size: var(--text-sm);
    text-decoration: none;
    transition: gap 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.ehc-cat-section-link:hover { gap: 12px; }
.ehc-cat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ── Mobile ── */
@media (max-width: 1024px) {
    .ehc-latest-grid, .ehc-cat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .ehc-featured { grid-template-columns: 1fr; }
    .ehc-featured-image { aspect-ratio: 16 / 10; }
    .ehc-featured-content { padding: 28px; }
    .ehc-latest-grid, .ehc-cat-grid { grid-template-columns: 1fr; gap: 20px; }
    .ehc-blog-stats { flex-direction: column; gap: 8px; }
    .ehc-cat-filter { top: 64px; }
    .ehc-cat-section { margin-bottom: 56px; }
    .ehc-cat-section-header { flex-direction: column; align-items: flex-start; }
}
