/**
 * E-E-A-T Pro Author Box - FIXED MOBILE + LIGHTER DARK THEME
 */

/* ================================================
   BASE AUTHOR BOX
   ================================================ */

.eeat-author-box {
    margin: 60px 0;
    padding: 40px;
    display: flex;
    align-items: flex-start;
    gap: 30px;
    border-radius: 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
    line-height: 1.7;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.eeat-author-box:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.12),
        0 10px 25px rgba(0, 0, 0, 0.08);
    border-color: rgba(99, 102, 241, 0.2);
}

/* Subtle background pattern */
.eeat-author-box::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.03) 0%, transparent 50%);
    pointer-events: none;
    border-radius: 24px;
    z-index: 0;
}

/* ================================================
   AVATAR
   ================================================ */

.eeat-author-avatar {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.eeat-author-avatar a {
    display: block;
    line-height: 0;
    position: relative;
}

/* Gradient ring on hover */
.eeat-author-avatar a::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.eeat-author-avatar a:hover::before {
    opacity: 1;
}

.eeat-author-avatar img {
    display: block;
    width: 120px;
    height: 120px;
    object-fit: cover;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.15),
        0 4px 10px rgba(0, 0, 0, 0.08);
}

.eeat-author-avatar a:hover img {
    transform: scale(1.05);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.2),
        0 8px 20px rgba(0, 0, 0, 0.12);
}

/* ================================================
   AUTHOR DETAILS
   ================================================ */

