/* ==========================================================================
   Christlinks Blog — additions on top of the church theme (custom.css)
   ========================================================================== */

.skip-to-content {
    position: absolute; left: 12px; top: -60px; z-index: 2000; background: var(--accent-color); color: #fff;
    padding: 10px 16px; border-radius: 0 0 12px 0;
}
.skip-to-content:focus { top: 12px; color: #fff; }

/* Page header uses the optimised church photo (or the post's own image). */
.page-header { background-image: url('../images/page-header.jpg'); }
.page-header.has-image::before { opacity: 60%; }
.page-header-box h1 { font-size: 64px; overflow-wrap: anywhere; }
.page-header-box p.lead { color: rgba(255, 255, 255, .88); max-width: 720px; margin: -6px auto 22px; font-size: 18px; }
.page-header.post-header { padding: 190px 0 80px; }
.page-header.post-header .page-header-box h1 { font-size: 52px; text-transform: none; line-height: 1.15; max-width: 1000px; margin-left: auto; margin-right: auto; }
@media (max-width: 991px) {
    .page-header-box h1 { font-size: 44px; }
    .page-header.post-header .page-header-box h1 { font-size: 36px; }
}
@media (max-width: 575px) {
    .page-header-box h1 { font-size: 34px; }
    .page-header.post-header .page-header-box h1 { font-size: 28px; }
}

.post-header-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; color: rgba(255, 255, 255, .9); font-size: 16px; margin: 0; padding: 0; list-style: none; }
.post-header-meta li { display: inline-flex; align-items: center; gap: 8px; }
.post-header-meta a { color: #fff; }
.post-header-meta a:hover { color: var(--secondary-color); }
.post-header-meta i { color: var(--secondary-color); }

.footer-info-box-content a, .footer-info-box-content a:hover { color: inherit; }
.footer-privacy-policy ul li a i { margin-right: 4px; }

/* ---------- Blog toolbar: categories + search ---------- */
.blog-toolbar { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: 40px; }
.category-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.category-chips a {
    display: inline-block; padding: 8px 18px; border-radius: 0 0 16px 0; background: var(--secondary-color);
    color: var(--accent-color); font-weight: 600; text-transform: capitalize; transition: all .3s ease-in-out;
}
.category-chips a:hover, .category-chips a.active { background: var(--accent-color); color: var(--white-color); }

.search-form { display: flex; min-width: 280px; max-width: 100%; }
.search-form input {
    flex: 1; min-width: 0; border: 1px solid var(--dark-divider-color); border-right: 0; padding: 12px 18px;
    border-radius: 100px 0 0 100px; font-size: 16px; color: var(--primary-color); outline: none;
}
.search-form input:focus { border-color: var(--accent-color); }
.search-form button {
    border: 0; background: var(--accent-color); color: #fff; padding: 0 20px; border-radius: 0 100px 100px 0; font-size: 16px;
}
.search-form button:hover { background: var(--primary-color); }
@media (max-width: 575px) { .search-form { min-width: 0; width: 100%; } }

/* ---------- Featured post ---------- */
.featured-post { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: center; margin-bottom: 60px; }
.featured-post .post-featured-image { border-radius: 0 0 100px 0; overflow: hidden; }
.featured-post .post-featured-image img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .5s ease-in-out; }
.featured-post:hover .post-featured-image img { transform: scale(1.05); }
.featured-post .featured-label { display: inline-block; font-size: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--active-color); margin-bottom: 14px; }
.featured-post h2 { font-size: 40px; line-height: 1.15; margin-bottom: 16px; }
.featured-post h2 a { color: var(--primary-color); }
.featured-post h2 a:hover { color: var(--accent-color); }
.featured-post p { font-size: 18px; }
@media (max-width: 991px) {
    .featured-post { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .featured-post h2 { font-size: 30px; }
}

/* ---------- Post cards ---------- */
/* width/height attributes are only hints for layout; the theme's aspect ratios decide the shape. */
.blog-item .post-featured-image img, .featured-post .post-featured-image img, .post-image img, .event-card .event-card-image img { width: 100%; height: auto; }
.post-item-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--text-color); margin-bottom: 10px; }
.post-item-meta i { color: var(--accent-color); margin-right: 5px; }
.post-item-meta a { color: inherit; }
.post-item-meta a:hover { color: var(--accent-color); }
.blog-item .post-item-body { max-width: none; }
.blog-item .post-item-body p { margin: -8px 0 0; font-size: 16px; }
.blog-item .post-featured-image .no-image {
    display: grid; place-items: center; aspect-ratio: 1 / 0.75; background: linear-gradient(135deg, var(--accent-color), #1a0050);
    border-radius: 0 0 80px 0; color: rgba(255, 255, 255, .85); font-size: 42px;
}

/* ---------- Pagination (theme style, Bootstrap-free) ---------- */
.page-pagination ul { display: flex; list-style: none; flex-wrap: wrap; gap: 6px; }
.page-pagination ul li span.gap { background: transparent; }

/* ---------- Single post ---------- */
.page-single-post { padding: 80px 0 100px; }
.post-image figure, .post-image img { width: 100%; }
.post-entry { font-size: 18px; line-height: 1.75; overflow-wrap: break-word; }
.post-entry img { max-width: 100%; height: auto; border-radius: 0 0 40px 0; }
.post-entry figure { margin: 30px 0; }
.post-entry figure.image { display: table; margin-left: auto; margin-right: auto; }
.post-entry figure.image img { display: block; }
.post-entry figure.align-left, .post-entry .align-left { float: left; margin: 6px 30px 20px 0; max-width: 50%; }
.post-entry figure.align-right, .post-entry .align-right { float: right; margin: 6px 0 20px 30px; max-width: 50%; }
.post-entry figcaption { display: table-caption; caption-side: bottom; font-size: 15px; color: var(--text-color); padding-top: 10px; text-align: center; }
.post-entry figure.audio, .post-entry figure.video { display: block; }
.post-entry figure.audio figcaption, .post-entry figure.video figcaption { display: block; text-align: left; }
.post-entry audio { width: 100%; }
.post-entry video { width: 100%; max-height: 560px; background: #000; border-radius: 0 0 40px 0; }
.post-entry iframe { max-width: 100%; border: 0; display: block; margin: 30px auto; }
.post-entry iframe[src*="youtube"], .post-entry iframe[src*="vimeo"], .post-entry iframe[src*="facebook.com/plugins/video"] {
    width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 0 0 40px 0;
}
.post-entry iframe[src*="google.com/maps"] { width: 100%; height: 420px; }
.post-entry table { width: 100%; border-collapse: collapse; margin: 30px 0; font-size: 16px; }
.post-entry th, .post-entry td { border: 1px solid var(--dark-divider-color); padding: 10px 14px; }
.post-entry th { background: var(--secondary-color); color: var(--primary-color); }
.post-entry pre { background: #1b1540; color: #eee; padding: 18px; border-radius: 0 0 30px 0; overflow: auto; font-size: 15px; }
.post-entry blockquote.scripture { background-color: #f3eefc; }
.post-entry blockquote.scripture p { font-style: italic; }
.post-entry .callout { margin: 30px 0; padding: 24px 28px; border: 2px dashed var(--accent-color); border-radius: 0 0 40px 0; background: #faf8ff; }
.post-entry .lead { font-size: 22px; color: var(--primary-color); }
.post-entry .button-link { display: inline-block; background: var(--accent-color); color: #fff; padding: 12px 26px; border-radius: 100px; font-weight: 700; }
.post-entry .button-link:hover { background: var(--primary-color); color: #fff; }
.post-entry a.file-download {
    display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border: 1px solid var(--dark-divider-color);
    border-radius: 0 0 20px 0; font-weight: 600;
}
.post-entry a.file-download::before { content: "\f019"; font-family: "Font Awesome 6 Free"; font-weight: 900; }
.post-entry details { border: 1px solid var(--dark-divider-color); border-radius: 0 0 20px 0; padding: 14px 20px; margin: 20px 0; }
.post-entry summary { font-weight: 700; color: var(--primary-color); cursor: pointer; }
.post-entry ul li::marker { color: var(--accent-color); }
@media (max-width: 767px) {
    .post-entry { font-size: 17px; }
    .post-entry figure.align-left, .post-entry figure.align-right, .post-entry .align-left, .post-entry .align-right { float: none; margin: 20px auto; max-width: 100%; }
}

.post-footer-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.post-social-sharing ul li a { cursor: pointer; border: 0; }
.post-social-sharing button { border: 0; padding: 0; background: none; }

.author-box {
    display: flex; gap: 24px; align-items: center; margin-top: 50px; padding: 30px; background: var(--secondary-color); border-radius: 0 0 60px 0;
}
.author-box .author-avatar {
    flex: 0 0 90px; width: 90px; height: 90px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
    background: var(--accent-color); color: #fff; font-size: 30px; font-weight: 700;
}
.author-box .author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-box h3 { font-size: 22px; margin-bottom: 6px; }
.author-box h3 a { color: var(--primary-color); }
.author-box p { margin: 0; }
@media (max-width: 575px) { .author-box { flex-direction: column; text-align: center; } }

.section-heading { font-size: 34px; font-weight: 700; text-transform: uppercase; margin-bottom: 30px; }
.section-heading span { color: var(--accent-color); }
.related-posts { margin-top: 80px; }

/* ---------- Comments ---------- */
.comments-area { margin-top: 70px; }
.comment-list { list-style: none; padding: 0; margin: 0 0 40px; }
.comment-list .children { list-style: none; padding-left: 60px; margin: 0; }
.comment { display: flex; gap: 18px; padding: 24px 0; border-bottom: 1px solid var(--dark-divider-color); }
.comment-body { flex: 1; min-width: 0; }
.comment-avatar {
    flex: 0 0 50px; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center;
    background: var(--secondary-color); color: var(--accent-color); font-weight: 700;
}
.comment-avatar.staff { background: var(--accent-color); color: #fff; }
.comment-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin-bottom: 8px; }
.comment-meta strong { color: var(--primary-color); font-size: 18px; }
.comment-meta .staff-badge { font-size: 12px; background: var(--accent-color); color: #fff; padding: 2px 8px; border-radius: 0 0 8px 0; }
.comment-meta time { font-size: 14px; }
.comment-text { white-space: pre-line; overflow-wrap: anywhere; margin-bottom: 8px; }
.comment-reply { font-weight: 600; color: var(--accent-color); font-size: 15px; }
.comment .comment { padding-bottom: 0; border-bottom: 0; }
@media (max-width: 575px) { .comment-list .children { padding-left: 24px; } }

.comment-respond { background: var(--secondary-color); padding: 40px; border-radius: 0 0 80px 0; margin-top: 20px; }
.comment-respond h3 { font-size: 28px; margin-bottom: 8px; }
.comment-respond .form-control { border: 0; border-radius: 0 0 20px 0; padding: 14px 18px; font-size: 16px; box-shadow: none; }
.comment-respond .form-control:focus { outline: 2px solid var(--accent-color); }
.comment-respond .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.comment-notice { padding: 16px 20px; border-radius: 0 0 20px 0; margin-bottom: 24px; }
.comment-notice.success { background: #e4f7ec; color: #0b5a2e; }
.comment-notice.error { background: #fdecec; color: #8e1d1d; }
@media (max-width: 575px) { .comment-respond { padding: 26px 20px; border-radius: 0 0 40px 0; } }

/* ---------- Events ---------- */
.page-events { padding: 100px 0 70px; }
.event-card { display: flex; flex-direction: column; height: calc(100% - 30px); margin-bottom: 30px; background: #fff; border-radius: 0 0 60px 0; overflow: hidden; box-shadow: 0 10px 40px rgba(50, 0, 145, .08); }
.event-card .event-card-image { position: relative; }
.event-card .event-card-image img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.event-card .event-card-image .no-image { aspect-ratio: 16 / 10; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent-color), #1a0050); color: #fff; font-size: 40px; }
.date-badge {
    position: absolute; left: 20px; top: 20px; background: #fff; border-radius: 0 0 20px 0; padding: 10px 16px; text-align: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .15); line-height: 1;
}
.date-badge strong { display: block; font-size: 30px; color: var(--accent-color); }
.date-badge span { font-size: 14px; font-weight: 700; text-transform: uppercase; color: var(--primary-color); }
.event-card-body { padding: 26px 28px 30px; display: flex; flex-direction: column; flex: 1; }
.event-card-body h2 { font-size: 24px; margin-bottom: 14px; }
.event-card-body h2 a { color: var(--primary-color); }
.event-card-body h2 a:hover { color: var(--accent-color); }
.event-facts { list-style: none; padding: 0; margin: 0 0 16px; }
.event-facts li { display: flex; gap: 10px; margin-bottom: 8px; }
.event-facts i { color: var(--accent-color); margin-top: 5px; width: 16px; text-align: center; }
.event-card-body .read-more-btn { margin-top: auto; }
.past-events .event-card { opacity: .85; }
.post-image.event-flyer figure, .post-image.event-flyer img { aspect-ratio: auto; max-height: none; }
.event-detail-facts { background: var(--secondary-color); border-radius: 0 0 60px 0; padding: 30px; margin-bottom: 30px; }
.event-detail-facts .event-facts li { font-size: 17px; color: var(--primary-color); }
.event-detail-facts .btn-default { margin: 6px 10px 0 0; }
.calendar-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.calendar-links a { font-weight: 600; color: var(--accent-color); }

/* ---------- Empty states, preview bar, edit button ---------- */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state i { font-size: 44px; color: var(--accent-color); margin-bottom: 18px; }
.empty-state h2 { font-size: 30px; margin-bottom: 12px; }

.preview-bar {
    position: sticky; top: 0; z-index: 2000; background: var(--active-color); color: #fff; text-align: center;
    padding: 10px 16px; font-size: 16px;
}
.preview-bar button { margin-left: 14px; border: 1px solid rgba(255, 255, 255, .7); background: transparent; color: #fff; border-radius: 100px; padding: 2px 14px; }

.admin-edit-button {
    position: fixed; right: 20px; bottom: 20px; z-index: 1500; background: var(--accent-color); color: #fff;
    padding: 12px 20px; border-radius: 100px; font-weight: 700; box-shadow: 0 8px 24px rgba(50, 0, 145, .35);
}
.admin-edit-button:hover { background: var(--primary-color); color: #fff; }

.reading-progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--active-color); z-index: 1100; width: 0; }

/* Smoother cards without the theme's animation scripts */
.blog-item, .event-card { animation: rise .5s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .blog-item, .event-card { animation: none; } }
