/*------------------------------------*\
    
    Posts CSS
 
    Posts.................Post content for loop on blog homepage, category, search page, archives, etc.
    Sidebar...............Sidebar elements.

\*------------------------------------*/

/* Blog Post Card Styling (image-card style) */
.blog-post__item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin: 0 auto 32px auto;
    box-shadow: var(--shadow-default);
    border-radius: var(--border-radius);
    background: var(--color-white);
    overflow: hidden;
    height: calc(100% - 32px);
    max-width: 100%;
    border: none;
    transition: var(--transition-default);
}

.blog-post__item.blog-post__featured {
    display: block;
    max-width: 100%;
}

.blog-post__img-link {
    background: none;
    border: none;
}

.blog-post__img-link::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 250%;
}

.blog-post__img-container {
    position: relative;
    width: 100%;
    padding-top: 50%;
    /* 2:1 aspect ratio like image-card */
    overflow: hidden;
}

.blog-post__img-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
    border-radius: var(--border-radius);
    background: var(--color-bg-light-purple);
    transition: var(--transition-default);
}

.toc-container {
    margin-bottom: var(--push-small);
}

/* Add scroll offset for TOC links to account for fixed header */
.blog-single-container h2,
.blog-single-container h3,
.blog-single-container h4,
.blog-single-container h5,
.blog-single-container h6 {
    scroll-margin-top: 100px;
}

/* Additional offset when WordPress admin bar is visible (logged in users) */
.admin-bar .blog-single-container h2,
.admin-bar .blog-single-container h3,
.admin-bar .blog-single-container h4,
.admin-bar .blog-single-container h5,
.admin-bar .blog-single-container h6 {
    scroll-margin-top: 146px; /* 100px header + 46px mobile admin bar */
}

@media (min-width: 783px) {
    .admin-bar .blog-single-container h2,
    .admin-bar .blog-single-container h3,
    .admin-bar .blog-single-container h4,
    .admin-bar .blog-single-container h5,
    .admin-bar .blog-single-container h6 {
        scroll-margin-top: 132px; /* 100px header + 32px desktop admin bar */
    }
}

.blog-post__meta {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    width: 100%;
    height: 100%;
    padding: var(--soft-small) var(--soft-small) var(--soft-half);
}

.blog-post__date {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-slate);
    margin: 0 0 var(--push-half);
    font-family: var(--font-sans);
}

.blog-post__title {
    font-size: 25px;
    margin: 0 0 5px;
}

.blog-post__title a {
    display: block;
    color: inherit;
    text-decoration: none;
    background: none;
    border: none;
}

.blog-post__excerpt {
    flex-grow: 1;
    font-weight: 400;
    color: var(--color-text-body);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.blog-post__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--soft-small);
}

.blog-post__item .blog-post__bottom .btn {
    margin: 0;
}

.blog-post__reading-time {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-body);
}

.blog-post__featured_label {
    color: var(--color-purple);
    padding-bottom: 5px;
}

.blog-post__link,
.blog-post__item .btn,
.blog-post__item .btn-primary {
    margin-top: var(--push-half);
}

.search-result__link,
.blog-post__link {
    width: fit-content;
    text-decoration: none;
}

.blog-post__link:hover {
    color: var(--color-white);
}

.blog-post__featured .blog-post__excerpt {
    background: none;
    border: none;
    padding-bottom: 60px;
}

.blog-post__featured .blog-post__img-container,
.blog-post__featured .show {
    height: 100%;
    background: none;
    border: none;
}

.blog-post__featured .blog-post__meta {
    position: relative;
}

.blog-post__featured .blog-post__bottom {
    padding: 0 0 10px;
}

