/* Bukit Piniapat – blog: landing-page section, header menu, index/archives and single posts.
   Loaded after bp-front.css (shares its tokens: --forest-green, --sunset-gold, --gutter …). */

/* ==================== HEADER: BLOG MENU ==================== */
.dropdown-menu-blog { min-width: 300px; max-width: 340px; }
.dropdown-menu .blog-menu-link { display: flex; flex-direction: column; gap: 2px; white-space: normal; }
.blog-menu-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.blog-menu-date { font-size: 0.72rem; color: #7A847E; font-weight: 500; }
.dropdown-menu .blog-menu-all { border-top: 1px solid var(--border-light); margin-top: 6px; padding-top: 6px; }
.dropdown-menu .blog-menu-all a { font-family: 'Montserrat', sans-serif; font-weight: 700; color: var(--sunset-gold); display: flex; align-items: center; gap: 8px; }
.mobile-nav .mobile-sublink-all { color: var(--sunset-gold); font-weight: 700 !important; }

/* ==================== CARDS & GRID ==================== */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: clamp(20px, 3vw, 32px); }
@media (min-width: 1000px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }

.blog-card {
    display: flex; flex-direction: column; background: var(--sky-white); border-radius: var(--radius-card);
    overflow: hidden; box-shadow: var(--shadow-card); border: 1px solid var(--border-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.blog-card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #E9EFEA; }
.blog-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s ease; }
.blog-card:hover .blog-card-media img { transform: scale(1.04); }
.blog-card-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #EEF3EE, #F8F4EA); }
.blog-card-placeholder .bp-logo { width: 96px; height: 96px; opacity: 0.85; }
.blog-card-placeholder i { font-size: 2.4rem; color: var(--forest-green); opacity: 0.4; }
.blog-card-body { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 26px; flex: 1; }
.blog-card-title { font-family: 'Montserrat', sans-serif; font-size: 1.12rem; line-height: 1.35; font-weight: 700; }
.blog-card-title a { color: var(--deep-forest); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; transition: color 0.2s; }
.blog-card-title a:hover { color: var(--sunset-gold); }
.blog-card-excerpt { color: #59605C; font-size: 0.93rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card-link { margin-top: auto; padding-top: 6px; display: inline-flex; align-items: center; gap: 8px; font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 0.85rem; color: var(--sunset-gold); min-height: 44px; }
.blog-card-link i { transition: transform 0.2s; }
.blog-card-link:hover i { transform: translateX(4px); }

.blog-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 0.8rem; color: #6B746F; }
.blog-meta-sep { opacity: 0.6; }
.blog-chip { background: #EAF2EC; color: var(--forest-green); font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.6px; padding: 4px 10px; border-radius: var(--radius-btn); }

.blog-more-cta { text-align: center; margin-top: clamp(28px, 4vw, 44px); }
.blog-all-btn { width: auto; display: inline-flex; align-items: center; gap: 10px; padding: 0 28px; }

/* Landing-page section */
.blog-home-section { background: var(--soft-ecru); }

/* ==================== HERO (index, archives, single) ==================== */
.blog-hero {
    position: relative; color: var(--sky-white); text-align: center;
    padding: calc(var(--header-height) + clamp(40px, 7vw, 80px)) 0 clamp(48px, 7vw, 84px);
    background: radial-gradient(1200px 400px at 50% -10%, rgba(192, 107, 0, 0.28), transparent 70%), linear-gradient(160deg, #14361D 0%, #1E4D2B 60%, #12301A 100%);
    background-size: cover; background-position: center;
}
.blog-hero-inner { position: relative; z-index: 1; max-width: 860px; }
.blog-hero h1 { color: var(--sky-white); font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.15; margin: 4px 0 14px; text-wrap: balance; }
.blog-hero p { color: rgba(255, 255, 255, 0.85); font-size: clamp(1rem, 2vw, 1.12rem); max-width: 640px; margin: 0 auto; }
.blog-hero .section-eyebrow { color: #F2B544; }
.blog-hero .section-eyebrow::before, .blog-hero .section-eyebrow::after { background-color: #F2B544; }

.blog-hero-post { text-align: left; }
.blog-hero-post .blog-hero-inner { max-width: 820px; }
.blog-hero-post.has-image { min-height: min(68vh, 620px); display: flex; align-items: flex-end; }
.blog-hero-post.has-image::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 26, 14, 0.55) 0%, rgba(10, 26, 14, 0.25) 35%, rgba(10, 26, 14, 0.85) 100%); }
.blog-hero-post.has-image .blog-hero-inner { width: 100%; }
.blog-breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.82rem; color: rgba(255, 255, 255, 0.75); margin-bottom: 12px; }
.blog-breadcrumb a { color: rgba(255, 255, 255, 0.9); }
.blog-breadcrumb a:hover { color: #F2B544; }
.blog-meta-hero { color: rgba(255, 255, 255, 0.85); font-size: 0.9rem; gap: 8px 10px; }
.blog-author { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--sky-white); }
.blog-avatar { width: 32px; height: 32px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.6); }

/* ==================== INDEX: FILTER, PAGINATION, EMPTY ==================== */
.blog-list-section { background: var(--soft-ecru); }
.blog-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: clamp(28px, 4vw, 44px); }
.blog-filter-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: var(--radius-btn); border: 1px solid #D9E1DB; background: var(--sky-white); color: var(--charcoal); font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 0.85rem; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.blog-filter-chip:hover { border-color: var(--forest-green); color: var(--forest-green); }
.blog-filter-chip.is-active { background: var(--forest-green); border-color: var(--forest-green); color: var(--sky-white); }

