﻿/* ===== css/style.css ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    color: #1e2a3a;
    background: #fff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

ul,
li {
    list-style: none;
}

.line-clamp-1 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.line-clamp-4 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== header & navigation ===== */
.site-header {
    border-bottom: 1px solid #eaeef2;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(6px);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.3s, box-shadow 0.3s;
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo a {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    text-decoration: none;
    color: #0b2230;
}

.logo span {
    color: #5a7c8a;
    font-weight: 300;
}

.hamburger {
    display: none;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #1e2a3a;
}

.main-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.main-nav a {
    text-decoration: none;
    font-weight: 500;
    color: #2c3e50;
    font-size: 1.05rem;
    transition: color 0.2s;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
    color: #a52f28;
    border-bottom-color: #a52f28;
}

/* ===== top announcement ===== */
.top-announcement {
    background: #f4f7fb;
    padding: 10px 0;
    border-bottom: 1px solid #dde3e9;
    font-size: 0.95rem;
}

.breaking {
    background: #c9423f;
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    margin-right: 12px;
}

.top-announcement a {
    color: #1e2a3a;
    text-decoration: none;
    font-weight: 500;
}

.top-announcement a:hover {
    text-decoration: underline;
}

/* ===== sections & grids ===== */
.section {
    padding: 48px 0;
}

.bg-light {
    background: #fafbfc;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.section-title {
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    border-left: 6px solid #c9423f;
    padding-left: 18px;
}

.section-title.small {
    font-size: 1.6rem;
    border-left-width: 4px;
}

.view-all {
    text-decoration: none;
    color: #2c5f7a;
    font-weight: 500;
    transition: 0.2s;
}

.view-all:hover {
    color: #a52f28;
}

.grid {
    display: grid;
    gap: 32px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* ===== card base & variants ===== */
.card {
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.25s ease;
    background: white;
}

.card-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
}

.card-content {
    padding: 18px;
}

.tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    background: #eef2f6;
    padding: 4px 12px;
    border-radius: 30px;
    display: inline-block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
}

.tag.tag-europe {
    background: #d9e9f7;
    color: #1b5273;
}

.tag-special {
    background: #fae6d8;
    color: #b15517;
}

.tag-climate {
    background: #ddf0e4;
    color: #176334;
}

.card-title {
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 8px;
    font-weight: 600;
}

.card-title a {
    text-decoration: none;
    color: #1e2a3a;
}

.card-title a:hover {
    color: #a52f28;
}

.card-excerpt {
    color: #4a5b6b;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.meta {
    font-size: 0.85rem;
    color: #6a7b8a;
}

.meta-cat {
    font-size: 0.8rem;
    color: #a52f28;
    font-weight: 500;
    margin-bottom: 4px;
}

/* card variations */
.card-a {
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.02);
}

.card-a:hover {
    box-shadow: 0 12px 24px rgba(0, 20, 30, 0.08);
    transform: translateY(-4px);
}

.card-b .tag {
    background: #102a41;
    color: white;
}

.card-b .card-content {
    background: #f9fcff;
    margin-top: -6px;
    border-radius: 0 0 16px 16px;
}

.card-c {
    background: #f8fbfe;
    border: 1px solid #e4ebf2;
}

.card-c .card-content {
    padding: 18px;
}

.list-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* card-d (horizontal) */
.card-d {
    background: white;
    border-radius: 20px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.02);
}

.card-d:hover {
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

.card-d-inner {
    display: flex;
    gap: 20px;
    align-items: center;
}

.card-d-img {
    flex: 0 0 40%;
}

.card-d-img img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 14px;
}

.card-d-content {
    flex: 1;
    padding: 10px;
}

/* card-e */
.card-e {
    border: 1px solid #e4ebf2;
    border-radius: 20px;
    background: white;
}

.card-e .card-content {
    padding: 0 18px 18px;
}

/* card-f, card-g simple */
.card-f,
.card-g {
    border-bottom: 1px solid #eef2f6;
    padding-bottom: 16px;
    border-radius: 0;
}

.card-g {
    border-bottom: none;
}

/* card-h image right */
.card-h-inner {
    display: flex;
    gap: 16px;
    align-items: center;
    background: #f6fafd;
    border-radius: 20px;
    padding: 12px;
}

.card-h-text {
    flex: 1;
}

.card-h-img {
    flex: 0 0 80px;
}

.card-h-img img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 12px;
}

/* list-card (no image) */
.list-card {
    padding: 12px 0;
    border-bottom: 1px dashed #d9e2e9;
}

.list-card .list-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.list-card .list-title a {
    text-decoration: none;
    color: #1e2a3a;
}

.list-card .meta {
    font-size: 0.8rem;
}

