/* ==========================================================================
   1. Shared Base / Global Card Styles
   ========================================================================== */
.tf-blogs-swiper-root {
    width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    margin-top: 30px;
    padding: 0 !important;
}

/* Link Wrapper Configurations */
.tf-blog-card-link {
    text-decoration: none !important;
    color: inherit !important;
    display: block !important;
}

.tf-blog-card {
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    height: auto !important;
}

.tf-blog-image-wrapper {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    line-height: 0;
}

.tf-blog-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.tf-layout-home-view .tf-blog-title{
    margin: 20px 0px 10px 0px !important;   
}

.tf-blog-title {
    font-family: 'Inter' !important;
    font-size: 20px !important;
    font-weight: 500 !important;
    color: #000000 !important;
    text-decoration: none !important;
}

.tf-blog-readmore {
    font-family: 'Inter' !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    color: #000000 !important;
    text-decoration: underline !important;
    transition: color 0.2s ease;
    margin-top: 4px;
    display: inline-block;
}

.tf-blog-card-link:hover .tf-blog-readmore {
    color: #555555 !important;
}

/* ── HOVER CONTENT: Default hidden ── */
.tf-hover-overlay-content {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 2 !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    pointer-events: none !important;
}

.tf-hover-icon {
    width: 73px !important;
    height: 73px !important;
    margin-bottom: 3px !important;
}

