/**
 * @file plugins/themes/lumina/styles/components/editorial-masthead.css
 *
 * Copyright (c) 2026 Lumina Project contributors
 * Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
 *
 * @brief Modern modernized card styles for the Editorial Team / Masthead page.
 */

.page_masthead {
    max-width: var(--lm-container-xl, 1280px);
    margin: 0 auto;
    padding: var(--space-md) var(--space-lg);
    font-family: var(--lm-font-sans);
}

.lm-masthead-header {
    margin-bottom: var(--space-xl);
    text-align: center;
    border-bottom: 1px solid var(--lm-border);
    padding-bottom: var(--space-lg);
}

.lm-masthead-title {
    font-size: var(--lm-font-size-3xl, 2rem);
    font-weight: var(--lm-weight-extrabold);
    color: var(--lm-text-primary);
    margin-bottom: var(--space-xs);
    letter-spacing: -0.025em;
}

.lm-masthead-subtitle {
    font-size: var(--lm-font-size-sm);
    color: var(--lm-text-secondary);
}

/* Section Wrapper */
.lm-masthead-section {
    margin-bottom: var(--space-2xl);
}

.lm-masthead-section-title {
    font-size: var(--lm-font-size-xl, 1.25rem);
    font-weight: var(--lm-weight-bold);
    color: var(--lm-text-primary);
    margin-bottom: var(--space-lg);
    border-left: 4px solid var(--lm-link);
    padding-left: var(--space-sm);
    letter-spacing: -0.01em;
}

/* Base Card Style */
.lm-masthead-card {
    background-color: var(--lm-surface-card, #ffffff);
    border: 1px solid var(--lm-border);
    border-radius: var(--lm-radius-xl, 12px);
    padding: var(--space-lg);
    transition: var(--lm-portal-transition);
    box-shadow: var(--lm-shadow-sm);
    display: flex;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.lm-masthead-card:hover {
    transform: translateY(-3px);
    border-color: var(--lm-border-hover);
    box-shadow: var(--lm-shadow-md);
}

/* Avatar Styling */
.lm-masthead-avatar-wrapper {
    flex-shrink: 0;
    margin-right: var(--space-lg);
}

.lm-masthead-avatar {
    border-radius: var(--lm-radius-full, 9999px);
    object-fit: cover;
    border: 3px solid var(--lm-border);
    background-color: var(--lm-surface-muted);
    box-shadow: var(--lm-shadow-sm);
}

/* Initials Fallback */
.lm-masthead-avatar-initials {
    border-radius: var(--lm-radius-full, 9999px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--lm-weight-bold);
    background-color: var(--lm-portal-accent-light, #eff6ff);
    color: var(--lm-portal-accent, #2563eb);
    border: 3px solid var(--lm-border);
    text-transform: uppercase;
    box-shadow: var(--lm-shadow-sm);
}

/* Card Content Details */
.lm-masthead-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0; /* Prevents overflow of flex items */
}

.lm-masthead-name {
    font-size: var(--lm-font-size-base);
    font-weight: var(--lm-weight-bold);
    color: var(--lm-text-primary);
    margin: 0 0 var(--space-xs) 0;
    line-height: var(--lm-lh-tight);
}

.lm-masthead-affiliation {
    font-size: var(--lm-font-size-sm);
    color: var(--lm-text-secondary);
    margin-bottom: var(--space-sm);
    line-height: var(--lm-lh-normal);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lm-masthead-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-md);
    margin-top: auto;
}

/* Country flag & Badge */
.lm-masthead-country {
    display: inline-flex;
    align-items: center;
    font-size: var(--lm-font-size-xs);
    color: var(--lm-text-secondary);
    background-color: var(--lm-surface-muted);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--lm-radius-full);
    border: 1px solid var(--lm-border);
    font-weight: var(--lm-weight-medium);
}

.lm-masthead-flag {
    margin-right: var(--space-xs);
    border-radius: var(--lm-radius-sm, 2px);
    object-fit: cover;
    display: inline-block;
}

/* ORCID Link styling */
.lm-masthead-orcid-wrapper {
    display: inline-flex;
}

.lm-masthead-orcid-link {
    display: inline-flex;
    align-items: center;
    font-size: var(--lm-font-size-xs);
    color: var(--lm-text-secondary);
    text-decoration: none;
    background-color: var(--lm-surface-muted);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--lm-radius-full);
    border: 1px solid var(--lm-border);
    transition: var(--lm-portal-transition);
    font-weight: var(--lm-weight-medium);
}

.lm-masthead-orcid-link svg,
.lm-masthead-orcid-link img {
    width: 14px;
    height: 14px;
    margin-right: var(--space-xs);
    flex-shrink: 0;
}

