/* Custom Blog Sections styles will be added here. */




/* =========================================
   CUSTOM BLOG SECTIONS - PREMIUM DESIGN
========================================= */

.cbs-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    width: 100%;
    margin: 0 auto;
}

/* Blog Card */

.cbs-blog-card {
    position: relative;
    background: #ffffff;
    border: 1px solid rgba(20, 70, 75, 0.09);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 22px rgba(0, 0, 0, 0.055);
    transition: transform .4s ease, box-shadow .4s ease, border-color .4s ease;
    animation: cbsCardReveal .7s ease both;
}

.cbs-blog-card:nth-child(2) {
    animation-delay: .12s;
}

.cbs-blog-card:nth-child(3) {
    animation-delay: .24s;
}

.cbs-blog-card:nth-child(4) {
    animation-delay: .36s;
}

.cbs-blog-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 125, 130, .25);
    box-shadow: 0 18px 40px rgba(0, 75, 80, .14);
}

/* Image */

.cbs-blog-image {
    position: relative;
    display: block;
    overflow: hidden;
    height: 245px;
    background: #edf5f4;
}

.cbs-blog-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 65, 70, .22),
        transparent 55%
    );
    opacity: 0;
    transition: opacity .4s ease;
}

.cbs-blog-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s cubic-bezier(.2,.7,.2,1);
}

.cbs-blog-card:hover .cbs-blog-image img {
    transform: scale(1.09);
}

.cbs-blog-card:hover .cbs-blog-image::after {
    opacity: 1;
}

/* Content */

.cbs-blog-content {
    padding: 25px;
}

.cbs-blog-date {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #00878a;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .3px;
    margin-bottom: 12px;
}

.cbs-blog-content h3 {
    font-size: 21px;
    line-height: 1.45;
    font-weight: 700;
    margin: 0 0 22px;
    min-height: 90px;
}

.cbs-blog-content h3 a {
    color: #18383b;
    text-decoration: none;
    transition: color .3s ease;
}

.cbs-blog-content h3 a:hover {
    color: #008b8e;
}

/* Learn More Button */

.cbs-blog-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 24px;
    min-width: 125px;
    color: #ffffff !important;
    background: linear-gradient(135deg, #008b8e, #006b70);
    border: 1px solid transparent;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    overflow: hidden;
    transition: all .35s ease;
    box-shadow: 0 5px 14px rgba(0, 120, 125, .18);
}

.cbs-blog-button::after {
    content: "→";
    font-size: 18px;
    line-height: 1;
    transition: transform .3s ease;
}

.cbs-blog-button:hover {
    background: linear-gradient(135deg, #f39a28, #e77c12);
    color: #ffffff !important;
    transform: translateY(-3px);
    box-shadow: 0 9px 20px rgba(231, 124, 18, .28);
}

.cbs-blog-button:hover::after {
    transform: translateX(5px);
}

/* Pagination */

.cbs-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 45px;
}

.cbs-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 8px 13px;
    border: 1px solid #dce8e7;
    border-radius: 7px;
    color: #006f73;
    background: #fff;
    text-decoration: none;
    transition: all .3s ease;
}

.cbs-pagination .page-numbers:hover,
.cbs-pagination .page-numbers.current {
    color: #fff;
    background: #007e82;
    border-color: #007e82;
    box-shadow: 0 5px 14px rgba(0, 126, 130, .2);
}

/* Entrance Animation */

@keyframes cbsCardReveal {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tablet */

@media (max-width: 1024px) {
    .cbs-blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
    }

    .cbs-blog-image {
        height: 220px;
    }
}

/* Mobile */

@media (max-width: 767px) {
    .cbs-blog-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .cbs-blog-image {
        height: 230px;
    }

    .cbs-blog-content {
        padding: 21px;
    }

    .cbs-blog-content h3 {
        font-size: 19px;
        min-height: auto;
    }

    .cbs-blog-card:hover {
        transform: translateY(-4px);
    }
}

/* Accessibility */

@media (prefers-reduced-motion: reduce) {
    .cbs-blog-card,
    .cbs-blog-image img,
    .cbs-blog-button {
        animation: none !important;
        transition: none !important;
    }
}


/* FIX: Remove blank gap below blog images */

.cbs-blog-card .cbs-blog-image {
    display: block !important;
    position: relative;
    width: 100%;
    height: 218px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    line-height: 0 !important;
    background: transparent !important;
}

.cbs-blog-card .cbs-blog-image img {
    display: block !important;
    width: 100% !important;
    height: 97% !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center !important;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: top !important;
}


/* Remove arrow from Learn More button */
.cbs-blog-button::after {
    content: none !important;
    display: none !important;
}
