/* --- Custom Styles for Section Headers --- */

/* Container for the section header - Grid approach for Chrome desktop */
.post-content .section-header {
    display: grid;
    place-items: center; /* Modern centering - works great in Chrome */
    width: 100% !important;
    max-width: 100% !important;
    margin: 40px auto 30px auto !important;
    padding: 0 !important;
    box-sizing: border-box;
}

/* Wrapper to ensure image stays centered */
.post-content .section-header .section-icon {
    display: block !important;
    width: 320px !important;
    height: 320px !important;
    margin: 0 auto 20px auto !important;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.3s ease;
    /* Critical overrides */
    position: static !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    -webkit-transform: none !important;
    -ms-transform: none !important;
    max-width: 320px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    /* Force centering */
    justify-self: center;
    align-self: center;
}

.post-content .section-header .section-icon:hover {
    transform: scale(1.05) !important;
    -webkit-transform: scale(1.05) !important;
}

/* Style the section title */
.post-content .section-header .section-title {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.15;
    margin: 0 auto 30px auto !important;
    text-align: center;
    width: 100%;
    max-width: 710px;
    justify-self: center;
}

/* Additional spacing for other headers */
.post-content h2,
.post-content h3 {
    margin-top: 40px;
}

/* Keep paragraphs left-aligned */
.post-content p {
    text-align: left;
}

/* Mobile responsive styles */
@media (max-width: 640px) {
    .post-content .section-header .section-icon {
        width: 240px !important;
        height: 240px !important;
    }
    
    .post-content .section-header .section-title {
        font-size: 2.2rem;
    }
}

/* Chrome desktop specific hack */
@media screen and (min-width: 641px) {
    @supports (-webkit-appearance:none) {
        .post-content .section-header {
            display: flex !important;
            flex-direction: column !important;
            align-items: center !important;
        }
        
        .post-content .section-header .section-icon {
            align-self: center !important;
            margin-left: auto !important;
            margin-right: auto !important;
        }
    }
}