/**
 * Person Page Styles
 */

.mvt-single-person {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Hero Section */
.mvt-person-hero {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.mvt-person-poster {
    position: relative;
}

.mvt-person-poster img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

/* Person Info */
.mvt-person-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mvt-person-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--mvt-text-color);
    line-height: 1.2;
}

.mvt-person-aka,
.mvt-person-birthday,
.mvt-person-birthplace,
.mvt-person-known-for {
    color: var(--mvt-text-secondary);
    font-size: 1rem;
}

.mvt-person-aka strong,
.mvt-person-birthday strong,
.mvt-person-birthplace strong,
.mvt-person-known-for strong {
    color: var(--mvt-text-color);
    margin-right: 8px;
}

.mvt-person-known-for {
    font-size: 1.1rem;
}

.mvt-person-known-for span {
    color: var(--mvt-primary-color);
    font-weight: 600;
}

.mvt-person-biography {
    margin-top: 15px;
}

/* Bio text — collapsed by default to 4 lines */
.mvt-bio-text {
    line-height: 1.7;
    color: var(--mvt-text-secondary);
    overflow: hidden;
    /* Clamp to 4 lines: line-height (1.7) × font-size (1rem) × 4 */
    max-height: calc( 1.7em * 4 );
    position: relative;
    transition: max-height .35s ease;
}

/* Fade-out gradient at the bottom when collapsed */
.mvt-bio-text::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2.5em;
    background: linear-gradient( to bottom,
        transparent,
        var(--mvt-bg-color, #141414) 90% );
    pointer-events: none;
    transition: opacity .25s ease;
}

/* Expanded state */
.mvt-bio-text.mvt-bio-expanded {
    max-height: 600px; /* large enough for any bio */
}
.mvt-bio-text.mvt-bio-expanded::after {
    opacity: 0;
}

/* Toggle button */
.mvt-bio-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--mvt-primary-color);
    transition: opacity .15s;
}
.mvt-bio-toggle:hover { opacity: 0.75; }
.mvt-bio-toggle:focus-visible {
    outline: 2px solid var(--mvt-primary-color);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Show the right label based on aria-expanded state */
.mvt-bio-toggle-less               { display: none; }
.mvt-bio-toggle[aria-expanded="true"]  .mvt-bio-toggle-more { display: none; }
.mvt-bio-toggle[aria-expanded="true"]  .mvt-bio-toggle-less { display: inline; }

/* Gutenberg / Block Editor Content */
.mvt-person-content {
    margin: 40px 0;
    line-height: 1.7;
    color: var(--mvt-text-secondary);
}

.mvt-person-content p,
.mvt-person-content ul,
.mvt-person-content ol {
    margin-bottom: 1em;
}

.mvt-person-content h2,
.mvt-person-content h3,
.mvt-person-content h4 {
    color: var(--mvt-text-color);
    margin: 1.5em 0 0.5em;
}

.mvt-person-content a {
    color: var(--mvt-primary-color);
    text-decoration: none;
}
.mvt-person-content a:hover {
    text-decoration: underline;
}

/* Filmography Sections */
.mvt-filmography-section {
    margin: 50px 0;
}

.mvt-filmography-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.mvt-filmography-slider::-webkit-scrollbar {
    display: none;
}

.mvt-filmography-slider .mvt-movie-card {
    flex: 0 0 auto;
    width: 200px;
}

/* Responsive */
@media (max-width: 768px) {
    .mvt-person-hero {
        grid-template-columns: 1fr;
    }
    
    .mvt-person-poster {
        max-width: 300px;
        margin: 0 auto;
    }
    
    .mvt-person-name {
        font-size: 2rem;
    }
}

/* Person placeholder image */
.mvt-placeholder-person {
    width: 100%;
    aspect-ratio: 2/3;
    background: linear-gradient(135deg, var(--mvt-card-bg) 0%, var(--mvt-border-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.mvt-placeholder-initial {
    font-size: 8rem;
    font-weight: 700;
    color: var(--mvt-text-muted);
    text-transform: uppercase;
}

/* Fix slider arrows visibility */
.mvt-filmography-section .mvt-slider-wrapper {
    position: relative;
}

.mvt-filmography-section .mvt-slider-arrow {
    z-index: 10;
}
