/* ===========================================================
   WATERSTONE PREMIUM — BLOG STYLES
   Editorial / refined аестетика, в съзвучие със style.css
   Зависи от: --bg, --bg2, --dark, --g1..g5, --sage, --sd, --sl,
              --sbg, --fd, --fb, --ease (декларирани в style.css)
   =========================================================== */

/* Body — малко по-светъл фон, за да изпъкнат картите */
.blog-body { background: var(--bg); }

/* ===========================
   HERO
   =========================== */
.bhero {
    position: relative;
    padding: clamp(140px, 16vw, 200px) 0 clamp(48px, 7vw, 96px);
    background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
    overflow: hidden;
}
.bhero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 20%, rgba(94,112,64,.06), transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(122,144,88,.05), transparent 40%);
    pointer-events: none;
}
.bhero__inner { position: relative; z-index: 2; max-width: 880px; }
.bhero__crumbs {
    display: flex; align-items: center; gap: .5rem;
    font-size: 13px; color: var(--g4);
    margin-bottom: 2rem; letter-spacing: .02em;
}
.bhero__crumbs a {
    color: var(--g5); transition: color .2s var(--ease);
}
.bhero__crumbs a:hover { color: var(--sage); }
.bhero__crumbs span[aria-hidden] { color: var(--g3); }

.bhero__tag { display: inline-block; margin-bottom: 1.2rem; }

.bhero__h1 {
    font-family: var(--fd);
    font-size: clamp(2.4rem, 6vw, 4.8rem);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -.02em;
    color: var(--dark);
    margin-bottom: 1.6rem;
}
.bhero__h1 em {
    font-style: italic;
    color: var(--sd);
    font-weight: 400;
}
.bhero__h1 .h-line {
    display: block;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    animation: bhero-line .9s var(--ease) forwards;
}
.bhero__h1 .h-line:nth-child(1) { animation-delay: .1s; }
.bhero__h1 .h-line:nth-child(2) { animation-delay: .22s; }
.bhero__h1 .h-line:nth-child(3) { animation-delay: .34s; }
@keyframes bhero-line {
    to { opacity: 1; transform: translateY(0); }
}

.bhero__p {
    font-size: clamp(15px, 1.4vw, 17px);
    color: var(--g5);
    max-width: 580px;
    line-height: 1.65;
    opacity: 0;
    animation: bhero-line .9s var(--ease) .5s forwards;
}

.bhero__deco {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    color: var(--sage);
    pointer-events: none;
    line-height: 0;
}
.bhero__deco svg {
    width: 100%; height: clamp(80px, 10vw, 140px); display: block;
}

/* ===========================
   FILTER BAR
   =========================== */