@media (min-width: 768px) {
    .blog-post__date {
        font-size: 18px;
    }

    .blog-post__title {
        font-size: 28px;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
}

@media (min-width: 1025px) {
    .blog-post__featured .blog-post__meta {
        padding: var(--soft-small) var(--soft-small) var(--soft-small) 0;
    }
}

@media (min-width: 1200px) {
    .blog-post__featured .blog-post__bottom {
        width: calc(100% - var(--soft-small));
        position: absolute;
        bottom: var(--soft-small);
        padding: 0;
    }

    .blog-post__title {
        font-size: 32px;
        -webkit-line-clamp: 3;
    }

    .blog-post__excerpt {
        -webkit-line-clamp: 3;
    }

    .blog-post__item:hover {
        box-shadow: var(--shadow-default);
        transition: var(--transition-default);
    }

    .blog-post__item:hover .btn-tertiary {
        color: var(--color-purple-dark);
    }

    .blog-post__item:has(.blog-post__img-link):hover {
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        transform: translateY(-10px);
    }
}

/* Blog Sidebar */

.blog .page-sidebar .widget {
    margin-bottom: var(--push-medium);
}

/**
* FX Load More
*/

/* Load More Progress Bar */
.load-more {
    text-align: center;
}

.load-more__progress {
    margin-top: var(--push-half);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    height: var(--soft-half);
    border: 0;
    border-radius: 50px;
    min-width: 250px;
    background-color: var(--color-border);
    overflow: hidden;
}

progress::-webkit-progress-bar,
progress::-webkit-progress-value,
progress::-moz-progress-bar {
    height: var(--soft-half);
    border: 0;
    border-radius: 0; 
}

/* WebKit browsers (Chrome, Safari) */
.load-more__progress::-webkit-progress-bar {
    background-color: var(--color-border);
}

.load-more__progress::-webkit-progress-value {
    background-color: var(--color-purple);
}

/* Firefox */
.load-more__progress::-moz-progress-bar {
    background-color: var(--color-purple);
}

/* Loading Indicator */
.is-loading:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    width: 50px;
    height: 50px;
    border: 5px solid;
    border-color: var(--color-border) var(--color-border) transparent;
    border-radius: var(--border-radius-round);
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    -webkit-animation: simpleSpin 1.5s linear infinite;
    animation: simpleSpin 1.5s linear infinite;
}

/* Load More Button */
.load-more__btn {
    border: 0;
    display: block;
    margin: var(--push-small) auto 0;
}

.load-more__btn.is-loading {
    position: relative;
    opacity: 0.6;
    cursor: not-allowed;
}

.load-more__btn.is-loading:before {
    width: var(--soft-small);
    height: var(--soft-small);
}

.load-more__btn.is-disabled {
    cursor: not-allowed;
    background: var(--color-bg-light-gray);
    border: 1px solid var(--color-border);
}

.load-more__btn.is-disabled::before {
    display: none;
}

/* Placeholder Space */
.placeholder-block {
    position: relative;
    display: flex;
}

.placeholder-block__inner {
    flex-grow: 1;
    background-color: var(--color-bg-light-gray);
    margin: 0 auto 32px auto;
}

.placeholder-block.is-loading:before {
    width: 50px;
    height: 50px;
}

@-webkit-keyframes simpleSpin {
    0% {
        -webkit-transform: translate(-50%, -50%) rotateZ(0deg);
        transform: translate(-50%, -50%) rotateZ(0deg);
    }

    100% {
        -webkit-transform: translate(-50%, -50%) rotateZ(360deg);
        transform: translate(-50%, -50%) rotateZ(360deg);
    }
}

@keyframes simpleSpin {
    0% {
        -webkit-transform: translate(-50%, -50%) rotateZ(0deg);
        transform: translate(-50%, -50%) rotateZ(0deg);
    }

    100% {
        -webkit-transform: translate(-50%, -50%) rotateZ(360deg);
        transform: translate(-50%, -50%) rotateZ(360deg);
    }
}

/* Single Post Pagination */
.post-pagination {
    display: flex;
    justify-content: space-between;
    align-content: center;
}

.btn-post-pagination {
    position: relative;
    font-size: 15px;
    background: var(--color-bg-tan);
    border-radius: var(--border-radius);
    padding: var(--soft-small) var(--soft-small);
    color: var(--color-text-body);
    border: none;
}

.btn-post-pagination > * {
    position: relative;
    z-index: 2;
}

.btn-post-pagination::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-gold-reverse);
    border-radius: var(--border-radius);
    z-index: 1;
    margin: 0;
    opacity: 0;
    transition: var(--transition-default);
}

.btn-post-pagination:hover::before {
    opacity: 1;
}

.post-pagination-text {
    display: none;
}

.btn-post-pagination strong {
    display: block;
    font-size: 12px;
}

.btn-previous-post,
.btn-next-post {
    max-width: 48%;
    flex: 0 0 48%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    text-decoration: none;
}

.btn-previous-post {
    padding-left: var(--soft-large);
}

.btn-next-post {
    padding-right: var(--soft-large);
}

.mobile-arrow:after {
    content: '\e906';
    font-family: 'the-sanctuary-at-sedona';
    font-size: 18px;
    font-weight: normal;
    font-style: normal;
    color: var(--color-text-body);
    display: block;
}

.mobile-arrow {
    position: absolute;
}

.btn-previous-post .mobile-arrow {
    left: 19px;
}

.btn-next-post .mobile-arrow {
    right: 19px;
}

.btn-previous-post .mobile-arrow:after {
    transform: rotate(180deg);
}

