/**
 * Header & Footer Styles
 * 
 * @package History of Healing - GeneratePress Child
 */

/* ========================================
   GLOBAL UTILITIES
   ======================================== */

.hoh-container {
    max-width: 1320px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.skip-link:focus {
    position: fixed;
    top: 0;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 12px 20px;
    z-index: 100000;
    text-decoration: none;
    font-weight: 600;
}

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

.hoh-site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hoh-site-header.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.hoh-site-header.header-hidden {
    transform: translateY(-100%);
}

/* Top Bar */
.hoh-top-bar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 8px 0;
    font-size: 14px;
    text-align: center;
}

.hoh-top-bar-content span {
    display: inline-block;
}

/* Main Header */
.hoh-main-header {
    padding: 20px 0;
}

.hoh-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

/* Site Branding */
.hoh-site-branding {
    flex-shrink: 0;
}

.hoh-site-identity {
    display: flex;
    flex-direction: column;
}

.hoh-site-title {
    margin: 0;
    font-size: 28px;
    font-family: var(--font-heading);
    line-height: 1.2;
}

.hoh-site-title a {
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: color 0.3s ease;
}

.hoh-site-title a:hover {
    color: var(--primary-color);
}

.hoh-logo-icon {
    color: var(--primary-color);
}

.hoh-site-description {
    margin: 4px 0 0 0;
    font-size: 13px;
    color: var(--text-muted);
}

.custom-logo-link {
    display: inline-block;
}

.custom-logo {
    max-height: 60px;
    width: auto;
}

/* Navigation */
.hoh-main-navigation {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hoh-primary-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 32px;
    align-items: center;
}

.hoh-primary-menu li {
    margin: 0;
    position: relative;
}

.hoh-primary-menu > li > a {
    color: var(--text-body);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    padding: 10px 0;
    display: inline-block;
    transition: color 0.3s ease;
    position: relative;
}

.hoh-primary-menu > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.hoh-primary-menu > li > a:hover,
.hoh-primary-menu > li.current-menu-item > a {
    color: var(--primary-color);
}

.hoh-primary-menu > li > a:hover::after,
.hoh-primary-menu > li.current-menu-item > a::after {
    width: 100%;
}

/* Dropdown Menus */
.hoh-primary-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    list-style: none;
    margin: 0;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    border-radius: 8px;
}

.hoh-primary-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.hoh-primary-menu .sub-menu li {
    margin: 0;
}

.hoh-primary-menu .sub-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--text-body);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.hoh-primary-menu .sub-menu a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
    padding-left: 24px;
}

/* Header Actions */
.hoh-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hoh-search-toggle,
.hoh-mobile-toggle {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-body);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hoh-search-toggle:hover {
    color: var(--primary-color);
}

.hoh-mobile-toggle {
    display: none;
}

.hoh-hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 24px;
}

.hoh-hamburger-line {
    width: 100%;
    height: 2px;
    background: currentColor;
    transition: all 0.3s ease;
}

.hoh-mobile-toggle.active .hoh-hamburger-line:nth-child(1) {
    transform: rotate(45deg) translateY(9px);
}

.hoh-mobile-toggle.active .hoh-hamburger-line:nth-child(2) {
    opacity: 0;
}

.hoh-mobile-toggle.active .hoh-hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translateY(-9px);
}

/* Search Modal */
.hoh-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hoh-search-modal.active {
    opacity: 1;
    visibility: visible;
}

.hoh-search-modal-inner {
    max-width: 800px;
    width: 90%;
    position: relative;
}

.hoh-search-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    transition: opacity 0.3s ease;
}

.hoh-search-close:hover {
    opacity: 0.7;
}

.hoh-search-form {
    display: flex;
    gap: 12px;
}

.hoh-search-input {
    flex: 1;
    padding: 18px 24px;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-family: var(--font-primary);
}

.hoh-search-input:focus {
    outline: 3px solid var(--primary-color);
}

.hoh-search-submit {
    padding: 18px 32px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hoh-search-submit:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

.hoh-search-hint {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-top: 16px;
    text-align: center;
}

/* Mobile Navigation */
.hoh-mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 85%;
    height: 100vh;
    background: white;
    z-index: 9999;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
}

.hoh-mobile-nav.active {
    right: 0;
}

.hoh-mobile-nav-inner {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 0;
}

/* Mobile Menu - Force Vertical Layout */
.hoh-mobile-menu,
.hoh-mobile-nav .hoh-primary-menu {
    display: flex !important;
    flex-direction: column !important;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0 !important;
}

.hoh-mobile-menu li,
.hoh-mobile-nav .hoh-primary-menu li {
    margin: 0;
    border-bottom: 1px solid var(--border-light);
    width: 100%;
}

.hoh-mobile-menu a,
.hoh-mobile-nav .hoh-primary-menu a {
    display: block;
    padding: 16px 20px;
    color: var(--text-body);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s ease;
    width: 100%;
}

.hoh-mobile-menu a:hover,
.hoh-mobile-menu .current-menu-item > a,
.hoh-mobile-nav .hoh-primary-menu a:hover,
.hoh-mobile-nav .hoh-primary-menu .current-menu-item > a {
    color: var(--primary-color);
    background: rgba(44, 95, 141, 0.05);
    padding-left: 28px;
}

