/* =========================================================
   BLOG (blog.php + blog-details.php)
   All classes start with "bl-" so nothing else is affected.
   ========================================================= */
.bl-page {
    --bl-teal: #19a985;
    --bl-teal-dark: #12655f;
    --bl-forest: #092c2a;
    --bl-amber: #ffae00;
    --bl-ink: #0f2a2e;
    --bl-text: #4b5f63;
    --bl-muted: #8aa3a0;
    --bl-border: #e2efec;
    background: #f5fbfa;
    overflow-x: hidden;
}

.bl-wrap {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Hero ---------- */
.bl-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 80px 0 70px;
    color: #fff;
    text-align: center;
}

.bl-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-size: cover;
    background-position: center;
    animation: blKen 18s ease-in-out infinite alternate;
}

@keyframes blKen { to { transform: scale(1.1); } }

.bl-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(110deg, rgba(4, 33, 31, 0.92) 0%, rgba(4, 33, 31, 0.78) 55%, rgba(18, 101, 95, 0.6) 100%);
}

.bl-crumb {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 14px;
}

.bl-crumb a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.bl-crumb a:hover { color: var(--bl-amber); }

.bl-hero h1 {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 auto 14px;
    max-width: 900px;
    color: #fff;
}

.bl-hero p {
    max-width: 640px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
}

/* Search in hero */
.bl-search {
    display: flex;
    max-width: 520px;
    margin: 26px auto 0;
    padding: 6px;
    border-radius: 50px;
    background: #fff;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
}

.bl-search input {
    flex: 1;
    min-width: 0;
    border: none !important;
    outline: none;
    padding: 10px 18px;
    font-size: 15px;
    background: transparent !important;
    color: var(--bl-ink);
}

.bl-search button {
    width: auto !important;     /* site styles make form buttons full width */
    flex: 0 0 auto;
    margin: 0 !important;
    border: none;
    padding: 10px 22px;
    border-radius: 50px;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, var(--bl-teal), var(--bl-teal-dark));
}

/* ---------- Category chips ---------- */
.bl-cats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 34px 0 30px;
}

.bl-cats a {
    padding: 9px 18px;
    border-radius: 50px;
    border: 1.5px solid var(--bl-border);
    background: #fff;
    color: var(--bl-text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
}

.bl-cats a span {
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 50px;
    background: #eef6f4;
    font-size: 12px;
}

.bl-cats a:hover,
.bl-cats a.active {
    background: var(--bl-teal);
    border-color: var(--bl-teal);
    color: #fff;
    transform: translateY(-2px);
}

.bl-cats a:hover span,
.bl-cats a.active span {
    background: rgba(255, 255, 255, 0.25);
}

/* ---------- Featured post ---------- */
.bl-featured {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    margin-bottom: 36px;
    border-radius: 24px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 18px 44px rgba(9, 44, 42, 0.12);
    text-decoration: none;
    color: inherit;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.bl-featured:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 60px rgba(9, 44, 42, 0.18);
}

.bl-featured-img {
    position: relative;
    min-height: 340px;
    overflow: hidden;
}

.bl-featured-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bl-featured:hover .bl-featured-img img { transform: scale(1.06); }

.bl-featured-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    padding: 6px 14px;
    border-radius: 50px;
    background: var(--bl-amber);
    color: var(--bl-forest);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bl-featured-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 36px 38px;
}

.bl-featured-body h2 {
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    font-weight: 800;
    line-height: 1.25;
    margin: 12px 0;
    color: var(--bl-ink);
}

.bl-featured-body p {
    color: var(--bl-text);
    line-height: 1.75;
    margin: 0 0 20px;
}

/* ---------- Post grid ---------- */
.bl-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

.bl-card {
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--bl-border);
    box-shadow: 0 8px 24px rgba(9, 44, 42, 0.06);
    text-decoration: none;
    color: inherit;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.bl-card:hover {
    transform: translateY(-10px);
    border-color: var(--bl-teal);
    box-shadow: 0 24px 46px rgba(9, 44, 42, 0.14);
}

.bl-card-img {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.bl-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bl-card:hover .bl-card-img img { transform: scale(1.08); }

.bl-card-cat {
    position: absolute;
    left: 14px;
    bottom: 14px;
    padding: 5px 12px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--bl-teal-dark);
    font-size: 12px;
    font-weight: 700;
}

