/* ─────────────────────────────────────────────────────────────────────────
   blog-page.css — Public blog listing + article pages
   Uses CSS variables from styles.css (--primary-color: #024442 etc.)
   ───────────────────────────────────────────────────────────────────────── */

/* ── Shared kicker/heading reuse ─────────────────────────────────────────── */
.blog-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #024442;
    background: rgba(2,68,66,.08);
    padding: 4px 12px;
    border-radius: 999px;
    letter-spacing: .03em;
    margin-bottom: 12px;
}

.blog-heading {
    font-size: clamp(1.5rem, 3.5vw, 2.4rem);
    font-weight: 800;
    color: #1a2c2b;
    line-height: 1.3;
    margin: 0 0 12px;
}

/* ── Blog Hero ────────────────────────────────────────────────────────────── */
.blog-hero {
    background: linear-gradient(160deg, #f0f9f8 0%, #e8f5f4 100%);
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(2,68,66,.06) 0%, transparent 70%);
    top: -200px;
    right: -100px;
    pointer-events: none;
}

.blog-hero .blog-heading { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.blog-hero p.lead { font-size: 1.05rem; color: #4a6766; max-width: 520px; margin: 0 auto 28px; }

/* ── Search + filter strip ───────────────────────────────────────────────── */
.blog-filter-bar {
    background: #fff;
    border-bottom: 1px solid #e8f0ef;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: 0 2px 12px rgba(2,68,66,.05);
}

.blog-filter-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.blog-search-box {
    flex: 1;
    min-width: 200px;
    position: relative;
}
.blog-search-box i {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    color: #9ab0ae;
    pointer-events: none;
}
.blog-search-box input {
    width: 100%;
    padding: 10px 38px 10px 14px;
    border: 1.5px solid #d1d9d8;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    color: #1a2c2b;
    background: #fafcfb;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.blog-search-box input:focus {
    border-color: #024442;
    box-shadow: 0 0 0 3px rgba(2,68,66,.08);
}

.blog-cat-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.cat-chip {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1.5px solid #d1d9d8;
    background: #fff;
    color: #4a6766;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}
.cat-chip:hover, .cat-chip.active {
    border-color: #024442;
    background: #024442;
    color: #fff;
}

/* ── Article grid ────────────────────────────────────────────────────────── */
.blog-main {
    padding: 48px 0 80px;
    background: #f8fffe;
    min-height: 60vh;
}

.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.article-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e8f0ef;
    transition: box-shadow .25s, transform .25s;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}
.article-card:hover {
    box-shadow: 0 8px 32px rgba(2,68,66,.12);
    transform: translateY(-3px);
}

.article-card-cover {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
    background: linear-gradient(135deg, #e8f5f4, #c8e6e4);
}
.article-card-cover-placeholder {
    width: 100%;
    height: 190px;
    background: linear-gradient(135deg, #e8f5f4, #c0e0de);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #6baca8;
}

.article-card-body {
    padding: 18px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.article-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.article-cat-badge {
    font-size: 0.73rem;
    font-weight: 700;
    background: rgba(2,68,66,.08);
    color: #024442;
    padding: 3px 10px;
    border-radius: 999px;
}

.article-date {
    font-size: 0.75rem;
    color: #9ab0ae;
    margin-right: auto;
}

.article-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a2c2b;
    line-height: 1.55;
    margin: 0;
}

.article-card-excerpt {
    font-size: 0.83rem;
    color: #5a7574;
    line-height: 1.7;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    flex: 1;
}

.article-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.76rem;
    color: #9ab0ae;
    margin-top: 4px;
}

.article-card-foot .read-more {
    font-size: 0.82rem;
    font-weight: 700;
    color: #024442;
}

/* ── Load more ───────────────────────────────────────────────────────────── */
.load-more-wrap {
    text-align: center;
    margin-top: 40px;
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: #024442;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background .2s, transform .2s;
}
.btn-load-more:hover { background: #013230; transform: translateY(-1px); }
.btn-load-more:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ── Empty state ─────────────────────────────────────────────────────────── */
.blog-empty {
    text-align: center;
    padding: 80px 24px;
    color: #8aadab;
    grid-column: 1 / -1;
}
.blog-empty i { font-size: 3rem; margin-bottom: 16px; display: block; }
.blog-empty p { font-size: 1.1rem; }

/* ══════════════════════════════════════════════════════════════════════════
   ARTICLE DETAIL PAGE (blog-post-template.html)
   ════════════════════════════════════════════════════════════════════════ */

.post-page { background: #fff; }

/* ── Article header ──────────────────────────────────────────────────────── */
.article-header {
    background: linear-gradient(160deg, #f0f9f8 0%, #e8f5f4 100%);
    padding: 56px 0 0;
}

.article-header-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px 40px;
}

.article-category-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #024442;
    text-decoration: none;
    background: rgba(2,68,66,.09);
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 16px;
    transition: background .2s;
}
.article-category-link:hover { background: rgba(2,68,66,.16); }

.article-main-title {
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    font-weight: 800;
    color: #1a2c2b;
    line-height: 1.35;
    margin: 0 0 20px;
}

.article-meta-row {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.82rem;
    color: #6b8e8c;
    flex-wrap: wrap;
}
.article-meta-row i { color: #024442; }

.article-cover {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
    border-radius: 0;
}

/* ── Article body ────────────────────────────────────────────────────────── */
.article-content-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px 64px;
}

.article-body {
    font-size: 1.05rem;
    line-height: 2;
    color: #253535;
}

.article-body h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1a2c2b;
    margin: 2em 0 0.6em;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8f5f4;
}

.article-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a2c2b;
    margin: 1.6em 0 0.5em;
}

.article-body h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #024442;
    margin: 1.4em 0 0.4em;
}

.article-body p { margin: 0 0 1.2em; }

.article-body strong { font-weight: 700; color: #1a2c2b; }

.article-body em { font-style: italic; }

.article-body a {
    color: #024442;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.article-body a:hover { color: #013230; }

.article-body blockquote {
    border-right: 4px solid #024442;
    border-left: none;
    padding: 12px 20px 12px 0;
    margin: 1.5em 0;
    color: #4a6766;
    font-size: 1.05rem;
    font-style: italic;
    background: rgba(2,68,66,.04);
    border-radius: 0 8px 8px 0;
}

.article-body ul, .article-body ol {
    padding-right: 24px;
    padding-left: 0;
    margin: 0 0 1.2em;
}
.article-body li { margin-bottom: 6px; }

.article-body img {
    max-width: 100%;
    border-radius: 10px;
    display: block;
    margin: 1.5em auto;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
}

.article-body figure { margin: 1.5em 0; text-align: center; }
.article-body figcaption { font-size: 0.82rem; color: #9ab0ae; margin-top: 6px; }

/* ── Tags ────────────────────────────────────────────────────────────────── */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 32px 0 40px;
    padding-top: 24px;
    border-top: 1px solid #e8f0ef;
}

.article-tag {
    padding: 5px 14px;
    border-radius: 999px;
    background: #f0f9f8;
    color: #024442;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    border: 1.5px solid #c8e0de;
    transition: all .2s;
}
.article-tag:hover { background: #024442; color: #fff; border-color: #024442; }

/* ── Like + Share bar ────────────────────────────────────────────────────── */
.article-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 20px 0;
    border-top: 1px solid #e8f0ef;
    border-bottom: 1px solid #e8f0ef;
    margin-bottom: 48px;
}

.btn-like {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 20px;
    border: 1.5px solid #e8f0ef;
    border-radius: 999px;
    background: #fff;
    color: #5a7574;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all .2s;
}
.btn-like:hover, .btn-like.liked {
    background: #fff0f3;
    border-color: #e57373;
    color: #c62828;
}
.btn-like.liked i { color: #e53935; }

.share-btns {
    display: flex;
    gap: 8px;
    margin-right: auto;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s;
}
.share-btn.telegram { background: #e3f2fd; color: #1565c0; }
.share-btn.telegram:hover { background: #1565c0; color: #fff; }
.share-btn.copy { background: #f0f9f8; color: #024442; border: none; font-family: inherit; cursor: pointer; }
.share-btn.copy:hover { background: #024442; color: #fff; }

/* ── Related articles ────────────────────────────────────────────────────── */
.related-section {
    background: #f8fffe;
    padding: 48px 0 64px;
}

.related-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 28px;
}

.related-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e8f0ef;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s, transform .2s;
}
.related-card:hover { box-shadow: 0 6px 20px rgba(2,68,66,.1); transform: translateY(-2px); }

.related-cover {
    height: 140px;
    background-size: cover;
    background-position: center;
    background-color: #e8f5f4;
}

.related-info {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.related-cat {
    font-size: 0.72rem;
    font-weight: 700;
    color: #024442;
    background: rgba(2,68,66,.08);
    padding: 2px 8px;
    border-radius: 999px;
    align-self: flex-start;
}

.related-info h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a2c2b;
    margin: 0;
    line-height: 1.45;
}

.related-time {
    font-size: 0.73rem;
    color: #9ab0ae;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .blog-hero { padding: 56px 0 40px; }
    .article-header-inner { padding: 0 16px 28px; }
    .article-content-wrap { padding: 28px 16px 48px; }
    .article-body { font-size: 0.97rem; }
    .article-grid { grid-template-columns: 1fr; }
}
