/* ================================================
   Thailand Fantastic — Blog Grid & Category Pages
   File: css/blog-grid.css
   ================================================ */

/* -----------------------------------------------
   HEADER HERO CON IMMAGINE (Blog e Categoria)
----------------------------------------------- */
.tf-page-header-hero {
    width: 100% !important;
    height: 260px !important;
    min-height: 260px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    padding: 1.75rem 2rem !important;
    margin-bottom: 1.75rem !important;
    box-sizing: border-box !important;
}

.tf-page-header-hero h1 {
    font-size: clamp(1.5rem, 4vw, 2rem) !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin: 0 0 0.35rem !important;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.9) !important;
    line-height: 1.2 !important;
}

.tf-page-header-hero p {
    font-size: 0.88rem !important;
    color: rgba(255,255,255,0.95) !important;
    margin: 0 !important;
    line-height: 1.5 !important;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.8) !important;
    max-width: 560px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.tf-hero-count {
    display: inline-flex !important;
    align-items: center !important;
    background: rgba(255,255,255,0.18) !important;
    backdrop-filter: blur(4px) !important;
    border: 1px solid rgba(255,255,255,0.35) !important;
    color: #ffffff !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    padding: 3px 11px !important;
    border-radius: 20px !important;
    margin-bottom: 0.5rem !important;
    width: fit-content !important;
    text-shadow: none !important;
}

/* -----------------------------------------------
   BOX DESCRIZIONE CATEGORIA (sotto il hero)
----------------------------------------------- */
.tf-cat-desc-box {
    background: #F5F9F7;
    border-radius: 12px;
    border: 1px solid #e2eee8;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.tf-cat-desc-box p {
    font-size: 0.9rem;
    color: #718096;
    line-height: 1.65;
    margin: 0;
}

/* -----------------------------------------------
   GRIGLIA ARTICOLI — 3 colonne desktop, 2 mobile
----------------------------------------------- */
.tf-art-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.tf-art-card {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2eee8;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
    text-decoration: none;
}

.tf-art-card:hover {
    border-color: #2E8B57;
    transform: translateY(-2px);
    box-shadow: 0 4px 24px rgba(46, 139, 87, 0.08);
    text-decoration: none;
}

.tf-art-card-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.tf-art-card-img-ph {
    width: 100%;
    height: 140px;
    background: linear-gradient(135deg, #186337, #2E8B57);
    flex-shrink: 0;
}

.tf-art-card-body {
    padding: 0.9rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.tf-art-card-cat {
    font-size: 0.67rem;
    font-weight: 700;
    color: #2E8B57;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.tf-art-card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #111111;
    line-height: 1.35;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.tf-art-card-exc {
    font-size: 0.78rem;
    color: #718096;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.tf-art-card-foot {
    padding: 0.7rem 0.9rem;
    border-top: 1px solid #e2eee8;
}

.tf-btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #2E8B57;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(46, 139, 87, 0.25);
    transition: all 0.2s ease;
}

.tf-btn-cta:hover {
    background: #256f45;
    color: #ffffff;
    text-decoration: none;
}

/* -----------------------------------------------
   PAGINAZIONE
----------------------------------------------- */
.tf-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 0.5rem;
}

.tf-pagination .page-numbers {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    border: 1px solid #e2eee8;
    background: #ffffff;
    font-size: 0.82rem;
    color: #333333;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tf-pagination .page-numbers:hover,
.tf-pagination .page-numbers.current {
    background: #2E8B57;
    color: #ffffff;
    border-color: #2E8B57;
    text-decoration: none;
}

.tf-pagination .page-numbers.dots {
    border: none;
    background: transparent;
    pointer-events: none;
}

/* -----------------------------------------------
   IMMAGINE FEATURED NEL SINGOLO ARTICOLO — 4:2
----------------------------------------------- */
.single .post-thumbnail,
.single .wp-post-image-wrapper {
    width: 100%;
    aspect-ratio: 2 / 1;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.single .post-thumbnail img,
.single .wp-post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}

/* -----------------------------------------------
   RESPONSIVE
----------------------------------------------- */
@media (max-width: 900px) {
    .tf-art-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .tf-page-header-hero {
        height: 180px !important;
        min-height: 180px !important;
        padding: 1.25rem !important;
    }
    .tf-art-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.6rem !important;
    }
    .tf-art-card .tf-art-card-img,
    .tf-art-card .tf-art-card-img-ph {
        height: 100px !important;
    }
    .tf-art-card .tf-art-card-body {
        padding: 0.5rem 0.6rem !important;
        gap: 0.2rem !important;
    }
    h2.tf-art-card-title {
        font-size: 0.75rem !important;
        line-height: 1.3 !important;
        -webkit-line-clamp: 3 !important;
        margin: 0 !important;
    }
    .tf-art-card .tf-art-card-cat {
        font-size: 0.58rem !important;
        letter-spacing: 0.04em !important;
    }
    .tf-art-card .tf-art-card-exc {
        font-size: 0.7rem !important;
        -webkit-line-clamp: 2 !important;
    }
    .tf-art-card .tf-art-card-foot {
        padding: 0.45rem 0.6rem !important;
    }
    .tf-art-card .tf-btn-cta {
        font-size: 0.68rem !important;
        padding: 5px 9px !important;
    }
}