/* Blog listing (/blog). Loaded only on blogs.blade.php. Everything is scoped under .bl-page. */

.bl-page {
    --bl-accent: #ff3c3c;
    --bl-accent-2: #ff7a2f;
    --bl-ink: #111111;
    --bl-muted: #666666;
    --bl-line: #ececec;
    background: #fff;
}

/* ---------- Hero ---------- */
.bl-page .bl-hero {
    position: relative;
    padding: 28px 0 56px;
    background: linear-gradient(135deg, #ffffff 0%, #fff6f1 100%);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 28px), 0 100%);
}

.bl-page .bl-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--bl-accent), var(--bl-accent-2));
}

.bl-page .bl-breadcrumb {
    justify-content: flex-start;
    margin-bottom: 18px;
}

.bl-page .bl-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--bl-accent);
}

.bl-page .bl-eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    background: var(--bl-accent);
    transform: rotate(45deg);
}

.bl-page .bl-title {
    margin: 0 0 12px;
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--bl-ink);
}

.bl-page .bl-subtitle {
    margin: 0;
    max-width: 640px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--bl-muted);
}

/* ---------- Grid ---------- */
.bl-page .bl-list {
    position: relative;
    padding: 40px 0 72px;
}

.bl-page .bl-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.bl-page .bl-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--bl-line);
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

/* Red-to-orange bar that sweeps across the top edge on hover */
.bl-page .bl-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 2;
    background: linear-gradient(90deg, var(--bl-accent), var(--bl-accent-2));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.bl-page .bl-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 60, 60, 0.45);
    box-shadow: 0 14px 30px rgba(255, 60, 60, 0.12);
}

.bl-page .bl-card:hover::before {
    transform: scaleX(1);
}

.bl-page .bl-card-media {
    position: relative;
    display: block;
    aspect-ratio: 512 / 293; /* matches the blog thumbnails, so the full image shows without cropping */
    overflow: hidden;
    background: #f4f4f4;
    /* angled bottom-right corner */
    clip-path: polygon(0 0, 100% 0, 100% 86%, 92% 100%, 0 100%);
}

.bl-page .bl-card-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* HUD-style corner brackets on the image frame */
.bl-page .bl-card-hud {
    position: absolute;
    inset: 10px;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(var(--bl-accent), var(--bl-accent)) left top / 18px 2px no-repeat,
        linear-gradient(var(--bl-accent), var(--bl-accent)) left top / 2px 18px no-repeat,
        linear-gradient(var(--bl-accent-2), var(--bl-accent-2)) right top / 18px 2px no-repeat,
        linear-gradient(var(--bl-accent-2), var(--bl-accent-2)) right top / 2px 18px no-repeat;
}

.bl-page .bl-card:hover .bl-card-hud {
    filter: drop-shadow(0 0 6px rgba(255, 60, 60, 0.75));
}

.bl-page .bl-card-index {
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 1;
    padding: 6px 14px 6px 12px;
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    background: #0d0d0d;
    clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

.bl-page .bl-card-date {
    position: absolute;
    top: 14px;
    left: 0;
    padding: 5px 12px 5px 10px;
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(90deg, var(--bl-accent), var(--bl-accent-2));
    clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

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

.bl-page .bl-card-title {
    margin: 0 0 10px;
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 600;
    font-size: 18px;
    line-height: 1.3;
    color: var(--bl-ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bl-page .bl-card-title a {
    color: inherit;
    text-decoration: none;
}

.bl-page .bl-card:hover .bl-card-title a {
    color: var(--bl-accent);
}

.bl-page .bl-card-desc {
    flex: 1;
    margin: 0 0 16px;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--bl-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bl-page .bl-card-link {
    align-self: flex-start;
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bl-accent);
    text-decoration: none;
}

.bl-page .bl-card-link span {
    display: inline-block;
    transition: transform 0.25s ease;
}

.bl-page .bl-card-link:hover span {
    transform: translateX(4px);
}

.bl-page .bl-empty {
    margin: 40px 0;
    text-align: center;
    color: var(--bl-muted);
}

.bl-page .bl-card-tag {
    display: inline-block;
    align-self: flex-start;
    margin-bottom: 12px;
    padding: 4px 12px;
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(90deg, var(--bl-accent), var(--bl-accent-2));
    clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}

/* Tick-mark track above the link; ticks turn red on hover */
.bl-page .bl-card-foot {
    margin-top: auto;
    padding-top: 14px;
}

.bl-page .bl-card-foot::before {
    content: "";
    display: block;
    height: 6px;
    margin-bottom: 12px;
    background: repeating-linear-gradient(90deg, #d9d9d9 0 1px, transparent 1px 8px);
    transition: background 0.25s ease;
}

.bl-page .bl-card:hover .bl-card-foot::before {
    background: repeating-linear-gradient(90deg, var(--bl-accent) 0 1px, transparent 1px 8px);
}

/* Featured (newest post, page 1 only): wide card, image left, text right */
.bl-page .bl-card--featured {
    grid-column: 1 / -1;
    flex-direction: row;
}

.bl-page .bl-card--featured .bl-card-media {
    flex: 0 0 55%;
    aspect-ratio: auto;
    min-height: 340px;
}

.bl-page .bl-card--featured .bl-card-img {
    position: absolute;
    inset: 0;
}

.bl-page .bl-card--featured .bl-card-body {
    justify-content: center;
    padding: 34px 36px;
}

.bl-page .bl-card--featured .bl-card-title {
    font-size: 26px;
    -webkit-line-clamp: 3;
}

.bl-page .bl-card--featured .bl-card-desc {
    font-size: 15.5px;
    -webkit-line-clamp: 4;
}

/* ---------- Pagination ---------- */
.bl-page .bl-pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.bl-page .bl-pagination .pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 0;
}

.bl-page .bl-pagination .page-link {
    min-width: 40px;
    text-align: center;
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 600;
    color: var(--bl-ink);
    background: #fff;
    border: 1px solid var(--bl-line);
    border-radius: 4px;
    box-shadow: none;
}

.bl-page .bl-pagination .page-link:hover,
.bl-page .bl-pagination .page-link:focus {
    color: var(--bl-accent);
    border-color: var(--bl-accent);
    background: #fff;
    box-shadow: none;
}

.bl-page .bl-pagination .page-item.active .page-link {
    color: #fff;
    background: linear-gradient(90deg, var(--bl-accent), var(--bl-accent-2));
    border-color: transparent;
}

.bl-page .bl-pagination .page-item.disabled .page-link {
    color: #bbb;
    background: #fff;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .bl-page .bl-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
    }
}

@media (max-width: 767px) {
    .bl-page .bl-card--featured {
        flex-direction: column;
    }

    .bl-page .bl-card--featured .bl-card-media {
        flex: none;
        min-height: 0;
        aspect-ratio: 512 / 293;
    }

    .bl-page .bl-card--featured .bl-card-img {
        position: static;
        height: auto;
    }

    .bl-page .bl-card--featured .bl-card-body {
        padding: 22px 20px 24px;
    }

    .bl-page .bl-card--featured .bl-card-title {
        font-size: 21px;
    }
}

@media (max-width: 575px) {
    .bl-page .bl-hero {
        padding: 20px 0 44px;
    }

    .bl-page .bl-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bl-page .bl-card,
    .bl-page .bl-card::before,
    .bl-page .bl-card-link span,
    .bl-page .bl-card-foot::before {
        transition: none;
    }

    .bl-page .bl-card:hover,
    .bl-page .bl-card-link:hover span {
        transform: none;
    }
}
