/* Staff Page Styles - Based on Figma Design */

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Force scrolled state styles for staff page */
.site-header.always-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

.site-header.always-scrolled .main-navigation a {
    color: #333333 !important;
    text-shadow: none !important;
    font-family: 'Zen Kaku Gothic Antique', sans-serif !important;
}

.site-header.always-scrolled .site-branding a {
    color: #333333 !important;
    font-family: 'Cinzel', serif !important;
}

/* Main Container */
.staff-page {
    width: 100%;
    background: #ffffff;
}

/* Hero Section */
.staff-hero {
    width: 100%;
    background: #ffffff;
    margin-top: -96px; /* ナビゲーションバーの高さ分 */
    padding-top: 96px;
}

.staff-hero-container {
    width: 100%;
    position: relative;
}

.staff-hero-image {
    position: relative;
    width: 100%;
    height: 500px;
    background-image: url('../img/kv/staff.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.staff-hero-content {
    text-align: center;
}

.staff-hero-title {
    font-family: 'Zen Kaku Gothic Antique', sans-serif !important;
    font-size: 50px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.2em;
}

/* Mobile Hero Text */
.staff-hero-mobile-title {
    display: none;
}

.staff-hero-mobile-subtitle {
    display: none;
}

/* Mobile only elements */
.mobile-only {
    display: none;
}

/* Staff Container */
.staff-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 40px;
}

/* Office Section */
.staff-section {
    margin-bottom: 100px;
}

.staff-section:last-child {
    margin-bottom: 0;
}

.office-title {
    font-family: 'Zen Kaku Gothic Antique', sans-serif !important;
    font-size: 24px;
    font-weight: 500;
    color: #C00000;
    margin-bottom: 40px;
    padding: 0 0 16px 0;
    position: relative;
    display: inline-block;
    border-bottom: 1px solid #E0E0E0;
    width: 100%;
}

.office-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    height: 3px;
    background: #C00000;
    width: auto;
    right: calc(100% - var(--title-width, 100px));
}

/* Staff Grid */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    column-gap: 5px;
    row-gap: 20px;
}

/* Staff Member */
.staff-member {
    position: relative;
}

.staff-photo {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 1:1 aspect ratio */
    overflow: hidden;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

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

.staff-photo-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #e0e0e0;
}

/* Hover Overlay */
.staff-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
}

.staff-photo:hover .staff-overlay {
    opacity: 1;
}

.staff-name {
    font-family: 'Zen Kaku Gothic Antique', sans-serif !important;
    font-size: 18px;
    font-weight: 500;
    color: #ffffff;
    text-align: center;
    line-height: 1.6;
    padding: 0 15px;
    letter-spacing: 0.05em;
}

/* Responsive */
@media (max-width: 1024px) {
    .staff-container {
        padding: 80px 40px;
    }
    
    .staff-grid {
        grid-template-columns: repeat(4, 1fr);
        column-gap: 5px;
        row-gap: 15px;
    }
    
    .office-title {
        font-size: 22px;
        margin-bottom: 28px;
    }
}

@media (max-width: 768px) {
    .staff-hero {
        margin-top: 0;
        padding-top: 0;
        height: 350px;
        background: #ffffff;
        overflow: hidden;
    }
    
    .staff-hero-container {
        height: 100%;
        position: relative;
    }
    
    .staff-hero-image {
        height: 100%;
        display: block;
        position: relative;
    }
    
    .staff-hero-content {
        display: none;
    }
    
    /* Mobile Hero Title */
    .staff-hero-mobile-title {
        display: block;
        position: absolute;
        top: 109px;
        left: 22px;
        font-family: 'Cinzel', serif;
        font-size: 40px;
        font-weight: 400;
        color: #1b1b1b;
        line-height: 1.3;
        letter-spacing: normal;
    }
    
    .staff-hero-mobile-subtitle {
        display: block;
        position: absolute;
        top: 221px;
        left: 22px;
        width: 295px;
        font-family: 'Zen Kaku Gothic Antique', sans-serif;
        font-size: 10px;
        font-weight: 500;
        color: #1b1b1b;
        line-height: 1.5;
    }
    
    .staff-container {
        padding: 40px 22px;
    }
    
    .staff-section {
        margin-bottom: 60px;
        position: relative;
    }
    
    /* Office title with decorative line */
    .office-title {
        font-size: 16px;
        margin-bottom: 24px;
        padding: 0;
        border: none;
        color: #1b1b1b;
        position: relative;
        padding-bottom: 14px;
    }
    
    .office-title::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 86px;
        height: 3px;
        background: #c00707;
    }
    
    .office-title::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: #d0d0d0;
    }
    
    /* Staff grid - 2列×5行 */
    .staff-grid {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 15px;
        row-gap: 24px;
    }
    
    /* Staff member styles */
    .staff-photo {
        box-shadow: none;
    }
    
    .staff-name {
        font-size: 14px;
    }
    
    /* Only show first 3 rows (6 items) */
    .staff-member:nth-child(n+7) {
        display: none;
    }
    
    /* Pagination dots container */
    .staff-pagination {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center;
        align-items: center;
        gap: 4px;
        margin-top: 40px;
        width: 100%;
    }
    
    .page-dot {
        width: 33px;
        height: 33px;
        border-radius: 50%;
        background: #d9d9d9;
        border: none;
        cursor: pointer;
        transition: background 0.3s ease;
        font-family: 'Cinzel', serif;
        font-size: 16px;
        font-weight: 400;
        color: #1b1b1b;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .page-dot.active {
        background: #c00707;
        color: #ffffff;
    }
    
    .page-dot:hover {
        background: #c00707;
        color: #ffffff;
    }
    
    /* Show all items when pagination is active */
    .staff-section.show-all .staff-member {
        display: block;
    }
    
    /* Show mobile only elements */
    .mobile-only {
        display: block;
    }
}

