/*
Theme Name: Divi Child Theme
Theme URI: https://cretaxappeal.com/
Description: Child Theme For Divi
Author: CRE Tax Appeal
Author URI: https://cretaxappeal.com/
Version: 1.0.0
Template: Divi
*/

/* AVM */
/*
* HEADER
*/
/* Sticky header when NOT in the Divi Builder */
.et-l--header {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100% !important;
    z-index: 99999 !important;
    background-color: #fff;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.4s ease;
}

/* Admin bar offset */
body.admin-bar .et-l--header {
    top: 32px !important;
}
@media screen and (max-width: 782px) {
    body.admin-bar .et-l--header { top: 46px !important; }
}

/* Logo */
.cre-logo img {
    max-height: 105px;
    width: auto;
    display: block;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.header-scrolled .cre-logo img {
    max-height: 55px;
}

.et_pb_row_1_tb_header.et_pb_row {
    display: flex !important;
    align-items: center !important; 
    transition: padding 0.4s ease !important;
}

/* Add a subtle shadow when scrolling */
.header-scrolled .et-l--header {
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

/* PAGE OFFSET */

body:not(.admin-bar):not(.et-fb) #page-container {
    padding-top: 110px !important;
}

body.admin-bar:not(.et-fb) #page-container {
    padding-top: 100px !important;
}

@media (min-width: 980px) and (max-width: 1366px)  {
    .et-tb.page:not(.admin-bar):not(.et-fb)  #page-container, .et-tb-has-header #page-container {
        padding-top: 230px !important;
    }
}

@media (max-width: 980px) {
    body:not(.admin-bar):not(.et-fb) #page-container {
		padding-top: 120px !important;
	}
}

/*
* VISUAL BUILDER FIX 
*/

/* When the Divi Frontend Builder (et-fb) is active, un-fix the header */
body.et-fb .et-l--header {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    z-index: 10 !important;
}

/* Remove the padding-top so you don't see a giant gap in the editor */
body.et-fb #page-container {
    padding-top: 0 !important;
}

/* Ensure the header content is visible and not collapsed in the editor */
body.et-fb .et_pb_section_0_tb_header {
    margin-top: 0 !important;
    opacity: 1 !important;
}
/* 
*   SUCCESS STORIES — Display Posts
*/

/* Shared card base (applies to both grid + list) */
.cre-stories-grid .listing-item,
.cre-stories-list .listing-item {
    position: relative;
    padding: 28px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.cre-stories-grid .listing-item:hover,
.cre-stories-list .listing-item:hover {
    cursor: pointer;
}

/* Whole-card click via the title link */
.cre-stories-grid .listing-item a.title::after,
.cre-stories-list .listing-item a.title::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Title */
.cre-stories-grid .listing-item .title,
.cre-stories-list .listing-item .title {
    display: block;
    line-height: 1.3;
    font-weight: 700;
    margin: 0 0 10px;
}

.cre-stories-grid .listing-item a.title,
.cre-stories-list .listing-item a.title {
    color: #1a2b4a;
    text-decoration: none;
}

.cre-stories-grid .listing-item a.title:hover,
.cre-stories-list .listing-item a.title:hover {
    color: #2563eb;
}

/* Meta row — holds property type and any future tags */
.cre-stories-grid .cre-meta,
.cre-stories-list .cre-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

/* Meta pill — shared base for all taxonomy + custom-field tags */
.cre-stories-grid .cre-tag,
.cre-stories-list .cre-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #2563eb;
    background: #eff4ff;
    padding: 4px 10px;
    border-radius: 999px;
}

/* Excerpt */
.cre-stories-grid .excerpt,
.cre-stories-list .excerpt {
    line-height: 1.6;
    color: #19407f;
    margin: 0;
}

/* Grid layout */
.cre-stories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 40px 0;
    padding: 0;
    list-style: none;
}

.cre-stories-grid .listing-item {
    display: flex;
    flex-direction: column;
}

.cre-stories-grid .listing-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

.cre-stories-grid .listing-item .title { font-size: 1.15rem; }
.cre-stories-grid .excerpt { font-size: 0.92rem; }

/* List layout (full-width stacked) */
.cre-stories-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0;
    list-style: none;
}

.cre-stories-list .listing-item {
    display: block;
    width: 100%;
    padding: 28px 32px;
}

.cre-stories-list .listing-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}

.cre-stories-list .listing-item .title { font-size: 1.35rem; }
.cre-stories-list .excerpt { font-size: 0.95rem; line-height: 1.65; max-width: 75ch; }

/* Pagination */
.display-posts-pagination { margin: 48px 0 0; text-align: center; }

.display-posts-pagination .nav-links {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.display-posts-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #1a2b4a;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.15s ease;
}

.display-posts-pagination .page-numbers:hover { border-color: #2563eb; color: #2563eb; }
.display-posts-pagination .page-numbers.current { background: #19407f; border-color: #1a2b4a; color: #fff; }

/* Responsive */
@media (max-width: 980px) {
    .cre-stories-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .cre-stories-grid { grid-template-columns: 1fr; gap: 20px; }
}

/*
* BREADCRUMBS (RankMath)
*/
.rank-math-breadcrumb > p { color: #a3a3a3; } 