/*
 Theme Name: Batao
 Template: twentytwentyfive
 Description: Batao theme based on Twenty Twenty-Five
 Author: Aleksandar Marković
 Tags: block-editor, fse
 Version: 1.0.0
*/
/* Single post */
.single-post .wp-block-image.alignwide img {
    max-height: 401px;
    object-fit: cover;
}

.wp-block-cover {
    position: relative;
    border-radius: 10px;
    padding: 0;
}

.single-post .wp-block-image img,
.wp-block-media-text .wp-block-media-text__media img {
    border-radius: 10px;
}

.wp-block-image img {
    vertical-align: unset;
}

.wp-block-cover:before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(67.16deg, rgba(53, 53, 101, 0.72) 35.44%, rgba(53, 53, 101, 0) 67.62%);
    z-index: 1;
}

.wp-block-cover .wp-block-heading {
    position: relative;
    z-index: 2;
}

/* Blog Grid Cards */
.batao-post-card {
    height: 100%;
    transition: all 0.3s ease;
    background-color: #ffffff !important;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(53, 53, 101, 0.08);
    flex-grow: 1 !important;
}

.batao-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(53, 53, 101, 0.15);
}

/* Image wrapper - for positioning category badge */
.batao-post-card-image-wrapper {
    position: relative;
}

.batao-post-card-detail-wrapper {
    flex-grow: 1;
}

.batao-post-card-detail-wrapper .wp-block-group.is-vertical {
    flex-grow: 1;
    gap: 0;
}

.batao-post-card .wp-block-post-featured-image,
.batao-cases-list-card .wp-block-post-featured-image {
    overflow: hidden;
    margin: 0;
    position: relative;
}

.batao-post-card:hover .wp-block-post-featured-image img {
    transform: scale(1.05);
}

.batao-post-card .wp-block-post-featured-image img {
    transition: transform 0.4s ease;
    display: block;
}

.batao-post-card .wp-block-post-featured-image:before,
.batao-cases-list-card .wp-block-post-featured-image:before,
.batao-case-card .wp-block-post-featured-image:before,
.batao-recent-posts-grid .batao-recent-post-image:before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(21.92deg, rgba(53, 53, 101, 0.56) 7.8%, rgba(53, 53, 101, 0) 69.87%);
    z-index: 2;
}

/* Category badge - positioned on image */
.batao-post-category-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    box-shadow: 0 2px 8px rgba(53, 53, 101, 0.12);
}

.batao-post-category-badge a {
    text-decoration: none;
}

/* Post title */
.batao-post-title a {
    text-decoration: none;
}

/* Post excerpt */
.batao-post-card .wp-block-post-excerpt {
    margin-bottom: 0;
}

.batao-post-card .wp-block-post-excerpt__excerpt {
    margin-bottom: 0;
}

/* Author section */
.batao-post-card .wp-block-post-author-avatar {
    margin: 0;
}

.batao-post-card .wp-block-post-author-avatar img {
    border-radius: 50%;
}

.batao-post-card .wp-block-post-author-name {
    margin: 0;
}

.batao-post-card .wp-block-post-author-name a {
    text-decoration: none;
}

.batao-post-card .wp-block-post-date {
    margin: 0;
}

/* Blog Header */
.batao-blog-title {
    color: var(--wp--preset--color--contrast);
}

.batao-blog-title .batao-highlight {
    background-color: #F6BE9B;
    padding: 0 0.5rem;
}