.eeat-author-details {
    flex: 1;
    min-width: 0;
    z-index: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.eeat-author-details h4,
.eeat-author-details p {
    margin: 0 0 14px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Author Name */
.eeat-author-name {
    font-size: 2em;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 8px !important;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.eeat-author-name a {
    text-decoration: none;
    border: none;
    box-shadow: none;
    position: relative;
    transition: all 0.3s ease;
    display: inline-block;
}

/* Underline on hover */
.eeat-author-name a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    transition: width 0.3s ease;
}

.eeat-author-name a:hover::after {
    width: 100%;
}

/* Arrow on hover */
.eeat-author-name a::before {
    content: '→';
    opacity: 0;
    margin-left: 8px;
    display: inline-block;
    transition: all 0.3s ease;
    transform: translateX(-10px);
}

.eeat-author-name a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* Job Title Badge */
.eeat-author-job-title {
    display: inline-block;
    font-size: 0.9em;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 12px;
    margin-bottom: 16px !important;
    position: relative;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.eeat-author-job-title::before {
    content: '✦';
    margin-right: 8px;
    font-size: 0.85em;
}

/* Bio */
.eeat-author-bio {
    font-size: 1em;
    line-height: 1.8;
    margin-top: 16px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Expertise */
.eeat-author-expertise {
    margin-top: 16px;
    font-size: 0.95em;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.eeat-author-expertise strong {
    font-weight: 700;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 8px;
    opacity: 0.7;
}

/* ================================================
   SOCIAL LINKS
   ================================================ */

.eeat-author-social,
.eeat-author-website {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.eeat-author-social a,
.eeat-author-website a {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 100px;
    text-decoration: none;
    font-size: 0.875em;
    font-weight: 600;
    border: none;
    box-shadow: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    white-space: nowrap;
}

.eeat-author-social a::before,
.eeat-author-website a::before {
    content: '→';
    margin-right: 8px;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.eeat-author-social a:hover::before,
.eeat-author-website a:hover::before {
    transform: translateX(3px);
}

.eeat-author-social a:hover,
.eeat-author-website a:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 30px rgba(0, 0, 0, 0.12),
        0 6px 15px rgba(0, 0, 0, 0.08);
}

/* ================================================
   THEME STYLES
   ================================================ */

/* Define variables for each theme */
.theme-light {
    --bg-gradient: linear-gradient(135deg, #ffffff 0%, #f9fafb 50%, #f3f4f6 100%);
    --text-color: #1e293b;
    --name-color: #0f172a;
    --name-hover-color: #6366f1;
    --job-title-bg: linear-gradient(135deg, #f0f4ff 0%, #faf5ff 100%);
    --job-title-color: #6366f1;
    --job-title-border: rgba(99, 102, 241, 0.2);
    --bio-color: #475569;
    --expertise-color: #64748b;
    --button-bg: rgba(99, 102, 241, 0.08);
    --button-color: #4f46e5;
    --button-border: rgba(99, 102, 241, 0.15);
    --button-hover-bg: rgba(99, 102, 241, 0.15);
    --button-hover-color: #4338ca;
    --button-hover-border: rgba(99, 102, 241, 0.3);
    --avatar-border-color: rgba(255, 255, 255, 0.9);
    --focus-outline-color: #6366f1;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.06),
        0 1px 4px rgba(0, 0, 0, 0.04);
}

.theme-dark {
    --bg-gradient: linear-gradient(135deg, #475569 0%, #64748b 100%);
    --text-color: #f8fafc;
    --name-color: #ffffff;
    --name-hover-color: #c7d2fe;
    --job-title-bg: rgba(199, 210, 254, 0.15);
    --job-title-color: #e0e7ff;
    --job-title-border: rgba(199, 210, 254, 0.3);
    --bio-color: #e2e8f0;
    --expertise-color: #cbd5e1;
    --button-bg: rgba(199, 210, 254, 0.15);
    --button-color: #c7d2fe;
    --button-border: rgba(199, 210, 254, 0.25);
    --button-hover-bg: rgba(199, 210, 254, 0.25);
    --button-hover-color: #e0e7ff;
    --button-hover-border: rgba(199, 210, 254, 0.4);
    --avatar-border-color: rgba(255, 255, 255, 0.2);
    --focus-outline-color: #c7d2fe;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.2),
        0 1px 4px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Apply variables to elements */
.theme-light, .theme-dark {
    background: var(--bg-gradient);
    color: var(--text-color);
}

.theme-light .eeat-author-name a,
.theme-dark .eeat-author-name a { 
    color: var(--name-color);
}

.theme-light .eeat-author-name a:hover,
.theme-dark .eeat-author-name a:hover {
    color: var(--name-hover-color);
}

.theme-light .eeat-author-job-title,
.theme-dark .eeat-author-job-title { 
    background: var(--job-title-bg);
    color: var(--job-title-color);
    border: 1px solid var(--job-title-border);
}

.theme-light .eeat-author-bio,
.theme-dark .eeat-author-bio {
    color: var(--bio-color);
}

.theme-light .eeat-author-expertise,
.theme-dark .eeat-author-expertise,
.theme-light .eeat-author-expertise strong,
.theme-dark .eeat-author-expertise strong {
    color: var(--expertise-color);
}

.theme-light .eeat-author-social a,
.theme-light .eeat-author-website a,
.theme-dark .eeat-author-social a,
.theme-dark .eeat-author-website a { 
    background: var(--button-bg);
    color: var(--button-color);
    border: 1px solid var(--button-border);
}

.theme-light .eeat-author-social a:hover,
.theme-light .eeat-author-website a:hover,
.theme-dark .eeat-author-social a:hover,
.theme-dark .eeat-author-website a:hover {
    background: var(--button-hover-bg);
    color: var(--button-hover-color);
    border-color: var(--button-hover-border);
}

.theme-light .eeat-author-avatar img,
.theme-dark .eeat-author-avatar img {
    border-color: var(--avatar-border-color);
}

/* ================================================
   AVATAR SHAPES
   ================================================ */

.shape-rounded .eeat-author-avatar img,
.shape-rounded .eeat-author-avatar a::before {
    border-radius: 16px;
}

.shape-round .eeat-author-avatar img,
.shape-round .eeat-author-avatar a::before {
    border-radius: 50%;
}

.shape-square .eeat-author-avatar img,
.shape-square .eeat-author-avatar a::before {
    border-radius: 6px;
}

/* ================================================
   LAYOUT VARIATIONS
   ================================================ */

/* Centered Card */
.layout-centered-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    padding: 50px 40px;
}

.layout-centered-card .eeat-author-avatar img {
    width: 140px;
    height: 140px;
}

.layout-centered-card .eeat-author-name {
    font-size: 2.2em;
}

.layout-centered-card .eeat-author-social,
.layout-centered-card .eeat-author-website {
    justify-content: center;
}

/* Horizontal Split */
.layout-horizontal-split {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 40px;
    padding: 45px;
}

.layout-horizontal-split .eeat-author-avatar img {
    width: 140px;
    height: 140px;
}

/* ================================================
   RESPONSIVE - FIXED! 📱
   ================================================ */

@media (max-width: 768px) {
    .eeat-author-box {
        flex-direction: column !important;
        align-items: center;
        text-align: center;
        padding: 30px 20px;
        gap: 20px;
        margin: 40px 16px;
    }

    .layout-horizontal-split {
        grid-template-columns: 1fr !important;
        justify-items: center;
        padding: 30px 20px;
    }

    .eeat-author-avatar img {
        width: 100px !important;
        height: 100px !important;
    }

    .eeat-author-name {
        font-size: 1.5em;
    }

    .eeat-author-job-title {
        font-size: 0.85em;
        padding: 6px 14px;
        text-align: center;
        display: block;
    }

    .eeat-author-bio,
    .eeat-author-expertise {
        font-size: 0.9em;
    }

    .eeat-author-social,
    .eeat-author-website {
        justify-content: center;
        width: 100%;
    }

    .eeat-author-social a,
    .eeat-author-website a {
        font-size: 0.8em;
        padding: 8px 16px;
    }

    /* Ensure text wraps properly */
    .eeat-author-details {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .eeat-author-box {
        padding: 24px 16px;
        border-radius: 20px;
        margin: 30px 12px;
    }

    .eeat-author-name {
        font-size: 1.3em;
    }

    .eeat-author-job-title {
        font-size: 0.8em;
        padding: 6px 12px;
    }

    .eeat-author-bio,
    .eeat-author-expertise {
        font-size: 0.85em;
    }

    .eeat-author-social a,
    .eeat-author-website a {
        font-size: 0.75em;
        padding: 7px 14px;
    }
}

/* ================================================
   ACCESSIBILITY
   ================================================ */

.eeat-author-name a:focus,
.eeat-author-social a:focus,
.eeat-author-avatar a:focus,
.eeat-author-website a:focus {
    outline: 3px solid;
    outline-offset: 4px;
    border-radius: 8px;
}

.theme-light a:focus,
.theme-dark a:focus {
    outline-color: var(--focus-outline-color);
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    
    .eeat-author-box:hover {
        transform: none;
    }
}

/* ================================================
   POST COUNT STYLING
   ================================================ */

.eeat-author-post-count {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    font-weight: 600;
    opacity: 0.75;
    margin: 14px 0;
    padding: 10px 14px;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 8px;
    border-left: 3px solid rgba(99, 102, 241, 0.3);
    font-style: italic;
}

.eeat-author-post-count .post-count-icon {
    font-size: 1.2em;
    flex-shrink: 0;
}

.eeat-author-post-count strong {
    font-weight: 700;
    color: inherit;
    font-style: normal;
}

.theme-dark .eeat-author-post-count {
    background: rgba(199, 210, 254, 0.1);
    border-left-color: rgba(199, 210, 254, 0.4);
}

/* ================================================
   PUBLISHED AT / CONTRIBUTOR LINKS (Button Style)
   ================================================ */

.eeat-author-published-at {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.theme-dark .eeat-author-published-at {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.eeat-author-published-at strong {
    display: block;
    font-size: 0.85em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    opacity: 0.7;
}

.eeat-published-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.eeat-published-links a {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 100px;
    font-size: 0.875em;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    color: inherit;
}

.eeat-published-links a::before {
    content: '📝';
    margin-right: 6px;
    font-size: 1em;
}

.eeat-published-links a:hover {
    background: rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 20px rgba(99, 102, 241, 0.15),
        0 4px 10px rgba(99, 102, 241, 0.1);
}

/* Dark theme adjustments */
.theme-dark .eeat-published-links a {
    background: rgba(199, 210, 254, 0.15);
    border-color: rgba(199, 210, 254, 0.25);
}

.theme-dark .eeat-published-links a:hover {
    background: rgba(199, 210, 254, 0.25);
}

/* ================================================
   HORIZONTAL SPLIT - PUBLISHED AT LIST STYLE
   ================================================ */

.layout-horizontal-split .eeat-author-published-at {
    margin-top: 28px;
    padding-top: 24px;
}

.layout-horizontal-split .eeat-author-published-at strong {
    margin-bottom: 16px;
}

.eeat-published-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.eeat-published-list li {
    margin: 0;
    padding: 0;
}

.eeat-published-list a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-left: 3px solid rgba(99, 102, 241, 0.4);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9em;
    font-weight: 600;
    color: inherit;
}

.eeat-published-list a::before {
    content: none; /* Remove the arrow from base social link style */
}

.eeat-published-list a:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.2);
    border-left-color: rgba(99, 102, 241, 0.7);
    transform: translateX(4px);
    box-shadow: 
        0 4px 12px rgba(99, 102, 241, 0.15),
        0 2px 6px rgba(99, 102, 241, 0.1);
}

.eeat-published-list .domain-icon {
    margin-right: 10px;
    font-size: 1.1em;
    opacity: 0.7;
    flex-shrink: 0;
}

.eeat-published-list .domain-name {
    flex: 1;
}

/* Dark theme for published list */
.theme-dark .eeat-published-list a {
    background: rgba(199, 210, 254, 0.1);
    border-color: rgba(199, 210, 254, 0.2);
    border-left-color: rgba(199, 210, 254, 0.5);
}

.theme-dark .eeat-published-list a:hover {
    background: rgba(199, 210, 254, 0.18);
    border-color: rgba(199, 210, 254, 0.3);
    border-left-color: rgba(199, 210, 254, 0.8);
}

/* ================================================
   CENTERED CARD - PUBLISHED LINKS CENTERED
   ================================================ */

.layout-centered-card .eeat-published-links {
    justify-content: center;
}

.layout-centered-card .eeat-author-post-count {
    justify-content: center;
}

/* ================================================
   RESPONSIVE - NEW ELEMENTS
   ================================================ */

@media (max-width: 768px) {
    /* Post Count */
    .eeat-author-post-count {
        font-size: 0.85em;
        padding: 8px 12px;
        justify-content: center;
        text-align: center;
    }
    
    /* Published At - Button Style */
    .eeat-author-published-at {
        padding-top: 16px;
        margin-top: 20px;
    }
    
    .eeat-published-links {
        justify-content: center;
    }
    
    .eeat-published-links a {
        font-size: 0.8em;
        padding: 6px 12px;
    }
    
    /* Published At - List Style (Horizontal Split) */
    .layout-horizontal-split .eeat-author-published-at {
        padding-top: 20px;
        margin-top: 20px;
    }
    
    .eeat-published-list a {
        padding: 10px 14px;
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    /* Post Count */
    .eeat-author-post-count {
        font-size: 0.8em;
        padding: 7px 10px;
        flex-wrap: wrap;
    }
    
    /* Published Links - Button Style */
    .eeat-published-links a {
        font-size: 0.75em;
        padding: 5px 10px;
    }
    
    .eeat-published-links a::before {
        margin-right: 4px;
    }
    
    /* Published List - List Style */
    .eeat-published-list a {
        padding: 8px 12px;
        font-size: 0.8em;
    }
    
    .eeat-published-list .domain-icon {
        font-size: 1em;
        margin-right: 8px;
    }
}

/* ================================================
   PRINT STYLES
   ================================================ */

@media print {
    .eeat-author-box {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        page-break-inside: avoid;
        margin: 20px 0;
        padding: 20px;
    }
    
    .eeat-author-box::after {
        display: none;
    }
    
    .eeat-author-box:hover {
        transform: none !important;
    }
    
    .eeat-author-social a::before,
    .eeat-author-website a::before,
    .eeat-published-links a::before {
        content: '';
    }
    
    .eeat-author-avatar a::before {
        display: none;
    }
    
    /* Show URLs after links in print */
    .eeat-author-social a::after,
    .eeat-author-website a::after,
    .eeat-published-links a::after,
    .eeat-published-list a::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}