/* Custom CSS for WordPress Posts Component */

/* --- General Layout & Loading --- */
.min-height-300px {
    min-height: 300px;
}

/* --- Search Section --- */
.searchBox {
    margin-top: 100px;
}

.searchBox .searchbar {
    height: 3rem;
    color: #161664;
    font-weight: 700;
    padding-left: 2rem;
    border: 1px solid #233467;
}

.searchBox .searchbar::placeholder {
    color: #233467;
    opacity: 1;
    /* Firefox */
}

.searchBox button {
    background: none;
    border: 0;
    padding-right: 30px;
}

.searchBox svg {
    color: #161664;
}

.search-input-height {
    height: 70px;
    /* Reduced height for search input */
}

.search-button-style {
    height: 70px;
    /* Explicitly set height to match input */
    z-index: 2;
    /* Ensure button is above input */
    background: linear-gradient(to right, #60A5FA, #3B82F6);
    /* Example gradient, adjust as needed */
    border: none;
    /* Remove default button border */
}


/* --- Category Buttons --- */
.categoryList {
    margin-bottom: 100px;
}

.category-buttons-container {
    /* Using negative margins to achieve precise spacing with flex-wrap */
    margin-left: -20px;
    /* Half of desired column-gap (40px / 2) */
    margin-top: -10px;
    /* Half of desired row-gap (20px / 2) */
}

.category-button {
    border-radius: 10px !important;
    background-color: white;
    border: 2px solid transparent;
    background-image: linear-gradient(white, white), linear-gradient(to right, #161664, #3F88BA);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem !important;
    color: #233467 !important;
    padding: 0.5rem 1.2rem !important;
    font-weight: 500 !important;
    margin: 0;

}

.category-button:hover {
    color: #233467;
    /* Keep text color consistent on hover for unselected */
    /* Re-apply gradient border on hover to ensure it doesn't disappear */
    background-image: linear-gradient(white, white), linear-gradient(to right, #161664, #3F88BA);
}

.category-button-selected {
    background-image: linear-gradient(to right, #161664, #3F88BA);
    /* Fill with gradient when selected */
    color: white !important;
    /* White text when selected */
    border: none;
    /* No border when selected, gradient fills fully */
}

.category-button-selected:hover {
    color: white !important;
    /* Keep text white on hover when selected */
    /* Ensure gradient fill remains on hover when selected */
    background-image: linear-gradient(to right, #161664, #3F88BA);
}

/* --- Post Cards --- */
.postsList {
    /* This class is already applied to a div that has Bootstrap classes:
       row row-cols-1 row-cols-md-2 row-cols-lg-3 g-4
       You can add more specific styles here if needed. */
}


.col svg {
    /**/
    pointer-events: none;
}

.featured-image-style {
    height: 224px;
    object-fit: cover;
    object-position: center;
}

.read-more-button {
    width: 48px;
    height: 48px;
    background: linear-gradient(to right, #60A5FA, #3B82F6);
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Social icon hover colors */
/* These use nth-child to target specific icons if they are always in the same order */
.social-icon-hover:hover {
    color: #0d6efd !important;
    /* Facebook blue */
}

.social-icon-hover:nth-child(2):hover {
    color: #212529 !important;
    /* X (Twitter) dark */
}

.social-icon-hover:nth-child(3):hover {
    color: #dc3545 !important;
    /* Email red */
}

.social-icon-hover:nth-child(4):hover {
    color: #198754 !important;
    /* Copy link green */
}

/* Optional: Additional styling for card elements if needed, not explicitly requested but good practice */
.card.rounded-4 {
    border-radius: 0.5rem !important;
    /* Bootstrap's rounded-4 is 0.5rem */
}

.card-img-top.rounded-top-4 {
    border-top-left-radius: 0.5rem !important;
    border-top-right-radius: 0.5rem !important;
    /* margin: 15px; */
}

.col {
    position: relative;
}

.postsList {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-gap: 40px;
}

.card {
    border: 2px solid #dbe5ff;
    border-radius: 30px !important;
    overflow: visible;
    position: relative;
    padding: 0;
    background: rgb(255, 255, 255);
    font-family: 'Poppins', sans-serif;
    margin: 0 !important;

}

.col svg {
    width: 100%;
    left: 0;
    top: 0;
    object-fit: cover;
}

.card .card-img-top {
    width: 100%;
    border-radius: 1rem;

}

.card .card-body-text {
    position: relative;
    flex: 1 1 auto;
    padding: 1vw 0 0 0;
    color: var(--bs-card-color);
}

.card .card-subtitle {
    margin-top: 0;
    font-size: 0.8rem;
    color: #233467d9;
}

.card .card-title {
    font-size: 1.3vw;
    line-height: 1.1;
    font-weight: 700;
    margin: 0 0 0.8vw 0;
    color: #233467;
    width: 100%;
}

.card .card-text {
    font-size: 1vw;
    line-height: 1.2;
    color: #233467d9;
    width: 16vw;
}

.card a.btn-primary {
    position: absolute;
    bottom: -0.5vw;
    right: 0;
    width: 3.5vw;
    height: 3.5vw;
    background: linear-gradient(to left, #E7F6FF, #A3CAF5);
    border-radius: 50%;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    margin: 0 !important;
}

.card a.btn-primary svg {
    fill: #233467;
}

.full-width-image-wrapper {
    position: relative;
}

.banner-text {
    position: absolute;
    bottom: 100px;
    left: 50px;
    z-index: 10;
    font-size: 50px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    background: linear-gradient(to left, #EDFFF4, #A6EAC7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.blog-breadcrumb {
    position: absolute;
    bottom: 70px;
    left: 50px;
    z-index: 10;
    width: fit-content;
}

.blog-breadcrumb .breadcrumb {
    margin-bottom: 0;
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.blog-breadcrumb .breadcrumb-item {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
}

.blog-breadcrumb .breadcrumb-item a {
    color: #fff;
    text-decoration: none;
}

.blog-breadcrumb .breadcrumb-item a:hover {
    text-decoration: underline;
}

.blog-breadcrumb .breadcrumb-item+.breadcrumb-item::before {
    content: "/\00a0 /\00a0";
    color: #fff;
}

.blog-breadcrumb .breadcrumb-item.active {
    color: #fff;
}

.blog-newsletter-section .newsletter-card {
    background: linear-gradient(180deg, rgba(163, 202, 245, 1) 0%, rgba(231, 246, 255, 1) 53%);
}

.blog-newsletter-section .fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.blog-newsletter-section .fade-in-section.is-inview {
    opacity: 1;
    transform: translateY(0);
}



.card-body h2 {
    color: var(--blue-color);
    font-size: 1.6vw;
    font-weight: 700;
    max-width: 40%;
    text-transform: uppercase;
    line-height: 1;
    margin: 20px auto;
}

.card-body p,
.card-body form {
    width: 40vw;
}

.cad-body p {
    font-size: 1vw;
    max-width: 60%;
    margin: 0 auto;
    color: var(--grey-text);
    opacity: 50%;
    line-height: 1.5vw;
}

.cad-body input {
    width: 100%;
    padding: 12px 60px 12px 30px;
    border-radius: 40px;
    border: 1px solid #161664;
    font-size: 1.1rem;
    outline: none;
    background: transparent;
    color: #fff;
    transition: border 0.2s;
}

.cad-body button {
    width: 30px;
    height: 30px;
    position: absolute;
    right: 10px;
    background-color: transparent;
    border: none;
    padding: 0;
    top: 10px;
}

@media(max-width: 1200px) {
    .card a.btn-primary {

        bottom: -1rem;
        right: -1rem;
        width: 3rem;
        height: 3rem;

    }
}

@media(max-width: 991px) {
    .postsList {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-gap: 40px;
    }

    .card .card-title {
        font-size: 1.2rem;
    }

    .card .card-text {
        font-size: 1rem;
        width: 80%;
    }
}

@media(max-width: 767px) {
    .postsList {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-gap: 0;
    }

    .card .card-text {
        width: 80%;
    }

    .card .card-img-top {
        height: auto;
    }

    .card .card-title {
        font-size: 20px;
    }

    .card .card-text {
        font-size: 15px;
        line-height: 22px;
    }

    .card {
        padding: 20px 20px 16px;
    }

    .card a.btn-primary {
        bottom: -0.5rem;
        right: -1rem;
        width: 3rem;
        height: 3rem;
    }

    .card .card-subtitle {
        margin-top: 0px;
        font-size: 14px;
    }
}




@media (max-width: 620px) {
    /* .card .card-img-top {
        height: auto;
    } */

    /* .card .card-title {
        font-size: 12px;
    }

    .card .card-subtitle {
        margin-top: 0px;
        font-size: 10px;
    } */

    /* .card .card-body-text .gap-2 {
        gap: .2rem !important;
    }

    .postsList {
        grid-gap: 10px;
    }

    .card a.btn-primary {
        bottom: -28px;
        right: -36px;
        width: 30px;
        height: 30px;
    }

    .card .card-text {
        font-size: 11px;
        line-height: 10px;
        width: 85%;
    }

    .postsList .overflow-hidden {
        overflow: inherit !important;
        padding: 5px;
    }

    button.btn.category-button {
        font-size: 16px !important;
        padding: 5px 10px !important;
    }

    .searchBox .searchbar {
        height: 50px;

    }

    .searchBox svg {

        height: 25px;
    }

    .category-buttons-container {
        margin-left: 0;

    }

    .banner-text {

        bottom: 80px;
        left: 30px;
        font-size: 30px;
    }

    .blog-breadcrumb {
        bottom: 50px;
        left: 30px;
    }

    .searchBox {
        margin-top: 50px;
    } */
}

@media (max-width: 575px) {
    .searchBox {
        margin-top: 10px;
    }

    .card .card-text {
        width: 80%;
    }

    .rounded.categoryList,
    .bg-white.searchBox.rounded,
    .p-4.postsList {
        padding: 0 !important;
    }

    .postsList {
        grid-template-columns: 1fr
    }

    .p-4.postsList {
        margin-bottom: 0 !important;
    }

    .rounded.categoryList {
        margin: 0;
    }

    button.btn.category-button {
        font-size: 14px !important;

    }

    .category-buttons-container {
        margin-left: 0;
    }
}

@media (max-width: 400px) {
    .category-buttons-container {
        margin-left: 0;
    }
}

/* --- Blog Banner (Moved from contact.css) --- */
.blog-banner {
    font-family: "Montserrat", sans-serif;
    position: relative;
    max-width: 90vw;
    width: 100%;
    height: calc(90vw / 2.98);
    /* desktop aspect ratio */
    margin: auto;
    border-radius: 12px;
    overflow: hidden;
    background-image: url("/images/blog-banner-desktop.webp");
    background-size: cover;
    background-position: center;
}

.dark-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
}

.overlay {
    position: absolute;
    bottom: 20px;
    left: 50px;
    color: white;
    z-index: 1;
}

.heading {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    line-height: 70px;
}

.subHeading {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .blog-banner {
        height: 90vw;
        background-image: url("/images/blog-banner-mobile.webp");
        /* square card on mobile */
    }

    .subHeading {
        font-size: 15px;
    }
}

/* --- Blog Banner Layout --- */
.ibdpBanner {
    width: 95vw !important;
    max-width: 95vw !important;
    margin: 0 auto;
}