.blog-pagination { margin-top: clamp(32px, 5vw, 52px); }
.blog-pagination ul.page-numbers { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.blog-pagination .page-numbers a, .blog-pagination .page-numbers span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 12px; background: var(--sky-white); border: 1px solid var(--border-light); color: var(--charcoal); font-weight: 600; }
.blog-pagination a.page-numbers:hover { border-color: var(--forest-green); color: var(--forest-green); }
.blog-pagination span.current { background: var(--forest-green); border-color: var(--forest-green); color: var(--sky-white); }
.blog-pagination span.dots { background: none; border: none; }

.blog-empty { text-align: center; max-width: 520px; margin: 0 auto; padding: 48px 24px; background: var(--sky-white); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.blog-empty i { font-size: 2.4rem; color: var(--sunset-gold); margin-bottom: 14px; }
.blog-empty p { color: #555; margin-bottom: 22px; }

/* ==================== SINGLE POST ==================== */
.blog-article-wrap { max-width: 760px; padding-top: clamp(36px, 6vw, 64px); padding-bottom: clamp(36px, 6vw, 64px); }

.entry-content { font-size: 1.075rem; line-height: 1.8; color: #2F3532; overflow-wrap: break-word; }
.entry-content > * + * { margin-top: 1.25em; }
.entry-content h2, .entry-content h3, .entry-content h4 { font-family: 'Montserrat', sans-serif; color: var(--deep-forest); line-height: 1.3; margin-top: 1.9em; }
.entry-content h2 { font-size: clamp(1.4rem, 3vw, 1.75rem); }
.entry-content h3 { font-size: clamp(1.2rem, 2.4vw, 1.35rem); }
.entry-content h4 { font-size: 1.1rem; }
.entry-content h2 + *, .entry-content h3 + *, .entry-content h4 + * { margin-top: 0.6em; }
.entry-content a { color: var(--forest-green); text-decoration: underline; text-decoration-color: rgba(24, 64, 34, 0.35); text-underline-offset: 3px; }
.entry-content a:hover { color: var(--sunset-gold); text-decoration-color: currentColor; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li + li { margin-top: 0.45em; }
.entry-content li::marker { color: var(--sunset-gold); }
.entry-content strong { color: #1F2622; }
.entry-content blockquote, .entry-content .wp-block-quote { border-left: 4px solid var(--sunset-gold); background: #FFF9EF; padding: 18px 22px; border-radius: 0 12px 12px 0; font-style: italic; color: #3E4440; }
.entry-content blockquote cite { display: block; margin-top: 8px; font-style: normal; font-size: 0.85rem; color: #6B746F; }
.entry-content img { max-width: 100%; height: auto; border-radius: 12px; }
.entry-content figure { margin-left: 0; margin-right: 0; }
.entry-content figcaption, .entry-content .wp-element-caption { font-size: 0.85rem; color: #6B746F; text-align: center; margin-top: 8px; }
.entry-content .alignwide { width: min(1040px, calc(100vw - 2 * var(--gutter))); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.entry-content .alignfull { width: 100vw; max-width: none; margin-left: 50%; transform: translateX(-50%); }
.entry-content .alignfull img { border-radius: 0; }
.entry-content .alignleft { float: left; margin: 0.3em 1.5em 1em 0; max-width: 50%; }
.entry-content .alignright { float: right; margin: 0.3em 0 1em 1.5em; max-width: 50%; }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; text-align: center; }
.entry-content::after { content: ''; display: table; clear: both; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.entry-content th, .entry-content td { border: 1px solid var(--border-light); padding: 10px 12px; text-align: left; }
.entry-content th { background: #F1F5F2; font-family: 'Montserrat', sans-serif; }
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content pre, .entry-content code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; }
.entry-content pre { background: #1F2622; color: #EDEFEA; padding: 18px; border-radius: 12px; overflow-x: auto; }
.entry-content :not(pre) > code { background: #EEF2EF; padding: 2px 6px; border-radius: 6px; }
.entry-content hr { border: 0; height: 1px; background: var(--border-light); margin: 2.4em 0; }
.entry-content .wp-block-button__link { background: var(--forest-green); color: var(--sky-white); border-radius: var(--radius-btn); padding: 12px 26px; text-decoration: none; font-family: 'Montserrat', sans-serif; font-weight: 700; }
.entry-content .wp-block-button__link:hover { background: var(--deep-forest); color: var(--sky-white); }
.entry-content .wp-block-embed iframe, .entry-content iframe { max-width: 100%; border-radius: 12px; }
.entry-content .wp-block-gallery img { border-radius: 8px; }
@media (max-width: 600px) { .entry-content .alignleft, .entry-content .alignright { float: none; max-width: 100%; margin: 1.2em 0; } }

.blog-page-links { margin-top: 2em; font-weight: 600; }
.blog-updated { margin-top: 28px; font-size: 0.85rem; color: #6B746F; }

.blog-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.blog-tags a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: var(--radius-btn); background: #EAF2EC; color: var(--forest-green); font-size: 0.85rem; font-weight: 600; }
.blog-tags a:hover { background: var(--forest-green); color: var(--sky-white); }

.blog-share { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 36px; padding: 18px 0; border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); }
.blog-share-label { font-family: 'Montserrat', sans-serif; font-weight: 700; color: var(--deep-forest); font-size: 0.95rem; }
.blog-share-buttons { display: flex; gap: 10px; }
.blog-share-btn { position: relative; width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border-light); background: var(--sky-white); color: var(--charcoal); font-size: 1.05rem; cursor: pointer; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.blog-share-btn.is-wa:hover { background: #25D366; border-color: #25D366; color: #fff; }
.blog-share-btn.is-fb:hover { background: #1877F2; border-color: #1877F2; color: #fff; }
.blog-share-btn.is-copy:hover { background: var(--forest-green); border-color: var(--forest-green); color: #fff; }
.blog-copy-done { position: absolute; bottom: calc(100% + 8px); right: 0; white-space: nowrap; background: var(--deep-forest); color: #fff; font-size: 0.75rem; padding: 5px 10px; border-radius: 6px; opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity 0.2s, transform 0.2s; }
.blog-share-btn.is-copied .blog-copy-done { opacity: 1; transform: translateY(0); }

.blog-prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.blog-prevnext-link { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border-radius: var(--radius-card); background: var(--sky-white); border: 1px solid var(--border-light); box-shadow: var(--shadow-card); transition: border-color 0.2s, transform 0.2s; }
.blog-prevnext-link:hover { border-color: var(--forest-green); transform: translateY(-2px); }
.blog-prevnext-link.is-next { text-align: right; align-items: flex-end; }
.blog-prevnext-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.8px; font-weight: 700; color: var(--sunset-gold); display: inline-flex; align-items: center; gap: 6px; }
.blog-prevnext-title { font-family: 'Montserrat', sans-serif; font-weight: 700; color: var(--deep-forest); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 600px) { .blog-prevnext { grid-template-columns: 1fr; } .blog-prevnext-link.is-next { text-align: left; align-items: flex-start; } }

.blog-more { background: var(--sky-white); }
.blog-more .blog-card { box-shadow: none; }
.blog-more .blog-card:hover { box-shadow: var(--shadow-card); }

/* Header sits on the dark hero: keep the transparent state readable before scrolling. */
.bp-blog .site-header:not(.scrolled) { background: transparent; }

@media (prefers-reduced-motion: reduce) {
    .blog-card, .blog-card-media img, .blog-card-link i, .blog-prevnext-link { transition: none; }
    .blog-card:hover, .blog-prevnext-link:hover { transform: none; }
    .blog-card:hover .blog-card-media img { transform: none; }
}
.mobile-nav a.mobile-sublink { line-height: 1.4; }

/* Header fit with the extra "Blog" menu (longest labels are BM): never wrap the logo or CTA,
   tighten the menu gap on mid-size screens and turn the CTA into an icon button below 1280px. */
.site-header .logo, .header-cta .btn { white-space: nowrap; }
@media (min-width: 1101px) and (max-width: 1365px) { .nav-list { gap: 18px; } }
@media (min-width: 1101px) and (max-width: 1279px) {
    .header-cta .btn { width: 44px; height: 44px; min-height: 44px; padding: 0; justify-content: center; border-radius: 50%; }
    .header-cta .btn i { margin: 0; font-size: 1.15rem; }
    .header-cta .btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
}

/* ==================== FOOTER: COPYRIGHT + DESIGN CREDIT ==================== */
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.footer-bottom p { margin: 0; }
.footer-credit { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 6px; color: rgba(255, 255, 255, 0.6); font-size: 0.8rem; }
.footer-credit a { color: rgba(255, 255, 255, 0.85); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.3); text-underline-offset: 3px; transition: color 0.2s, text-decoration-color 0.2s; }
.footer-credit a:hover, .footer-credit a:focus-visible { color: var(--sunset-gold); text-decoration-color: currentColor; }
@media (max-width: 768px) { .footer-bottom { flex-direction: column; justify-content: center; text-align: center; } }
/* Keep the credit line clear of the floating WhatsApp button. */
.footer-bottom { padding-bottom: 88px; }