@media (min-width: 768px) {
    .post-pagination-text {
        display: block;
    }

    .btn-previous-post {
        text-align: left;
    }

    .btn-next-post {
        text-align: right;
    }
}

/* Search Results */

.search-results {
    display: flex;
    flex-direction: column;
    gap: var(--push-medium);
}

.search-result {
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    gap: var(--push-small);
    background: none;
    padding: 0 0 var(--soft-medium) 0;
}

.search-result__excerpt {
    margin-bottom: var(--push-small);
}

.search-result__excerpt p {
    font-weight: 400;
}

.search-result__img-container img {
    max-width: 280px;
    max-height: 280px;
    object-fit: contain;
}

.search_bar,
.blog_title_bar {
    position: relative;
    padding: var(--soft-large) 0 var(--soft-small) 0;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
}

.blog_title_bar {
    margin-bottom: var(--push-small);
}

.blog_title_bar input,
.blog_title_bar select,
.search_bar input,
.search_bar select {
    height: 35px;
    width: 100%;
    background-color: var(--color-light-lavender);
    border-radius: var(--border-radius);
    padding-left: var(--soft-half);
    margin-bottom: 5px;
}

@media (max-width: 767px) {
    .search-result {
        flex-direction: column-reverse;
    }
}

.blog_title_bar .row {
    align-items: center;
}

.blog_title_bar select {
    width: 100%;
    margin-bottom: 5px;
}

.blog_title_bar input.search_bar_input {
    position: initial;
    width: 100%;
}

.blog_title_bar input.search_bar_submit,
.search_bar input.search_bar_submit {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    background-color: var(--color-purple);
    color: var(--color-white);
    padding-left: var(--soft-small);
    padding-right: var(--soft-small);
    width: 100%;
    border-radius: var(--border-radius);
}

.search_form {
    width: 100%;
}

.search_form form {
	position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.search_form input.search_bar_input {
    width: 100%;
    height: 50px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    padding: 12px 20px;
}

.search_form input.search_bar_input::placeholder {
    opacity: 0.5;
}

.search_form input.search_bar_submit {
    width: fit-content;
    height: 50px;
    border: none;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    transition: var(--transition-default);
}

.search_form input.search_bar_submit:hover {
    background-color: var(--color-purple-dark);
}

.search_bar .choices,
.blog_title_bar .choices {
    width: 100%;
    margin-bottom: 0;
}

.search_bar .choices__inner,
.blog_title_bar .choices__inner {
    background: var(--color-light-lavender);
    border: none;
    border-radius: var(--border-radius);
    min-height: 50px;
    padding: 12px 20px !important;
    line-height: 1.5em;
    color: var(--color-text-dark);
}

.search_bar .choices__inner .choices__list,
.blog_title_bar .choices__inner .choices__list {
    height: auto;
    line-height: 22px;
}

.search_bar .choices[data-type*='select-one']:after,
.blog_title_bar .choices[data-type*='select-one']:after {
    content: "\e908";
    font-family: 'the-sanctuary-at-sedona';
    border: none;
    width: auto;
    height: auto;
    margin-top: 0;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translate(0, -50%);
    font-size: 15px;
    font-weight: normal;
    line-height: 1em;
    color: var(--color-purple);
}

.search_bar .choices[data-type*='select-one'].is-open:after,
.blog_title_bar .choices[data-type*='select-one'].is-open:after {
    content: "\e925";
    margin-top: 0;
    transform: translate(0, -50%);
}

.search_bar .choices__list--single,
.blog_title_bar .choices__list--single {
    padding: 0;
}

.search_bar .choices__list--single .choices__item,
.blog_title_bar .choices__list--single .choices__item {
    color: var(--color-text-dark);
    opacity: 1;
}

.search_bar .choices__list--dropdown,
.search_bar .choices__list[aria-expanded],
.blog_title_bar .choices__list--dropdown,
.blog_title_bar .choices__list[aria-expanded] {
    background: var(--color-light-lavender);
    border: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    margin-top: 0;
    box-shadow: var(--shadow-header);
}

.search_bar .choices__list--dropdown .choices__item,
.search_bar .choices__list[aria-expanded] .choices__item,
.blog_title_bar .choices__list--dropdown .choices__item,
.blog_title_bar .choices__list[aria-expanded] .choices__item {
    padding: 10px 20px;
    font-size: 18px;
    font-weight: 400;
    line-height: var(--line-height-normal);
}

.search_bar .choices__list--dropdown .choices__item--selectable.is-highlighted,
.search_bar .choices__list[aria-expanded] .choices__item--selectable.is-highlighted,
.blog_title_bar .choices__list--dropdown .choices__item--selectable.is-highlighted,
.blog_title_bar .choices__list[aria-expanded] .choices__item--selectable.is-highlighted {
    background: rgba(74, 72, 157, 0.1);
    font-weight: 700;
}

.search_bar .is-open .choices__inner,
.blog_title_bar .is-open .choices__inner {
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.right-title-bar {
    display: flex;
    justify-content: flex-end;
    gap: var(--push-half);
}

.right-title-bar input.search_bar_submit {
    height: 50px;
}

.right-title-bar .choices,
.right-title-bar .search_form {
    width: 50%;
}

.right-title-bar .search_form form {
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

@media (min-width: 768px) {
    .search_bar .row {
        justify-content: space-between;
    }
}

.popular-posts h2 {
    text-align: center;
    padding-bottom: var(--soft-small);
}

.blog-single-container {
    margin: var(--push-medium) 0;
}

.blog-single-container .blog-post__img-container {
    margin-bottom: var(--push-small);
}

.blog-single-meta {
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--color-text-body);
    align-items: center;
    gap: var(--push-half);
    padding-bottom: var(--soft-small);
}

.blog-single-meta .social-share-row {
    justify-content: flex-start;
    text-align: left;
    list-style: none;
    padding: 0 !important;
}

.blog-single-meta-footer .social-share-row {
    justify-content: flex-start;
    margin: var(--push-medium) 0 var(--push-small);
}

/* Author Bio - Mobile First */
.author-bio {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--push-small);
    padding: var(--soft-medium);
    margin: var(--push-medium) 0 var(--push-small);
    background: var(--color-bg-tan);
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;
}

.author-bio::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-teal-purple);
}