.bfilter {
    position: sticky;
    top: 80px;
    z-index: 50;
    padding: 1rem 0;
    background: rgba(247,245,240,.85);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid var(--g2);
}
.bfilter__inner {
    width: min(1180px, 92%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Search input */
.bfilter__search {
    position: relative;
    display: flex;
    align-items: center;
    gap: .6rem;
    background: var(--white);
    border: 1px solid var(--g2);
    border-radius: 100px;
    padding: .55rem 1rem .55rem 1.1rem;
    transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
    flex: 1 1 280px;
    min-width: 0;
    max-width: 360px;
}
.bfilter__search:focus-within {
    border-color: var(--sage);
    box-shadow: 0 0 0 3px var(--sbg);
}
.bfilter__search svg { color: var(--g4); flex-shrink: 0; }
.bfilter__search input {
    flex: 1; min-width: 0;
    border: none; outline: none; background: transparent;
    font-family: var(--fb); font-size: 14px; color: var(--dark);
    padding: .15rem 0;
}
.bfilter__search input::placeholder { color: var(--g4); }
.bfilter__clear {
    border: none; background: var(--g1); color: var(--g5);
    width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background .2s var(--ease);
    flex-shrink: 0;
}
.bfilter__clear:hover { background: var(--g2); color: var(--dark); }

/* Categories */
.bfilter__cats {
    display: flex;
    gap: .35rem;
    overflow-x: auto;
    flex: 1 1 auto;
    padding: 4px;
    margin: -4px;
    scrollbar-width: none;
}
.bfilter__cats::-webkit-scrollbar { display: none; }

.bcat {
    border: 1px solid var(--g2);
    background: transparent;
    font-family: var(--fb);
    font-size: 13px;
    font-weight: 500;
    color: var(--g5);
    padding: .5rem 1rem;
    border-radius: 100px;
    cursor: pointer;
    white-space: nowrap;
    transition: all .25s var(--ease);
}
.bcat:hover { border-color: var(--g4); color: var(--dark); }
.bcat.active {
    background: var(--dark);
    border-color: var(--dark);
    color: #fff;
}

/* ===========================
   SECTION HEADERS (editorial)
   =========================== */
.bsection-head {
    display: flex;
    align-items: baseline;
    gap: 1.2rem;
    margin-bottom: clamp(2rem, 4vw, 3rem);
    margin-top: clamp(2rem, 4vw, 3rem);
}
.bsection-num {
    font-family: var(--fd);
    font-style: italic;
    font-size: 1rem;
    color: var(--sage);
    font-weight: 400;
    letter-spacing: .05em;
}
.bsection-h2 {
    font-family: var(--fd);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 400;
    color: var(--dark);
    letter-spacing: -.01em;
    flex-shrink: 0;
}
.bsection-meta {
    font-size: 13px;
    color: var(--g4);
    font-style: italic;
}
.bsection-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--g2), transparent);
    margin-left: .5rem;
}

/* ===========================
   FEATURED ARTICLES
   =========================== */
.bfeatured { padding-top: clamp(40px, 5vw, 64px); }

.bfeatured__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: clamp(1.2rem, 2.4vw, 2rem);
}

/* Първата featured карта — голяма */
.bfeatured__grid .bcard:first-child {
    grid-row: span 2;
}
.bfeatured__grid .bcard:first-child .bcard__img-wrap {
    aspect-ratio: 4 / 5;
}
.bfeatured__grid .bcard:first-child .bcard__title {
    font-size: clamp(1.4rem, 2.4vw, 2rem);
}

/* ===========================
   ARTICLE GRID
   =========================== */
.barticles { padding: clamp(40px, 5vw, 64px) 0 clamp(60px, 8vw, 100px); }

.bgrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1.4rem, 2.5vw, 2.2rem) clamp(1.2rem, 2vw, 1.8rem);
}

/* ===========================
   ARTICLE CARD
   =========================== */
.bcard {
    display: flex;
    flex-direction: column;
    background: transparent;
    border-radius: 0;
    overflow: hidden;
    transition: transform .35s var(--ease);
    cursor: pointer;
    position: relative;
    text-decoration: none;
    color: inherit;
}
.bcard:hover { transform: translateY(-4px); }

.bcard__img-wrap {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: var(--g1);
    margin-bottom: 1.2rem;
}
.bcard__img-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(20,20,20,.15));
    opacity: 0;
    transition: opacity .35s var(--ease);
    pointer-events: none;
}
.bcard:hover .bcard__img-wrap::after { opacity: 1; }

.bcard__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .8s var(--ease);
    background: var(--g2);
}
.bcard:hover .bcard__img { transform: scale(1.06); }

.bcard__cat-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--dark);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: .35rem .8rem;
    border-radius: 100px;
    z-index: 2;
}

.bcard__body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.bcard__meta {
    display: flex;
    align-items: center;
    gap: .8rem;
    font-size: 12px;
    color: var(--g4);
    margin-bottom: .6rem;
    letter-spacing: .02em;
}
.bcard__meta-dot {
    width: 3px; height: 3px;
    border-radius: 50%;
    background: var(--g3);
}

