/* =====================================================
   BLOG_LIST.CSS
   Page-specific styles for blog_list.asp
   ===================================================== */

/* ===================== TOOLBAR ===================== */
.toolbar-wrap {
    max-width: 1300px;
    margin: 0 auto;
    padding: 28px 60px 18px;
}

.toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.searchbar {
    flex: 0 0 37.5%;
    max-width: 37.5%;
    min-width: 260px;
    display: flex;
    align-items: stretch;
}

.searchbar input {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-right: none;
    border-radius: 10px 0 0 10px;
    padding: 14px 16px;
    font-size: 14px;
    color: #fff;
    outline: none;
    font-family: inherit;
    transition: border-color .2s, background .2s;
}

.searchbar input::placeholder { color: #555; }

.searchbar input:focus {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.15);
}

.searchbar button {
    background: #fff;
    color: #000;
    border: none;
    border-radius: 0 10px 10px 0;
    padding: 14px 16px;
    font-size: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}

.searchbar button:hover  { background: #e6e6e6; }
.searchbar button:active { transform: scale(0.98); }

.searchbar button svg {
    width: 18px;
    height: 18px;
}

.chips {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1;
}

.chip {
    position: relative;
    display: flex;
    align-items: center;
}

.chip select {
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: #aaa;
    padding: 10px 36px 10px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    font-family: inherit;
    transition: all .15s;
}

.chip select:hover,
.chip select:focus {
    border-color: rgba(255,255,255,0.18);
    color: #fff;
}

.chip::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #666;
    pointer-events: none;
}

.chip select option {
    background: #1a1a1a;
    color: #ddd;
}

.count {
    margin-left: auto;
    color: #555;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}


/* ===================== LOADING / EMPTY ===================== */
.grid-loading {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 0;
}

.grid-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #555;
}

.grid-empty p       { font-size: 16px; margin-bottom: 8px; }
.grid-empty-sub     { font-size: 13px; color: #444; }

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }


/* ===================== GRID ===================== */
.grid {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 60px 30px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}


/* ===================== POST CARD ===================== */
.post-card {
    display: block;
    background: var(--card-bg, rgba(255,255,255,0.03));
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 12px;
    overflow: hidden;
    transition: transform .22s ease, background .22s ease, border-color .22s ease, box-shadow .22s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.post-card:hover {
    background: var(--card-hover, rgba(255,255,255,0.06));
    border-color: rgba(255,255,255,0.08);
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}

/* Thumbnail */
.post-card .thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #111;
    overflow: hidden;
}

.post-card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.95;
    transition: transform .3s ease, opacity .3s ease;
    display: block;
}

.post-card:hover .thumb img {
    transform: scale(1.06);
    opacity: 1;
}

/* Category badge overlaid on thumbnail */
.post-card .badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.10);
    color: #ddd;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

/* Card body */
.post-card .body {
    padding: 16px 18px 18px;
}

.post-card .meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 10px;
    color: #666;
    font-size: 12px;
    font-weight: 700;
}

.post-card .meta .dot { opacity: .55; }

.post-card .title {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 10px;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

    .post-card .excerpt {
        font-size: 0.9rem;
        color: #555;
        margin: 10px 0;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2; /* Limits to 2 lines if the sentence is very long */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .post-card .tags {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        margin-top: auto; /* Pushes tags to the bottom of the card */
    }

.tag-badge {
    background: #f0f0f0;
    color: #666;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    font-weight: 600;
}

.post-card .tag {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.06);
    color: #d0d0d0;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.post-card .tag.accent {
    border-color: rgba(214,0,0,0.35);
    background: rgba(214,0,0,0.12);
    color: #ffd0d0;
}


/* ===================== PAGINATION: GOLD OUTLINE STYLE ===================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
}

.page-btn {
    padding: 8px 16px;
    /* Transparent background for outline look */
    background: transparent;
    /* Use the gold variable from your base.css */
    border: 1px solid var(--gold);
    color: var(--gold);
    cursor: pointer;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.2s ease;
}

    /* Hover State: Fills in with gold */
    .page-btn:hover:not(:disabled) {
        background: var(--gold);
        color: #fff;
    }

    /* Active State: Solid Gold */
    .page-btn.active {
        background: var(--gold);
        color: #fff;
        border-color: var(--gold);
    }

    /* Nav Buttons (Prev/Next): Slightly bolder border or specific style */
    .page-btn.nav {
        text-transform: uppercase;
        font-size: 12px;
        letter-spacing: 1px;
    }

    /* Disabled State: Faded out */
    .page-btn:disabled {
        opacity: 0.3;
        border-color: #555;
        color: #555;
        cursor: not-allowed;
    }

.pager-dots {
    color: var(--gold);
    padding: 0 5px;
    font-weight: bold;
}


/* ===================== RESPONSIVE ===================== */
@media (max-width: 980px) {
    .blog-hero          { padding: 0 20px 50px; min-height: 48vh; }
    .blog-hero-content  { padding-top: 110px; }
    .blog-hero h1       { font-size: 40px; }
    .toolbar-wrap       { padding: 22px 20px 14px; }
    .searchbar          { flex: 0 0 100%; max-width: 100%; }
    .grid               { padding: 0 20px 26px; gap: 16px; }
    .pagination         { padding: 12px 20px 38px; }
}

@media (max-width: 640px) {
    .blog-hero h1       { font-size: 34px; }
    .grid               { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
    .searchbar button   { padding: 14px 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .post-card,
    .post-card .thumb img { transition: none !important; }
}
