/* 
 Theme Name:   CFO Hub
 Theme URI:    
 Description:  
 Author:       admin
 Author URI:   https://cfohub.com
 Template:     Divi
 Version:      1.0.1
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html

 /* == Add your own styles below this line ==
--------------------------------------------*/

/* == CFO Hub Custom Search Overlay (CRIAdv.com style) ==
--------------------------------------------*/

/* Hide default Divi search elements */
#et_top_search,
.et_search_outer,
.et_search_form_container {
    display: none !important;
}

/* Header Search Toggle Icon */
#cfohub-search-toggle {
    display: block;
    float: left;
    cursor: pointer;
    margin-top: 5px;
    margin-left: 15px;
    font-size: 17px;
    color: rgba(0, 0, 0, 0.6);
    transition: color 0.3s ease;
    line-height: 1;
}

#cfohub-search-toggle:hover,
#cfohub-search-toggle:focus {
    color: #2EA3F2;
}

/* Search Overlay */
.cfohub-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 130px;
    background-color: #1a3a5c;
    z-index: 100000;
    padding: 40px 80px 40px 40px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-100%);
    transition: transform 0.4s ease, opacity 0.4s ease, visibility 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cfohub-search-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Admin bar offset */
.admin-bar .cfohub-search-overlay {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .cfohub-search-overlay {
        top: 46px;
    }
}

/* Search Inner Container */
.cfohub-search-inner {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

/* Search Form */
.cfohub-search-form {
    width: 100%;
}

.cfohub-search-field {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    color: #ffffff;
    font-size: 22px;
    font-weight: 300;
    padding: 15px 0;
    outline: none;
    text-align: center;
    transition: border-color 0.3s ease;
    -webkit-appearance: none;
    border-radius: 0;
}

.cfohub-search-field::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.cfohub-search-field:focus {
    border-bottom-color: #ffffff;
}

.et_header_style_left .logo_container {
    width: 85%;
}



/* Close Button */
#cfohub-search-close {
    position: absolute;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #ffffff;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    padding: 10px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    z-index: 10;
}

#cfohub-search-close:hover,
#cfohub-search-close:focus {
    opacity: 1;
}

/* Responsive Adjustments */
@media (max-width: 980px) {
    .cfohub-search-overlay {
        padding: 30px 70px 30px 30px;
        min-height: 110px;
    }

    .cfohub-search-field {
        font-size: 18px;
    }

    #cfohub-search-close {
        right: 20px;
        font-size: 30px;
    }
}

@media (max-width: 767px) {
    .cfohub-search-overlay {
        padding: 25px 60px 25px 20px;
        min-height: 100px;
    }

    .cfohub-search-field {
        font-size: 16px;
    }

    #cfohub-search-close {
        right: 15px;
        font-size: 28px;
    }
    #cfohub-search-toggle{
        margin-right: 5px;
        margin-top: 5px;
    }
}
@media (max-width: 427px) {
    /* Retain Divi’s fixed-header padding; only remove excess overlap */
    body #page-container {
        padding-top: 0 !important;
    }
    body.admin-bar #page-container {
        padding-top: 46px !important;
    }
}

/* == Search & Blog Featured Image Improvements ==
--------------------------------------------*/

