/**
 * Professional Features CSS
 * Breadcrumbs, Social Sharing, Email Opt-in, Author Box, Popular Posts
 * 
 * @package History of Healing - GeneratePress Child
 */

/* ========================================
   BREADCRUMBS
   ======================================== */

.hoh-breadcrumbs {
    background: var(--bg-white);
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    color: var(--text-muted);
}

.hoh-breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.hoh-breadcrumbs a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.hoh-breadcrumb-sep {
    margin: 0 8px;
    color: var(--text-muted);
}

/* ========================================
   SOCIAL SHARING BUTTONS
   ======================================== */

.hoh-social-share {
    margin: 40px 0;
    padding: 32px;
    background: linear-gradient(135deg, rgba(44, 95, 141, 0.05) 0%, rgba(139, 69, 19, 0.02) 100%);
    border-radius: 12px;
    border: 2px solid var(--primary-color);
}

.hoh-social-share-top {
    margin-top: 32px;
    margin-bottom: 40px;
}

.hoh-social-share-bottom {
    margin-top: 48px;
    margin-bottom: 40px;
}

.hoh-share-label {
    display: block;
    font-weight: 700;
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-family: var(--font-heading);
}

.hoh-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hoh-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hoh-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hoh-share-facebook {
    background: #1877F2;
}

.hoh-share-facebook:hover {
    background: #0C63D4;
}

.hoh-share-twitter {
    background: #1DA1F2;
}

.hoh-share-twitter:hover {
    background: #0D8BD9;
}

.hoh-share-pinterest {
    background: #E60023;
}

.hoh-share-pinterest:hover {
    background: #C5001A;
}

.hoh-share-linkedin {
    background: #0A66C2;
}

.hoh-share-linkedin:hover {
    background: #004182;
}

.hoh-share-email {
    background: var(--text-primary);
}

.hoh-share-email:hover {
    background: var(--secondary-color);
}

/* ========================================
   STICKY SOCIAL SHARE BAR
   ======================================== */

.hoh-sticky-share {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 998;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.hoh-sticky-share.visible {
    opacity: 1;
    visibility: visible;
}

.hoh-sticky-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.hoh-sticky-share-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.hoh-sticky-facebook {
    background: #1877F2;
}

.hoh-sticky-twitter {
    background: #1DA1F2;
}

.hoh-sticky-pinterest {
    background: #E60023;
}

.hoh-sticky-linkedin {
    background: #0A66C2;
}

.hoh-sticky-email {
    background: var(--text-primary);
}

/* ========================================
   EMAIL OPT-IN FORM
   ======================================== */

.hoh-email-optin {
    margin: 60px 0;
    padding: 48px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(44, 95, 141, 0.2);
}

.hoh-optin-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hoh-optin-icon {
    margin-bottom: 24px;
}

.hoh-optin-icon svg {
    color: rgba(255, 255, 255, 0.9);
}

.hoh-optin-title {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 700;
    color: white;
    margin: 0 0 12px 0;
}

.hoh-optin-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 32px 0;
    line-height: 1.6;
}

.hoh-optin-form {
    max-width: 600px;
    margin: 0 auto;
}