.author-bio__avatar {
    flex-shrink: 0;
    position: relative;
}

.author-bio__avatar img {
    border-radius: var(--border-radius-round);
    width: 90px;
    height: 90px;
    border: 4px solid var(--color-white);
    box-shadow: var(--shadow-default);
    -o-object-fit: cover;
    object-fit: cover;
}

.author-bio__content {
    flex: 1;
    min-width: 0;
}

.author-bio__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: var(--push-small);
    margin-bottom: var(--push-half);
}

.author-bio__title {
    flex: 1;
    min-width: 0;
    text-align: center;
}

.author-bio__label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-purple);
    margin-bottom: 5px;
}

.author-bio__name {
    display: inline-block;
    font-size: 22px;
    font-weight: 700;
    line-height: var(--line-height-tight);
    color: var(--color-text-heading);
    text-transform: uppercase;
    transition: var(--transition-default);
    margin: 0;
}

.author-bio__social {
    flex-shrink: 0;
    order: -1;
    margin-bottom: var(--push-half);
}

.author-bio__social ul {
    display: flex;
    gap: var(--push-half);
    list-style: none;
    padding: 0;
    margin: 0;
}

.author-bio__social li {
    margin: 0;
    padding: 0;
}

.author-bio__social li::before {
    display: none;
}

.author-bio__social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-round);
    background-color: var(--color-white);
    color: var(--color-purple);
    text-decoration: none;
    transition: var(--transition-default);
    border: none;
    overflow: hidden;
}

.author-bio__social a:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-teal-purple);
    opacity: 0;
    z-index: 1;
    transition: var(--transition-default);
}

.author-bio__social a:hover::before {
    opacity: 1;
}

.author-bio__social a:hover .dashicons {
    color: var(--color-white);
}

.author-bio__social .dashicons {
    position: relative;
    font-size: 20px;
    line-height: 1;
    z-index: 2;
}

.author-bio__description {
    margin: 0;
    font-size: 15px;
    line-height: var(--line-height-normal);
    color: var(--color-text-body);
}

/* Tablet - 768px and up */
@media (min-width: 768px) {
    .author-bio {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
    }

    .author-bio__avatar img {
        width: 100px;
        height: 100px;
    }

    .author-bio__header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .author-bio__title {
        text-align: left;
    }

    .author-bio__name {
        font-size: 24px;
    }

    .author-bio__social {
        order: 0;
        margin-bottom: 0;
    }

    .author-bio__description {
        font-size: 16px;
    }
}

/* Desktop - 992px and up */
@media (min-width: 992px) {
    .author-bio {
        gap: var(--push-large);
        padding: var(--soft-large);
    }

    .author-bio__avatar img {
        width: 120px;
        height: 120px;
    }

    .author-bio__name {
        font-size: 28px;
    }
}

.blog-listing__pagination {
    padding-top: var(--soft-medium);
}

@media (min-width: 768px) {
    .blog-single-meta {
        gap: 0;
    }

    .blog-single-meta .social-share-row {
        justify-content: flex-end;
    }

    .blog-single-meta .social-share-row li:first-child {
        display: block;
    }
}