/** * 卒業生カード ブロックのフロントエンド表示用スタイル */ :root { --primary-color: #78909c; --secondary-color: #607d8b; --accent-color: #56c596; --dark-gray: #454545; --medium-gray: #777; --light-gray: #eee; --shadow: 0 4px 20px rgba(0, 0, 0, 0.08); } /* 卒業生カードスタイル */ .wp-block-theme-graduate-card { width: 100%; box-sizing: border-box; margin-bottom: 2rem; .graduate-card { --primary-color: #78909c; --secondary-color: #90a4ae; --accent-color: #b0bec5; --light-bg: #eceff1; --dark-gray: #455a64; --medium-gray: #78909c; --light-gray: #cfd8dc; --shadow: 0 4px 20px rgba(0,0,0,0.06); --card-radius: 16px; display: flex; flex-direction: column; background-color: #fff; border-radius: var(--card-radius); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.3s ease, box-shadow 0.3s ease; height: 100%; width: 100%; min-width: 300px; max-width: 100%; box-sizing: border-box; &:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.12); } } .graduate-card-header { background: var(--primary-color); color: white; padding: 25px; position: relative; width: 100%; box-sizing: border-box; } .graduate-info { position: relative; width: 100%; display: flex; align-items: center; justify-content: space-between; box-sizing: border-box; } .graduate-info-text { flex: 1; padding-right: 20px; min-width: 0; /* これによりテキストが親要素を超えないようになる */ box-sizing: border-box; } .graduate-name { font-size: 22px; font-weight: 600; margin: 0 0 5px; color: #fff; display: block; word-wrap: break-word; overflow-wrap: break-word; min-height: 22px; box-sizing: border-box; width: 100%; } .graduate-name-en { font-size: 16px; font-style: italic; color: rgba(255, 255, 255, 0.85); margin: 0 0 10px; word-wrap: break-word; overflow-wrap: break-word; box-sizing: border-box; width: 100%; } .graduate-title { font-size: 14px; color: #fff; opacity: 0.95; margin: 5px 0 0; font-weight: normal; word-wrap: break-word; overflow-wrap: break-word; box-sizing: border-box; width: 100%; } .graduate-occupation { font-size: 14px; color: #fff; opacity: 0.9; display: block; margin-top: 5px; font-weight: bold; word-wrap: break-word; overflow-wrap: break-word; box-sizing: border-box; width: 100%; } .graduate-image-wrapper { width: 100px; height: 100px; min-width: 100px; border-radius: 50%; overflow: hidden; border: 3px solid #fff; box-shadow: 0 4px 8px rgba(0,0,0,0.15); display: flex; align-items: center; justify-content: center; background-color: rgba(255, 255, 255, 0.2); flex-shrink: 0; /* 画像は縮小しないようにする */ margin-left: 10px; box-sizing: border-box; } .graduate-image { width: 100%; height: 100%; object-fit: cover; } .graduate-image-placeholder { display: flex; justify-content: center; align-items: center; height: 100%; width: 100%; svg { width: 60%; height: 60%; } } .graduate-card-body { padding: 30px; background: white; flex-grow: 1; display: flex; flex-direction: column; width: 100%; box-sizing: border-box; } .graduate-profile { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--light-gray); box-sizing: border-box; } .profile-content { font-size: 15px; line-height: 1.6; color: var(--medium-gray); margin: 0; word-wrap: break-word; overflow-wrap: break-word; box-sizing: border-box; } .message-title { font-size: 18px; font-weight: 600; line-height: 1.4; margin: 0 0 25px; position: relative; padding-left: 20px; border-left: 3px solid var(--accent-color); color: var(--dark-gray); word-wrap: break-word; overflow-wrap: break-word; box-sizing: border-box; } .message-content { font-size: 15px; line-height: 1.8; color: #555; margin: 0 0 20px; word-wrap: break-word; overflow-wrap: break-word; box-sizing: border-box; p { margin: 0 0 15px; &:last-child { margin: 0; } } } } /* レスポンシブ対応 */ @media (max-width: 767px) { .wp-block-theme-graduate-card { width: 100%; .graduate-info { flex-direction: column; align-items: center; text-align: center; } .graduate-info-text { padding-right: 0; margin-bottom: 20px; order: 2; width: 100%; } .graduate-image-wrapper { order: 1; margin-bottom: 20px; margin-left: 0; } .graduate-card-body { padding: 20px; } .message-title { font-size: 16px; margin: 0 0 20px; } .message-content { font-size: 14px; } } }