/*
Theme Name: HL WP Search Theme
Theme URI: https://hauntedlineage.com
Author: Haunted Lineage
Author URI: https://hauntedlineage.com
Description: Custom WordPress theme integrating the Haunted Lineage Search Engine with a modern, high-performance web portal design.
Version: 1.1.5
Requires at least: 6.0
Tested up to: 7.1.1
Requires PHP: 7.4
License: Proprietary
License URI: https://hauntedlineage.com/
Text Domain: hl-wp-searchtheme
Tags: blog, custom-background, custom-colors, custom-header, custom-logo, custom-menu, featured-images, flexible-header, full-width-template, theme-options, translation-ready, dark-mode
*/

/* Custom CSS overrides */
.hl-prose p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
}
.hl-prose h2, .hl-prose h3, .hl-prose h4 {
    font-family: 'Oswald', sans-serif;
    color: #ffffff;
    margin-top: 2rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.hl-prose a {
    color: var(--color-primary, #d41111);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
}
.hl-prose a:hover {
    opacity: 0.8;
}
.hl-prose blockquote {
    border-left: 4px solid var(--color-primary, #d41111);
    padding-left: 1.25rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.03);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    border-radius: 0 0.5rem 0.5rem 0;
}
.hl-prose img {
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin: 1.5rem 0;
    max-width: 100%;
    height: auto;
}

/* Podcast Player Embed Container */
.hl-podcast-embed-wrap {
    width: 100%;
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
}
.hl-podcast-embed-wrap iframe {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0.5rem;
    border: none;
    display: block;
}

.hl-header-podcast-dropdown {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    z-index: 80;
    width: min(26rem, calc(100vw - 2rem));
    padding: 0.75rem;
    background: rgba(10, 10, 10, 0.98);
    border: 1px solid rgba(212, 17, 17, 0.45);
    border-radius: 0.75rem;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.7);
}
.hl-header-podcast-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.25rem 0.75rem;
    color: #fff;
    font-family: 'Oswald', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.hl-header-podcast-heading > .material-symbols-outlined { color: #d41111; font-size: 1.1rem; }
.hl-header-podcast-heading button {
    margin-left: auto;
    padding: 0.2rem;
    color: rgba(255, 255, 255, 0.55);
    background: transparent;
    border: 0;
    cursor: pointer;
}
.hl-header-podcast-heading button:hover { color: #fff; }
.hl-header-podcast-heading button .material-symbols-outlined { font-size: 1rem; }
.hl-header-podcast-embed { overflow: hidden; border-radius: 0.45rem; }
.hl-header-podcast-embed iframe { height: 418px !important; }
@media (max-width: 767px) {
    .hl-header-podcast-dropdown {
        position: fixed;
        top: 4.5rem;
        right: 1rem;
        left: 1rem;
        width: auto;
    }
    .hl-header-podcast-embed iframe { height: 418px !important; }
}

/* Signature Section & Widget Header: Red Left Accent Bar + Red Full Underline (Identical to Follow Haunted Lineage) */
.hl-widget-header,
.hl-section-header,
.is-style-hl-accent-header,
.sidebar-ad-widget .wp-block-heading,
.sidebar-ad-widget h1,
.sidebar-ad-widget h2,
.sidebar-ad-widget h3,
.sidebar-ad-widget h4,
.sidebar-ad-widget h5,
.sidebar-ad-widget h6,
.widget-title {
    display: flex !important;
    align-items: center !important;
    position: relative !important;
    border: none !important;
    border-bottom: 1px solid rgba(212, 17, 17, 0.6) !important;
    padding-left: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0.75rem !important;
    margin-top: 0 !important;
    margin-bottom: 1.25rem !important;
    color: #ffffff !important;
    font-family: 'Oswald', sans-serif !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    line-height: 1 !important;
}

.hl-widget-header::before,
.hl-section-header::before,
.is-style-hl-accent-header::before,
.sidebar-ad-widget .wp-block-heading::before,
.sidebar-ad-widget h1::before,
.sidebar-ad-widget h2::before,
.sidebar-ad-widget h3::before,
.sidebar-ad-widget h4::before,
.sidebar-ad-widget h5::before,
.sidebar-ad-widget h6::before,
.widget-title::before {
    content: '' !important;
    display: inline-block !important;
    width: 4px !important;
    height: 1em !important;
    background-color: #d41111 !important;
    margin-right: 0.75rem !important;
    flex-shrink: 0 !important;
}

.footer-ad-slot-box .wp-block-heading,
.footer-ad-slot-box h1,
.footer-ad-slot-box h2,
.footer-ad-slot-box h3,
.footer-ad-slot-box h4 {
    display: none !important;
}

.sidebar-ad-widget .widget-title:empty,
.sidebar-ad-widget .wp-block-heading:empty,
.sidebar-ad-widget h1:empty,
.sidebar-ad-widget h2:empty,
.sidebar-ad-widget h3:empty,
.sidebar-ad-widget h4:empty,
.widget-title:empty,
h1:empty, h2:empty, h3:empty, h4:empty, h5:empty, h6:empty {
    display: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    height: 0 !important;
}

/* Prevent duplicate underlines if a title is wrapped in another border-b container */
div:has(> .widget-title),
div:has(> .hl-widget-header),
div:has(> .is-style-hl-accent-header),
.widget > div.border-b:has(.widget-title) {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* Footer Widget & Column Content Word-Wrapping */
footer .widget,
footer .widget_block,
footer .widget p,
footer p,
.widget_text p,
.widget_block p {
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    max-width: 100% !important;
    display: block !important;
}
footer .widget p,
footer p {
    font-family: 'Roboto', sans-serif !important;
    font-size: 0.875rem !important;
    line-height: 1.625 !important;
    color: rgb(209, 213, 219) !important;
}

/* Ensure buttons and button links inside prose/content areas retain white text */
.hl-prose a.hl-btn,
.hl-prose a.hl-btn-primary,
.hl-prose a.button,
.hl-prose a.btn,
.hl-btn-primary,
a.hl-btn-primary {
    color: #ffffff !important;
    text-decoration: none !important;
}
.hl-prose a.hl-btn:hover,
.hl-prose a.hl-btn-primary:hover,
.hl-btn-primary:hover,
a.hl-btn-primary:hover {
    color: #ffffff !important;
    opacity: 0.92;
}
