/**
 * Custom styling for single post template
 */

/* Post container */
.post-content {
    padding: 0 0.5rem;  /* Minimal padding on mobile for wider text */
}

@media (min-width: 768px) {
    .post-content {
        padding: 0 2rem;
    }
}

@media (min-width: 1024px) {
    .post-content {
        padding: 0 5rem;
    }
}

/* Regular paragraph styling */
.post-content p {
    color: var(--Dark-Gray, #666);
    font-family: "embarcadero-mvb-pro", system-ui, sans-serif;
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: 28px;
    margin-bottom: 1.5rem;
}

/* Make sure images are responsive and centered */
.post-content img,
.post-content .wp-block-image img {
    max-width: 100%;
    max-height: 70vh;
    height: auto;
    margin: 4rem auto;
    display: block;
    object-fit: contain;
}

/* Center WordPress image blocks and figures */
.post-content .wp-block-image,
.post-content figure {
    text-align: center;
    margin: 2rem auto;
}

/* Center image captions */
.post-content .wp-block-image figcaption,
.post-content figure figcaption,
.post-content .wp-caption-text {
    text-align: center;
    font-style: italic;
    font-size: 0.9rem;
    color: var(--Dark-Gray, #666);
    margin-top: 0.5rem;
}

/* Override WordPress alignment classes to ensure centering */
.post-content .aligncenter,
.post-content .alignleft,
.post-content .alignright {
    display: block;
    margin-left: auto;
    margin-right: auto;
    float: none;
}

/* Center WordPress galleries */
.post-content .wp-block-gallery,
.post-content .gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 2rem auto;
}

.post-content .gallery-item {
    text-align: center;
    margin: 0.5rem;
}

/* Style blockquotes */
.post-content blockquote {
    border-left: 4px solid var(--Lightest-Blue, #EAF3FF);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
}

/* Style lists */
.post-content ul,
.post-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
    color: var(--Dark-Gray, #666);
    font-family: "embarcadero-mvb-pro", system-ui, sans-serif;
    font-size: 18px;
    line-height: 28px;
}

.post-content li {
    margin-bottom: 0.5rem;
}

/* Style links */
.post-content a {
    color: var(--Light-Blue, #6494CE);
    text-decoration: underline;
}

.post-content a:hover {
    text-decoration: none;
}

/* Style headings within content */
.post-content h3 {
    color: var(--Dark-Blue);
    font-family: "p22-mackinac-pro", system-ui, sans-serif;
    font-size: 1.5rem;
    line-height: 2.2rem;
    font-weight: 400;
    margin: 2rem 0 1rem;
}

.post-content h4 {
    color: var(--Dark-Blue);
    font-family: "p22-mackinac-pro", system-ui, sans-serif;
    font-size: 1.25rem;
    line-height: 1.8rem;
    font-weight: 400;
    margin: 1.5rem 0 1rem;
}

/* YouTube embed and iframe styling */
.post-content iframe {
    max-width: 800px;
    width: 100%;
    height: 450px;
    margin: 3rem auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Make sure YouTube embeds are centered */
.post-content div:has(iframe) {
    text-align: center;
    margin: 3rem auto;
    max-width: 800px;
}

/* Mobile-first responsive adjustments for images */
@media (max-width: 768px) {
    .post-content img,
    .post-content .wp-block-image img {
        margin: 2rem auto;
        max-height: 50vh;
    }

    .post-content .wp-block-image,
    .post-content figure {
        margin: 1rem auto;
    }

    .post-content iframe {
        margin: 2rem auto;
        height: auto;
        aspect-ratio: 16/9;
        max-width: 100%;
        border-radius: 8px;
    }

    .post-content div:has(iframe) {
        margin: 2rem auto;
        max-width: 100%;
    }
}