.bcard__title {
    font-family: var(--fd);
    font-size: clamp(1.15rem, 1.6vw, 1.4rem);
    font-weight: 500;
    line-height: 1.25;
    color: var(--dark);
    margin-bottom: .6rem;
    letter-spacing: -.005em;
    transition: color .25s var(--ease);
}
.bcard:hover .bcard__title { color: var(--sd); }

.bcard__excerpt {
    font-size: 14px;
    color: var(--g5);
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.bcard__more {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: 13px;
    font-weight: 500;
    color: var(--sage);
    align-self: flex-start;
    transition: gap .25s var(--ease), color .25s var(--ease);
}
.bcard:hover .bcard__more {
    gap: .6rem;
    color: var(--sd);
}
.bcard__more svg {
    width: 14px; height: 14px;
    transition: transform .25s var(--ease);
}
.bcard:hover .bcard__more svg { transform: translateX(2px); }

/* ===========================
   SKELETON CARD
   =========================== */
.bcard--skeleton { pointer-events: none; cursor: default; }
.bcard--skeleton .bcard__img,
.bcard--skeleton .bcard__line {
    background: linear-gradient(90deg, var(--g1) 0%, var(--g2) 50%, var(--g1) 100%);
    background-size: 200% 100%;
    animation: skeleton 1.4s ease-in-out infinite;
    border-radius: 4px;
}
.bcard--skeleton .bcard__img {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    margin-bottom: 1.2rem;
}
.bcard--skeleton .bcard__line {
    display: block; height: 12px; margin-bottom: .5rem;
}
.bcard--skeleton .bcard__line--sm { width: 35%; height: 10px; margin-bottom: .8rem; }
.bcard--skeleton .bcard__line--lg { width: 90%; height: 18px; margin-bottom: .8rem; }
.bcard--skeleton .bcard__line--md { width: 70%; }

@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===========================
   EMPTY / ERROR STATES
   =========================== */
.bempty,
.berror {
    text-align: center;
    padding: clamp(3rem, 6vw, 5rem) 1rem;
    color: var(--g5);
    grid-column: 1 / -1;
}
.bempty svg,
.berror svg {
    color: var(--g3);
    margin: 0 auto 1.2rem;
    display: block;
}
.berror svg { color: var(--red); }
.bempty h3,
.berror h3 {
    font-family: var(--fd);
    font-size: 1.4rem;
    color: var(--dark);
    font-weight: 500;
    margin-bottom: .5rem;
}
.bempty p,
.berror p {
    font-size: 14px;
    margin-bottom: 1.5rem;
}

/* ===========================
   LOAD MORE
   =========================== */
.bload {
    text-align: center;
    margin-top: clamp(2.5rem, 5vw, 4rem);
}
.bload__btn {
    padding: .9rem 2.2rem;
    border: 1px solid var(--g2);
    transition: all .3s var(--ease);
}
.bload__btn:hover {
    background: var(--dark);
    color: #fff;
    border-color: var(--dark);
}
.bload__btn svg {
    transition: transform .3s var(--ease);
}
.bload__btn:hover svg { transform: translateY(2px); }
.bload__count {
    font-size: 13px;
    color: var(--g4);
    margin-top: .8rem;
    font-style: italic;
}

/* ===========================
   CTA BAND
   =========================== */
.bcta {
    background: var(--dark);
    color: #fff;
    padding: clamp(56px, 8vw, 96px) 0;
    position: relative;
    overflow: hidden;
}
.bcta::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(122,144,88,.12), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(94,112,64,.08), transparent 50%);
    pointer-events: none;
}
.bcta__inner {
    position: relative;
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: clamp(2rem, 4vw, 4rem);
    align-items: end;
}
.bcta__txt h2 {
    font-family: var(--fd);
    font-size: clamp(1.8rem, 3.6vw, 2.8rem);
    font-weight: 400;
    line-height: 1.15;
    margin: 1rem 0 1rem;
    color: #fff;
}
.bcta__txt h2 em {
    font-style: italic;
    color: var(--sl);
}
.bcta__txt p {
    font-size: 15px;
    color: rgba(255,255,255,.65);
    max-width: 460px;
    line-height: 1.7;
}
.bcta__acts {
    display: flex;
    flex-direction: column;
    gap: .8rem;
    align-items: flex-end;
}
.bcta__call {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    color: rgba(255,255,255,.7);
    font-size: 14px;
    transition: color .2s var(--ease);
}
.bcta__call:hover { color: #fff; }
.bcta__call svg { color: var(--sl); }

/* ===========================
   ARTICLE PAGE (post.html)
   =========================== */
.post {
    padding: clamp(120px, 13vw, 170px) 0 clamp(60px, 8vw, 100px);
    background: var(--bg);
}
.post__container {
    max-width: 760px;
    margin: 0 auto;
    width: 92%;
}
.post__back {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: 13px;
    color: var(--sage);
    margin-bottom: 2rem;
    transition: color .2s var(--ease), gap .2s var(--ease);
}
.post__back:hover { color: var(--sd); gap: .6rem; }
.post__back svg { width: 14px; height: 14px; }

.post__cat {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--sage);
    margin-bottom: .8rem;
}
.post__h1 {
    font-family: var(--fd);
    font-size: clamp(2rem, 4.5vw, 3.4rem);
    font-weight: 400;
    line-height: 1.1;
    color: var(--dark);
    letter-spacing: -.015em;
    margin-bottom: 1rem;
}
.post__h1 em { font-style: italic; color: var(--sd); }

