/* ========================================
   Single Post Template Styles
   ======================================== */

/* Single Post Hero Section */
.single-post-hero {
    position: relative;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    min-height: 250px;
    background-color: var(--accentColor3);
    padding:1rem;
    gap:1rem;

}

.single-post-title {
    margin: 0;
    font-family: var(--fontFamily);
    font-weight: bold;
    font-size: 3.5rem;
    color:#fff;
    max-width:1200px;
    text-align:center;
}

.single-post-date {
    margin: 0;
    font-family: var(--fontFamilySecond);
    font-size: 1rem;
    color:#fff;
    max-width:1200px;
}

/* Content Wrapper */
.single-post-content-wrapper {
    background-color: #fff;
}

/* WYSIWYG Sections */
.single-post-wysiwyg-section {
    padding: 4rem 0;
}
.single-post-wysiwyg-section.single-post-wysiwyg-with-image .container .single-post-content-image-wrapper {
    display: flex;
    flex-direction: row-reverse;
    gap: 3rem;
    & > div {
        flex: 1;
    }
    .single-post-side-image {
        position: relative;
    }
    & > div:has(img) {
        flex: 0.75;
        overflow:hidden;
        max-width: calc(100% - 2rem);
        @media (width >= 1024px) {
             img {
                position: absolute;
                top: 50%;
                left: 50%;
                width: 100%;
                height: 100%;
                object-fit: cover;     /* makes it cover the container */
                object-position: center; /* keeps it centered */
                transform: translate(-50%, -50%);
             }
        }
    }
    @media (width <= 1024px) {
        flex-direction: column;
        align-items: center;
    }
}
.single-post-wysiwyg-section.single-post-wysiwyg-with-image:last-of-type .container .single-post-content-image-wrapper {
    flex-direction: row;
    @media (width <= 1024px) {
        flex-direction: column;
    }
}

.single-post-wysiwyg-section .container {
    max-width: 1200px;
    margin: 0 auto;
    width: auto;
    padding: 0 1rem;
}

.single-post-wysiwyg-section h1,
.single-post-wysiwyg-section h2,
.single-post-wysiwyg-section h3,
.single-post-wysiwyg-section h4,
.single-post-wysiwyg-section h5,
.single-post-wysiwyg-section h6 {
    font-family: var(--fontFamily);
    color: var(--accentColor2);
    margin-bottom: 20px;
}

.single-post-wysiwyg-section p {
    font-family: var(--fontFamilySecond);
    font-size: var(--textSize);
    line-height: var(--textLineHeight);
    color: var(--textColor);
    margin-bottom: 20px;
}

.single-post-wysiwyg-section img {
    max-width: 100%;
    height: auto;
    /* border-radius: 8px; */
    /* margin: 20px 0; */
}

/* Product Section */
.single-post-product-section {
    padding: 2rem 3rem;
    background-color: #f8f9fa;
    overflow-x:hidden;
}
.single-post-mid-page-image {
    overflow:hidden;
    max-height:700px;
    display:flex;
    align-items:flex-end;
    
    img {
        width:100%;
        height:auto;
    }
}
/* Gallery Section */
.single-post-gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4rem 0;

    .single-post-gallery-title {
        font-family: var(--fontFamily);
        font-size: 3rem;
        margin: 0;
        margin-bottom: 2rem;
    }


    .single-post-gallery-grid {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-behavior: auto;
        scroll-snap-type: x mandatory;
        gap: 10px;
        padding: 0 1rem;
    }
    .single-post-gallery-item {
        flex: 0 0 1;
        scroll-snap-align: start;
        max-width: 240px;
        background-color:hotpink;
        img {
            width:100%;
            height:auto;
            object-fit: cover;
        }
    }
}


/* FAQ Section */
.single-post-faq-section-wrapper {
    background-color: #000;
}
.single-post-faq-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 1rem;
    display:flex;
    flex-direction: column;
    align-items: center;
    color: #fff;

}
.single-post-faq-title {
    font-family: var(--fontFamily);
    font-size: 3rem;
    margin: 0;
    margin-bottom: 2rem;
}
.single-post-faq-accordion {
    width:74%;
    @media (max-width: 768px) {
        width:100%;
    }
}
.single-post-faq-button {
    width:100%;
    padding: 1rem;
    background-color: #201c1c;
    border-radius: 0.4rem;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-block: 0.5rem;
    .single-post-faq-icon {
        filter: invert(48%) sepia(79%) saturate(2476%) hue-rotate(0deg) brightness(118%) contrast(119%);
        transition: transform 0.3s ease;
    }
    &[aria-expanded="true"] {
        .single-post-faq-icon {
            transform: rotate(180deg);
        }
    }
}
.single-post-faq-question {
    font-family: var(--fontFamily);
    font-size: 1.5rem;
    margin: 0;
    text-align: start;
}
.single-post-faq-answer {
    font-family: var(--fontFamilySecond);
    font-size: 18px;
    color: #fff;
    margin: 0;
    overflow: hidden;
    height:0;
    padding-inline:1rem;
    visibility: hidden;
    opacity: 0;
    transition: height 0.3s ease-out , opacity 0.3s ease-out;
}
.single-post-faq-answer[aria-hidden="false"] {
    visibility: visible;
    height: auto;
    opacity: 1;
}


/* Default Content Fallback */
.single-post-default-content {
    padding: 4rem 0;
}

.single-post-default-content .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width:auto;
}

/* Author section style*/

.single-post-author-section {
    padding: 3rem 2rem;
    background-color: #000;
    @media (max-width: 768px) {
        padding: 2rem 1rem;
    }
}
.single-post-autor-card{
    display:flex;
    gap: 2rem;
    padding: 1rem;
    background-color: var(--accentColor);
    color: var(--accentColor4);
    border-radius: 0.4rem;
    margin:0 auto;
    width:fit-content;
}

.single-post-autor-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.single-post-author-info p {
    margin: 0 0 1rem 0;
    color: var(--accentColor4);
    max-width:55ch;

}

.single-post-author-socials {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.single-post-author-socials a {
    color: var(--accentColor4);
    font-size: 1.2rem;
    transition: opacity 0.3s ease;
}

.single-post-author-socials a:hover {
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .single-post-hero {
        flex-direction: column;
        text-align: center;
        padding: 40px 5% !important;
        min-height: 300px !important;
    }
    
    .single-post-title {
        font-size: 2.5rem !important;
        margin-bottom: 20px;
    }
    
    .single-post-date {
        font-size: 18px !important;
    }
    
    .single-post-wysiwyg-section {
        padding: 40px 0;
    }
    
    .single-post-product-section {
        padding: 3rem 1rem;
    }
    
    .product-slider-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    
    .single-post-product-carousel h2.woocommerce-loop-product__title {
        font-size: 1.4rem;
        height: auto;
        min-height: 60px;
    }
    .single-post-autor-card {
        flex-direction: column;
    }
}