/* Category Filter Buttons */
.batao-category-filters {
    max-width: 999px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.batao-category-button {
    display: inline-block;
    padding: 4px 20px;
    line-height: 32px;
    background-color: #ffffff;
    color: var(--wp--preset--color--contrast);
    border: 1px solid #8686AF40;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.batao-category-filters.solutions .batao-category-button {
    box-shadow: 0 4px 10px 5px #0000000D;
    max-width: 313px;
    padding: 11px 20px;
}

.batao-category-button:hover,
.batao-category-button.is-active {
    background-color: var(--wp--preset--color--contrast);
    color: #FFFFFF;
}

/* Category Button with Image */
.batao-category-button {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

.batao-category-image {
    width: 38px;
    height: 27px;
    flex-shrink: 0;
}

.batao-category-button:hover .batao-category-image,
.batao-category-button.is-active .batao-category-image {
    filter: brightness(0) invert(1);
}

/* Category Button Content (name + description) */
.batao-category-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.batao-category-name {
    font-size: 20px;
    line-height: 32px;
    font-weight: 700;
}

@media (min-width: 999px) {
    .batao-category-name {
        font-size: 25px;
        line-height: 29px;
        font-weight: 700;
    }

    .batao-category-image {
        width: 56px;
        height: 56px;
    }
}

.batao-category-description {
    font-size: 16px;
    font-weight: 400;
    line-height: 32px;
}

/* Hierarchical Category Navigation */
.batao-category-filters {
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.batao-category-children {
    display: flex;
    width: 100%;
    gap: 1rem;
}

.batao-category-filters.solutions .batao-category-children {
    display: grid;
    grid-template-columns: repeat(3, 1fr) !important;
    justify-content: center;
    gap: 1.5rem;
}

/* WordPress Categories Block styled as buttons */
.batao-category-filters-static {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.batao-category-filters-static li {
    margin: 0;
    padding: 0;
}

.batao-category-filters-static a {
    display: inline-block;
    padding: 2.5px 21px;
    color: var(--wp--preset--color--contrast);
    background-color: #ffffff;
    border: 1px solid #8686AF40;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.batao-category-filters-static a:hover,
.batao-category-filters-static .current-cat a {
    background-color: var(--wp--preset--color--contrast);
    color: #FFFFFF;
}

/* Responsive Grid */
@media (max-width: 1200px) {
    .wp-block-post-template.is-layout-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.batao-category-filters.solutions .batao-category-button {
    position: relative;
    display: flex;
    align-items: center;
    padding: 1rem 44px 13px 17px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    overflow: hidden;
    gap: 0.7rem;
}

.batao-category-filters.solutions .batao-category-button:after {
    content: '';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid #D9D9D9;
    background-color: #ffffff;
    transition: all 0.2s ease;
}

/* 2. The Green Circle + Icon (Active) */
.batao-category-filters.solutions .batao-category-button.is-active:after {
    background-color: #5cb85c;
    border-color: #5cb85c;
    background-image: url('../icons/check-solid-full.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 1.3rem;
}

@media (min-width: 1200px)  {
    .batao-blog-title {
        line-height: 70px;
    }

    .batao-category-filters.solutions:after {
        content: '';
        width: 200px;
        height: 66px;
        position: absolute;
        background-image: url(../images/select-module.png);
        right: -6%;
        top: -70px;
        background-size: contain;
        background-repeat: no-repeat;
    }

    .blog .wp-block-group .wp-block-query .wp-block-post-template {
        gap: 39px 1rem;
    }

    .single-post .wp-block-cover .wp-block-cover__inner-container h1 {
        padding-right: 550px;
    }
}

@media (max-width: 1024px) {
    .wp-block-post-template.is-layout-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .batao-category-filters.solutions .batao-category-children {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 640px) {
    .wp-block-post-template.is-layout-grid {
        grid-template-columns: 1fr !important;
    }

    .batao-post-title {
        font-size: 19px !important;
    }

    .batao-category-filters.solutions .batao-category-children {
        grid-template-columns: 1fr !important;
    }

    .batao-category-filters {
        gap: 12px;
    }

    .batao-category-filters.solutions .batao-category-button {
        padding: 16px 20px;
    }

    .batao-category-children {
        gap: 0.5rem;
    }
}

.batao-plus-separator {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 40px;
    margin: 20px 0;
}

.batao-plus-separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #8686AF40;
    z-index: 1;
}

.plus-icon-container {
    position: relative;
    z-index: 2;
}

.batao-plus-separator:hover .plus-icon-container svg {
    transform: rotate(90deg);
}

.plus-icon-container svg {
    display: block;
    transition: transform 0.3s ease;
}
