/* ============================================================================
   DirectWomen Programs - Custom Styles
   ============================================================================
   
   Custom styling for program post type including single pages, archive listings,
   and GenerateBlocks query displays.
   
   Contents:
   1. Homepage Customizations
   2. Single Program Page Layout
   3. Featured Image Management
   4. Program Details Meta Box (Single Pages)
   5. Video Embed Section (Single Pages)
   6. Archive/Loop Display (GenerateBlocks Query)
   7. Responsive Adjustments
   ============================================================================ */


/* ============================================================================
   1. HOMEPAGE CUSTOMIZATIONS
   ============================================================================ */

/* Hide page title on homepage only */
.page-id-1 .entry-title {
    display: none;
}

/* Hide footer credits site-wide */
.site-info {
    display: none;
}

/* ============================================================================
   STICKY HEADER
   ============================================================================ */

/* Make site header sticky on scroll */
.site-header {
    position: sticky !important;
    top: 0px !important;
    z-index: 9999 !important;
    background-color: var(--base-3) !important; /* Maintains your light blue background */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Optional: adds subtle shadow when scrolling */
}

/* Ensure inside-header container maintains proper styling */
.site-header .inside-header {
    position: relative;
	 transition: box-shadow 0.3s ease;
}

/* Fix any layout shift issues when sticky activates */
body {
    padding-top: 0 !important;
}

/* ============================================================================
   SMARTTEAMS POPUP - DISPLAY ABOVE STICKY HEADER
   ============================================================================ */

/* Push all SmartTeams popups above the sticky header */
.mfp-wrap,
.mfp-bg {
    z-index: 99999 !important; /* Higher than header's 9999 */
}

/* Ensure popup content is also above header */
.mfp-container,
.mfp-content {
    z-index: 99999 !important;
}
/* ============================================================================
   2. SINGLE PROGRAM PAGE LAYOUT
   ============================================================================ */

/* Remove all top spacing from page containers */
.single-program .site-content,
.single-program #content,
.single-program .content-area,
.single-program #primary,
.single-program article,
.single-program .inside-article,
.single-program .entry-content,
.single-program .site-main,
.single-program #main,
.single-program .separate-containers .site-content,
.single-program .separate-containers .inside-article,
.single-program .container,
.single-program .grid-container {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Remove gray background from page wrapper */
body.single-program {
    background-color: #ffffff !important;
}

body.single-program .site-content,
body.single-program div#primary.content-area {
    background-color: transparent !important;
    min-height: 0 !important;
}

/* Remove minimum heights from content containers */
.single-program .content-area,
.single-program #primary,
.single-program .inside-article {
    height: auto !important;
    min-height: 0 !important;
}

/* Remove spacing from first content element 
.single-program .entry-content > *:first-child,
.single-program .entry-content > div:first-child,
.single-program .entry-content > .wp-block-cover:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}
*/

/* Hide entry header and breadcrumbs 
.single-program .entry-header,
.single-program .breadcrumbs,
.single-program #breadcrumbs {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 100% !important;
}
*/

/* Hide Jetpack Related Posts section */
.single-program #jp-relatedposts {
    display: none !important;
}


/* ============================================================================
   3. FEATURED IMAGE MANAGEMENT
   ============================================================================ */

/* Hide automatic featured images that appear before content */
.single-program .generate-post-image,
.single-program article > .wp-post-image:first-child,
.single-program .inside-article > .wp-post-image:first-child {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Hide automatic featured image container (GeneratePress theme) */
.single-program .featured-image {
    display: none !important;
}

/* Allow manually added Featured Image blocks inside content area */
.single-program .entry-content .wp-post-image,
.single-program .entry-content .wp-block-post-featured-image,
.single-program .entry-content .wp-block-post-featured-image img {
    display: block !important;
    height: auto !important;
    min-height: auto !important;
}


/* ============================================================================
   4. PROGRAM DETAILS META BOX (SINGLE PAGES)
   ============================================================================ */

/* Main container with gray background and blue left border */
.program-meta-box {
    background: #f8f9fa !important;
    border-left: 4px solid #4a90e2 !important;
    padding: 1.5rem !important;
    margin: 2rem 0 !important;
    border-radius: 4px !important;
}

/* Event subtitle styling */
.program-subtitle {
    font-size: 1.3rem;
    color: #666;
    margin: 0 0 1.5rem 0;
    line-height: 1.4;
}

/* Container for all metadata items */
.program-meta-items {
    margin-bottom: 1.5rem;
}

/* Individual metadata item (date, time, location, type) */
.program-meta-item {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    line-height: 1.6;
}

.program-meta-item:last-child {
    margin-bottom: 0;
}

/* Label styling (e.g., "Date:", "Time:") */
.meta-label {
    font-weight: 600;
    color: #333;
}

/* Value styling (actual date, time, etc.) */
.meta-value {
    color: #555;
}


/* ============================================================================
   5. VIDEO EMBED SECTION (SINGLE PAGES)
   ============================================================================ */

/* Container for video embed section */
.program-video-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #ddd;
}

/* "Watch Recording" heading */
.program-video-section h3 {
    margin: 0 0 1rem 0;
    color: #2c5aa0;
    font-size: 1.2rem;
}

/* Responsive 16:9 aspect ratio video wrapper */
.program-video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background: #000 !important;
    border-radius: 4px;
}

/* Embedded video/iframe positioning */
.program-video-wrapper iframe,
.program-video-wrapper object,
.program-video-wrapper embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}


/* ============================================================================
   6. ARCHIVE/LOOP DISPLAY (GENERATEBLOCKS QUERY)
   ============================================================================ */

/* Container for program metadata in excerpts */
.program-meta-excerpt {
    display: block;
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* "Watch Now" link styling */
a.watch-now-link {
    color: #d32f2f;
    font-weight: 600;
    text-decoration: none;
}

a.watch-now-link:hover {
    color: #b71c1c;
    text-decoration: underline;
}


/* ============================================================================
   7. RESPONSIVE ADJUSTMENTS
   ============================================================================ */

@media (max-width: 768px) {
    /* Reduce padding on mobile */
    .program-meta-box {
        padding: 1rem;
    }
    
    /* Smaller subtitle text on mobile */
    .program-subtitle {
        font-size: 1.1rem;
    }
    
    /* Ensure video wrapper doesn't overflow */
    .program-video-wrapper {
        max-width: 100%;
    }
}
