/* Blog pages: matches the packages.php design. Loaded after style.css, so it only adds what the blog needs. */

body { font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
/* The footer's .row.g-5 overshoots the screen edge by a few px on phones and causes sideways scrolling */
.footer { overflow-x: hidden; }

.text-gradient {
    background: linear-gradient(135deg, var(--brand-red, #d90429), #ff4d4d);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}
.text-gradient-blue {
    background: linear-gradient(135deg, var(--brand-blue, #1a528a), #0f3057);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---------- Hero (plain gradient, no background photo, so it costs nothing to load) ---------- */
.blog-hero {
    background:
        radial-gradient(ellipse at 80% 0%, rgba(26, 82, 138, .45), transparent 55%),
        linear-gradient(135deg, #0a2540 0%, #041220 100%);
    padding: 90px 0 80px;
}
.blog-hero-chip {
    display: inline-block; padding: 7px 16px; margin-bottom: 18px; border-radius: 50px;
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2);
    color: #fff; font-size: .85rem; font-weight: 500;
}
.blog-hero-sub { max-width: 620px; }
.blog-search { position: relative; max-width: 480px; }
.blog-search input {
    width: 100%; border: 0; border-radius: 50px; padding: 15px 56px 15px 24px;
    font-size: 1rem; outline: none; box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.blog-search button {
    position: absolute; right: 6px; top: 6px; width: 44px; height: 44px; border: 0; border-radius: 50%;
    background: var(--brand-blue, #1a528a); color: #fff; cursor: pointer;
}
.blog-search button:hover { background: var(--brand-red, #d90429); }

/* ---------- List ---------- */
.blog-list { background: #f8f9fa; padding: 60px 0 90px; }
.blog-list.related { padding: 60px 0; }

.blog-pills { margin-bottom: 40px; }
.blog-pills .nav-link {
    display: inline-block; margin: 0 5px 10px; padding: 10px 22px; border-radius: 50px;
    background: #fff; border: 2px solid #e2e8f0; color: var(--brand-blue, #1a528a);
    font-weight: 700; font-size: .92rem; text-decoration: none; transition: all .25s ease;
}
.blog-pills .nav-link small { font-weight: 500; opacity: .7; }
.blog-pills .nav-link:hover,
.blog-pills .nav-link.current {
    background: var(--brand-blue, #1a528a); border-color: var(--brand-blue, #1a528a); color: #fff;
    box-shadow: 0 10px 20px rgba(26, 82, 138, .2);
}

.blog-card {
    background: #fff; border-radius: 24px; overflow: hidden; height: 100%;
    display: flex; flex-direction: column; border: 2px solid transparent;
    box-shadow: 0 15px 35px rgba(0, 0, 0, .05); transition: transform .3s ease, box-shadow .3s ease;
}
.blog-card:hover { transform: translateY(-8px); box-shadow: 0 25px 50px rgba(0, 0, 0, .1); border-color: rgba(26, 82, 138, .1); }
.blog-card-media { display: block; aspect-ratio: 16 / 10; background: #e9eef4; overflow: hidden; }
.blog-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.blog-card:hover .blog-card-media img { transform: scale(1.04); }
.blog-card-ph {
    display: flex; width: 100%; height: 100%; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #0a2540, #1a528a); color: rgba(255, 255, 255, .35); font-size: 3rem;
}
.blog-card-body { padding: 24px 26px 28px; display: flex; flex-direction: column; flex-grow: 1; }
.blog-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: .8rem; color: #64748b; margin-bottom: 12px; }
.blog-badge {
    display: inline-block; padding: 4px 14px; border-radius: 50px; font-size: .78rem; font-weight: 700;
    color: var(--brand-red, #d90429); background: rgba(217, 4, 41, .07); text-decoration: none;
}
.blog-badge:hover { background: var(--brand-red, #d90429); color: #fff; }
.blog-badge.on-dark { background: rgba(255, 255, 255, .12); color: #fff; margin-bottom: 14px; }
.blog-badge.on-dark:hover { background: var(--brand-red, #d90429); }
.blog-card-title { font-size: 1.15rem; font-weight: 800; line-height: 1.4; margin: 0 0 10px; }
.blog-card-title a { color: var(--brand-blue, #1a528a); text-decoration: none; }
.blog-card-title a:hover { color: var(--brand-red, #d90429); }
.blog-card-text {
    color: #555; font-size: .93rem; line-height: 1.65; margin-bottom: 18px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-more { margin-top: auto; font-weight: 700; font-size: .9rem; color: var(--brand-blue, #1a528a); text-decoration: none; }
.blog-more i { font-size: .75rem; margin-left: 4px; transition: margin .2s; }
.blog-more:hover { color: var(--brand-red, #d90429); }
.blog-more:hover i { margin-left: 9px; }

.blog-empty-box { background: #fff; border-radius: 24px; padding: 70px 20px; box-shadow: 0 15px 35px rgba(0, 0, 0, .05); }
.blog-empty-box > i { font-size: 3rem; color: #cbd5e1; }
.blog-empty { padding: 120px 0; }

.btn-blog {
    display: inline-block; padding: 13px 28px; border-radius: 50px; font-weight: 700; font-size: .95rem;
    background: var(--brand-blue, #1a528a); color: #fff; text-decoration: none; border: 0;
    box-shadow: 0 10px 20px rgba(26, 82, 138, .2); transition: all .25s;
}
.btn-blog:hover { background: var(--brand-red, #d90429); color: #fff; transform: translateY(-2px); }
.btn-blog-light { background: #fff; color: var(--brand-blue, #1a528a); box-shadow: none; }
.btn-blog-light:hover { background: #fff; color: var(--brand-red, #d90429); }
.btn-blog-ghost { background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, .5); box-shadow: none; padding: 11px 26px; }
.btn-blog-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.blog-pagination { --bs-pagination-color: var(--brand-blue, #1a528a); --bs-pagination-active-bg: var(--brand-blue, #1a528a); --bs-pagination-active-border-color: var(--brand-blue, #1a528a); --bs-pagination-hover-color: var(--brand-red, #d90429); --bs-pagination-border-radius: 50px; flex-wrap: wrap; gap: 4px; }
.blog-pagination .page-link { border-radius: 50px !important; border: 2px solid #e2e8f0; font-weight: 600; min-width: 44px; text-align: center; }

/* ---------- Single post ---------- */
.preview-bar { background: #fff3cd; color: #664d03; text-align: center; padding: 10px 16px; font-size: .9rem; font-weight: 600; }
.post-hero { padding: 70px 0 110px; text-align: center; }
.post-title { color: #fff; font-weight: 800; font-size: clamp(1.8rem, 4.2vw, 2.9rem); line-height: 1.25; max-width: 860px; margin: 0 auto 20px; }
.crumbs { font-size: .85rem; color: rgba(255, 255, 255, .6); margin-bottom: 22px; }
.crumbs a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs span { margin: 0 8px; opacity: .5; }
.crumbs em { font-style: normal; }
.post-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; color: rgba(255, 255, 255, .75); font-size: .9rem; }
.post-meta i { margin-right: 6px; color: #ff6b81; }

.post-wrap { max-width: 860px; margin-left: auto; margin-right: auto; padding-bottom: 60px; }
.post-cover { margin: -70px 0 40px; border-radius: 20px; overflow: hidden; box-shadow: 0 25px 50px rgba(0, 0, 0, .15); aspect-ratio: 16 / 9; background: #e9eef4; position: relative; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-wrap > .post-content:first-child { margin-top: 50px; }

.post-content { font-size: 1.06rem; line-height: 1.85; color: #2d3748; overflow-wrap: break-word; }
.post-content > :first-child { margin-top: 0; }
.post-content h2, .post-content h3, .post-content h4 { color: var(--brand-blue, #1a528a); font-weight: 800; line-height: 1.35; margin: 2.2rem 0 .9rem; }
.post-content h2 { font-size: 1.7rem; }
.post-content h3 { font-size: 1.35rem; }
.post-content h4 { font-size: 1.15rem; }
.post-content p { margin-bottom: 1.3rem; }
.post-content a { color: var(--brand-red, #d90429); text-decoration: underline; text-underline-offset: 3px; }
.post-content img, .post-content video { max-width: 100%; height: auto; border-radius: 14px; }
.post-content figure { margin: 2rem 0; }
.post-content figure img { display: block; margin: 0 auto; }
.post-content figcaption { text-align: center; font-size: .88rem; color: #64748b; margin-top: 10px; }
.post-content ul, .post-content ol { margin-bottom: 1.4rem; padding-left: 1.6rem; }
.post-content li { margin-bottom: .45rem; }
.post-content blockquote { margin: 2rem 0; padding: 18px 26px; border-left: 5px solid var(--brand-red, #d90429); background: #f8fafc; border-radius: 0 14px 14px 0; font-style: italic; color: #475569; }
.post-content blockquote p:last-child { margin-bottom: 0; }
.post-content pre { background: #0f172a; color: #e2e8f0; padding: 18px 22px; border-radius: 14px; overflow-x: auto; font-size: .9rem; line-height: 1.6; margin-bottom: 1.5rem; }
.post-content code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
.post-content :not(pre) > code { background: #eef2f7; padding: 2px 7px; border-radius: 6px; color: #b4233a; }
.post-content table { width: 100%; border-collapse: collapse; margin: 0 0 1.6rem; display: block; overflow-x: auto; }
.post-content th, .post-content td { border: 1px solid #e2e8f0; padding: 10px 14px; text-align: left; vertical-align: top; }
.post-content th { background: #f1f5f9; font-weight: 700; }
.post-content hr { border: 0; border-top: 2px solid #e2e8f0; margin: 2.5rem 0; opacity: 1; }
.post-content iframe { max-width: 100%; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 14px; }
.post-content mark { background: #fff3a3; padding: 0 3px; }

.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px; padding-top: 26px; border-top: 1px solid #e2e8f0; }
.post-tags a { padding: 5px 15px; border-radius: 50px; background: #f1f5f9; color: #475569; font-size: .85rem; font-weight: 600; text-decoration: none; }
.post-tags a:hover { background: var(--brand-blue, #1a528a); color: #fff; }

.post-share { display: flex; align-items: center; gap: 10px; margin-top: 26px; }
.post-share strong { font-size: .95rem; margin-right: 4px; }
.post-share a, .post-share button {
    width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: #f1f5f9; color: var(--brand-blue, #1a528a); border: 0; text-decoration: none; cursor: pointer; transition: all .2s;
}
.post-share a:hover, .post-share button:hover, .post-share button.done { background: var(--brand-blue, #1a528a); color: #fff; }

.post-cta {
    margin-top: 50px; padding: 44px 36px; border-radius: 24px; text-align: center; color: #fff;
    background: radial-gradient(ellipse at 90% 0%, rgba(26, 82, 138, .55), transparent 60%), linear-gradient(135deg, #0a2540, #041220);
}
.post-cta h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: 10px; }
.post-cta p { color: rgba(255, 255, 255, .75); margin-bottom: 24px; }
.post-cta .btn-blog { margin: 4px; }

/* ---------- Cookie notice (moved here from the inline styles of the main pages) ---------- */
.cookie-widget {
    position: fixed; bottom: 30px; left: -400px; width: 320px; background: #0f172a; color: #f8fafc;
    padding: 20px; border-radius: 16px; z-index: 9999; visibility: hidden; opacity: 0;
    transition: all .5s cubic-bezier(.4, 0, .2, 1); border: 1px solid rgba(255, 255, 255, .1);
}
.cookie-widget.show { left: 30px; visibility: visible; opacity: 1; }
.cookie-header { display: flex; align-items: center; }
.cookie-content p { font-size: .85rem; line-height: 1.5; color: #cbd5e1; }
.cookie-content a { color: #38bdf8; text-decoration: none; font-weight: 600; }
.cookie-content a:hover { text-decoration: underline; }
.cookie-actions button { border-radius: 8px; padding: 8px 0; }
.cookie-actions .btn-outline-light:hover { background-color: rgba(255, 255, 255, .1); color: #fff !important; }

@media (max-width: 576px) {
    .blog-hero { padding: 60px 0 56px; }
    .post-hero { padding: 50px 0 90px; }
    .post-cta { padding: 34px 22px; }
    .cookie-widget { width: calc(100% - 40px); left: 50%; bottom: -300px; transform: translateX(-50%); }
    .cookie-widget.show { bottom: 20px; left: 50%; }
}
