/**
 * Blackturn News Blog — base styles
 * Hero carousel + post grid + pagination
 */

.btnb-hero, .btnb-grid-wrap { box-sizing: border-box; font-family: inherit; }
.btnb-hero *, .btnb-grid-wrap *, .btnb-hero *::before, .btnb-hero *::after { box-sizing: border-box; }

/* ============ HERO CAROUSEL ============ */
.btnb-hero {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background-color: #111;
}
.btnb-hero .swiper { width: 100%; height: 500px; }
.btnb-hero .swiper-slide { position: relative; overflow: hidden; }
.btnb-hero .swiper-slide a {
    display: block; position: relative; width: 100%; height: 100%;
    text-decoration: none; color: #fff;
}
.btnb-hero-img {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform .6s ease;
}
.btnb-hero--zoom .swiper-slide:hover .btnb-hero-img { transform: scale(1.04); }

.btnb-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, var(--btnb-overlay-top, rgba(0,0,0,0)) 30%, var(--btnb-overlay-bottom, rgba(0,0,0,.85)) 100%);
    pointer-events: none;
}
.btnb-hero-content {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 40px 48px;
    z-index: 2;
    max-width: 800px;
}
.btnb-hero-cat {
    display: inline-block;
    background: #e53935; color: #fff;
    font-size: 11px; font-weight: 700;
    letter-spacing: 1px; text-transform: uppercase;
    padding: 6px 12px; border-radius: 4px;
    margin-bottom: 14px;
}
.btnb-hero-title {
    font-size: 34px; font-weight: 700;
    line-height: 1.2; margin: 0 0 10px;
    color: #fff;
}
.btnb-hero-excerpt {
    font-size: 15px; line-height: 1.6;
    color: rgba(255,255,255,.85); margin: 0 0 12px;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.btnb-hero-meta { font-size: 13px; color: rgba(255,255,255,.7); }
.btnb-hero-meta .btnb-sep { opacity: 0.6; margin: 0 4px; }

.btnb-hero .swiper-button-next, .btnb-hero .swiper-button-prev {
    color: #fff; width: 46px; height: 46px;
    background: rgba(0,0,0,.4);
    border-radius: 50%;
    backdrop-filter: blur(6px);
    transition: background .2s;
}
.btnb-hero .swiper-button-next:hover, .btnb-hero .swiper-button-prev:hover { background: rgba(0,0,0,.7); }
.btnb-hero .swiper-button-next::after, .btnb-hero .swiper-button-prev::after { font-size: 18px; font-weight: 700; }

.btnb-hero .swiper-pagination-bullet { background: rgba(255,255,255,.5); opacity: 1; width: 10px; height: 10px; transition: all .3s; }
.btnb-hero .swiper-pagination-bullet-active { width: 28px; border-radius: 5px; background: #e53935; }

/* ============ POST GRID ============ */
.btnb-grid-wrap { width: 100%; }

.btnb-section-head {
    display: flex; align-items: center; justify-content: space-between;
    margin: 0 0 24px; padding-bottom: 14px;
    border-bottom: 3px solid #111;
}
.btnb-section-head h2 {
    margin: 0; font-size: 22px; font-weight: 700;
    letter-spacing: -0.3px; color: #111;
}
.btnb-accent-word { color: #e53935; }

.btnb-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    margin-bottom: 0;
}
.btnb-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
    display: flex; flex-direction: column;
}
.btnb-card-img-wrap {
    position: relative; overflow: hidden;
    aspect-ratio: 16/10;
    background: #f2f2f2; display: block;
}
.btnb-card-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform .4s ease;
}
.btnb-card:hover .btnb-card-img-wrap img { transform: scale(1.06); }
.btnb-card-cat {
    position: absolute; top: 12px; left: 12px;
    background: #e53935; color: #fff;
    font-size: 10px; font-weight: 700;
    letter-spacing: .8px; text-transform: uppercase;
    padding: 5px 10px; border-radius: 3px; z-index: 2;
    text-decoration: none;
}
.btnb-card-cat--inline { position: static; display: inline-block; margin-bottom: 10px; }

