/* Container: Grid Layout */
.mha-figure-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    /* Sidebar fixed 300px, Content fills rest */
    gap: 40px;
    margin: 40px 0;
    align-items: start;
    direction: rtl;
}

@media (max-width: 768px) {
    .mha-figure-container {
        grid-template-columns: 1fr;
        /* Stack on mobile */
    }
}

/* Sidebar Card */
.mha-profile-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: sticky;
    /* Sticky sidebar! */
    top: 20px;
}

.mha-profile-img {
    height: 300px;
    background: #eee;
}

.mha-profile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mha-profile-data {
    padding: 20px;
}

.mha-data-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
}

.mha-data-row:last-child {
    border-bottom: none;
}

.mha-data-row .label {
    color: #888;
    font-weight: bold;
}

.mha-data-row .value {
    color: #333;
    font-weight: bold;
    text-align: left;
}

.mha-data-row.highlight .value {
    color: var(--mha-primary, #0f4c81);
}

.mha-data-row.death .value {
    color: #aaa;
    text-decoration: line-through;
}

.mha-data-row.alive .value {
    color: green;
}

/* Tags */
.mha-profile-tags {
    padding: 0 20px 20px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mha-tag {
    background: #f0f4f8;
    color: var(--mha-primary, #0f4c81);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Main Content */
.mha-section {
    margin-bottom: 40px;
}

.mha-title {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #222;
    border-bottom: 2px solid var(--mha-secondary, #d4a017);
    display: inline-block;
    padding-bottom: 5px;
}

.mha-subtitle {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: #444;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Achievements List */
.mha-achievements-list {
    list-style: none;
    padding: 0;
}

.mha-achievements-list li {
    display: flex;
    margin-bottom: 15px;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    align-items: center;
}

.mha-achievements-list .year {
    background: var(--mha-secondary, #d4a017);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    margin-left: 15px;
    min-width: 60px;
    text-align: center;
}

/* Photo Grid */
.mha-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.mha-photo-item {
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: 8px;
    display: block;
}

.mha-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.mha-photo-item:hover img {
    transform: scale(1.1);
}






/* =========================================
   FIGURES GRID (Shortcode View)
   ========================================= */
.mha-figures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    /* Responsive Grid */
    gap: 30px;
    padding: 20px 0;
    direction: rtl;
}

.mha-figure-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    border: 1px solid #eee;
}

.mha-figure-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.mha-figure-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.mha-card-img {
    height: 250px;
    width: 100%;
    background: #f9f9f9;
}

.mha-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    /* Focus on faces usually at top */
    transition: transform 0.5s;
}

.mha-figure-card:hover .mha-card-img img {
    transform: scale(1.05);
}

.mha-card-body {
    padding: 15px;
    position: relative;
}

.mha-card-role {
    background: var(--mha-secondary, #d4a017);
    color: #fff;
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 10px;
    position: relative;
    top: -25px;
    /* Floats above the name */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mha-card-body h3 {
    margin: -10px 0 5px 0;
    /* Pull up to account for the floating badge */
    font-size: 1.1rem;
    color: var(--mha-primary, #0f4c81);
}

.mha-card-kunya {
    color: #888;
    font-size: 0.9rem;
    margin: 0;
}

/* Navigation */
.mha-figure-navigation {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #eee;
    direction: rtl;
}

.mha-figure-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.mha-figure-navigation .nav-previous,
.mha-figure-navigation .nav-next {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    max-width: 40%;
}

.mha-figure-navigation .nav-previous {
    text-align: right;
}

.mha-figure-navigation .nav-next {
    text-align: left;
}

.mha-figure-navigation .nav-label {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.mha-figure-navigation .nav-title {
    font-size: 1.1rem;
    color: var(--mha-primary, #0f4c81);
    font-weight: bold;
    transition: color 0.2s;
}

.mha-figure-navigation a:hover .nav-title {
    color: var(--mha-secondary, #d4a017);
}

.mha-figure-navigation .nav-archive {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #444;
    transition: transform 0.2s, color 0.2s;
    min-width: 80px;
}

.mha-figure-navigation .nav-archive i {
    font-size: 24px;
    margin-bottom: 5px;
}

.mha-figure-navigation .nav-archive span {
    font-size: 0.9rem;
    font-weight: bold;
}

.mha-figure-navigation .nav-archive:hover {
    color: var(--mha-secondary, #d4a017);
    transform: scale(1.1);
}

.mha-figure-navigation .nav-placeholder {
    width: 40%;
}

@media (max-width: 600px) {
    .mha-figure-navigation .nav-links {
        flex-direction: column;
        gap: 30px;
    }

    .mha-figure-navigation .nav-previous,
    .mha-figure-navigation .nav-next,
    .mha-figure-navigation .nav-placeholder {
        max-width: 100%;
        width: 100%;
        text-align: center;
    }
}

/* Archive & Search Styles */
.mha-archive-container.figures-archive {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.mha-archive-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    gap: 20px;
}

.mha-header-content .mha-archive-title {
    font-size: 2.5rem;
    color: var(--mha-primary, #0f4c81);
    margin: 0;
}

.mha-header-content .mha-archive-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin: 5px 0 0 0;
}

.mha-search-box {
    flex: 0 0 400px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.mha-search-box input[type="text"] {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #eee;
    border-radius: 30px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
}

.mha-search-box input[type="text"]:focus {
    border-color: var(--mha-secondary, #d4a017);
    box-shadow: 0 0 10px rgba(212, 160, 23, 0.1);
}

.mha-search-box button {
    position: absolute;
    left: 15px;
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.2s;
}

.mha-search-box button:hover {
    color: var(--mha-secondary, #d4a017);
}

.mha-no-results {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 12px;
}

.mha-reset-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 20px;
    background: var(--mha-primary, #0f4c81);
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    font-weight: bold;
    transition: background 0.2s;
}

.mha-reset-btn:hover {
    background: var(--mha-secondary, #d4a017);
    color: #fff;
}

.mha-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.mha-pagination .page-numbers {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #444;
    transition: all 0.2s;
}

.mha-pagination .page-numbers.current {
    background: var(--mha-primary, #0f4c81);
    color: #fff;
    border-color: var(--mha-primary, #0f4c81);
}

.mha-pagination .page-numbers:hover:not(.current) {
    background: #f0f0f0;
}

@media (max-width: 992px) {
    .mha-archive-header {
        flex-direction: column;
        text-align: center;
    }

    .mha-search-box {
        flex: 1;
        width: 100%;
        max-width: 500px;
    }
}