/* AuthorGuardian Front-End Author Box Stylesheet */
.authorguardian-box {
    margin: 3.5rem 0 2rem 0;
    padding: 2rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    gap: 1.75rem;
    align-items: flex-start;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -2px rgba(0, 0, 0, 0.02);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    clear: both;
}

.ag-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.ag-avatar-img {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.ag-verified-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: #2563eb;
    color: #ffffff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.ag-content-wrap {
    flex-grow: 1;
}

.ag-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.ag-author-name {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}

.ag-author-name a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.15s ease;
}

.ag-author-name a:hover {
    color: #2563eb;
}

.ag-author-title {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.ag-cta-btn {
    display: inline-block;
    padding: 0.45rem 0.9rem;
    background: #0f172a;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.15s ease, transform 0.1s ease;
}

.ag-cta-btn:hover {
    background: #1e293b;
    transform: translateY(-1px);
}

.ag-author-bio {
    margin-bottom: 1rem;
}

.ag-author-bio p {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #334155;
}

.ag-social-links {
    display: flex;
    gap: 0.65rem;
    align-items: center;
}

.ag-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569 !important;
    transition: all 0.15s ease;
}

.ag-social-icon:hover {
    background: #2563eb;
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* Theme Presets */
.authorguardian-box--news-editorial {
    border-left: 4px solid #e11d48;
    background: #fafaf9;
}

.authorguardian-box--minimal-line {
    background: transparent;
    border: none;
    border-top: 2px solid #e2e8f0;
    border-radius: 0;
    box-shadow: none;
    padding-left: 0;
    padding-right: 0;
}

/* ==========================================================================
   News Lunar Theme Direct Compatibility Rules (Themeansar / AF Themes)
   ========================================================================== */
.news-lunar .authorguardian-box,
.newslunar .authorguardian-box,
.single-post .authorguardian-box,
.single .site-main .authorguardian-box {
    clear: both !important;
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 2.25rem 0 1.75rem 0 !important;
}

/* Suppress News Lunar built-in redundant author bio if theme outputs one */
.news-lunar .mg-author-box,
.news-lunar .author-box,
.news-lunar .post-author,
.newslunar .single-author-box {
    display: none !important;
}

@media (max-width: 640px) {
    .authorguardian-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.25rem;
        padding: 1.5rem;
    }
    .ag-header-row {
        flex-direction: column;
        align-items: center;
    }
    .ag-social-links {
        justify-content: center;
    }
}