.lm-masthead-orcid-link:hover {
    border-color: var(--lm-success, #10b981);
    color: var(--lm-text-primary);
    background-color: var(--lm-surface-card);
}

/* 1. Featured Editor-in-Chief Layout */
.lm-masthead-featured {
    max-width: var(--lm-container-md, 768px);
    margin: 0 auto var(--space-xl) auto;
}

.lm-masthead-featured .lm-masthead-card {
    background: linear-gradient(135deg, var(--lm-surface-card) 0%, var(--lm-surface-muted) 100%);
    border-left: 6px solid var(--lm-link);
    padding: var(--space-xl);
}

.lm-masthead-featured .lm-masthead-avatar {
    width: 110px;
    height: 110px;
}

.lm-masthead-featured .lm-masthead-avatar-initials {
    width: 110px;
    height: 110px;
    font-size: var(--lm-font-size-4xl, 2.25rem);
}

.lm-masthead-featured .lm-masthead-name {
    font-size: var(--lm-font-size-xl, 1.25rem);
}

.lm-masthead-featured .lm-masthead-affiliation {
    font-size: var(--lm-font-size-base);
}

/* 2. Associate Editors Grid (2-column on desktop) */
.lm-masthead-medium-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

.lm-masthead-medium-grid .lm-masthead-avatar {
    width: 80px;
    height: 80px;
}

.lm-masthead-medium-grid .lm-masthead-avatar-initials {
    width: 80px;
    height: 80px;
    font-size: var(--lm-font-size-2xl, 1.5rem);
}

.lm-masthead-medium-grid .lm-masthead-name {
    font-size: var(--lm-font-size-lg, 1.125rem);
}

/* 3. Editorial Advisory Board / Production Team Grid (Compact, 3-column / 4-column) */
.lm-masthead-compact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

.lm-masthead-compact-grid .lm-masthead-card {
    padding: var(--space-md);
    align-items: center;
}

.lm-masthead-compact-grid .lm-masthead-avatar-wrapper {
    margin-right: var(--space-md);
}

.lm-masthead-compact-grid .lm-masthead-avatar {
    width: 50px;
    height: 50px;
}

.lm-masthead-compact-grid .lm-masthead-avatar-initials {
    width: 50px;
    height: 50px;
    font-size: var(--lm-font-size-base, 1rem);
}

.lm-masthead-compact-grid .lm-masthead-name {
    font-size: var(--lm-font-size-base);
}

.lm-masthead-compact-grid .lm-masthead-affiliation {
    font-size: var(--lm-font-size-xs);
    margin-bottom: var(--space-xs);
}

/* CTA Section */
.lm-masthead-cta-section {
    margin: var(--space-2xl) auto 0 auto;
    max-width: var(--lm-container-md, 768px);
    text-align: center;
}

.lm-masthead-cta-card {
    background-color: var(--lm-surface-card);
    border: 1px solid var(--lm-border);
    border-radius: var(--lm-radius-xl, 12px);
    padding: var(--space-xl);
    box-shadow: var(--lm-shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

.lm-masthead-cta-text {
    font-size: var(--lm-font-size-lg, 1.125rem);
    font-weight: var(--lm-weight-semibold);
    color: var(--lm-text-primary);
    margin-bottom: var(--space-md);
}

.lm-masthead-cta-button {
    display: inline-block;
    background-color: var(--lm-button-primary, var(--lm-link));
    color: var(--lm-button-text, #ffffff) !important;
    font-weight: var(--lm-weight-semibold);
    padding: 0.75rem 1.5rem;
    border-radius: var(--lm-radius-md, 6px);
    text-decoration: none;
    transition: var(--lm-portal-transition);
    border: none;
    cursor: pointer;
    box-shadow: var(--lm-shadow-sm);
}

.lm-masthead-cta-button:hover {
    background-color: var(--lm-button-primary-hover, var(--lm-link-hover));
    transform: translateY(-1px);
    box-shadow: var(--lm-shadow-md);
}

/* Responsive Breakpoints */
@media (min-width: 640px) {
    .lm-masthead-compact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .lm-masthead-featured .lm-masthead-card {
        flex-direction: row;
        align-items: center;
    }
    
    .lm-masthead-medium-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .lm-masthead-compact-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .lm-masthead-compact-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Editorial History Link */
.lm-masthead-history-link {
    margin-top: var(--space-xl);
    text-align: center;
}

.lm-masthead-history-link p {
    color: var(--lm-text-secondary);
    font-size: var(--lm-font-size-sm);
}

.lm-masthead-history-link a {
    color: var(--lm-link);
    text-decoration: underline;
    font-weight: var(--lm-weight-medium);
}

.lm-masthead-history-link a:hover {
    color: var(--lm-link-hover);
}

