/* Featured Authors Page */

/* ── Hero ───────────────────────────────────────────────────────────────────── */

.featured-hero {
    text-align: center;
    padding: 4rem 0;
    background: var(--gradient-primary);
    color: white;
    border-radius: 20px;
    margin-bottom: 4rem;
    position: relative;
    overflow: hidden;
}

.featured-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="featdots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23featdots)"/></svg>');
    pointer-events: none;
}

.featured-hero .hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    margin: 0 auto;
}

.featured-hero h1 {
    font-size: 3rem;
    margin-bottom: 1.25rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    line-height: 1.6;
}

/* ── Loading ────────────────────────────────────────────────────────────────── */

.featured-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 4rem 0;
    color: var(--text-secondary, #718096);
}

/* display:flex above would otherwise override the hidden attribute */
.featured-loading[hidden] {
    display: none;
}

.featured-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(128, 128, 128, 0.25);
    border-top-color: var(--accent-color, #ffab02);
    border-radius: 50%;
    animation: featured-spin 0.9s linear infinite;
}

@keyframes featured-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .featured-loading .loading-spinner { animation-duration: 2.5s; }
}

/* ── Author Card Grid ───────────────────────────────────────────────────────── */

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
    padding-bottom: 4rem;
}

.author-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.author-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

.author-card-photo {
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-photo-placeholder {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    opacity: 0.8;
}

.author-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.author-card-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary, #1a202c);
}

.author-card-genre {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-color, #667eea);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.author-card-tagline {
    font-size: 0.95rem;
    color: var(--text-secondary, #718096);
    line-height: 1.5;
    margin: 0.25rem 0 0.5rem;
}

.author-card-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--accent-color, #667eea);
    text-decoration: none;
}

.author-card-link:hover {
    text-decoration: underline;
}

/* ── Empty State ────────────────────────────────────────────────────────────── */

.featured-empty-section {
    padding: 2rem 0 6rem;
}

.empty-state {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.empty-icon {
    font-size: 4rem;
    line-height: 1;
}

.empty-state h2 {
    font-size: 1.8rem;
    margin: 0;
}

.empty-state p {
    color: var(--text-secondary, #718096);
    line-height: 1.65;
    margin: 0;
}

.empty-sub {
    font-size: 0.9rem;
}

.empty-sub a {
    color: var(--accent-color, #667eea);
}

/* ── Dark mode ──────────────────────────────────────────────────────────────── */

[data-theme="dark"] .author-card {
    background: var(--card-bg-dark, #1e2a3a);
    border-color: var(--border-dark, #2d3748);
}

[data-theme="dark"] .author-card-name {
    color: var(--text-primary-dark, #f7fafc);
}
