/* Blog listing page (Views/Blogs/Index.cshtml, Views/Blogs/_Partial_Blog_GridBody.cshtml) */

/* ── Blog Hero Header ── */
.tf-blog-hero {
    position: relative;
    background-color: #0d1b6e;
    overflow: hidden;
    padding: 48px 0 52px;
}

    .tf-blog-hero::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 55%;
        height: 100%;
        background-image: url('https://tiles-finder-prod.s3.ap-south-1.amazonaws.com/mockups/2026/2026-03/DYNUT-GRIS-PREVIEW-da8cc7ec-ec17-43dc-8d26-632234b76272.jpg');
        background-size: cover;
        background-position: center;
        mask-image: linear-gradient(to left, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0) 100%);
        /*-webkit-mask-image: linear-gradient(to left, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 100%);*/
        pointer-events: none;
    }

    /* Dark blue overlay so text stays readable */
    .tf-blog-hero::after {
        content: '';
        position: absolute;
        inset: 0;
        /*background: linear-gradient(to right, #0d1b6e 30%, rgba(13,27,110,0.55) 30%, rgba(13,27,110,0.1) 100%);*/
        pointer-events: none;
    }

.tf-blog-hero__inner {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Breadcrumb */
.tf-blog-hero__breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
}

    .tf-blog-hero__breadcrumb a {
        color: rgba(255, 255, 255, 0.75);
        text-decoration: none;
        transition: color 0.2s;
    }

        .tf-blog-hero__breadcrumb a:hover {
            color: #fff;
        }

.tf-blog-hero__breadcrumb-sep {
    display: inline-flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.45);
}

    .tf-blog-hero__breadcrumb-sep svg {
        width: 14px;
        height: 14px;
    }

.tf-blog-hero__breadcrumb span {
    color: #fff;
    font-weight: 500;
}

/* Heading */
.tf-blog-hero__title {
    font-size: clamp(2rem, 5vw, 3rem);
    /*font-weight: 800;*/
    color: #ffffff;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* Subtitle */
.tf-blog-hero__subtitle {
    font-size: clamp(0.9rem, 2vw, 1.05rem);
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 32px;
    max-width: 480px;
    line-height: 1.55;
}

/* Search bar */
.tf-blog-hero__search-wrap {
    max-width: 560px;
}

.tf-blog-hero__search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 50px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

.tf-blog-hero__search-icon {
    position: absolute;
    left: 20px;
    color: #9ca3af;
    pointer-events: none;
    flex-shrink: 0;
}

.tf-blog-hero__search-input {
    width: 100%;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 50px !important;
    padding: 16px 24px 16px 52px !important;
    font-size: 0.95rem;
    color: #1e293b;
    background: transparent;
}

    .tf-blog-hero__search-input::placeholder {
        color: #9ca3af;
    }

    .tf-blog-hero__search-input:focus {
        box-shadow: none !important;
        border: none !important;
    }

/* ── Blog section heading ── */
.tf-blog-section-heading {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0;
}

/* ── Blog section top bar ── */
.tf-blog-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 28px 0 20px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 28px;
}

.tf-blog-topbar__right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Categories dropdown */
.tf-blog-cat-select {
    appearance: none;
    -webkit-appearance: none;
    padding: 9px 36px 9px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #374151;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24' stroke='%236b7280' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
    transition: border-color 0.2s;
}

    .tf-blog-cat-select:focus {
        outline: none;
        border-color: #1a2fa8;
    }

/* View toggle buttons */
.tf-view-toggle {
    display: flex;
    gap: 4px;
}

.tf-view-toggle__btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #9ca3af;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

    .tf-view-toggle__btn:hover,
    .tf-view-toggle__btn.active {
        border-color: #1a2fa8;
        color: #1a2fa8;
        background: #eef1ff;
    }

/* ── Blog Card Grid ── */
.tfbc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    /*padding: 0 16px;*/
}

/* ── Card ── */
.tfbc-card {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    border: 1px solid #f0f0f0;
}

    .tfbc-card:hover {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.13);
        transform: translateY(-3px);
    }

/* ── Image wrapper ── */
.tfbc-card__img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e9ecef;
}

    .tfbc-card__img-wrap img {
        width: 100%;
        height: 100%;
        object-fit: fill;
        display: block;
        transition: transform 0.4s ease;
    }

.tfbc-card:hover .tfbc-card__img-wrap img {
    transform: scale(1.04);
}

/* ── Category badge ── */
.tfbc-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 13px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    background: #7c3aed;
    line-height: 1;
    white-space: nowrap;
}

/* Category colour variants */
.tfbc-card__badge--maintenance {
    background: #2563eb;
}

.tfbc-card__badge--trends {
    background: #f97316;
}

.tfbc-card__badge--buying-guide {
    background: #16a34a;
}

.tfbc-card__badge--bathroom {
    background: #0891b2;
}

.tfbc-card__badge--kitchen {
    background: #d97706;
}

.tfbc-card__badge--flooring {
    background: #7c3aed;
}

.tfbc-card__badge--wall {
    background: #dc2626;
}

.tfbc-card__badge--floor {
    background: #7c3aed;
}

/* ── Card body ── */
.tfbc-card__body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ── Meta row (date · read time) ── */
.tfbc-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 10px;
}

    .tfbc-card__meta svg {
        flex-shrink: 0;
        color: #9ca3af;
    }

.tfbc-card__meta-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #d1d5db;
    display: inline-block;
}

/* ── Title ── */
.tfbc-card__title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.4;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

    .tfbc-card__title a {
        color: inherit;
        text-decoration: none;
        transition: color 0.2s;
    }

        .tfbc-card__title a:hover {
            color: #2563eb;
        }

/* ── Description ── */
.tfbc-card__desc {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.55;
    margin: 0 0 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Read More link ── */
.tfbc-card__readmore {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    margin-top: auto;
    transition: gap 0.2s, color 0.2s;
}

    .tfbc-card__readmore:hover {
        color: #1d4ed8;
        gap: 10px;
    }

    .tfbc-card__readmore svg {
        transition: transform 0.2s;
    }

    .tfbc-card__readmore:hover svg {
        transform: translateX(3px);
    }

/* ── Empty state ── */
.tfbc-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
    font-size: 1.1rem;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .tf-blog-hero {
        padding: 36px 0 40px;
        background: linear-gradient(135deg, #0d1b6e 30%, #1a2fa8 100%);
    }

        .tf-blog-hero::before {
            display: none;
        }

    .tf-blog-topbar {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .tf-blog-hero__search-input {
        padding: 13px 18px 13px 46px !important;
        font-size: 0.875rem;
    }

    .tf-blog-hero__search-icon {
        left: 16px;
    }
}

@media (max-width: 1199px) {
    .tfbc-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 899px) {
    .tfbc-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .tfbc-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 428px) {
    .blog-start-spaceing {
        padding-top: 0 !important;
        margin-top: 2.5rem !important;
    }
}
