/* Featured Image Header */
.featured-image-header {
    position: relative;
    width: 100%;
    max-height: 500px;
    overflow: hidden;
}

.featured-image-header img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.featured-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--header-overlay);
    color: var(--background-color);
    padding: 40px 20px 20px;
}

.featured-image-overlay h1 {
    color: var(--background-color);
    margin-bottom: 10px;
    font-size: 2.5rem;
    font-family: var(--font-family-entry-title);
}

.featured-image-overlay .entry-meta {
    color: var(--footer-tag-cloud-text);
    font-size: 0.9rem;
    font-family: var(--font-family-entry-meta);
}

/* Featured Image Header */
.featured-image-header {
    position: relative;
    max-height: 60vh;
    overflow: hidden;
}

.featured-image-header img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.featured-header-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 20px;
    background: var(--header-overlay);
    color: var(--background-color);
    text-align: center;
}

.featured-header-content .entry-title,
.featured-header-content .entry-description {
    color: var(--background-color);
    max-width: 1200px;
    margin: 0 auto;
    font-family: var(--font-family-entry-title);
}

/* ======================
   HEADER STYLES - MATCHES SINGLE.PHP
   ====================== */
.featured-image-header {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
}

.featured-image-header img {
    width: 100%;
    height: auto;
    display: block;
}

/* Replace the existing .featured-header-content styles with this: */
.featured-header-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: var(--header-overlay-solid);
    text-align: center;
    color: var(--background-color);
    z-index: 2;
}

.featured-header-content .entry-title {
    color: var(--background-color);
    margin: 0 0 0.5rem;
    font-size: 2.5rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    font-family: var(--font-family-entry-title);
}

.featured-header-content .entry-description {
    color: var(--featured-header-description);
    font-size: 1.2rem;
    margin: 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-family: var(--font-family-paragraphs);
}

/* For video headers specifically */
.featured-video-header .featured-header-content {
    background: var(--video-header-overlay);
}

.standard-header-content {
    padding: 3rem 0;
    text-align: center;
    background: var(--sidebar-bg);
}

.standard-header-content .entry-title {
    font-size: 2.5rem;
    margin: 0 0 0.5rem;
    font-family: var(--font-family-entry-title);
}

.standard-header-content .entry-description {
    font-size: 1.2rem;
    color: var(--light-text);
    max-width: 800px;
    margin: 0 auto;
    font-family: var(--font-family-paragraphs);
}

/* Fixes for header */
/* Fix header text styling */
.featured-header-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.featured-header-content .entry-title,
.featured-header-content .entry-description {
    color: var(--background-color);
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    max-width: 800px;
    margin: 0 auto;

}

.featured-header-content .entry-description {
    margin-top: 1rem;
}

/* header background layer through customiser */
/* More specific selectors */
body.header-bg-disabled header .featured-header-content {
    background: transparent !important;
}

body.header-bg-disabled .featured-video-header .featured-header-content {
    background: transparent !important;
}

/* Corrections */

.featured-header-content .entry-title {
    color: var(--featured-header-title) !important;

}

.featured-header-content .entry-description {
    color: var(--featured-header-description) !important;

}

/* ==========================================================================
   Metabox Header Background Control 
   (Won't affect Customizer styles)
   ========================================================================== */
body.metabox-header-bg-disabled .featured-header-overlay {
    background: transparent !important;
}

body.metabox-header-bg-disabled .featured-video-header .featured-header-overlay {
    background: transparent !important;
}

/* Keep text readable */
body.metabox-header-bg-disabled .featured-header-content {
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
    .featured-image-header {
        max-height: 50vh;
    }
    
    .featured-header-content {
        padding: 20px;
    }
    
    .entry-title {
        font-size: 2rem;
    }
    
    .entry-description {
        font-size: 1rem;
    }
}

