/* ==========================================================================
   Widget: Blog Posts
   BEM root: .gtea-blog-posts
   ========================================================================== */

/* --------------------------------------------------------------------------
   Root
   -------------------------------------------------------------------------- */
.gtea-blog-posts {
    box-sizing: border-box;
    position: relative;
    width: 100%;
}

/* --------------------------------------------------------------------------
   Columns row
   -------------------------------------------------------------------------- */
.gtea-blog-posts__columns {
    display: flex;
    flex-wrap: wrap;
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Column base
   -------------------------------------------------------------------------- */
.gtea-blog-posts__col {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-start;
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Card
   -------------------------------------------------------------------------- */
.gtea-blog-posts__card {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    position: relative; /* required for __card-link overlay */
    width: 100%;
}

/* --------------------------------------------------------------------------
   Image
   -------------------------------------------------------------------------- */
.gtea-blog-posts__image-outer {
    display: block;
    box-sizing: border-box;
    width: 100%;
}

.gtea-blog-posts__image-wrap {
    display: block;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
}

.gtea-blog-posts__image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.gtea-blog-posts__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --------------------------------------------------------------------------
   Meta row (category + date)
   -------------------------------------------------------------------------- */
.gtea-blog-posts__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
}

.gtea-blog-posts__category-outer,
.gtea-blog-posts__date-outer {
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.gtea-blog-posts__category {
    text-decoration: none;
    display: inline-block;
    box-sizing: border-box;
}

.gtea-blog-posts__date {
    display: inline-block;
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Title
   -------------------------------------------------------------------------- */
.gtea-blog-posts__title-outer {
    display: flex;
    box-sizing: border-box;
    width: 100%;
}

.gtea-blog-posts__title-link {
    text-decoration: none;
    display: block;
    width: 100%;
    color: inherit;
}

.gtea-blog-posts__title {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Excerpt
   -------------------------------------------------------------------------- */
.gtea-blog-posts__excerpt-outer {
    display: flex;
    box-sizing: border-box;
    width: 100%;
}

.gtea-blog-posts__excerpt {
    width: 100%;
    box-sizing: border-box;
}

.gtea-blog-posts__excerpt > *:first-child {
    margin-top: 0;
}

.gtea-blog-posts__excerpt > *:last-child {
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   CTA wrap
   -------------------------------------------------------------------------- */
.gtea-blog-posts__cta-wrap {
    display: flex;
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Full card click overlay
   -------------------------------------------------------------------------- */
.gtea-blog-posts__card-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    cursor: pointer;
}

/* Keep interactive elements above the card-link overlay */
.gtea-blog-posts__image-link,
.gtea-blog-posts__title-link,
.gtea-blog-posts__category,
.gtea-blog-posts__cta-wrap {
    position: relative;
    z-index: 2;
}

/* --------------------------------------------------------------------------
   Animation — base states
   All cards (featured + list) start hidden when a data-anim-type attribute
   is present. Viewport mode: JS adds .gtea-bp-visible to reveal each card.
   Scroll mode: JS drives opacity/transform directly via inline styles.
   -------------------------------------------------------------------------- */
.gtea-blog-posts[data-anim-type] .gtea-blog-posts__card {
    opacity: 0;
}

.gtea-blog-posts[data-anim-type] .gtea-blog-posts__card.gtea-bp-visible {
    opacity: 1;
    transform: none !important;
}