/* Search results: constrain featured image and improve layout */
.search .et_pb_post .entry-featured-image-url img,
.search .et_pb_post_main_image {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Ensure the featured image link doesn't overflow on mobile */
.search .et_pb_post .entry-featured-image-url {
    display: inline-block;
    max-width: 100%;
    margin-bottom: 15px;
}

/* Blog archives: same treatment for consistency */
.blog .et_pb_post .entry-featured-image-url img,
.archive .et_pb_post .entry-featured-image-url img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Improve spacing between search results */
.search .et_pb_post {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #eee;
}

.search .et_pb_post:last-child {
    border-bottom: none;
}

/* == Compact Search Results Layout ==
--------------------------------------------*/

/* Search result item: horizontal flex row on desktop */
.search .et_pb_post.cfohub-search-result {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #eee;
}

.search .et_pb_post.cfohub-search-result:last-child {
    border-bottom: none;
}

/* Image wrapper */
.search .cfohub-search-image {
    flex: 0 0 180px;
    max-width: 180px;
}

.search .cfohub-search-image .entry-featured-image-url {
    display: block;
    margin-bottom: 0;
    max-width: 100%;
}

.search .cfohub-search-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* Content wrapper */
.search .cfohub-search-content {
    flex: 1 1 auto;
    min-width: 0; /* prevent flex item overflow */
}

/* Title */
.search .cfohub-search-content .entry-title {
    font-size: 18px;
    line-height: 1.3;
    margin-bottom: 6px;
    padding-bottom: 0;
}

.search .cfohub-search-content .entry-title a {
    color: #1a3a5c;
}

/* Meta */
.search .cfohub-search-content .post-meta {
    font-size: 12px;
    color: #777;
    margin-bottom: 8px;
    padding-bottom: 0;
}

/* Excerpt */
.search .cfohub-search-content .entry-summary {
    font-size: 14px;
    line-height: 1.5;
    color: #444;
}

.search .cfohub-search-content .entry-summary p {
    padding-bottom: 0;
}

/* Limit excerpt to 3 lines with ellipsis for compactness */
.search .cfohub-search-content .entry-summary {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
#SearchResultsforCFOServices{
    margin-bottom: 20px;
}

.search-results #left-area h2.entry-title{
    font-size: 25px !important;
    line-height: 30px !important;
}

.wp-singular .et_pb_blog_0 .et_pb_post img{
    width: 100%;
}

/* == Blog Side-by-Side Layout (reduce dead space) ==
--------------------------------------------*/

/* Float-based layout — image on left, text on right */
/* Scoped to .blog-page so it only applies on the blog page */
.blog-page .et_pb_blog_0 .et_pb_post {
    display: block;
    margin-bottom: 40px;
    overflow: hidden; /* clearfix */
}

/* Image floats left */
.blog-page .et_pb_blog_0 .et_pb_post .entry-featured-image-url {
    float: left;
    width: 250px;
    margin-right: 20px;
    margin-bottom: 0;
}

.blog-page .et_pb_blog_0 .et_pb_post .entry-featured-image-url img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Text content flows beside the float */
.blog-page .et_pb_blog_0 .et_pb_post .entry-title,
.blog-page .et_pb_blog_0 .et_pb_post .post-meta,
.blog-page .et_pb_blog_0 .et_pb_post .post-content {
    overflow: hidden; /* creates block formatting context so it stays beside float */
}

.blog-page .et_pb_blog_0 .et_pb_post .entry-title {
    font-size: 22px;
    line-height: 1.3;
    margin-bottom: 8px;
    padding-bottom: 0;
}