.tf-hover-text {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 500 !important;
    font-size: 20px !important;
    line-height: 100% !important;
    text-align: center !important;
    white-space: nowrap !important;
}
.tf-hover-text .text-view { color: #ffffff !important; }
.tf-hover-text .text-article { color: #A6A891 !important; }

/* ==========================================================================
   2. Blog Page Grid Layout ONLY (Hover Effects Active)
   ========================================================================== */
.tf-layout-pure-grid .tf-blog-image-wrapper::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important; left: 0 !important;
    width: 100% !important; height: 100% !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    z-index: 1 !important;
}

.tf-layout-pure-grid .tf-blog-card-link:hover .tf-blog-image-wrapper::before,
.tf-layout-pure-grid .tf-blog-card-link:hover .tf-hover-overlay-content {
    opacity: 1 !important;
}

.tf-layout-pure-grid .tf-blog-image {
    transition: transform 0.3s ease !important;
}
.tf-layout-pure-grid .tf-blog-card-link:hover .tf-blog-image {
    transform: scale(1.03) !important;
}

/* ==========================================================================
   3. Home Page Layout ONLY (All Hovers Disabled)
   ========================================================================== */
.tf-layout-home-view .tf-blog-image-wrapper::before,
.tf-layout-home-view .tf-hover-overlay-content {
    display: none !important;
    opacity: 0 !important;
}
.tf-layout-home-view .tf-blog-image:hover,
.tf-layout-home-view .tf-blog-card-link:hover .tf-blog-image {
    transform: none !important;
    transition: none !important;
}

/* ==========================================================================
   4. Responsive Structure Breakpoints (Grid vs Home View)
   ========================================================================== */
@media (max-width: 1611px) {
.custom-blog-hero{
 padding: 0px 20px !important;   
}
}
/* ── DESKTOP VIEW (1025px+) ── */
@media (min-width: 1025px) {
    .tf-pure-grid-wrapper, .tf-home-grid-wrapper {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 19px !important;
        width: 100% !important;
    }

    .tf-blog-card {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Home Layout Adjustments */
    .tf-layout-home-view .tf-blog-card {
        align-items: flex-start !important;
    }
    .tf-layout-home-view .tf-blog-title {
        text-align: left !important;
    }
    .tf-layout-home-view .tf-blog-image-wrapper {
        aspect-ratio: 519 / 415 !important;
    }

    /* Blog Grid Layout Adjustments (Figma Layout) */
    .tf-layout-pure-grid .tf-blog-card {
        align-items: center !important;
        text-align: center !important;
    }
    
    .tf-layout-pure-grid .tf-blog-image-wrapper {
        max-width: 518px !important;
        max-height: 509px !important;
        aspect-ratio: 518 / 509 !important;  
        width: 100% !important;              
        margin-bottom: 20px !important;
    }
    .tf-layout-pure-grid .tf-blog-title {
        font-family: 'Poppins', sans-serif !important;
        font-weight: 300 !important;
        font-size: 23px !important;
        line-height: 1.6 !important;
        text-align: center !important;
    }
}

/* ── TABLET VIEW (768px – 1024px) ── */
@media (min-width: 768px) and (max-width: 1024px) {
    .tf-pure-grid-wrapper, .tf-home-grid-wrapper {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
    .tf-blog-image-wrapper { aspect-ratio: 4 / 3 !important; }
    .tf-blog-title { font-size: 18px !important; }
    .tf-blog-readmore { font-size: 16px !important; }
    
    .tf-layout-pure-grid .tf-blog-card { align-items: center !important; text-align: center !important; }
    .tf-layout-pure-grid .tf-blog-title { font-family: 'Poppins', sans-serif !important; font-size: 21px !important; line-height : 1.5 !important ;}
}

/* ── MOBILE VIEW (Below 767px) ── */
@media (max-width: 767px) {
    .tf-pure-grid-wrapper, .tf-home-grid-wrapper {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    .tf-blog-image-wrapper { aspect-ratio: 4 / 3 !important; }
    .tf-blog-title {
        font-size: 18px !important;
        line-height: 1.3 !important;
        margin: 10px 0 6px 0 !important;
    }
    .tf-blog-readmore { font-size: 16px !important; }

    .tf-layout-pure-grid .tf-blog-card { align-items: center !important; text-align: center !important; }
    .tf-layout-pure-grid .tf-blog-title {
        font-family: 'Poppins', sans-serif !important;
        font-size: 18px !important;
        margin-bottom: 0 !important;
    }
    .tf-layout-pure-grid .tf-blog-image-wrapper {
        margin-bottom: 10px !important;
    }

    /* Hover overlay icon/text shrink so it fits inside the smaller card */
    .tf-hover-icon {
        width: 40px !important;
        height: 40px !important;
        margin-bottom: 2px !important;
    }
    .tf-hover-text {
        font-size: 12px !important;
    }

    /* ──────────────────────────────────────────────────────────────
       HOME PAGE LAYOUT ONLY — Swiper.js Carousel (Mobile)
       Real Swiper.js library JS se init hoti hai (see custom-blogs-grid.php).
       Yahan sirf itna zaroori hai ke default 2-column GRID cancel ho
       taake Swiper apna flex layout + spaceBetween sahi tarah laga sake.
       Blog page (tf-layout-pure-grid) is se bilkul affect nahi hota.
       ────────────────────────────────────────────────────────────── */
    .tf-layout-home-view .tf-home-grid-wrapper {
        display: flex !important;
        grid-template-columns: none !important;
        gap: 0 !important;
    }

    .tf-layout-home-view .tf-home-grid-wrapper .tf-blog-image-wrapper {
        aspect-ratio: 4 / 3 !important;
    }

/* ── FIXED PILLS PAGINATION INTEGRATED FOR ALL SLIDERS ── */
    .tf-swiper-pagination,
    .collection-swiper-pagination {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        position: relative !important;
        bottom: 0 !important;
        margin-top: 20px !important;
        width: 100% !important;
        z-index: 10 !important;
    }
    
    /* Base style for all bullets - including active */
    .tf-swiper-pagination .swiper-pagination-bullet,
    .collection-swiper-pagination .swiper-pagination-bullet {
        width: 8px !important;
        height: 8px !important;
        background: #000000 !important;
        opacity: 0.25 !important;
        margin: 0 6px !important; /* Perfect gap configuration */
        border-radius: 50% !important;
        transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1), 
                    border-radius 0.3s cubic-bezier(0.25, 1, 0.5, 1), 
                    opacity 0.3s ease !important;
        transform: translate3d(0, 0, 0); /* Force hardware acceleration alignment fix */
    }
    
    /* Active dynamic capsule stretching configuration */
    .tf-swiper-pagination .swiper-pagination-bullet-active,
    .collection-swiper-pagination .swiper-pagination-bullet-active {
        opacity: 1 !important;
        background: #000000 !important;
        width: 24px !important; /* Fixed stretched layout */
        border-radius: 10px !important; /* Capsule track radius standard */
    }
}

/* ── EXTRA SMALL MOBILE (Below 420px) — tighten further ── */
@media (max-width: 420px) {
    .tf-pure-grid-wrapper, .tf-home-grid-wrapper {
        gap: 10px !important;
    }
    .tf-blog-title { font-size: 15px !important; }
    .tf-layout-pure-grid .tf-blog-title { font-size: 13px !important; }
    .tf-blog-readmore { font-size: 16px !important; }
}


/* ==========================================
   DYNAMIC SINGLE POST HERO BANNER STYLING
   ========================================== */
.custom-blog-hero {
    position: relative;
    width: 100%; 
    min-height: 370px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
}
.custom-blog-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1;
}

.custom-blog-hero .hero-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1611px;
    margin: 0 auto; 
    text-align: left; 
}

/* Dynamic Typography Styling */
.custom-blog-hero .dynamic-post-title {
    color: #ffffff !important;
    font-size: 65px !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    font-family: 'Inter';
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .custom-blog-hero {
        min-height: 320px;
    }
    .custom-blog-hero .hero-container {
        padding: 0 20px;
    }
    .custom-blog-hero .dynamic-post-title {
        font-size: 32px !important;
    }
}