@media (max-width: 480px) {
    .staff-grid {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 15px;
        row-gap: 24px;
    }
}

/* Staff Modal Styles */
.staff-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
}

.staff-modal.active {
    display: block;
}

.staff-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.staff-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #ffffff;
    max-width: 1000px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.staff-modal-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    font-family: 'Cinzel', serif !important;
    font-size: 16px;
    font-weight: 400;
    color: #000000;
    cursor: pointer;
    padding: 10px;
    letter-spacing: 0.1em;
    z-index: 10;
}

.staff-modal-close:hover {
    opacity: 0.7;
}

.staff-modal-body {
    display: flex;
    min-height: 600px;
}

.staff-modal-image {
    flex: 0 0 50%;
    background-color: #f5f5f5;
}

.staff-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.staff-modal-info {
    flex: 1;
    padding: 60px;
    display: flex;
    flex-direction: column;
}

.staff-modal-name-container {
    margin-bottom: 40px;
}

.staff-name-table {
    border-collapse: collapse;
    border-spacing: 0;
}

.staff-name-table td {
    padding: 0;
    border: none;
    vertical-align: baseline;
}

.staff-name-table .name-first {
    padding-right: 1em;
    text-align: left;
    width: auto;
}

.staff-name-table .name-last {
    padding-left: 0;
    text-align: left;
}

.staff-modal-subtitle {
    font-family: 'Zen Kaku Gothic Antique', sans-serif !important;
    font-size: 16px;
    font-weight: 500;
    color: #1B1B1B;
    margin: 0;
    letter-spacing: 0.1em;
    font-feature-settings: "palt";
    display: inline-block;
}

.staff-modal-name {
    font-family: 'Zen Kaku Gothic Antique', sans-serif !important;
    font-size: 32px;
    font-weight: 700;
    color: #000000;
    margin: 0;
    line-height: 1.3;
    letter-spacing: 0.1em;
    font-feature-settings: "palt";
    display: inline-block;
}

.staff-modal-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    margin-bottom: 40px;
}

.staff-modal-table tr {
    border: none;
}

.staff-modal-table th {
    font-family: 'Zen Kaku Gothic Antique', sans-serif !important;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    background-color: #1B1B1B;
    padding: 6px 20px;
    text-align: center;
    width: 140px;
}

.staff-modal-table td {
    font-family: 'Zen Kaku Gothic Antique', sans-serif !important;
    font-size: 16px;
    font-weight: 500;
    color: #333333;
    padding: 6px 20px;
    line-height: 1.6;
}

.staff-modal-description {
    font-family: 'Zen Kaku Gothic Antique', sans-serif !important;
    font-size: 17px;
    font-weight: 500;
    color: #333333;
    line-height: 1.8;
    white-space: pre-line;
}

/* Responsive for Modal */
@media (max-width: 768px) {
    .staff-modal-content {
        width: 85%;
        max-height: 85vh;
    }
    
    .staff-modal-close {
        top: 15px;
        right: 15px;
        font-size: 14px;
    }
    
    .staff-modal-body {
        flex-direction: column;
        min-height: auto;
    }
    
    .staff-modal-image {
        flex: none;
        height: 300px;
    }
    
    .staff-modal-info {
        padding: 30px;
    }
    
    .staff-modal-name-container {
        margin-bottom: 30px;
    }
    
    .staff-modal-name {
        font-size: 24px;
    }
    
    .staff-modal-table th {
        width: 120px;
        font-size: 12px;
        padding: 6px 15px;
    }
    
    .staff-modal-table td {
        font-size: 14px;
        padding: 6px 15px;
    }
    
    .staff-modal-description {
        font-size: 14px;
    }
}