/* list-card-detailed (image + text row) */
.list-card-detailed {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e7eef5;
}

.list-card-detailed.reverse {
    flex-direction: row-reverse;
}

.list-img {
    flex: 0 0 200px;
}

.list-img img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 16px;
}

.list-content {
    flex: 1;
}

.list-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.list-excerpt {
    color: #4f6475;
    margin-bottom: 12px;
}

/* text-card */
.text-card {
    background: #f4f9ff;
    padding: 24px;
    border-radius: 24px;
    margin-bottom: 28px;
}

/* ===== topics cloud ===== */
.topic-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin: 24px 0 16px;
}

.topic-item {
    text-decoration: none;
    background: #f0f4f9;
    padding: 8px 18px;
    border-radius: 40px;
    color: #1e2a3a;
    font-weight: 500;
    transition: 0.2s;
}

.topic-item:hover {
    background: #c9423f;
    color: white;
    transform: scale(1.03);
}

/* ===== static filter / dropdown ===== */
.static-filter {
    margin: 28px 0 8px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.filter-select {
    padding: 8px 16px;
    border: 1px solid #bccbd8;
    border-radius: 40px;
    background: white;
    font-size: 0.95rem;
    cursor: default;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 8"><path fill="%23333" d="M6 8L0 0h12z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* ===== pagination ===== */
.pagination {
    display: flex;
    gap: 8px;
    margin-top: 40px;
}

.page-link {
    padding: 8px 16px;
    border: 1px solid #ccdbe8;
    border-radius: 30px;
    text-decoration: none;
    color: #1e2a3a;
}

.page-link.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.page-link.active {
    background: #1e2a3a;
    color: white;
    border-color: #1e2a3a;
}

/* ===== breadcrumb (ol style) ===== */
.breadcrumb-ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 16px 0 12px;
    margin: 0 0 24px;
    font-size: 0.95rem;
    border-bottom: 1px solid #eaeef2;
}

.breadcrumb-ol li {
    display: flex;
    align-items: center;
    color: #6a7b8a;
}

.breadcrumb-ol li:not(:last-child)::after {
    content: "›";
    margin: 0 10px;
    color: #b0c4d9;
    font-size: 1.2rem;
    line-height: 1;
}

.breadcrumb-ol a {
    text-decoration: none;
    color: #2c5f7a;
    transition: color 0.2s;
}

.breadcrumb-ol a:hover {
    color: #a52f28;
    text-decoration: underline;
}

.breadcrumb-ol .current {
    font-weight: 500;
    color: #1e2a3a;
}

/* ===== sidebar widgets (common) ===== */
.sidebar-widget {
    margin-bottom: 40px;
    background: #fafdff;
    padding: 20px;
    border-radius: 24px;
}

.sidebar-widget h3 {
    font-size: 1.2rem;
    margin-bottom: 16px;
    border-bottom: 2px solid #d9e6f0;
    padding-bottom: 8px;
}

/* search form */
.search-form-static {
    display: flex;
}

.search-form-static input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ced9e3;
    border-radius: 40px 0 0 40px;
}

.search-form-static button {
    background: #1e2a3a;
    color: white;
    border: none;
    padding: 0 14px;
    border-radius: 0 40px 40px 0;
    cursor: default;
}

/* category list in sidebar */
.category-list-sidebar {
    list-style: none;
}

.category-list-sidebar li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #ecf3f9;
}

.category-list-sidebar a {
    text-decoration: none;
    color: #1e2a3a;
}

.category-list-sidebar a:hover {
    color: #a52f28;
}

.category-list-sidebar span {
    background: #ecf3f9;
    padding: 2px 10px;
    border-radius: 40px;
    font-size: 0.8rem;
    color: #2c5f7a;
}

/* sidebar list (for related / latest) */
.sidebar-list {
    list-style: none;
}

.sidebar-list li {
    margin-bottom: 14px;
    border-bottom: 1px dashed #e1eaf2;
    padding-bottom: 10px;
}

.sidebar-list li:last-child {
    border-bottom: none;
}

.sidebar-list a {
    text-decoration: none;
    color: #1e2a3a;
    font-weight: 500;
    transition: color 0.2s;
    display: block;
}

.sidebar-list a:hover {
    color: #a52f28;
}

.sidebar-list .meta {
    font-size: 0.8rem;
    color: #7f95ab;
    margin-top: 4px;
}

/* tag cloud (sidebar) */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-cloud a {
    background: #e6edf5;
    padding: 6px 16px;
    border-radius: 30px;
    text-decoration: none;
    color: #1e2a3a;
    font-size: 0.9rem;
}

.tag-cloud a:hover {
    background: #c9423f;
    color: white;
}