.bl-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 22px 22px;
}

.bl-card-body h3 {
    font-size: 1.12rem;
    font-weight: 800;
    line-height: 1.4;
    margin: 8px 0 10px;
    color: var(--bl-ink);
    transition: color 0.3s ease;
}

.bl-card:hover h3 { color: var(--bl-teal-dark); }

.bl-card-body p {
    flex: 1;
    margin: 0 0 16px;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--bl-text);
}

.bl-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    font-size: 13px;
    color: var(--bl-muted);
}

.bl-meta i { color: var(--bl-teal); margin-right: 5px; }

.bl-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--bl-teal-dark);
}

.bl-more i { transition: transform 0.3s ease; }
.bl-card:hover .bl-more i,
.bl-featured:hover .bl-more i { transform: translateX(6px); }

.bl-tag {
    display: inline-block;
    align-self: flex-start;
    padding: 5px 12px;
    border-radius: 50px;
    background: #e6f7f3;
    color: var(--bl-teal-dark);
    font-size: 12px;
    font-weight: 700;
}

/* ---------- Pagination ---------- */
.bl-pages {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 40px 0 10px;
}

.bl-pages a,
.bl-pages span {
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--bl-border);
    background: #fff;
    color: var(--bl-text);
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
}

.bl-pages a:hover,
.bl-pages .active {
    background: var(--bl-teal);
    border-color: var(--bl-teal);
    color: #fff;
}

.bl-empty {
    padding: 50px 20px;
    text-align: center;
    color: var(--bl-muted);
    background: #fff;
    border-radius: 20px;
    border: 1px dashed #cfe3df;
}

.bl-empty i { display: block; font-size: 34px; margin-bottom: 10px; color: #bcd9d3; }

/* ---------- CTA band ---------- */
.bl-cta {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin: 50px 0 60px;
    padding: 40px 44px;
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(120deg, var(--bl-forest), var(--bl-teal-dark) 60%, var(--bl-teal));
    background-size: 200% 200%;
    animation: blGrad 10s ease infinite;
}

@keyframes blGrad { 50% { background-position: 100% 50%; } }

.bl-cta::after {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f1b8";
    position: absolute;
    right: -20px;
    bottom: -50px;
    z-index: -1;
    font-size: 200px;
    color: rgba(255, 255, 255, 0.08);
}

.bl-cta h2 { margin: 0 0 6px; font-size: 1.6rem; color: #fff; }
.bl-cta p { margin: 0; color: rgba(255, 255, 255, 0.85); }

.bl-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 26px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bl-btn:hover { transform: translateY(-3px); }
.bl-btn-amber { background: var(--bl-amber); color: var(--bl-forest); box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2); }
.bl-btn-teal { background: linear-gradient(135deg, var(--bl-teal), var(--bl-teal-dark)); color: #fff; }

/* =========================================================
   DETAILS PAGE
   ========================================================= */
.bl-article-hero { padding: 90px 0 120px; }
.bl-article-hero .bl-tag { background: var(--bl-amber); color: var(--bl-forest); margin-bottom: 14px; }
.bl-article-hero .bl-meta { justify-content: center; color: rgba(255, 255, 255, 0.8); margin-top: 16px; }
.bl-article-hero .bl-meta i { color: var(--bl-amber); }

.bl-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 34px;
    margin-top: -70px;
    position: relative;
    z-index: 2;
    align-items: start;
}

.bl-article {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 18px 44px rgba(9, 44, 42, 0.1);
}

.bl-article-cover img {
    display: block;
    width: 100%;
    max-height: 460px;
    object-fit: cover;
}

.bl-content {
    padding: 36px 42px 30px;
    color: var(--bl-text);
    font-size: 1.05rem;
    line-height: 1.85;
}

.bl-content > *:first-child { margin-top: 0; }
.bl-content p { margin: 0 0 1.2em; }

.bl-content h2,
.bl-content h3,
.bl-content h4 {
    color: var(--bl-ink);
    font-weight: 800;
    line-height: 1.3;
    margin: 1.6em 0 0.6em;
}

.bl-content h2 {
    position: relative;
    padding-left: 16px;
    font-size: 1.55rem;
}

.bl-content h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 5px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--bl-teal), var(--bl-amber));
}

