@charset "UTF-8";

/* =================================== */
/* 1. 基本設定 & 汎用スタイル */
/* =================================== */
body { font-family: 'Noto Sans JP', sans-serif; margin: 0; background-color: #212121; color: #f5f5f5; line-height: 1.8; }
/* （以下、今までのコードが続く） */

/* =================================== */
/* 1. 基本設定 & 汎用スタイル */
/* =================================== */
body { font-family: 'Noto Sans JP', sans-serif; margin: 0; background-color: #212121; color: #f5f5f5; line-height: 1.8; }
a { color: #bbdefb; text-decoration: none; transition: color 0.3s; }
a:hover { color: #ffffff; }
img { max-width: 100%; height: auto; display: block; }
.page-content { max-width: 960px; margin: 0 auto; padding: 4rem 2rem; }
.page-subtitle { text-align: center; color: #ccc; margin-top: -3rem; margin-bottom: 3rem; }
.section-divider { border: none; border-top: 1px solid #444; margin: 5rem 0; }

/* PCではスマホ用改行を非表示にする */
.sp-br { display: none; }

/* =================================== */
/* 2. ヘッダー、ナビゲーション、フッター */
/* =================================== */
.main-header { display: flex; justify-content: center; align-items: center; text-align: center; color: #ffffff; position: relative; overflow: hidden; }
.header-video { height: 100vh; }
#header-video { position: absolute; top: 50%; left: 50%; min-width: 100%; min-height: 100%; width: auto; height: auto; transform: translateX(-50%) translateY(-50%); z-index: 0; }
.video-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.6); z-index: 1; }

.header-content { position: relative; z-index: 3; }
.header-content h1 { font-size: 2.5rem; font-weight: 300; margin: 0; }
.header-content h1 span { font-weight: 700; font-size: 3.5rem; display: block; letter-spacing: 2px; }
.header-content p { font-size: 1rem; font-weight: 300; letter-spacing: 1px; }

.main-nav { position: sticky; top: 0; background-color: #333333; z-index: 100; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; }
.main-nav ul li a { display: block; padding: 1rem 1.5rem; color: #f5f5f5; font-weight: 400; transition: background-color 0.3s; }
.main-nav ul li a:hover { background-color: #424242; }

.main-footer { background-color: #1a1a1a; padding: 3rem 1rem; text-align: center; }
.footer-content { max-width: 800px; margin: 0 auto; }

/* ーー 各ページの背景画像設定 ーー */
.header-subpage { height: 60vh; background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('/saitama-jibika/images/top_page/hospital-panoramic.jpg'); background-size: cover; background-position: center; }
.header-greeting { height: 60vh; background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('/saitama-jibika/images/top_page/greeting-bg.jpg'); background-size: cover; background-position: center; }
.header-recruitment { height: 60vh; background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('/saitama-jibika/images/top_page/recruitment.jpg'); background-size: cover; background-position: center; }
.header-staff { height: 60vh; background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('/saitama-jibika/images/top_page/staff.jpg'); background-size: cover; background-position: center; }
.header-blog { height: 60vh; background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('/saitama-jibika/images/top_page/blog.jpg'); background-size: cover; background-position: center; }

/* =================================== */
/* 3. トップページ (index.html) 専用 */
/* =================================== */
.top-page-content { max-width: 1200px; margin: 0 auto; padding: 4rem 2rem; }
.content-section { display: flex; align-items: center; margin-bottom: 4rem; gap: 3rem; }
.content-section:nth-child(even) { flex-direction: row-reverse; }
.section-image { flex: 1; }
.section-image img { border-radius: 8px; box-shadow: 0 10px 20px rgba(0,0,0,0.3); }
.section-text { flex: 1; padding: 0 2rem; }
.section-text h2 { font-size: 2.2rem; border-left: 4px solid #bbdefb; padding-left: 1rem; }

/* 診療内容セクション */
.info-grid { text-align: center; margin-top: 6rem; }
.info-grid h2 { font-size: 2.2rem; margin-bottom: 3rem; border-bottom: 2px solid #bbdefb; padding-bottom: 1rem; }
.grid-container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; margin-top: 3rem; }
.grid-item { background-color: #2c2c2c; padding: 2rem; border-radius: 8px; text-align: left; transition: transform 0.3s; }
.grid-item:hover { transform: translateY(-10px); }
.grid-item h3 { font-size: 1.4rem; margin-top: 0; color: #bbdefb; border-left: 3px solid #fdd835; padding-left: 1rem; }

/* トップページ ヘッダーアニメーション */
.main-header::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: #000; z-index: 2; animation: fadeOut 2.5s ease-out forwards; }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
.header-content-animate { position: relative; z-index: 3; }
.animate-line { opacity: 0; animation: fadeUpIn 1s ease-out forwards; }
@keyframes fadeUpIn { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
.line-1 { animation-delay: 0.8s; }
.line-2 { animation-delay: 1.0s; }
.line-3 { animation-delay: 1.2s; }
.line-4 { animation-delay: 1.4s; }
.fade-to-black-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: #000; z-index: 4; opacity: 0; pointer-events: none; transition: opacity 2s ease; }
.video-ended .fade-to-black-overlay { opacity: 1; }
.scroll-prompt { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); z-index: 5; opacity: 0; text-align: center; }
.video-ended .scroll-prompt { animation: fadeInPrompt 2s ease 1.5s forwards; }
@keyframes fadeInPrompt { from { opacity: 0; } to { opacity: 1; } }
.scroll-prompt span { font-size: 2rem; display: block; }
.scroll-prompt p { font-size: 1rem; letter-spacing: 2px; text-transform: uppercase; }

/* 旧ホームページへのリンクボタン */
.old-site-link-container { margin-top: 4rem; text-align: center; }
.old-site-link { display: inline-block; padding: 0.8rem 2.5rem; border: 1px solid #555; border-radius: 50px; color: #bbb; font-size: 0.95rem; transition: all 0.3s ease; text-decoration: none; background-color: transparent; }
.old-site-link:hover { background-color: #333; color: #ffffff; border-color: #bbdefb; transform: translateY(-2px); }

/* =================================== */
/* 4. 主任教授挨拶ページ (greeting.html) */
/* =================================== */
.greeting-section { background-color: #2c2c2c; padding: 4rem; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); margin-top: 2rem; }
.greeting-header { display: flex; align-items: center; gap: 3rem; margin-bottom: 3rem; border-bottom: 1px solid #444; padding-bottom: 3rem; }
.greeting-photo { width: 260px; height: auto; aspect-ratio: 3 / 4; border-radius: 12px; object-fit: cover; object-position: center 20% ; box-shadow: 0 15px 35px rgba(0,0,0,0.6); }
.greeting-title h2 { font-size: 1.8rem; color: #bbdefb; margin-top: 0; line-height: 1.6; }
.greeting-name { font-size: 1.2rem; margin-top: 1.5rem; color: #fff; }
.greeting-name strong { font-size: 2rem; margin-left: 1rem; letter-spacing: 3px; }
.greeting-body p { margin-bottom: 2rem; text-align: justify; font-size: 1.1rem; line-height: 2.2; color: #e0e0e0; }

/* =================================== */
/* 5. 医師紹介ページ (staff.html) */
/* =================================== */
.staff-group { margin-bottom: 4rem; }
.staff-group h2 { font-size: 2rem; border-bottom: 2px solid #444; padding-bottom: 1rem; margin-bottom: 2rem; }
.staff-card-featured { display: flex; align-items: center; gap: 2rem; background-color: #2c2c2c; border-radius: 8px; padding: 2rem; border: 1px solid #333; margin-bottom: 2rem; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.staff-card-featured:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.5); }
.staff-card-featured .photo-wrapper { flex: 0 0 250px; }
.staff-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.staff-card { background-color: #2c2c2c; border-radius: 8px; padding: 1.5rem; text-align: center; border: 1px solid #333; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.staff-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.5); }

.staff-photo-container { position: relative; width: 100%; aspect-ratio: 3 / 5; margin-bottom: 1.5rem; overflow: hidden; border-radius: 8px; }
.staff-photo-container img.photo-default { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.staff-photo-container img.photo-hover { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; opacity: 0; transition: opacity 0.5s ease; z-index: 1; }
.staff-card:hover .photo-hover, .staff-card-featured:hover .photo-hover { opacity: 1; }

.staff-overlay { position: absolute; bottom: 0; left: 0; width: 100%; height: 24%; background-color: rgba(20, 80, 150, 0.45); display: flex; justify-content: center; align-items: center; padding: 1rem; text-align: center; opacity: 0; transition: opacity 0.4s ease; box-sizing: border-box; z-index: 2; }
.staff-overlay p { margin: 0; line-height: 1.6; word-break: break-all; text-shadow: 0px 1px 3px rgba(0, 0, 0, 0.8); }
.staff-card:hover .staff-overlay, .staff-card-featured:hover .staff-overlay { opacity: 1; }

.staff-card h3, .staff-card-featured h3 { font-size: 1.6rem; margin: 0; color: #fff; }
.staff-card .title, .staff-card-featured .title { font-size: 1rem; color: #bbdefb; margin: 0.2rem 0 1rem 0; }
.staff-card .details, .staff-card-featured .details { text-align: left; font-size: 0.9rem; color: #ccc; line-height: 1.7; border-top: 1px solid #444; padding-top: 1rem; }

/* =================================== */
/* 6. 実績ページ (achievements.html) */
/* =================================== */
.achievement-section { margin-bottom: 5rem; }
.achievement-section h2 .year-label { font-size: 0.55em; color: #aaaaaa; font-weight: 300; margin-left: 1rem; letter-spacing: 1px; }
.stat-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin: 2rem 0 4rem 0; }
.stat-card { background-color: #2c2c2c; padding: 2rem 1rem; border-radius: 12px; text-align: center; border-bottom: 4px solid #bbdefb; transition: transform 0.3s; }
.stat-card:hover { transform: translateY(-5px); }
.stat-label { display: block; font-size: 0.95rem; color: #ccc; margin-bottom: 0.5rem; }
.stat-value { display: block; font-size: 2.2rem; font-weight: 700; color: #fff; }
.stat-value small { font-size: 1rem; margin-left: 4px; color: #aaa; }

.stat-large-container { display: flex; justify-content: center; margin-bottom: 3rem; }
.stat-card-large { width: 100%; max-width: 450px; padding: 3rem 2rem; border-bottom: 6px solid #fdd835; box-shadow: 0 15px 30px rgba(0,0,0,0.4); }
.stat-card-large .stat-label { font-size: 1.2rem; color: #e0e0e0; letter-spacing: 2px; }
.stat-card-large .stat-value { font-size: 4rem; color: #fdd835; text-shadow: 0 2px 10px rgba(253, 216, 53, 0.3); }
.stat-card-large .stat-value small { font-size: 1.5rem; color: #fff; }

/* =================================== */
/* 7. 医局員募集ページ (recruitment.html) */
/* =================================== */
.recruitment-page .page-content { padding-top: 1.4rem; }
.recruitment-section { margin-bottom: 5rem; }
.recruitment-section h2 { font-size: 2.2rem; text-align: center; margin-bottom: 3rem; border-bottom: 2px solid #bbdefb; padding-bottom: 1rem; }
.message-container { display: flex; align-items: center; gap: 2.5rem; }

.message-photo img { width: 480px; max-width: 100%; height: auto; aspect-ratio: 3 / 4; border-radius: 12px; object-fit: cover; object-position: center top; box-shadow: 0 10px 25px rgba(0,0,0,0.5); }
.feature-section { background-color: #2c2c2c; padding: 3rem; border-radius: 8px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.feature-item h3 { color: #bbdefb; border-left: 3px solid #fdd835; padding-left: 1rem; }

.testimonial-grid { display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap;}
.testimonial-item { background-color: #2c2c2c; padding: 2rem; border-radius: 8px; text-align: center; flex-basis: 350px; }
.testimonial-item img { width: 140px; height: auto; aspect-ratio: 3 / 4; border-radius: 12px; object-fit: cover; object-position: center top; margin: 0 auto 1.5rem auto; border: none; box-shadow: 0 8px 20px rgba(0,0,0,0.4); }

.contact-section { text-align: center; }
.contact-box { background-color: #2c2c2c; border: 1px solid #444; padding: 3rem 2rem; border-radius: 12px; margin-top: 2rem; text-align: center; }
.contact-button { display: inline-block; background-color: #bbdefb; color: #212121; padding: 1.2rem 3rem; border-radius: 50px; font-weight: 700; font-size: 1.2rem; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(187, 222, 251, 0.3); text-decoration: none; }
.contact-button:hover { background-color: #ffffff; transform: translateY(-3px); box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4); }

/* =================================== */
/* 8. 医局ブログページ (blog.html) */
/* =================================== */
.blog-intro { text-align: center; margin-bottom: 4rem; }
.blog-intro h2 { font-size: 2.2rem; margin-bottom: 1rem; color: #bbdefb; }
.instagram-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; margin-bottom: 4rem; }
.insta-placeholder { background-color: #2c2c2c; border: 1px dashed #555; border-radius: 8px; display: flex; justify-content: center; align-items: center; height: 400px; color: #888; }
.instagram-link-container { text-align: center; margin-top: 2rem; padding-top: 3rem; border-top: 1px solid #444; }
.instagram-button { display: inline-flex; align-items: center; justify-content: center; gap: 0.8rem; background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); color: #ffffff; padding: 1.2rem 3rem; border-radius: 50px; font-weight: 700; font-size: 1.2rem; transition: transform 0.3s ease, box-shadow 0.3s ease; text-decoration: none; box-shadow: 0 4px 15px rgba(220, 39, 67, 0.4); }
.instagram-button:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(220, 39, 67, 0.6); color: #ffffff; }

/* =================================== */
/* 9. 文章の改行?文字組み最適化 */
/* =================================== */
h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
.nowrap { display: inline-block; }

/* =================================== */
/* 10. レスポンシブ対応 (スマホ?タブレット) */
/* =================================== */
@media (max-width: 992px) {
    .grid-container { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    /* 共通 */
    .main-nav { position: relative; } /* スマホ追従解除 */
    .content-section { flex-direction: column !important; }
    .grid-container, .staff-grid, .staff-grid-2col { grid-template-columns: 1fr; }
    
    /* ▼▼▼ 追加：スマホでの文字サイズと改行の最適化 ▼▼▼ */
    .header-content h1 { 
        font-size: 1.3rem; /* ちょうどいいサイズに戻します */
        white-space: normal; /* 1行にする設定を解除 */
        line-height: 1.5; /* 行間を少し開けて読みやすく */
    }
    .sp-br { 
        display: block; /* スマホの時だけ改行をオンにする！ */
    }
    .header-content h1 span { 
        font-size: 7vw; /* 下の「耳鼻咽喉?頭頸部外科」も画面幅に連動させる */
        margin-top: 0.5rem; 
    }
    .header-content p { font-size: 0.85rem; }
    .section-text { padding: 0 1rem; }
    .section-text h2 { font-size: 1.45rem; line-height: 1.6; } /* 見出しが変なところで切れないサイズに */
    .nowrap { display: inline; } /* スマホでは窮屈になるのでブロックを解除して自然に流す */
    /* ▲▲▲ ここまで追加 ▲▲▲ */

    /* 実績 */
    .stat-summary-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-card-large .stat-value { font-size: 3rem; }

    /* 挨拶 */
    .greeting-header { flex-direction: column; text-align: center; gap: 1.5rem; padding-bottom: 2rem; }
    .greeting-section { padding: 2rem 1.5rem; }
    .greeting-title h2 { font-size: 1.4rem; }
    .greeting-name strong { font-size: 1.6rem; display: block; margin-top: 0.5rem; margin-left: 0; }

    /* 医師紹介 */
    .staff-card-featured { flex-direction: column; }
    .staff-card-featured .photo-wrapper { max-width: 300px; width: 100%; }
    
    /* 医局員募集 */
    .message-container { flex-direction: column; }
    .testimonial-grid { flex-direction: column; }
    .contact-button { padding: 1rem 2rem; font-size: 1.1rem; }
}