.hoh-optin-field {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.hoh-optin-input {
    flex: 1;
    padding: 16px 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-size: 16px;
    font-family: var(--font-primary);
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
}

.hoh-optin-input:focus {
    outline: none;
    border-color: white;
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

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

.hoh-optin-submit:hover {
    background: var(--bg-light);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hoh-optin-privacy {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.hoh-optin-privacy svg {
    flex-shrink: 0;
}

/* ========================================
   AUTHOR BOX
   ======================================== */

.hoh-author-box {
    margin: 60px 0;
    padding: 40px;
    background: var(--bg-light);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.hoh-author-avatar {
    flex-shrink: 0;
}

.hoh-author-avatar img {
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hoh-author-info {
    flex: 1;
}

.hoh-author-name {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 16px 0;
}

.hoh-author-bio {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-body);
    margin: 0 0 20px 0;
}

.hoh-author-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hoh-author-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.hoh-author-link:hover {
    color: var(--secondary-color);
    gap: 12px;
}

.hoh-author-count {
    color: var(--text-muted);
    font-weight: 500;
}

/* ========================================
   POPULAR POSTS
   ======================================== */

.hoh-popular-posts {
    margin: 60px 0;
    padding: 48px;
    background: linear-gradient(135deg, rgba(44, 95, 141, 0.03) 0%, rgba(139, 69, 19, 0.02) 100%);
    border-radius: 16px;
    border: 2px solid var(--border-light);
}

.hoh-popular-title {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 32px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hoh-popular-title svg {
    color: var(--accent-color);
}

.hoh-popular-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hoh-popular-item {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: white;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.hoh-popular-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(44, 95, 141, 0.1);
    transform: translateX(8px);
}

.hoh-popular-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: 700;
    font-size: 18px;
    border-radius: 50%;
    font-family: var(--font-heading);
}

.hoh-popular-content {
    flex: 1;
    display: flex;
    gap: 20px;
    align-items: center;
}

.hoh-popular-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.hoh-popular-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hoh-popular-item:hover .hoh-popular-thumb img {
    transform: scale(1.1);
}

.hoh-popular-text {
    flex: 1;
}

.hoh-popular-post-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
}

.hoh-popular-post-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.hoh-popular-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-muted);
}

.hoh-popular-reading-time {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ========================================
   CATEGORY DESCRIPTION
   ======================================== */

.hoh-category-description {
    max-width: 800px;
    margin: 24px auto;
    padding: 24px 32px;
    background: rgba(44, 95, 141, 0.05);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-body);
}

.hoh-category-description p {
    margin: 0;
}

.hoh-archive-meta {
    margin-top: 16px;
    text-align: center;
}

.hoh-archive-count {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: rgba(44, 95, 141, 0.1);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
}

/* ========================================
   ENHANCED RELATED POSTS
   ======================================== */

.hoh-related-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.hoh-related-meta svg {
    flex-shrink: 0;
}

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

@media (max-width: 968px) {
    /* Sticky share hidden on tablets */
    .hoh-sticky-share {
        display: none;
    }
    
    .hoh-social-share {
        padding: 24px;
    }
    
    .hoh-share-buttons {
        justify-content: center;
    }
    
    .hoh-email-optin {
        padding: 36px 24px;
    }
    
    .hoh-optin-title {
        font-size: 26px;
    }
    
    .hoh-optin-subtitle {
        font-size: 16px;
    }
    
    .hoh-author-box {
        flex-direction: column;
        text-align: center;
        align-items: center;
        padding: 32px 24px;
    }
    
    .hoh-author-meta {
        justify-content: center;
    }
    
    .hoh-popular-posts {
        padding: 32px 24px;
    }
    
    .hoh-popular-title {
        font-size: 24px;
    }
    
    .hoh-popular-item {
        padding: 20px;
    }
}

@media (max-width: 640px) {
    .hoh-share-buttons {
        flex-direction: column;
    }
    
    .hoh-share-btn {
        justify-content: center;
    }
    
    .hoh-share-text {
        flex: 1;
    }
    
    .hoh-optin-field {
        flex-direction: column;
    }
    
    .hoh-optin-submit {
        width: 100%;
        justify-content: center;
    }
    
    .hoh-email-optin {
        padding: 28px 20px;
    }
    
    .hoh-optin-title {
        font-size: 22px;
    }
    
    .hoh-popular-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .hoh-popular-thumb {
        width: 100%;
        height: 160px;
    }
    
    .hoh-popular-item {
        flex-direction: column;
        gap: 16px;
    }
    
    .hoh-popular-number {
        align-self: flex-start;
    }
}

/* ========================================
   BACK TO TOP BUTTON
   ======================================== */

.hoh-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(44, 95, 141, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

.hoh-back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.hoh-back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(44, 95, 141, 0.4);
}

.hoh-back-to-top:active {
    transform: translateY(-2px);
}

.hoh-back-to-top svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 640px) {
    .hoh-back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* ============================================
   BULLETPROOF BACK TO TOP - ALWAYS WORKS
   ============================================ */

#hohBackToTop {
    /* Position */
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    z-index: 999 !important;
    
    /* Size */
    width: 50px !important;
    height: 50px !important;
    
    /* Appearance */
    background: linear-gradient(135deg, #2C5F8D 0%, #1A3A52 100%) !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    box-shadow: 0 4px 16px rgba(44, 95, 141, 0.3) !important;
    
    /* Layout */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    
    /* Transitions */
    transition: all 0.3s ease !important;
    
    /* Initial state (hidden) */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

#hohBackToTop svg {
    stroke: white !important;
    width: 24px !important;
    height: 24px !important;
}

/* Mobile */
@media (max-width: 768px) {
    #hohBackToTop {
        bottom: 20px !important;
        right: 20px !important;
        width: 45px !important;
        height: 45px !important;
    }
    
    #hohBackToTop svg {
        width: 20px !important;
        height: 20px !important;
    }
}