.bl-content h3 { font-size: 1.25rem; }

.bl-content ul,
.bl-content ol {
    margin: 0 0 1.3em;
    padding-left: 0;
    list-style: none;
    counter-reset: bl;
}

.bl-content li {
    position: relative;
    padding: 6px 0 6px 34px;
}

.bl-content ul li::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f058";
    position: absolute;
    left: 0;
    top: 7px;
    color: var(--bl-teal);
}

.bl-content ol li { counter-increment: bl; }

.bl-content ol li::before {
    content: counter(bl);
    position: absolute;
    left: 0;
    top: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    background: var(--bl-teal);
}

.bl-content blockquote {
    margin: 1.6em 0;
    padding: 20px 24px;
    border-radius: 16px;
    border-left: 5px solid var(--bl-amber);
    background: #fff8e6;
    color: #6b5313;
    font-weight: 600;
}

.bl-content a { color: var(--bl-teal-dark); font-weight: 700; }
.bl-content img { max-width: 100%; height: auto; border-radius: 14px; }

.bl-content table { width: 100%; border-collapse: collapse; margin: 1.2em 0; }
.bl-content th, .bl-content td { padding: 10px 12px; border: 1px solid var(--bl-border); text-align: left; }
.bl-content th { background: #f0f9f7; color: var(--bl-ink); }

/* Share bar */
.bl-share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 22px 42px 30px;
    border-top: 1px solid var(--bl-border);
}

.bl-share strong { margin-right: 6px; color: var(--bl-ink); }

.bl-share a,
.bl-share button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.bl-share a:hover,
.bl-share button:hover { transform: translateY(-3px) rotate(-8deg); }