.blog-page .et_pb_blog_0 .et_pb_post .entry-title a {
    color: #1a3a5c;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-page .et_pb_blog_0 .et_pb_post .entry-title a:hover,
.blog-page .et_pb_blog_0 .et_pb_post .entry-title a:focus {
    color: #2EA3F2;
}

/* Hide empty meta */
.blog-page .et_pb_blog_0 .et_pb_post .post-meta:empty {
    display: none;
}

.blog-page .et_pb_blog_0 .et_pb_post .post-meta {
    font-size: 13px;
    color: #777;
    margin-bottom: 10px;
    margin-top: 0;
    padding-bottom: 0;
}

.blog-page .et_pb_blog_0 .et_pb_post .post-content {
    font-size: 15px;
    line-height: 1.6;
    color: #444;
    margin-top: 0;
}

.blog-page .et_pb_blog_0 .et_pb_post .post-content p {
    padding-bottom: 0;
    margin-bottom: 0;
}

/* Tablet adjustments */
@media (max-width: 980px) {
    .blog-page .et_pb_blog_0 .et_pb_post .entry-featured-image-url {
        width: 200px;
        margin-right: 16px;
    }

    .blog-page .et_pb_blog_0 .et_pb_post .entry-title {
        font-size: 20px;
    }

    .blog-page .et_pb_blog_0 .et_pb_post .post-content {
        font-size: 14px;
    }
}

/* Mobile: stack vertically */
@media (max-width: 767px) {
    .blog-page .et_pb_blog_0 .et_pb_post {
        margin-bottom: 30px;
    }

    .blog-page .et_pb_blog_0 .et_pb_post .entry-featured-image-url {
        float: none;
        width: 100%;
        margin-right: 0;
        margin-bottom: 12px;
    }

    .blog-page .et_pb_blog_0 .et_pb_post .entry-featured-image-url img {
        width: 100%;
        max-width: 100%;
        height: auto;
    }

    .blog-page .et_pb_blog_0 .et_pb_post .entry-title {
        font-size: 18px;
    }

    .blog-page .et_pb_blog_0 .et_pb_post .post-content {
        font-size: 14px;
    }
}

/* Tablet adjustments */
@media (max-width: 980px) {
    .search .et_pb_post.cfohub-search-result {
        gap: 16px;
        margin-bottom: 20px;
        padding-bottom: 20px;
    }

    .search .cfohub-search-image {
        flex: 0 0 150px;
        max-width: 150px;
    }

    .search .cfohub-search-content .entry-title {
        font-size: 17px;
    }

    .search .cfohub-search-content .entry-summary {
        font-size: 13px;
    }
}

/* Mobile: stack vertically */
@media (max-width: 767px) {
    .search .et_pb_post.cfohub-search-result {
        flex-direction: column;
        gap: 12px;
    }

    .search .cfohub-search-image {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
    }

    .search .cfohub-search-image img {
        width: 100%;
        max-width: 100%;
        height: auto;
    }

    .search .cfohub-search-content .entry-title {
        font-size: 16px;
    }

    .search .cfohub-search-content .entry-summary {
        font-size: 13px;
        -webkit-line-clamp: 4;
    }
}

/* == Search Results Page - New Layout Sections ==
--------------------------------------------*/

/* Top Content Area */
.search__top-content {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.search__top-content .page-title {
    font-size: 28px;
    line-height: 1.3;
    color: #1a3a5c;
    margin-bottom: 10px;
    font-weight: 600;
}

.search__top-content .page-title span {
    color: #2EA3F2;
}

.search__top-content #breadcrumbs {
    font-size: 13px;
    color: #777;
    margin: 0;
}

.search__top-content #breadcrumbs a {
    color: #1a3a5c;
    text-decoration: none;
}

.search__top-content #breadcrumbs a:hover {
    color: #2EA3F2;
}

/* New Search Form Section */
.search__form-content {
    background-color: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 30px;
    margin-bottom: 40px;
}

.search__form-content-header {
    font-size: 20px;
    line-height: 1.4;
    color: #1a3a5c;
    margin-bottom: 8px;
    font-weight: 600;
}

.search__form-content-sub-header {
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    margin-bottom: 20px;
}

.search__form-content .search-form {
    position: relative;
    display: block;
    max-width: 520px;
}

.search__form-content .search-form label {
    display: block;
    margin: 0;
}

.search__form-content .search-form .search-field {
    width: 100%;
    padding: 12px 44px 12px 16px;
    font-size: 15px;
    line-height: 1.5;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: #fff;
    color: #1e293b;
    box-sizing: border-box;
}

.search__form-content .search-form .search-field:focus {
    border-color: #2EA3F2;
    box-shadow: 0 0 0 3px rgba(46, 163, 242, 0.15);
}

.search__form-content .search-form .search-field::placeholder {
    color: #94a3b8;
}

.search__form-content .search-form .search-submit {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 44px;
    padding: 0;
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 15px;
    cursor: pointer;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 6px 6px 0;
}

.search__form-content .search-form .search-submit:hover,
.search__form-content .search-form .search-submit:focus {
    color: #2EA3F2;
    background: transparent;
}