.post__meta {
    display: flex;
    align-items: center;
    gap: .8rem;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--g4);
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--g2);
}
.post__meta-dot {
    width: 3px; height: 3px;
    border-radius: 50%;
    background: var(--g3);
}

.post__hero {
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 2.5rem;
    background: var(--g1);
}
.post__hero img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.post__excerpt {
    font-family: var(--fd);
    font-size: clamp(1.1rem, 1.8vw, 1.3rem);
    line-height: 1.5;
    color: var(--g5);
    font-style: italic;
    padding-left: 1.2rem;
    border-left: 2px solid var(--sage);
    margin-bottom: 2.5rem;
}

.post__body { font-size: 16px; line-height: 1.8; color: #2a2a2a; }
.post__body p {
    margin-bottom: 1.4rem;
}
.post__body h2 {
    font-family: var(--fd);
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    font-weight: 500;
    color: var(--dark);
    line-height: 1.25;
    margin: 2.5rem 0 1rem;
    letter-spacing: -.01em;
}
.post__body h3 {
    font-family: var(--fd);
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--dark);
    line-height: 1.3;
    margin: 2rem 0 .8rem;
}
.post__body ul,
.post__body ol {
    margin: 0 0 1.4rem;
    padding-left: 0;
    list-style: none;
}
.post__body li {
    position: relative;
    padding-left: 1.4rem;
    margin-bottom: .5rem;
    color: var(--g5);
}
.post__body ul li::before {
    content: '';
    position: absolute;
    left: 0; top: .6rem;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--sage);
}
.post__body ol { counter-reset: post-li; }
.post__body ol li {
    counter-increment: post-li;
    padding-left: 2rem;
}
.post__body ol li::before {
    content: counter(post-li) '.';
    position: absolute;
    left: 0; top: 0;
    color: var(--sage);
    font-family: var(--fd);
    font-weight: 500;
    font-size: 1.1rem;
}
.post__body blockquote {
    margin: 2rem 0;
    padding: 1.4rem 1.8rem;
    background: var(--sbg);
    border-left: 3px solid var(--sage);
    border-radius: 8px;
    font-family: var(--fd);
    font-size: 1.15rem;
    font-style: italic;
    color: var(--dark);
    line-height: 1.5;
}
.post__body strong { color: var(--dark); font-weight: 600; }
.post__body a { color: var(--sage); text-decoration: underline; text-underline-offset: 3px; }
.post__body a:hover { color: var(--sd); }

