/* ── Blog Page ── */

.blog-page { padding-top: 70px; }

.blog-hero {
    padding: 5rem 0 3rem;
    text-align: center;
}

.blog-hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.blog-hero p {
    font-size: 1.1rem;
    max-width: 560px;
    margin: 0 auto;
    opacity: .8;
}

.text-green { color: #10b981; }

/* Filters */
.blog-filters-section {
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,.07);
    margin-bottom: 2.5rem;
}

.filters-bar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.filter-tabs {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.filter-tab {
    padding: .45rem 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.15);
    background: transparent;
    color: rgba(255,255,255,.75);
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
}

.filter-tab:hover,
.filter-tab.active {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: .6rem;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px;
    padding: .5rem 1rem;
    flex: 1;
    min-width: 240px;
    max-width: 420px;
}

.search-bar i { opacity: .5; font-size: .85rem; flex-shrink: 0; }

.search-bar input {
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-size: .9rem;
    flex: 1;
    min-width: 0;
}

.search-bar input::placeholder { opacity: .5; }

.search-bar select {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 6px;
    color: #fff;
    font-size: .8rem;
    padding: .25rem .5rem;
    cursor: pointer;
    flex-shrink: 0;
}

.search-bar select option { background: #1e293b; }

/* Grid */
.blog-content { padding-bottom: 5rem; }

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.75rem;
}

/* Card */
.blog-card {
    background: rgba(255,255,255,.05);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 16px;
    overflow: hidden;
    transition: transform .3s, box-shadow .3s, border-color .3s;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,.35);
    border-color: rgba(255,255,255,.18);
}

.card-img-wrap {
    position: relative;
    height: 190px;
    overflow: hidden;
    background: rgba(255,255,255,.04);
}

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

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

.card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59,130,246,.15), rgba(139,92,246,.1));
    font-size: 3rem;
    opacity: .35;
}

.card-type-badge {
    position: absolute;
    top: .85rem;
    left: .85rem;
    padding: .3rem .8rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    display: flex;
    align-items: center;
    gap: .35rem;
}

.badge-article      { background: rgba(139,92,246,.9);  color: #fff; }
.badge-news         { background: rgba(59,130,246,.9);  color: #fff; }
.badge-announcement { background: rgba(245,158,11,.9);  color: #fff; }

.card-body {
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: .5rem;
    line-height: 1.35;
    color: #fff;
}

.card-excerpt {
    font-size: .85rem;
    opacity: .75;
    line-height: 1.55;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.card-meta {
    display: flex;
    gap: 1rem;
    font-size: .78rem;
    opacity: .65;
    margin-bottom: .85rem;
    flex-wrap: wrap;
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: 1rem;
}

.tag {
    font-size: .72rem;
    padding: .2rem .55rem;
    border-radius: 999px;
    background: rgba(59,130,246,.12);
    color: #60a5fa;
    border: 1px solid rgba(59,130,246,.2);
}

.card-actions {
    display: flex;
    gap: .6rem;
    margin-top: auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem 1.1rem;
    border-radius: 8px;
    border: none;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
}

.btn-primary { background: #10b981; color: #fff; }
.btn-primary:hover { background: #059669; transform: translateY(-1px); }

.btn-secondary {
    background: rgba(255,255,255,.08);
    color: #fff;
    border: 1px solid rgba(255,255,255,.15);
}

.btn-secondary:hover { background: rgba(255,255,255,.14); }

.btn-ghost {
    background: transparent;
    color: rgba(255,255,255,.7);
    border: 1px solid rgba(255,255,255,.12);
    padding: .45rem .85rem;
}

.btn-ghost:hover { color: #fff; border-color: rgba(255,255,255,.3); }

/* States */
.state-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 2rem;
    text-align: center;
    gap: 1rem;
    opacity: .75;
}

.spinner {
    width: 38px;
    height: 38px;
    border: 3px solid rgba(255,255,255,.15);
    border-top-color: #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.empty-icon { font-size: 3rem; opacity: .35; }

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
}

.modal-box {
    background: #1e293b;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 16px;
    padding: 2rem;
    max-width: 680px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,.08);
    border: none;
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}

.modal-close:hover { background: rgba(239,68,68,.3); }

.modal-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1.25rem;
}

.modal-title { font-size: 1.5rem; font-weight: 700; margin-bottom: .5rem; }

.modal-meta {
    font-size: .82rem;
    opacity: .65;
    margin-bottom: 1.25rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.modal-meta span { display: flex; align-items: center; gap: .35rem; }

.modal-body {
    font-size: .9rem;
    line-height: 1.75;
    opacity: .85;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-page { padding-top: 70px; }
    .blog-hero { padding: 2.5rem 0 1.5rem; }
    .blog-hero p { font-size: 0.95rem; }
    .filters-bar { flex-direction: column; align-items: stretch; gap: 0.75rem; }
    .filter-tabs { justify-content: flex-start; }
    .search-bar { max-width: 100%; min-width: 0; }
    .blog-grid { grid-template-columns: 1fr; gap: 1.25rem; }
    .card-actions { flex-direction: column; }
    .card-actions .btn { width: 100%; justify-content: center; }
    .modal-box { padding: 1.25rem; }
}

@media (max-width: 480px) {
    .filter-tab { padding: .4rem .85rem; font-size: .8rem; }
    .card-img-wrap { height: 160px; }
}
