﻿
:root {
    --green-deep: #1e4129;
    --green-mid: #2d5f3f;
    --green-light: #f0f7f2;
    --green-accent: #5a9e6f;
    --orange: #f07b35;
    --text-dark: #1a2318;
    --text-mid: #4a5568;
    --text-light: #8a9a8a;
    --border: #e4ede6;
    --white: #ffffff;
    --bg: #f5f8f5;
}

* {
    box-sizing: border-box;
}

body {
    background: var(--bg);
    font-family: 'DM Sans', sans-serif;
    color: var(--text-dark);
}

/* ---- Page Hero ---- */
.blog-hero {
    background: var(--green-deep);
    padding: 64px 0 56px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

    .blog-hero::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse at 30% 50%, rgba(90,158,111,0.18) 0%, transparent 65%), radial-gradient(ellipse at 80% 20%, rgba(45,95,63,0.3) 0%, transparent 55%);
        pointer-events: none;
    }

.blog-hero__label {
    display: inline-block;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #a8d5b8;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 18px;
}

.blog-hero__title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 800;
    color: #fff;
    margin: 0 0 14px;
    line-height: 1.15;
}

.blog-hero__sub {
    font-size: 16px;
    color: rgba(255,255,255,0.65);
    margin: 0;
}

/* ---- Search / Filter Bar ---- */
.blog-search-bar {
    background: var(--white);
    padding: 16px 20px;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    margin: -28px auto 40px;
    max-width: 680px;
    position: relative;
    z-index: 5;
}

    .blog-search-bar input {
        width: 100%;
        padding: 12px 18px 12px 46px;
        border: 1.5px solid var(--border);
        border-radius: 10px;
        font-size: 15px;
        font-family: inherit;
        outline: none;
        background: var(--bg);
        transition: border-color 0.2s;
        color: var(--text-dark);
    }

        .blog-search-bar input:focus {
            border-color: var(--green-mid);
            background: #fff;
        }

    .blog-search-bar .search-icon {
        position: absolute;
        left: 36px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-light);
        font-size: 15px;
        pointer-events: none;
    }

/* ---- Main Content ---- */
.blog-section {
    padding: 0 0 70px;
}

/* Results count */
.blog-results-info {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 24px;
}

/* ---- Blog Cards ---- */
#blogContainer {
    /* grid via bootstrap row */
}

.blog-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border);
    opacity: 0;
    transform: translateY(18px);
}

    .blog-card.card-visible {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.45s ease, transform 0.45s ease, box-shadow 0.3s ease;
    }

    .blog-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 14px 36px rgba(30,65,41,0.13);
    }

/* Image */
.blog-card__img-wrap {
    position: relative;
    width: 100%;
    padding-top: 62%;
    overflow: hidden;
    background: var(--green-light);
}

.blog-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card__img {
    transform: scale(1.05);
}

/* Category badge */
.blog-card__cat {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--green-deep);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    padding: 5px 11px;
    border-radius: 6px;
}

/* Body */
.blog-card__body {
    padding: 20px 20px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card__meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 10px;
}

    .blog-card__meta i {
        margin-right: 4px;
        color: var(--green-accent);
    }

.blog-card__title {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.35;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card__desc {
    font-size: 14px;
    color: var(--text-mid);
    line-height: 1.65;
    margin: 0 0 18px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.blog-card__read-more {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 700;
    color: var(--green-mid);
    text-decoration: none;
    transition: gap 0.25s, color 0.25s;
}

    .blog-card__read-more:hover {
        gap: 12px;
        color: var(--green-deep);
        text-decoration: none;
    }

    .blog-card__read-more i {
        font-size: 12px;
    }

/* ---- Empty State ---- */
.blog-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

    .blog-empty i {
        font-size: 56px;
        color: #c8d8cc;
        display: block;
        margin-bottom: 18px;
    }

    .blog-empty h4 {
        font-size: 18px;
        color: var(--text-dark);
        margin-bottom: 8px;
    }

/* ---- Pagination ---- */
.blog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.blog-pagination__info {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 12px;
    text-align: center;
}

.btn-page-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border: 1.5px solid var(--green-mid);
    border-radius: 10px;
    background: var(--white);
    color: var(--green-mid);
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s;
}

    .btn-page-nav:hover:not(:disabled) {
        background: var(--green-mid);
        color: #fff;
    }

    .btn-page-nav:disabled {
        opacity: 0.35;
        cursor: not-allowed;
        border-color: #ccc;
        color: #999;
    }

.page-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-dot-btn {
    min-width: 38px;
    height: 38px;
    border: 1.5px solid var(--border);
    background: var(--white);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-mid);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

    .page-dot-btn:hover {
        border-color: var(--green-mid);
        color: var(--green-mid);
    }

    .page-dot-btn.active {
        background: var(--green-mid);
        border-color: var(--green-mid);
        color: #fff;
    }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .blog-hero {
        padding: 50px 0 50px;
    }

    .blog-search-bar {
        margin: -24px 16px 32px;
    }

    .blog-card__title {
        font-size: 16px;
    }

    .btn-page-nav {
        padding: 10px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .blog-card__footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .page-dots {
        display: none;
    }
}