/* ===== author card (sidebar) ===== */
.author-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 24px 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.02);
    border: 1px solid #e9f0f5;
    text-align: center;
    margin-bottom: 32px;
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 16px;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.author-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #152b39;
}

.author-title {
    font-size: 0.85rem;
    color: #a52f28;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.author-bio {
    color: #4a5b6b;
    font-size: 0.95rem;
    line-height: 1.5;
    padding: 0 8px;
}

/* ===== filter bar (static) ===== */
.filter-bar-static {
    display: flex;
    align-items: center;
    gap: 24px;
    background: #f5f8fc;
    padding: 10px 18px;
    border-radius: 48px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.filter-label {
    font-weight: 600;
}

.filter-options {
    display: flex;
    gap: 12px;
}

.filter-option {
    padding: 4px 14px;
    background: white;
    border-radius: 30px;
    cursor: default;
    border: 1px solid #ccdbe8;
}

.filter-option.active {
    background: #1e2a3a;
    color: white;
    border-color: #1e2a3a;
}

.filter-select.small {
    padding: 6px 28px 6px 12px;
}

/* ===== article page specific ===== */
.two-columns {
    display: grid;
    grid-template-columns: 70% 28%;
    gap: 20px;
    margin: 32px 0;
}

@media (max-width: 900px) {
    .two-columns {
        grid-template-columns: 100%;
    }
}

.category-page-title {
    font-size: 2.4rem;
    font-weight: 400;
    margin-bottom: 16px;
    border-left: 6px solid #c9423f;
    padding-left: 18px;
}

/* article header */
.article-header {
    margin-bottom: 24px;
}

.article-body {
    font-size: 0.985rem;
    letter-spacing: 0.2px;
    color: #171717;
    line-height: 1.75;
}

.article-title {
    font-size: 2.6rem;
    line-height: 1.2;
    font-weight: 500;
    margin: 16px 0 12px;
}

.article-standfirst {
    font-size: 1.3rem;
    color: #3a4e62;
    margin: 20px 0 24px;
    line-height: 1.5;
    font-weight: 350;
    border-left: 4px solid #c9423f;
    padding-left: 20px;
}

/* author meta with avatar */
.author-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0 8px;
}

.author-meta-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.author-meta-info {
    font-weight: 500;
}

.author-meta-name {
    font-weight: 600;
    color: #1e2a3a;
}

.author-meta-date {
    font-size: 0.9rem;
    color: #6a7b8a;
}

/* article figure */
.article-figure {
    margin: 28px 0;
}

.article-img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 24px;
}

figcaption {
    color: #667e92;
    font-size: 0.9rem;
    margin-top: 8px;
}

/* article body */
.article-body p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #1f2e3c;
}

.article-body img {
    margin: 0 auto;
}

/* article tags */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 32px 0 24px;
    padding-top: 20px;
    border-top: 1px solid #eaeef2;
}

.article-tags .tag {
    background: #eef2f6;
    color: #1e2a3a;
    text-transform: none;
    font-size: 0.9rem;
}

/* author bio card (large) */
.author-bio-card {
    display: flex;
    gap: 24px;
    background: #f8fbfe;
    border-radius: 24px;
    padding: 28px;
    margin: 32px 0 24px;
    border: 1px solid #e9f0f5;
}

.author-bio-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    margin: 0 auto;
}

