/* =============================================
   Holistiy Blog — Front-end Styles
   Designed to match holistiy.co.il branding
   ============================================= */

:root {
    --hag-primary: #2777B5;
    --hag-primary-light: #e8f4fd;
    --hag-primary-dark: #1b5a8a;
    --hag-accent: #C8C007;
    --hag-accent-light: #fafae0;
    --hag-text: #1a1a2e;
    --hag-text-light: #5a5a72;
    --hag-text-muted: #8e8ea0;
    --hag-bg: #fafbfc;
    --hag-card-bg: #ffffff;
    --hag-border: #e8eaef;
    --hag-radius: 16px;
    --hag-radius-sm: 10px;
    --hag-shadow: 0 2px 8px rgba(0,0,0,0.04);
    --hag-shadow-hover: 0 12px 32px rgba(39,119,181,0.12);
    --hag-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --hag-font: inherit;
    --hag-max-width: 1200px;
}

/* Reset for shortcode scope */
.hag-blog { 
    font-family: var(--hag-font);
    max-width: var(--hag-max-width);
    margin: 0 auto;
    padding: 0 16px 60px;
    color: var(--hag-text);
    direction: rtl;
}
.hag-blog *, .hag-blog *::before, .hag-blog *::after {
    box-sizing: border-box;
}

/* ── Hero Header ── */
.hag-blog-hero {
    background: linear-gradient(135deg, var(--hag-primary) 0%, var(--hag-primary-dark) 100%);
    border-radius: var(--hag-radius);
    margin-bottom: 32px;
    overflow: hidden;
    position: relative;
}
.hag-blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='1.5' fill='%23ffffff' opacity='0.08'/%3E%3C/svg%3E") repeat;
}
.hag-blog-hero__inner {
    position: relative;
    padding: 48px 40px;
    text-align: center;
}
.hag-blog-hero__title {
    color: #fff;
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.3;
}
.hag-blog-hero__sub {
    color: rgba(255,255,255,0.85);
    font-size: clamp(15px, 2vw, 18px);
    margin: 0;
    line-height: 1.6;
}

/* ── Category Filter ── */
.hag-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 28px;
    padding: 0 8px;
}
.hag-filter__btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    border: 1.5px solid var(--hag-border);
    border-radius: 100px;
    background: var(--hag-card-bg);
    color: var(--hag-text-light);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--hag-transition);
    white-space: nowrap;
}
.hag-filter__btn:hover {
    border-color: var(--hag-primary);
    color: var(--hag-primary);
    background: var(--hag-primary-light);
}
.hag-filter__btn.active {
    background: var(--hag-primary);
    color: #fff;
    border-color: var(--hag-primary);
}

/* ── Posts Grid ── */
.hag-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr;
}
@media (min-width: 640px) {
    .hag-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
    .hag-grid--3 { grid-template-columns: repeat(3, 1fr); }
    .hag-grid--2 { grid-template-columns: repeat(2, 1fr); }
}

/* ── Card ── */
.hag-card {
    background: var(--hag-card-bg);
    border-radius: var(--hag-radius);
    border: 1px solid var(--hag-border);
    overflow: hidden;
    box-shadow: var(--hag-shadow);
    transition: var(--hag-transition);
    position: relative;
}
.hag-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hag-shadow-hover);
    border-color: rgba(39,119,181,0.2);
}
.hag-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* Card Media */
.hag-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--hag-primary-light), #f0f4f8);
}
.hag-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.hag-card:hover .hag-card__img {
    transform: scale(1.04);
}
.hag-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hag-text-muted);
    background: linear-gradient(135deg, #f0f6fa 0%, #e8eef5 100%);
}
.hag-card__badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--hag-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 100px;
    letter-spacing: 0.02em;
}

/* Card Body */
.hag-card__body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.hag-card__title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.45;
    margin: 0 0 8px;
    color: var(--hag-text);
    transition: color var(--hag-transition);
}
.hag-card:hover .hag-card__title {
    color: var(--hag-primary);
}
.hag-card__excerpt {
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--hag-text-light);
    margin: 0 0 auto;
}

/* Card Footer */
.hag-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--hag-border);
}
.hag-card__date {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--hag-text-muted);
}
.hag-card__date svg { opacity: 0.6; }
.hag-card__read {
    font-size: 13px;
    font-weight: 600;
    color: var(--hag-primary);
    transition: var(--hag-transition);
}
.hag-card:hover .hag-card__read {
    gap: 6px;
    color: var(--hag-primary-dark);
}

/* ── Featured Card (first post) ── */
@media (min-width: 960px) {
    .hag-card--featured {
        grid-column: 1 / -1;
    }
    .hag-card--featured .hag-card__link {
        flex-direction: row-reverse;
    }
    .hag-card--featured .hag-card__media {
        width: 55%;
        flex-shrink: 0;
        aspect-ratio: auto;
        min-height: 300px;
    }
    .hag-card--featured .hag-card__body {
        padding: 32px;
        justify-content: center;
    }
    .hag-card--featured .hag-card__title {
        font-size: 24px;
    }
    .hag-card--featured .hag-card__excerpt {
        font-size: 16px;
    }
}

/* ── Pagination ── */
.hag-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
    flex-wrap: wrap;
}
.hag-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1.5px solid var(--hag-border);
    border-radius: var(--hag-radius-sm);
    color: var(--hag-text-light);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    background: var(--hag-card-bg);
    transition: var(--hag-transition);
}
.hag-pagination .page-numbers:hover {
    border-color: var(--hag-primary);
    color: var(--hag-primary);
    background: var(--hag-primary-light);
}
.hag-pagination .page-numbers.current {
    background: var(--hag-primary);
    color: #fff;
    border-color: var(--hag-primary);
    font-weight: 700;
}
.hag-pagination .page-numbers svg { display: block; }

/* ── Empty State ── */
.hag-empty {
    text-align: center;
    padding: 64px 20px;
    color: var(--hag-text-muted);
}
.hag-empty svg { margin-bottom: 16px; opacity: 0.35; }
.hag-empty p {
    font-size: 16px;
    margin: 0;
}

/* ── Mobile Tweaks ── */
@media (max-width: 639px) {
    .hag-blog-hero__inner { padding: 32px 20px; }
    .hag-card__body { padding: 16px; }
    .hag-card__title { font-size: 16px; }
    .hag-grid { gap: 16px; }
}
