/* ===== Blog Pages ===== */

/* ── Shared ── */
.blog-page,
.blog-detail {
    min-height: 100vh;
    background: #f8fafc;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5rem 2rem 5rem;
    overflow: hidden;
    font-family: 'Inter', system-ui, sans-serif;
}

.bp-glow {
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
    z-index: 0;
    filter: blur(50px);
}
.bp-glow--tl {
    top: -80px; left: -100px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(0,168,150,0.07) 0%, transparent 65%);
}
.bp-glow--br {
    bottom: -80px; right: -100px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(0,168,150,0.05) 0%, transparent 65%);
}

/* ── Watermark ── */
.bp-watermark {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(80px, 18vw, 200px);
    font-weight: 900;
    letter-spacing: -0.02em;
    color: rgba(0,0,0,0.06);
    white-space: nowrap;
    pointer-events: none;
    z-index: 0;
    user-select: none;
}

/* ── Header ── */
.bp-header {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 560px;
    margin-bottom: 3rem;
}

.bp-tag {
    display: inline-block;
    border: 1px solid rgba(0,168,150,0.4);
    color: #00A896;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 5px 16px;
    border-radius: 999px;
    background: rgba(0,168,150,0.06);
    margin-bottom: 1rem;
}

.bp-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 0.8rem;
}

.bp-sub {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
}

/* ── Featured post ── */
.bp-featured {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    width: 100%;
    max-width: 1100px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    margin-bottom: 2.5rem;
    transition: box-shadow 0.25s, transform 0.25s;
}

.bp-featured:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
    transform: translateY(-3px);
}

.bp-featured-img {
    position: relative;
    height: 320px;
    max-height: 360px;
    overflow: hidden;
}

.bp-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bp-featured-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bp-featured-placeholder svg {
    width: 56px;
    height: 56px;
    opacity: 0.3;
}

.bp-featured-cat {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #00A896;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 999px;
}

.bp-featured-body {
    padding: 36px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
}

.bp-featured-title {
    font-size: clamp(1.3rem, 2.5vw, 1.9rem);
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.bp-featured-excerpt {
    font-size: 0.93rem;
    color: #64748b;
    line-height: 1.7;
}

.bp-featured-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 500;
}

.bp-meta-author { color: #475569; font-weight: 600; }
.bp-meta-dot { color: #cbd5e1; }

/* ── Grid of cards ── */
.bp-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 1100px;
}

.bp-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
}

.bp-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,0.07);
    transform: translateY(-3px);
}

.bp-card-img {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.bp-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.bp-card:hover .bp-card-img img { transform: scale(1.04); }

.bp-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bp-card-placeholder svg {
    width: 36px;
    height: 36px;
    stroke: #cbd5e1;
}

.bp-card-cat {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #00A896;
    color: #fff;
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 999px;
}

.bp-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.bp-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.bp-card-excerpt {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bp-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
    margin-top: 4px;
}

/* ── Empty state ── */
.bp-empty {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 80px 20px;
    color: #94a3b8;
}

.bp-empty svg {
    width: 56px;
    height: 56px;
    stroke: #e2e8f0;
    margin-bottom: 16px;
}

.bp-empty p { font-size: 0.95rem; }

/* ══════════════════════
   BLOG DETAIL
══════════════════════ */
.blog-detail { padding-top: 4rem; }

.bd-back-wrap {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 780px;
    margin-bottom: 1.5rem;
}

.bd-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.15s;
}

.bd-back:hover { color: #00A896; }
.bd-back svg { width: 16px; height: 16px; }

.bd-article {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 780px;
}

.bd-hero {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bd-cat {
    display: inline-block;
    background: rgba(0,168,150,0.08);
    color: #00A896;
    border: 1px solid rgba(0,168,150,0.2);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 999px;
    width: fit-content;
}

.bd-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.bd-excerpt {
    font-size: 1.05rem;
    color: #64748b;
    line-height: 1.65;
}

.bd-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 500;
}

.bd-meta-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0,168,150,0.1);
    color: #00A896;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bd-cover {
    width: 100%;
    max-height: 440px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 2.5rem;
    display: block;
}

/* News detail: show full image (A4/portrait) capped at viewport height */
.blog-detail--news .bd-cover {
    width: auto;
    max-width: 100%;
    max-height: 100vh;
    height: auto;
    object-fit: contain;
    margin-left: auto;
    margin-right: auto;
    background: #f8fafc;
}

/* Quill content styling */
.bd-content .ql-editor {
    padding: 0;
    font-size: 1rem;
    line-height: 1.8;
    color: #334155;
}

.bd-content .ql-editor h1,
.bd-content .ql-editor h2,
.bd-content .ql-editor h3 {
    color: #0f172a;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 1.8rem 0 0.8rem;
}

.bd-content .ql-editor p { margin-bottom: 1rem; }
.bd-content .ql-editor a { color: #00A896; }

.bd-content .ql-editor blockquote {
    border-left: 3px solid #00A896;
    padding-left: 1rem;
    color: #64748b;
    font-style: italic;
    margin: 1.5rem 0;
}

.bd-content .ql-editor img {
    max-width: 100%;
    border-radius: 10px;
    margin: 1rem 0;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .bp-featured { grid-template-columns: 1fr; }
    .bp-featured-img { min-height: 220px; }
    .bp-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 580px) {
    .blog-page, .blog-detail { padding: 5rem 1.25rem 4rem; }
    .bp-grid { grid-template-columns: 1fr; }
    .bp-featured-body { padding: 24px; }
}

/* ── Case-study additions ── */
.bp-featured-client,
.bp-card-client {
    font-size: 0.75rem;
    font-weight: 700;
    color: #00A896;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.bp-featured-result,
.bp-card-result {
    display: inline-block;
    margin-top: 4px;
    padding: 5px 12px;
    background: rgba(0,168,150,0.08);
    border: 1px solid rgba(0,168,150,0.25);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #00A896;
    width: fit-content;
}

.bd-client {
    font-size: 0.82rem;
    font-weight: 700;
    color: #00A896;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.bd-results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 0 0 2.5rem;
}

.bd-result-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 22px 20px;
}

.bd-result-value {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: #00A896;
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 6px;
}

.bd-result-label {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.4;
}

@media (max-width: 720px) {
    .bd-results { grid-template-columns: 1fr; }
}

.bd-external-cta {
    margin: 0 0 2rem;
    display: flex;
    justify-content: center;
}
.bd-external-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(180deg, #00bfac 0%, #00A896 100%);
    color: #ffffff;
    text-decoration: none;
    padding: 12px 22px;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(0,168,150,0.35);
    transition: transform 0.15s, box-shadow 0.2s;
}
.bd-external-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,168,150,0.5); }
.bd-external-btn svg { width: 16px; height: 16px; }