.hoh-mobile-menu .sub-menu,
.hoh-mobile-nav .hoh-primary-menu .sub-menu {
    list-style: none;
    padding-left: 0;
    display: flex !important;
    flex-direction: column !important;
}

.hoh-mobile-menu .sub-menu li,
.hoh-mobile-nav .hoh-primary-menu .sub-menu li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.hoh-mobile-menu .sub-menu a,
.hoh-mobile-nav .hoh-primary-menu .sub-menu a {
    padding-left: 36px;
    font-size: 14px;
}

.hoh-mobile-menu .sub-menu a:hover,
.hoh-mobile-nav .hoh-primary-menu .sub-menu a:hover {
    padding-left: 44px;
}

/* ========================================
   FOOTER
   ======================================== */

.hoh-site-footer {
    background: var(--text-primary);
    color: rgba(255, 255, 255, 0.9);
    margin-top: 80px;
}

/* Footer Widgets */
.hoh-footer-widgets {
    padding: 60px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hoh-footer-widgets-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.hoh-footer-widget-area {
    color: rgba(255, 255, 255, 0.9);
}

.hoh-footer-widget-area h2,
.hoh-footer-widget-area h3,
.hoh-footer-widget-area .widget-title {
    color: white;
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
}

.hoh-footer-widget-area ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hoh-footer-widget-area ul li {
    margin-bottom: 10px;
}

.hoh-footer-widget-area a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.hoh-footer-widget-area a:hover {
    color: var(--accent-color);
}

/* Footer Main */
.hoh-footer-main {
    padding: 60px 0;
}

.hoh-footer-main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px;
}

.hoh-footer-title {
    color: white;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px 0;
    font-family: var(--font-heading);
    display: flex;
    align-items: center;
    gap: 10px;
}

.hoh-footer-icon {
    color: var(--accent-color);
}

.hoh-footer-description {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
}

.hoh-footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hoh-footer-menu li {
    margin-bottom: 12px;
}

.hoh-footer-menu a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-block;
}

.hoh-footer-menu a:hover {
    color: var(--accent-color);
    padding-left: 8px;
}

/* Newsletter Form */
.hoh-footer-newsletter-text {
    font-size: 14px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.8);
}

.hoh-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.hoh-newsletter-input {
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 14px;
    font-family: var(--font-primary);
}

.hoh-newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.hoh-newsletter-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
}

.hoh-newsletter-submit {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hoh-newsletter-submit:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

/* Social Links */
.hoh-social-links {
    display: flex;
    gap: 12px;
}

.hoh-social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.hoh-social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-4px);
}

/* Footer Bottom */
.hoh-footer-bottom {
    padding: 24px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hoh-footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.hoh-copyright p,
.hoh-footer-credits p {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.hoh-copyright a,
.hoh-footer-credits a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.hoh-copyright a:hover,
.hoh-footer-credits a:hover {
    color: var(--accent-color);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1200px) {
    .hoh-primary-menu {
        gap: 24px;
    }
}

@media (max-width: 968px) {
    .hoh-main-navigation {
        display: none;
    }

    .hoh-mobile-toggle {
        display: flex;
    }

    .hoh-footer-main-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hoh-footer-widgets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hoh-site-title {
        font-size: 22px;
    }

    .hoh-site-description {
        font-size: 12px;
    }

    .hoh-footer-main-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .hoh-footer-widgets-grid {
        grid-template-columns: 1fr;
    }

    .hoh-footer-bottom-inner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hoh-main-header {
        padding: 16px 0;
    }

    .hoh-site-title {
        font-size: 20px;
    }

    .hoh-search-input {
        font-size: 16px;
        padding: 14px 18px;
    }

    .hoh-search-submit {
        padding: 14px 24px;
    }
}

/* Prevent body scroll when modals open */
body.mobile-nav-open,
body.search-modal-open {
    overflow: hidden;
}

/* ========================================
   LOGO IMAGE STYLES
   ======================================== */

/* Header Logo */
.hoh-logo-image {
    display: inline-block;
    vertical-align: middle;
    margin-right: 12px;
    width: 64px;
    height: 64px;
    object-fit: contain;
}

/* Footer Logo */
.hoh-footer-logo {
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
    width: 64px;
    height: 64px;
    object-fit: contain;
}

/* Mobile Logo in Nav */
.hoh-mobile-branding {
    padding: 24px 20px 20px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 20px;
}

.hoh-mobile-branding a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.hoh-mobile-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    flex-shrink: 0;
}

.hoh-mobile-site-name {
    font-size: 20px;
    font-weight: 700;
    font-family: var(--font-heading);
}

/* Mobile Copyright in Nav */
.hoh-mobile-copyright {
    padding: 20px;
    border-top: 1px solid var(--border-light);
    margin-top: auto;
    text-align: center;
}

.hoh-mobile-copyright p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Mobile Nav Inner - Flexbox for Logo → Menu → Copyright */
.hoh-mobile-nav-inner {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 0;
}

.hoh-mobile-navigation {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px 20px 20px;
}

/* ============================================
   BULLETPROOF FOOTER - ALWAYS VISIBLE
   ============================================ */

.hoh-site-footer {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
    clear: both !important;
    width: 100% !important;
    margin-top: 0 !important;
}

.hoh-footer-bottom {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.hoh-copyright,
.hoh-footer-credits {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
