/* Bayutconsultants: blog pages (ported from the Tahiti blog system, restyled to the Bayutu palette) */
:root {
    --bb-copper: #d66c44;
    --bb-brand: #AA5E44;
    --bb-ink: #0b1c31;
    --bb-sand: #ede7e1;
    --bb-light: #f7f6f5;
    --bb-line: #e6ebf0;
    --bb-muted: #6c757d;
}

/* ---------- hero ---------- */
.bb-hero { background: var(--bb-sand); padding: 150px 0 70px; }
.bb-hero h1 { font-size: clamp(30px, 4.4vw, 56px); line-height: 1.1; letter-spacing: -.03em; font-weight: 700; color: var(--bb-ink); max-width: 960px; margin: 0; }
.bb-hero .bb-lead { margin: 22px 0 0; max-width: 620px; color: var(--bb-muted); line-height: 1.8; font-size: .95rem; }
.bb-eyebrow { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; color: var(--bb-copper); text-transform: uppercase; font-weight: 700; font-size: .75rem; letter-spacing: 2px; }
.bb-eyebrow::before { content: ''; width: 36px; height: 2px; background: var(--bb-copper); display: inline-block; }
.bb-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--bb-muted); margin-bottom: 26px; }
.bb-crumbs a { color: var(--bb-muted); text-decoration: none; }
.bb-crumbs a:hover { color: var(--bb-copper); }
.bb-crumbs > * + *::before { content: '/'; margin-right: 8px; opacity: .5; }
.bb-meta { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 26px; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--bb-muted); }
.bb-meta b { color: var(--bb-copper); font-weight: 700; }

/* ---------- layout ---------- */
.bb-section { background: var(--bb-light); padding: 70px 0 90px; }
.bb-wrap { display: grid; grid-template-columns: 250px minmax(0, 1fr) 280px; gap: clamp(24px, 3vw, 48px); align-items: start; }
.bb-wrap.bb-wrap-article { grid-template-columns: minmax(0, 1fr) 300px; }
.bb-wrap > * { min-width: 0; }
.bb-side { position: sticky; top: 100px; align-self: start; }
.bb-side h4, .bb-box h4 { font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--bb-line); color: var(--bb-ink); }

/* category accordion (native <details>, no JS) */
.bb-cat { border-bottom: 1px solid var(--bb-line); }
.bb-cat summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; font-size: .9rem; font-weight: 600; color: var(--bb-ink); }
.bb-cat summary::-webkit-details-marker { display: none; }
.bb-cat summary::after { content: '+'; font-weight: 400; font-size: 18px; color: var(--bb-muted); }
.bb-cat[open] summary::after { content: '\2212'; color: var(--bb-copper); }
.bb-cat ul { list-style: none; margin: 0 0 14px; padding: 0; }
.bb-cat li a { display: block; padding: 7px 0 7px 14px; font-size: .84rem; color: var(--bb-muted); border-left: 2px solid var(--bb-line); text-decoration: none; transition: color .2s, border-color .2s; }
.bb-cat li a:hover, .bb-cat li a.is-active { color: var(--bb-ink); border-left-color: var(--bb-copper); }

