/**
 * @package     Phoca Premiere Template
 * @copyright   Copyright (C) Jan Pavelka www.phoca.cz
 * @license     http://www.gnu.org/copyleft/gpl.html GNU/GPL
 * 
 * Author Bio Block Styles
 * ========================
 * E-E-A-T optimized author information display with schema.org Person markup
 * Supports: photo, name, title, credentials, bio, expertise topics, social links, CTA button
 */

/* Main Container */
.ph-author-bio {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    margin: 2rem 0;
    align-items: flex-start;
}

/* No-avatar variant */
.ph-author-bio.ph-author-bio-no-avatar .ph-author-info {
    /* No special styling needed, avatar placeholder handles itself */
}

/* Has CTA variant */
.ph-author-bio.ph-author-bio-has-cta .ph-author-info {
    display: flex;
    flex-direction: column;
}

/* Author Avatar/Image */
.ph-author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary, #667eea);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
    flex-shrink: 0;
    background: var(--light, #f8f9fa);
}

/* Placeholder avatar (initials) */
.ph-author-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary, #667eea);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

/* Author Info Container */
.ph-author-info {
    flex: 1;
    min-width: 0;
}

/* Author Name */
.ph-author-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark, #1a1a1a);
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
}

[data-bs-theme="dark"] .ph-author-name {
    color: #fff;
}

/* Author Title/Job Title */
.ph-author-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary, #667eea);
    margin: 0 0 0.5rem 0;
}

/* Author Credentials/Certifications */
.ph-author-credentials {
    font-size: 0.875rem;
    color: var(--secondary, #6c757d);
    margin: 0 0 0.75rem 0;
    font-weight: 500;
}

[data-bs-theme="dark"] .ph-author-credentials {
    color: #adb5bd;
}

/* Author Bio/Description - renamed to avoid conflict with main container */
.ph-author-description {
    font-size: 0.95rem;
    color: var(--secondary, #6c757d);
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

[data-bs-theme="dark"] .ph-author-description {
    color: #ced4da;
}

/* Author Expertise Topics (knowsAbout) */
.ph-author-expertise {
    margin: 0 0 1rem 0;
    font-size: 0.875rem;
}

.ph-author-expertise-label {
    font-weight: 600;
    color: var(--primary, #667eea);
    margin-right: 0.25rem;
}

.ph-author-knowsabout {
    color: var(--secondary, #6c757d);
}

[data-bs-theme="dark"] .ph-author-knowsabout {
    color: #ced4da;
}

/* Author Social Links Container */
.ph-author-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Individual Social Links */
.ph-author-social {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    border: 1px solid transparent;
}

/* Icon styling within social links */
.ph-author-social i {
    font-size: 0.875rem;
    width: 1em;
    text-align: center;
}

/* LinkedIn */
.ph-author-linkedin {
    background: rgba(0, 119, 181, 0.1);
    color: #0077b5;
    border-color: rgba(0, 119, 181, 0.2);
}

.ph-author-linkedin:hover {
    background: #0077b5;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 119, 181, 0.3);
}

/* Twitter/X */
.ph-author-twitter {
    background: rgba(29, 15, 242, 0.1);
    color: #1da1f2;
    border-color: rgba(29, 161, 242, 0.2);
}

.ph-author-twitter:hover {
    background: #1da1f2;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(29, 161, 242, 0.3);
}

/* Website/Personal Site */
.ph-author-website {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border-color: rgba(102, 126, 234, 0.2);
}

.ph-author-website:hover {
    background: #667eea;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Custom/Generic social link */
.ph-author-custom {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    border-color: rgba(108, 117, 125, 0.2);
}

.ph-author-custom:hover {
    background: #6c757d;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* GitHub (URL-based detection) */
.ph-author-social[href*="github"] {
    background: rgba(52, 52, 52, 0.1);
    color: #343434;
    border-color: rgba(52, 52, 52, 0.2);
}

.ph-author-social[href*="github"]:hover {
    background: #343434;
    color: #fff;
}

[data-bs-theme="dark"] .ph-author-social[href*="github"] {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

/* CTA Wrapper */
.ph-author-cta-wrapper {
    margin-top: 0.5rem;
}

/* Author Bio with CTA Integration */
.ph-author-bio.has-cta {
    display: flex;
    flex-direction: column;
}

.ph-author-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    align-self: flex-start;
    margin-top: 0.5rem;
}

.ph-author-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: #fff;
}

.ph-author-cta i {
    font-size: 0.875rem;
}

/* Compact Variant */
.ph-author-bio.ph-author-bio-compact {
    padding: 1.5rem;
    gap: 1rem;
}

.ph-author-bio.ph-author-bio-compact .ph-author-avatar {
    width: 60px;
    height: 60px;
}

.ph-author-bio.ph-author-bio-compact .ph-author-name {
    font-size: 1.125rem;
}

.ph-author-bio.ph-author-bio-compact .ph-author-title {
    font-size: 0.875rem;
}

.ph-author-bio.ph-author-bio-compact .ph-author-bio {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

/* Centered Variant */
.ph-author-bio.ph-author-bio-centered {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.ph-author-bio.ph-author-bio-centered .ph-author-links {
    justify-content: center;
}

.ph-author-bio.ph-author-bio-centered .ph-author-cta {
    align-self: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ph-author-bio {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.5rem;
        gap: 1rem;
    }

    .ph-author-avatar {
        width: 80px;
        height: 80px;
    }

    .ph-author-name {
        font-size: 1.25rem;
    }

    .ph-author-links {
        justify-content: center;
    }

    .ph-author-bio.ph-author-bio-centered {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .ph-author-bio {
        padding: 1rem;
    }

    .ph-author-avatar {
        width: 70px;
        height: 70px;
    }

    .ph-author-name {
        font-size: 1.125rem;
    }

    .ph-author-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .ph-author-social {
        width: 100%;
        justify-content: center;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .ph-author-social,
    .ph-author-cta {
        transition: none;
    }

    .ph-author-social:hover,
    .ph-author-cta:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .ph-author-bio {
        background: #f5f5f5;
        border: 1px solid #ddd;
        break-inside: avoid;
    }

    .ph-author-social,
    .ph-author-cta {
        display: none;
    }
}