.post__tags {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 2.5rem 0;
    padding-top: 2rem;
    border-top: 1px solid var(--g2);
}
.post__tag {
    font-size: 12px;
    color: var(--g5);
    background: var(--g1);
    padding: .4rem .8rem;
    border-radius: 100px;
    transition: all .2s var(--ease);
}
.post__tag:hover {
    background: var(--sbg);
    color: var(--sd);
}

/* Share */
.post__share {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.2rem 0;
    border-top: 1px solid var(--g2);
    border-bottom: 1px solid var(--g2);
}
.post__share-label {
    font-size: 13px;
    color: var(--g4);
    letter-spacing: .03em;
}
.post__share-btns {
    display: flex; gap: .4rem;
}
.post__share-btn {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--g1);
    color: var(--g5);
    border: none;
    cursor: pointer;
    transition: all .25s var(--ease);
}
.post__share-btn:hover {
    background: var(--sage);
    color: #fff;
    transform: translateY(-2px);
}

/* Related posts */
.post__related {
    margin-top: clamp(3rem, 6vw, 5rem);
    padding-top: clamp(2.5rem, 5vw, 3.5rem);
    border-top: 1px solid var(--g2);
}
.post__related-h2 {
    font-family: var(--fd);
    font-size: clamp(1.4rem, 2.4vw, 1.8rem);
    font-weight: 400;
    color: var(--dark);
    margin-bottom: 2rem;
}
.post__related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 1024px) {
    .bgrid { grid-template-columns: repeat(2, 1fr); }
    .bfeatured__grid { grid-template-columns: 1fr; }
    .bfeatured__grid .bcard:first-child { grid-row: auto; }
    .bfeatured__grid .bcard:first-child .bcard__img-wrap { aspect-ratio: 16 / 9; }
}

@media (max-width: 768px) {
    .bfilter { top: 70px; }
    .bfilter__inner { gap: 1rem; }
    .bfilter__search { max-width: 100%; }
    .bgrid { grid-template-columns: 1fr; gap: 2rem; }
    .bsection-head { flex-wrap: wrap; gap: .8rem; }
    .bsection-line { display: none; }
    .bcta__inner { grid-template-columns: 1fr; align-items: start; }
    .bcta__acts { align-items: flex-start; }
    .post__related-grid { grid-template-columns: 1fr; }
    .post__share { flex-wrap: wrap; }
}

@media (max-width: 480px) {
    .bhero { padding-top: clamp(110px, 22vw, 140px); }
    .bfilter__inner { flex-direction: column; align-items: stretch; }
    .bfilter__cats { width: 100%; }
    .bcard__img-wrap { aspect-ratio: 16 / 10; }
    .bcta__txt h2 br { display: none; }
}

/* ===========================
   ACCESSIBILITY / MOTION
   =========================== */
@media (prefers-reduced-motion: reduce) {
    .bhero__h1 .h-line,
    .bhero__p {
        opacity: 1;
        transform: none;
        animation: none;
    }
    .bcard,
    .bcard__img,
    .bcard__more svg,
    .bcard__more {
        transition: none;
    }
    .bcard:hover { transform: none; }
    .bcard:hover .bcard__img { transform: none; }
    .bcard--skeleton .bcard__img,
    .bcard--skeleton .bcard__line {
        animation: none;
    }
}

/* Focus states */
.bcard:focus-visible,
.bcat:focus-visible,
.bload__btn:focus-visible,
.bfilter__search:focus-within,
.post__share-btn:focus-visible,
.post__back:focus-visible {
    outline: 2px solid var(--sage);
    outline-offset: 3px;
    border-radius: 8px;
}