/* ---------- cards ---------- */
.bb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.bb-card { display: flex; flex-direction: column; background: #fff; border-radius: 2px; text-decoration: none; color: inherit; box-shadow: 0 4px 20px rgba(0, 0, 0, .03); transition: transform .3s, box-shadow .3s; }
.bb-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(11, 28, 49, .10); color: inherit; }
.bb-card[hidden] { display: none; }
.bb-thumb { aspect-ratio: 16 / 10; background: var(--bb-brand); overflow: hidden; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 40px; font-weight: 300; }
.bb-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.bb-card:hover .bb-thumb img { transform: scale(1.04); }
.bb-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.bb-date { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--bb-muted); }
.bb-card h3 { font-size: 1.15rem; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; color: var(--bb-ink); margin: 0; }
.bb-card p { font-size: .88rem; color: var(--bb-muted); line-height: 1.7; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bb-more { margin-top: auto; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--bb-ink); border-bottom: 2px solid var(--bb-copper); align-self: flex-start; padding-bottom: 4px; text-decoration: none; }
.bb-more:hover { color: var(--bb-copper); }
.bb-loadmore { display: block; margin: 40px auto 0; cursor: pointer; border: 1px solid var(--bb-copper); background: var(--bb-copper); color: #fff; font-weight: 700; padding: 14px 32px; transition: background-color .3s; }
.bb-loadmore:hover { background: #bf5b36; border-color: #bf5b36; }
.bb-empty { padding: 60px 0; color: var(--bb-muted); }

/* ---------- sidebar lists ---------- */
.bb-box { background: #fff; padding: 26px 24px; border-radius: 2px; }
.bb-pop a { display: block; padding: 14px 0; border-bottom: 1px solid var(--bb-line); text-decoration: none; color: inherit; }
.bb-pop a:last-child { border-bottom: 0; padding-bottom: 0; }
.bb-pop a:hover strong { color: var(--bb-copper); }
.bb-pop strong { display: block; font-size: .9rem; line-height: 1.4; font-weight: 600; margin-bottom: 4px; color: var(--bb-ink); transition: color .2s; }
.bb-pop small { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--bb-muted); }
.bb-stack { display: grid; gap: 28px; }

/* ---------- article ---------- */
.bb-article { background: #fff; padding: clamp(24px, 4vw, 56px); min-width: 0; border-radius: 2px; }
.bb-cover { margin: -6px 0 36px; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bb-sand); }
.bb-cover img { width: 100%; height: 100%; object-fit: cover; }
.bb-content { font-size: 1.04rem; line-height: 1.85; color: #2a2f36; overflow-wrap: anywhere; word-break: normal; }
.bb-content > :first-child { margin-top: 0; }
.bb-content > :last-child { margin-bottom: 0; }
.bb-content h1, .bb-content h2, .bb-content h3, .bb-content h4 { letter-spacing: -.02em; line-height: 1.25; margin: 1.8em 0 .6em; color: var(--bb-ink); font-weight: 700; }
.bb-content h2 { font-size: 1.75rem; } .bb-content h3 { font-size: 1.4rem; } .bb-content h4 { font-size: 1.15rem; }
.bb-content p { margin: 0 0 1.2em; }
.bb-content strong, .bb-content b { font-weight: 700; color: var(--bb-ink); }
/* links: always above any stray positioned/overlay element pasted into the body, always clickable */
.bb-content a { position: relative; z-index: 1; pointer-events: auto; cursor: pointer; color: var(--bb-brand); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color .2s; }
.bb-content a:hover, .bb-content a:focus-visible { color: var(--bb-ink); }
.bb-content ul, .bb-content ol { margin: 0 0 1.3em; padding-left: 1.4em; }
.bb-content ul { list-style: disc; } .bb-content ol { list-style: decimal; }
.bb-content li { margin-bottom: .4em; padding-left: .2em; }
.bb-content li::marker { color: var(--bb-copper); }
.bb-content img { max-width: 100%; height: auto; margin: 1.4em 0; }
.bb-content hr { border: 0; border-top: 1px solid var(--bb-line); margin: 2em 0; opacity: 1; }
.bb-content pre { overflow-x: auto; background: var(--bb-ink); color: #eee; padding: 16px 18px; font-size: .9rem; line-height: 1.6; margin: 1.4em 0; }
.bb-content figure { margin: 1.4em 0; }
.bb-table { overflow-x: auto; margin: 1.4em 0; -webkit-overflow-scrolling: touch; }
.bb-content table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: .95rem; }
.bb-content th, .bb-content td { border: 1px solid var(--bb-line); padding: 10px 12px; text-align: left; vertical-align: top; }
.bb-content th { background: var(--bb-sand); font-weight: 600; }
.bb-video { position: relative; aspect-ratio: 16 / 9; margin: 1.6em 0; background: var(--bb-ink); }
.bb-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.bb-content blockquote { margin: 1.6em 0; padding: 6px 0 6px 22px; border-left: 3px solid var(--bb-copper); color: var(--bb-muted); font-style: italic; }
.bb-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--bb-line); }
.bb-tags span { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; padding: 7px 12px; border: 1px solid var(--bb-line); color: var(--bb-muted); }
.bb-back { display: inline-block; margin-top: 30px; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; border-bottom: 2px solid var(--bb-copper); padding-bottom: 4px; color: var(--bb-ink); text-decoration: none; }
.bb-back:hover { color: var(--bb-copper); }
.bb-notfound { max-width: 640px; }
.bb-notfound h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 700; letter-spacing: -.02em; margin-bottom: 14px; color: var(--bb-ink); }
.bb-notfound p { color: var(--bb-muted); margin-bottom: 28px; }
.bb-btn { display: inline-block; background: var(--bb-copper); color: #fff; font-weight: 700; padding: 14px 28px; text-decoration: none; transition: background-color .3s; }
.bb-btn:hover { background: #bf5b36; color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
    .bb-wrap { grid-template-columns: 220px minmax(0, 1fr); }
    .bb-wrap > .bb-right { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
    .bb-wrap.bb-wrap-article { grid-template-columns: minmax(0, 1fr); }
    .bb-wrap-article .bb-side { position: static; }
}
@media (max-width: 800px) {
    .bb-wrap, .bb-wrap.bb-wrap-article { grid-template-columns: 1fr; }
    .bb-side { position: static; }
    .bb-grid { grid-template-columns: 1fr; }
    .bb-hero { padding: 120px 0 50px; }
    .bb-section { padding: 44px 0 64px; }
}