.bl-s-wa { background: #25d366; }
.bl-s-fb { background: #1877f2; }
.bl-s-in { background: #0a66c2; }
.bl-s-x  { background: #111; }
.bl-s-copy { background: var(--bl-teal-dark); }

/* Prev / next */
.bl-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 26px;
}

.bl-nav a {
    padding: 18px 20px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--bl-border);
    text-decoration: none;
    color: var(--bl-ink);
    font-weight: 700;
    line-height: 1.4;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.bl-nav a:hover { border-color: var(--bl-teal); transform: translateY(-3px); }
.bl-nav small { display: block; margin-bottom: 4px; color: var(--bl-muted); font-weight: 600; }
.bl-nav .bl-next { text-align: right; }

/* Sidebar */
.bl-side {
    position: sticky;
    top: 110px;
    display: grid;
    gap: 22px;
}

.bl-widget {
    padding: 22px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--bl-border);
    box-shadow: 0 8px 24px rgba(9, 44, 42, 0.05);
}

.bl-widget h4 {
    margin: 0 0 14px;
    font-size: 1.05rem;
    color: var(--bl-ink);
}

.bl-widget .bl-search { margin: 0; box-shadow: none; border: 1.5px solid var(--bl-border); }

.bl-cat-list a {
    display: flex;
    justify-content: space-between;
    padding: 9px 0;
    border-bottom: 1px dashed var(--bl-border);
    color: var(--bl-text);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.25s ease, padding 0.25s ease;
}

.bl-cat-list a:hover { color: var(--bl-teal-dark); padding-left: 6px; }
.bl-cat-list a:last-child { border-bottom: none; }

.bl-recent a {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 8px 0;
    text-decoration: none;
    color: var(--bl-ink);
}

.bl-recent img {
    width: 70px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 10px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.bl-recent a:hover img { transform: scale(1.06); }
.bl-recent strong { display: block; font-size: 14px; line-height: 1.4; }
.bl-recent a:hover strong { color: var(--bl-teal-dark); }
.bl-recent small { color: var(--bl-muted); font-size: 12px; }

.bl-quote-box {
    color: #fff;
    background: linear-gradient(140deg, var(--bl-forest), var(--bl-teal-dark));
    border: none;
}

.bl-quote-box h4 { color: #fff; }
.bl-quote-box p { margin: 0 0 16px; color: rgba(255, 255, 255, 0.85); line-height: 1.6; font-size: 14.5px; }
.bl-quote-box .bl-btn { width: 100%; justify-content: center; margin-top: 8px; padding: 12px 18px; }

.bl-related-title {
    margin: 50px 0 22px;
    text-align: center;
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--bl-ink);
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .bl-layout { grid-template-columns: 1fr; }
    .bl-side { position: static; }
    .bl-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
    .bl-featured { grid-template-columns: 1fr; }
    .bl-featured-img { min-height: 220px; }
    .bl-featured-body { padding: 24px; }
    .bl-grid { grid-template-columns: 1fr; }
    .bl-content { padding: 26px 20px; font-size: 1rem; }
    .bl-share { padding: 18px 20px 24px; }
    .bl-nav { grid-template-columns: 1fr; }
    .bl-cta { padding: 30px 24px; }
    .bl-wrap { padding: 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .bl-hero-bg, .bl-cta { animation: none; }
}

/* =====================================================================
   Blog listing + article pages — "reading desk" background (unique):
   ruled notebook paper with a margin line, soft ink glows, and big faint
   writing icons: pen writing, open book turning pages, floating quote.
   ===================================================================== */
body .bl-page {
    position: relative;
    isolation: isolate;
    background:
        radial-gradient(circle at 92% 18%, rgba(255, 174, 0, 0.12) 0, rgba(255, 174, 0, 0) 26%),
        radial-gradient(circle at 6% 55%, rgba(25, 169, 133, 0.12) 0, rgba(25, 169, 133, 0) 28%),
        radial-gradient(circle at 90% 92%, rgba(9, 146, 178, 0.10) 0, rgba(9, 146, 178, 0) 26%),
        linear-gradient(90deg, transparent 0 58px, rgba(255, 120, 120, 0.16) 58px 60px, transparent 60px) 0 0 / 100% 100%,
        repeating-linear-gradient(180deg, transparent 0 33px, rgba(25, 169, 133, 0.10) 33px 34px),
        #f8fcfb;
}
body .bl-page > .bl-wrap { position: relative; }

body .bl-page::before, body .bl-page::after,
body .bl-page > .bl-wrap::before {
    position: absolute;
    z-index: -1;
    line-height: 1;
    pointer-events: none;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

/* pen nib "writing" — small loops, upper right below the hero */
body .bl-page::before {
    content: "\f5ad";
    top: 470px;
    right: 3%;
    font-size: 170px;
    color: rgba(25, 169, 133, 0.10);
    animation: blWrite 5s ease-in-out infinite;
}
/* open book, pages "breathing", near the bottom left */
body .bl-page::after {
    content: "\f518";
    bottom: 220px;
    left: 2%;
    font-size: 200px;
    color: rgba(255, 174, 0, 0.14);
    animation: blBook 4s ease-in-out infinite;
}
/* big quote mark drifting, middle left */
body .bl-page > .bl-wrap::before {
    content: "\f10d";
    top: 38%;
    left: -110px;
    font-size: 180px;
    color: rgba(9, 146, 178, 0.08);
    animation: blQuote 9s ease-in-out infinite;
}

@keyframes blWrite {
    0%, 100% { translate: 0 0; rotate: 0deg; }
    20% { translate: -14px 8px; rotate: -6deg; }
    40% { translate: 10px 14px; rotate: 4deg; }
    60% { translate: -8px 20px; rotate: -4deg; }
    80% { translate: 12px 6px; rotate: 5deg; }
}
@keyframes blBook { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(0.9) translateY(-10px); } }
@keyframes blQuote { 0%, 100% { translate: 0 0; rotate: -8deg; } 50% { translate: 20px -26px; rotate: 6deg; } }

@media (max-width: 767px) {
    body .bl-page { background-size: auto, auto, auto, 0 0, auto, auto; }
    body .bl-page::before { font-size: 100px; top: 420px; }
    body .bl-page::after { font-size: 120px; }
    body .bl-page > .bl-wrap::before { font-size: 110px; left: -50px; }
}

@media (prefers-reduced-motion: reduce) {
    body .bl-page::before, body .bl-page::after,
    body .bl-page > .bl-wrap::before { animation: none; }
}