/* Results Content Area */
.search__results-content {
    margin-bottom: 40px;
}

.search__results-content-title {
    font-size: 22px;
    line-height: 1.4;
    color: #1a3a5c;
    margin-bottom: 6px;
    font-weight: 600;
}

.search__results-content-title span {
    color: #2EA3F2;
}

.search__results-content-sub-title {
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    margin-bottom: 25px;
}

/* Individual Result Post (reuse existing flex layout, add new class support) */
.search__results-post.search-results-post {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #eee;
}

.search__results-post.search-results-post:last-child {
    border-bottom: none;
}

.search-results-post__image {
    flex: 0 0 180px;
    max-width: 180px;
}

.search-results-post__image .entry-featured-image-url {
    display: block;
    margin-bottom: 0;
    max-width: 100%;
}

.search-results-post__image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.search-results-post__content {
    flex: 1 1 auto;
    min-width: 0;
}

.search-results-post__title {
    font-size: 18px;
    line-height: 1.3;
    margin-bottom: 6px;
    padding-bottom: 0;
}

.search-results-post__title a {
    color: #1a3a5c;
    text-decoration: none;
    transition: color 0.3s ease;
}

.search-results-post__title a:hover,
.search-results-post__title a:focus {
    color: #2EA3F2;
}

.search-results-post__content .post-meta {
    font-size: 12px;
    color: #777;
    margin-bottom: 8px;
    padding-bottom: 0;
}

.search-results-post__content .entry-summary {
    font-size: 14px;
    line-height: 1.5;
    color: #444;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-results-post__content .entry-summary p {
    padding-bottom: 0;
}

/* No Results State */
.search__no-results {
    background-color: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 40px 30px;
    text-align: center;
    margin-bottom: 40px;
}

.search__no-results p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Tablet Adjustments */
@media (max-width: 980px) {
    .search__top-content .page-title {
        font-size: 24px;
    }

    .search__form-content {
        padding: 24px;
    }

    .search__form-content-header {
        font-size: 18px;
    }

    .search__results-content-title {
        font-size: 20px;
    }

    .search__results-post.search-results-post {
        gap: 16px;
        margin-bottom: 20px;
        padding-bottom: 20px;
    }

    .search-results-post__image {
        flex: 0 0 150px;
        max-width: 150px;
    }

    .search-results-post__title {
        font-size: 17px;
    }

    .search-results-post__content .entry-summary {
        font-size: 13px;
    }
    /* == Newsletter CTA Fix: prevent overlap at tablet breakpoint ==
--------------------------------------------*/
    .et_pb_cta_0.et_pb_promo {
        display: none;
    }
}

/* Mobile: Stack Vertically */
@media (max-width: 767px) {
    .search__top-content .page-title {
        font-size: 20px;
    }

    .search__form-content {
        padding: 20px;
        margin-bottom: 30px;
    }

    .search__form-content-header {
        font-size: 17px;
    }

    .search__form-content-sub-header {
        font-size: 13px;
    }

    .search__form-content .search-form {
        max-width: 100%;
    }

    .search__form-content .search-form .search-field {
        padding: 10px 40px 10px 14px;
        font-size: 16px; /* prevent iOS zoom on focus */
    }

    .search__form-content .search-form .search-submit {
        width: 40px;
    }

    .search__results-content-title {
        font-size: 18px;
    }

    .search__results-content-sub-title {
        font-size: 13px;
    }

    .search__results-post.search-results-post {
        flex-direction: column;
        gap: 12px;
    }

    .search-results-post__image {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
    }

    .search-results-post__image img {
        width: 100%;
        max-width: 100%;
        height: auto;
    }

    .search-results-post__title {
        font-size: 16px;
    }

    .search-results-post__content .entry-summary {
        font-size: 13px;
        -webkit-line-clamp: 4;
    }

    .search__no-results {
        padding: 30px 20px;
    }

    .search__no-results p {
        font-size: 14px;
    }
}



