* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    background: #FAF5EF;
}

.page-container {
    max-width: 1400px;
    margin: 0 auto;
}

.page-title {
    text-align: center;
    font-size: 42px;  
    font-weight: 700;
    color: #0f172a;
    margin-bottom:6.5rem;
}

/* Cards Grid Layout - 4-3-4-3 pattern */
.cards-grid {
    display: flex;
    flex-direction: column;
    gap: 64px;  /* 垂直間隔 */
    margin-bottom: 15rem;
}

.card-row {
    display: grid;
    gap: 50px;  /*  水平間隔 */
    justify-items: center;
}

.card-row.row-4 {
    grid-template-columns: repeat(4, minmax(280px, 345px));  /* 可変幅: 最小280px、最大345px */
    justify-content: center;
    margin: 0 auto;
}

.card-row.row-3 {
    grid-template-columns: repeat(3, minmax(280px, 345px));  /* 可変幅: 最小280px、最大345px */
    justify-content: center;
    margin: 0 auto;
}

/* Individual Card Styles */
.profile-card {
    position: relative;
    background: white;
    border-radius: 29px;  
    box-shadow: 0 6px 6px rgba(0, 0, 0, 0.16);
    padding: 1rem 1.5rem 1rem 1.5rem;
    width: 100%;  /* 可変幅 */
    max-width: 345px;  /* 最大幅345px */
    height: 300px; 
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.profile-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.card-avatar-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.card-avatar {
    width: 125px;
    height: 125px; 
    border-radius: 50%;
    overflow: hidden;
    background: #e2e8f0;
}

.card-avatar svg {
    width: 100%;
    height: 100%;
}

.card-department {
    font-size: 13px;
    color: #000;
    margin-bottom: 1rem;
    font-weight: 400;
}

.card-message {
    color: #000;
    line-height: 1.6;
    font-weight: 500;
}

/* 赤字強調用のクラス */
.highlight {
    color: #BE3C1F;
    font-weight: 500;
}

.card-arrow {
    position: absolute;
    bottom: 1.5rem;
    right: 1.2rem;
    width: 35px; 
    height: 35px;  
    background: #1e293b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.profile-card:hover .card-arrow {
    background: #0f172a;
}

.card-arrow-icon {
    width: 16px;
    height: 16px;
    color: white;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background:#FAF5EF;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 30px; 
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.25);
    max-width: 608px; 
    min-height: 563px; 
    width: 100%;
    padding: 3rem 2.5rem;
    animation: scaleIn 0.3s ease-out;
}

/* Close Button */
.close-button {
    position: absolute;
    top: 2.25rem;
    right: 2.25rem;
    width: 35px; 
    height: 35px;  
    background: #1e293b;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-button:hover {
    background: #0f172a;
    transform: scale(1.1);
}

.close-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.close-button:hover .close-icon {
    transform: rotate(90deg);
}

/* Modal Content */
.modal-avatar-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.modal-avatar {
    width: 125px; 
    height: 125px; 
    border-radius: 50%;
    overflow: hidden;
    background: #e2e8f0;
}

.modal-avatar svg {
    width: 100%;
    height: 100%;
}

.modal-department {
    text-align: center;
    font-size: 13px;  
    color: #000;
    margin-bottom: 0.5rem;
    font-weight: 400;
    line-height: 0.5;
}

.modal-name {
    text-align: center;
    font-size: 13px; 
    color: #000;
    margin: 0 0 2.5rem;
    font-weight: 500;
}

/* Q&A Section */
.qa-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.qa-item {
    text-align: center;
}

.question {
    font-size: 18px; 
    color: #0f172a;
    margin-bottom: 0.5rem;
    line-height: 1.6;
    font-weight: 400;
}

.answer {
    font-size: 18px; 
    font-weight: 500;
    color: #BE3C1F;
    line-height: 1.5;
    margin: 0;
}

.divider {
    display: flex;
    justify-content: center;
    margin: 0.5rem 0;
}

.divider::before {
    content: "";
    width: 3rem;
    height: 1.1px;
    background: #707070;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Responsive */
/* PC: 1280px以上 - 4-3-4-3パターン */
@media (min-width: 1280px) {
    .card-row.row-4 {
        grid-template-columns: repeat(4, minmax(160px, 300px));
    }
    
    .card-row.row-3 {
        grid-template-columns: repeat(3, minmax(160px, 300px));
    }
}

/* タブレット: 768px～1279px - 2列表示 */
@media (min-width: 768px) and (max-width: 1279px) {
    .card-row.row-4,
    .card-row.row-3 {
        grid-template-columns: repeat(4, minmax(160px, 300px));
        gap: 10px;
    }
    .cards-grid{
        margin:20px;
    }
}

/* 中間サイズ: 481px～767px - 2列表示 */
@media (min-width: 481px) and (max-width: 767px) {
    .card-row.row-4,
    .card-row.row-3 {
        grid-template-columns: repeat(4, minmax(280px, 345px));
    }
}

/* スマホ: 480px以下 - 1列表示 */
@media (max-width: 480px) {
    
    .page-title {
        font-size: 32px;  /* スマホでは少し小さく */
        margin-bottom: 2rem;
    }
    
    .card-row.row-4,
    .card-row.row-3 {
        grid-template-columns: minmax(280px, 345px);  /* 可変幅: 最小280px、最大345px */
    }
    
    .cards-grid {
        gap: 32px;  /* スマホでは垂直間隔を半分に */
        margin: 0 3rem;
    }
    
    .card-row {
        gap: 32px;  /* スマホでは水平間隔を半分に */
    }
    
    .modal-content {
        padding: 2rem;
        max-width: 90%;
    }
}