.btnb-card-body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }
.btnb-card-title { font-size: 17px; font-weight: 700; line-height: 1.35; margin: 0 0 10px; }
.btnb-card-title a { color: #111; text-decoration: none; transition: color .2s; }
.btnb-card-title a:hover { color: #e53935; }

.btnb-card-excerpt {
    font-size: 13.5px; line-height: 1.6; color: #555;
    margin: 0 0 14px;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden; flex: 1;
}
.btnb-card-meta {
    font-size: 12px; color: #888;
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.btnb-dot {
    display: inline-block; width: 3px; height: 3px;
    border-radius: 50%; background: currentColor; opacity: .5;
}

/* Card style variants */
.btnb-card--overlay { position: relative; }
.btnb-card--overlay .btnb-card-img-wrap { aspect-ratio: 3/4; height: 100%; }
.btnb-card--overlay .btnb-card-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.85) 100%);
    pointer-events: none;
}
.btnb-card--overlay .btnb-card-overlay-content {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 16px; z-index: 2; color: #fff;
}
.btnb-card--overlay .btnb-card-overlay-content .btnb-card-title a { color: #fff; }
.btnb-card--overlay .btnb-card-overlay-content .btnb-card-meta { color: rgba(255,255,255,0.8); }

.btnb-card--minimal { background: transparent; border: 0; border-radius: 0; }
.btnb-card--minimal .btnb-card-body { padding: 0; }

/* ============ PAGINATION ============ */
.btnb-pagination {
    display: flex; justify-content: center; align-items: center;
    gap: 6px; flex-wrap: wrap; margin-top: 40px;
    list-style: none; padding: 0;
}
.btnb-pagination .page-numbers {
    min-width: 42px; height: 42px; padding: 0 14px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; border: 1px solid #e5e5e5;
    border-radius: 8px; color: #333;
    font-size: 14px; font-weight: 500;
    text-decoration: none; transition: all .2s;
    cursor: pointer;
}
.btnb-pagination a.page-numbers:hover { border-color: #111; color: #111; }
.btnb-pagination .page-numbers.current { background: #111; border-color: #111; color: #fff; }
.btnb-pagination .page-numbers.dots { border: none; background: transparent; min-width: auto; padding: 0 4px; }

/* ============ LOAD MORE ============ */
.btnb-loadmore-wrap { text-align: center; margin-top: 40px; }
.btnb-loadmore {
    display: inline-block; background: #111; color: #fff;
    border: 0; padding: 14px 32px;
    font-size: 14px; font-weight: 600;
    letter-spacing: 0.5px; text-transform: uppercase;
    border-radius: 8px; cursor: pointer;
    transition: all .2s;
}
.btnb-loadmore:hover { background: #e53935; }
.btnb-loadmore:disabled { opacity: 0.6; cursor: wait; }

/* ============ STATES ============ */
.btnb-empty { text-align: center; padding: 60px 20px; color: #888; font-size: 15px; }
.btnb-grid-container.btnb-loading { opacity: 0.5; pointer-events: none; transition: opacity .2s; }

/* ============ RELATED POSTS ============ */
.btnb-related { width: 100%; }
.btnb-related-head {
    font-size: 22px; font-weight: 700; color: #111;
    margin: 0 0 24px; padding-bottom: 14px;
    border-bottom: 3px solid #111;
}
.btnb-related-grid {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}
.btnb-related-card {
    background: #fff; border: 1px solid #eee;
    border-radius: 10px; overflow: hidden;
    transition: transform .25s, box-shadow .25s;
    display: flex; flex-direction: column;
}
.btnb-related-card:hover { transform: translateY(-3px); box-shadow: 0 6px 24px rgba(0,0,0,.08); }
.btnb-related-img { display: block; aspect-ratio: 16/10; overflow: hidden; background: #f2f2f2; }
.btnb-related-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.btnb-related-card:hover .btnb-related-img img { transform: scale(1.05); }
.btnb-related-body { padding: 14px 16px 18px; flex: 1; display: flex; flex-direction: column; }
.btnb-related-cat {
    display: inline-block; background: transparent; color: #e53935;
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .8px; margin-bottom: 8px; text-decoration: none;
}
.btnb-related-title { font-size: 15px; font-weight: 700; line-height: 1.4; margin: 0 0 10px; flex: 1; }
.btnb-related-title a { color: #111; text-decoration: none; transition: color .2s; }
.btnb-related-title a:hover { color: #e53935; }
.btnb-related-meta { font-size: 12px; color: #888; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .btnb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
    .btnb-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .btnb-hero .swiper { height: 400px; }
    .btnb-hero-content { padding: 28px; }
    .btnb-hero-title { font-size: 24px; }
}
@media (max-width: 640px) {
    .btnb-grid, .btnb-related-grid { grid-template-columns: 1fr; gap: 20px; }
    .btnb-hero .swiper { height: 340px; }
    .btnb-hero-content { padding: 22px 20px; }
    .btnb-hero-title { font-size: 20px; }
    .btnb-hero-excerpt { -webkit-line-clamp: 1; }
    .btnb-hero .swiper-button-next, .btnb-hero .swiper-button-prev { display: none; }
    .btnb-section-head h2 { font-size: 18px; }
}

/* ============================================================
 * BROWSE BY CATEGORY WIDGET
 * ============================================================ */

.btnb-cats-head {
    font-size: 32px;
    font-weight: 800;
    color: #111;
    margin: 0 0 24px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}
.btnb-cats-head .btnb-accent-word { color: #e53935; }

.btnb-cats-wrap {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: stretch;
}

/* ---------- Pills ---------- */
.btnb-cats--pills {
    flex-wrap: wrap;
    align-items: center;
}
.btnb-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: #fff6d6;
    color: #1a1a1a;
    border: 1px solid transparent;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all .25s ease;
    line-height: 1.3;
    white-space: nowrap;
}
.btnb-cat-pill:hover {
    background: #e53935;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229,57,53,0.25);
}
.btnb-cat-pill .btnb-cat-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 700;
    color: #999;
    background: rgba(0,0,0,0.06);
    border-radius: 100px;
    transition: all .25s;
}
.btnb-cat-pill:hover .btnb-cat-count {
    color: #fff;
    background: rgba(255,255,255,0.25);
}

/* ---------- Image Tiles ---------- */
.btnb-cats--tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.btnb-cat-tile {
    position: relative;
    display: flex;
    align-items: flex-end;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    background: #222 center/cover no-repeat;
    text-decoration: none;
    color: #fff;
    transition: transform .3s ease, box-shadow .3s ease;
    isolation: isolate;
}
.btnb-cat-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 100%);
    transition: background .3s ease;
    z-index: 1;
}
.btnb-cat-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
}
.btnb-cat-tile:hover::before {
    background: rgba(229,57,53,0.85);
}
.btnb-cat-tile-body {
    position: relative;
    z-index: 2;
    padding: 20px;
    width: 100%;
}
.btnb-cat-tile-title {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.2px;
}
.btnb-cat-tile .btnb-cat-count {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    opacity: 0.9;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.btnb-cat-tile .btnb-cat-desc {
    margin: 8px 0 0;
    font-size: 13px;
    opacity: 0.85;
    line-height: 1.5;
}

/* ---------- Icon Cards ---------- */
.btnb-cats--cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.btnb-cat-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 24px 20px;
    background: #ffffff;
    border: 1px solid #eee;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all .25s ease;
    position: relative;
    overflow: hidden;
}
.btnb-cat-card:hover {
    background: #111;
    border-color: #111;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}
.btnb-cat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 36px;
    line-height: 1;
    color: #e53935;
    transition: color .25s;
}
.btnb-cat-icon svg { width: 36px; height: 36px; fill: currentColor; transition: fill .25s; }
.btnb-cat-card:hover .btnb-cat-icon { color: #fff; }

.btnb-cat-card-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #111;
    line-height: 1.3;
    transition: color .25s;
}
.btnb-cat-card:hover .btnb-cat-card-title { color: #fff; }
.btnb-cat-card-meta {
    font-size: 12px;
    color: #888;
    letter-spacing: 0.3px;
    transition: color .25s;
}
.btnb-cat-card:hover .btnb-cat-card-meta { color: rgba(255,255,255,0.7); }

/* ---------- Minimal Numbered List ---------- */
.btnb-cats--list {
    flex-direction: column;
    gap: 0;
    align-items: stretch;
}
.btnb-cat-list-item {
    display: flex;
    align-items: baseline;
    gap: 20px;
    padding: 18px 0;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: #111;
    font-size: 18px;
    font-weight: 500;
    transition: color .2s, padding-left .25s;
}
.btnb-cat-list-item::before {
    content: var(--btnb-idx, '00');
    font-size: 13px;
    font-weight: 700;
    color: #e53935;
    letter-spacing: 1px;
    flex-shrink: 0;
    width: 32px;
}
.btnb-cat-list-item:hover {
    color: #e53935;
    padding-left: 8px;
}
.btnb-cat-list-item .btnb-cat-list-name {
    flex: 1;
}
.btnb-cat-list-item .btnb-cat-count {
    color: #999;
    font-size: 14px;
    font-weight: 600;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .btnb-cats--tiles, .btnb-cats--cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .btnb-cat-tile { height: 160px; }
    .btnb-cats-head { font-size: 26px; }
}
@media (max-width: 640px) {
    .btnb-cats--tiles, .btnb-cats--cards { grid-template-columns: 1fr; }
    .btnb-cat-pill { font-size: 14px; padding: 8px 16px; }
    .btnb-cat-tile { height: 140px; }
    .btnb-cat-tile-title { font-size: 17px; }
    .btnb-cat-list-item { font-size: 16px; padding: 14px 0; gap: 14px; }
    .btnb-cats-head { font-size: 22px; }
}