.author-bio-content h4 {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.author-bio-content p {
    color: #4a5b6b;
}

/* share buttons */
.share-buttons {
    display: flex;
    gap: 12px;
    margin: 16px 0;
}

.share-btn {
    background: #eef3f8;
    border: none;
    font-size: 1rem;
    padding: 8px 16px;
    border-radius: 40px;
    cursor: pointer;
    transition: 0.2s;
}

.share-btn:hover {
    background: #c9423f;
    color: white;
}

/* comments section */
.comments-section {
    margin-top: 48px;
    border-top: 2px solid #e6edf5;
    padding-top: 28px;
}

.comment {
    background: #f9fcff;
    padding: 16px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 4px;
}

.comment-meta {
    font-size: 0.8rem;
    color: #7f95ab;
    margin-bottom: 8px;
}

.comment-form {
    margin-top: 24px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 16px;
    border: 1px solid #d6e2ed;
    border-radius: 20px;
}

.comment-form button {
    background: #1e2a3a;
    color: white;
    padding: 10px 30px;
    border: none;
    border-radius: 40px;
    cursor: default;
}

/* related posts grid (inside article) */
.related-posts {
    margin-top: 48px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.related-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #eef2f6;
    transition: 0.2s;
}

.related-card:hover {
    box-shadow: 0 12px 24px rgba(0, 20, 30, 0.08);
}

.related-card img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.related-card .card-content {
    padding: 16px;
}

.related-card .card-title {
    font-size: 1.1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== author profile page ===== */
.author-profile {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 24px;
}

.author-profile-header {
    display: flex;
    gap: 40px;
    align-items: center;
    margin-bottom: 48px;
    flex-wrap: wrap;
    background: #fafcff;
    padding: 40px;
    border-radius: 32px;
    box-shadow: 0 10px 30px rgba(0, 20, 30, 0.05);
}

.author-profile-avatar {
    flex: 0 0 180px;
}

.author-profile-avatar img {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.author-profile-summary {
    flex: 1;
}

.author-profile-name {
    font-size: 2.6rem;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 8px;
    color: #152b39;
}

.author-profile-title {
    font-size: 1.2rem;
    color: #a52f28;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.author-profile-bio {
    font-size: 1.1rem;
    color: #2c4053;
    margin-bottom: 20px;
    line-height: 1.6;
}

.author-social {
    display: flex;
    gap: 16px;
}

.author-social a {
    background: #eef3f8;
    padding: 8px 18px;
    border-radius: 40px;
    text-decoration: none;
    color: #1e2a3a;
    font-weight: 500;
    transition: all 0.2s;
}

.author-social a:hover {
    background: #c9423f;
    color: white;
}

.author-detail-section {
    margin-top: 48px;
}

.author-detail-section h2 {
    font-size: 2rem;
    font-weight: 400;
    border-left: 6px solid #c9423f;
    padding-left: 18px;
    margin-bottom: 32px;
}

.author-detail-text {
    background: white;
    padding: 32px;
    border-radius: 32px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.02);
    border: 1px solid #e9f0f5;
    line-height: 1.8;
    color: #2a3f52;
}

.author-detail-text p {
    margin-bottom: 1.2rem;
}

.author-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 32px;
}

.author-article-card {
    border-radius: 20px;
    overflow: hidden;
    background: white;
    border: 1px solid #eef2f6;
    transition: 0.25s;
}

.author-article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 30px rgba(0, 20, 30, 0.1);
}

.author-article-card img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.author-article-card .card-content {
    padding: 18px;
}

.author-article-card .card-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.author-article-card .meta {
    font-size: 0.85rem;
}

/* ===== footer ===== */
.site-footer {
    background: #152b39;
    color: #e1eef9;
    padding: 20px 0;
    margin-top: 40px;
}

.site-footer p {
    text-align: center;
    margin: 0;
}

.site-footer a {
    color: #e1eef9;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
}

.footer-col .logo a {
    color: white;
}

.footer-col .logo span {
    color: #b0cedf;
}

.footer-col h4 {
    color: white;
    margin-bottom: 20px;
    font-weight: 500;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 12px;
}

.footer-col a {
    color: #cbdae6;
    text-decoration: none;
}

.footer-col a:hover {
    color: white;
    text-decoration: underline;
}

.footer-form {
    margin-top: 20px;
    display: flex;
}

.footer-form input {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 40px 0 0 40px;
    background: #2f4655;
    color: white;
}

.footer-form input::placeholder {
    color: #aebac5;
}

.footer-form button {
    background: #c9423f;
    color: white;
    border: none;
    padding: 0 16px;
    border-radius: 0 40px 40px 0;
    font-size: 1.2rem;
    cursor: default;
}

/* ===== back to top button ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #1e2a3a;
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.6rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
    transition: 0.2s;
    z-index: 99;
}

.back-to-top.show {
    display: flex;
}

.back-to-top:hover {
    background: #a52f28;
}

/* ===== responsive tweaks ===== */
@media (max-width: 900px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width:768px) {
    .share-buttons {
        flex-wrap: wrap;
    }

    .site-header {
        position: relative;
    }

    .header-flex {
        height: 50px;
    }

    .pagination {
        flex-wrap: wrap;
    }
}


@media (max-width: 640px) {
    .hamburger {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: 50px;
        left: 0;
        width: 100%;
        background: white;
        border-bottom: 1px solid #ddd;
        padding: 20px;
        display: none;
        box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1);
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 1rem;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .card-d-inner,
    .list-card-detailed,
    .author-bio-card,
    .author-profile-header {
        flex-direction: column;
    }

    .list-img {
        flex: auto;
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .article-title {
        font-size: 1.4rem;
    }

    .author-meta-avatar {
        display: none;
    }

    .author-meta {
        font-size: 0.8rem;
    }

    .author-meta-date {
        display: flex;
        font-size: 0.8rem;
    }

    .author-profile-avatar {
        flex: 0 0 auto;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .author-bio-card {
        text-align: center;
    }
}