/* Member List Page Styles */

:root {
    --dpfp-yellow: #f5b500;
    --dpfp-blue: #043e80;
    --dpfp-dark-blue: #032d5e;
    --dpfp-text: #333333;
    --dpfp-gray-bg: #f5f7fa;
}

/* Hero Section */
.dpfp-member-hero {
    padding: 80px 20px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
    background-color: #fff;
    margin-bottom: 0;
}

.member-page-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--dpfp-blue);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    line-height: 1.1;
}

.member-page-subtitle {
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
}

/* Filter Tabs */
.member-filter-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.filter-tab {
    background: #fff;
    border: 1px solid #ddd;
    padding: 10px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tab:hover,
.filter-tab.active {
    background: var(--dpfp-blue);
    color: #fff;
    border-color: var(--dpfp-blue);
    box-shadow: 0 4px 10px rgba(4, 62, 128, 0.2);
}

/* Member Container */
.dpfp-member-container {
    padding-bottom: 100px;
}

/* Sections */
.member-section {
    margin-bottom: 60px;
}

.member-section-title {
    font-size: 1.8rem;
    color: var(--dpfp-text);
    margin-bottom: 30px;
    padding-left: 20px;
    border-left: 6px solid var(--dpfp-yellow);
    display: flex;
    align-items: center;
    gap: 15px;
}

.count-badge {
    font-size: 1rem;
    background: #eee;
    padding: 4px 12px;
    border-radius: 20px;
    color: #666;
    font-weight: normal;
}

/* Grid */
.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
}

/* Member Card */
.member-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
}

.member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: rgba(4, 62, 128, 0.1);
}

.member-photo-wrapper {
    width: 100%;
    padding-top: 100%;
    /* 1:1 Aspect Ratio */
    position: relative;
    background: #f0f2f5;
    overflow: hidden;
}

.member-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.member-card:hover .member-photo {
    transform: scale(1.05);
}

.member-photo-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e0;
    font-size: 5rem;
    background: linear-gradient(135deg, #f0f2f5 0%, #e2e8f0 100%);
}

.member-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.member-position-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(4, 62, 128, 0.9);
    color: #fff;
    padding: 6px 10px;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    backdrop-filter: blur(4px);
}

.member-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.member-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.3;
    color: var(--dpfp-text);
}

.member-furigana {
    display: block;
    font-size: 0.7rem;
    color: #888;
    font-weight: normal;
    margin-bottom: 2px;
}

.member-district {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.district-tag,
.block-tag {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
    background: #f0f2f5;
    color: #555;
    font-weight: 500;
}

.block-tag {
    background: #fff9e6;
    color: #b38600;
}

/* Officer Card Styling */
/* .member-section.officer-section .member-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
} */

/* Major Officer (Gold/Yellow) */
.member-card.is-officer-major {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    background: linear-gradient(to bottom, #fff, #fffbf0);
    z-index: 2;
}

.member-card.is-officer-major .member-photo-wrapper {
    padding-top: 110%;
}

.member-card.is-officer-major .member-photo-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--dpfp-yellow);
}

.member-card.is-officer-major .member-position-badge {
    background: var(--dpfp-yellow);
    color: #333;
    font-size: 0.85rem;
    /* 長い肩書き対応で少し小さく */
    padding: 8px 10px;
    top: 0;
    bottom: auto;
    backdrop-filter: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);

    /* 長文対応 */
    white-space: normal;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    /* 最大3行まで */
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: auto;
    max-height: 4.2em;
    /* 3行分 */
}

.member-card.is-officer-major .member-name {
    font-size: 1.4rem;
    color: var(--dpfp-blue);
}

.member-card.is-officer-major:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(245, 181, 0, 0.15);
}

/* Minor Officer (Blue) */
.member-card.is-officer-minor {
    border: 1px solid rgba(4, 62, 128, 0.1);
    background: #fff;
}

.member-card.is-officer-minor .member-position-badge {
    background: var(--dpfp-blue);
    /* 青色タグ */
    color: #fff;
    font-size: 0.75rem;
    padding: 6px 10px;
    top: 0;
    bottom: auto;
    left: auto;
    right: 0;
    /* 右寄せ */
    border-bottom-left-radius: 8px;

    /* 長文対応 */
    white-space: normal;
    line-height: 1.2;
    max-width: 80%;
    /* 横幅制限 */
    text-align: right;
}

.member-card.is-officer-minor .member-name {
    color: var(--dpfp-blue);
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .member-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .member-card {
        min-width: 0;
        width: 100%;
    }

    .member-name {
        font-size: 1rem;
    }

    .member-info {
        padding: 15px;
    }

    .member-filter-tabs {
        flex-wrap: wrap;
        gap: 10px;
    }

    .filter-tab {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}

/* Keep 2 columns even on small mobile devices */
@media (max-width: 480px) {
    .member-page-title {
        font-size: 2.5rem;
    }
    
    .member-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
}

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}