/* /bin/style.css (完全版) */

/* === 1. Reset & Basic Settings === */
html {
    scroll-behavior: smooth;
}
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    font-family: 'Noto Sans JP', Arial, sans-serif;
    color: #333;
    padding-top: 65px; 
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* bodyの高さを最低でも画面の高さ100%にする */
    box-sizing: border-box; /* paddingを含めて高さを100vhにするため */
}
main {
    flex-grow: 1; /* 利用可能な残りのスペースをすべて埋める */
}
a {
    color: #007bff;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
img {
    max-width: 100%;
    height: auto;
}

/* === 2. Common Layout === */
/* --- Navigation Bar --- */
.navbar {
    position: fixed;
    top: 0; left: 0; width: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
    height: 65px;
}
.logo { font-size: 22px; font-weight: bold; }
.logo a { color: #333; text-decoration: none; }
.nav-links { list-style: none; display: flex; margin: 0; padding: 0; }
.nav-links a { color: #333; padding: 8px 15px; margin: 0 5px; border-radius: 4px; transition: background-color 0.3s; text-decoration: none; }
.nav-links a:hover { background-color: #e9ecef; text-decoration: none; }
.menu-toggle { display: none; background: none; border: none; font-size: 28px; cursor: pointer; }

/* --- Main Content Wrapper --- */
.wrap {
    max-width: 1200px;
    margin: 40px auto;
    background-color: #ffffff;
    box-shadow: 0 0 15px rgba(0,0,0,0.07);
}

/* --- Section --- */
.session {
    padding: 50px 40px;
    border-bottom: 1px solid #e9ecef;
}
.session:last-child { border-bottom: none; }
.section-heading {
    font-size: 32px;
    font-weight: bold;
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 40px;
    border-bottom: 3px solid #007bff;
    padding-bottom: 10px;
    display: inline-block;
}
.section-heading-en {
  display: block;
  font-size: 16px;
  font-weight: normal;
  color: #999;
  margin-top: 8px;
  letter-spacing: 1px;
}
.sub-section-heading {
    font-size: 26px;
    font-weight: bold;
    color: #333;
    margin-top: 50px;
    margin-bottom: 25px;
    border-bottom: 2px solid #eee;
    padding-bottom: 8px;
}

/* --- Footer --- */
footer {
    background-color: #343a40;
    color: #adb5bd;
    padding: 30px 0;
    font-size: 14px;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: right;
}
footer a { color: #ced4da; margin-left: 15px; }
footer a:hover { color: white; }

/* === 3. Page Specific Styles === */
/* --- Top Page: Hero Header --- */
.hero-header {
    position: relative;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #555 url(/bin/header_bg.jpg) center center/cover no-repeat;
    padding: 80px 20px;
}
.hero-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
}
.hero-header-content { position: relative; z-index: 1; }
.hero-title-jp { font-size: 48px; font-weight: bold; margin: 0; text-shadow: 2px 2px 6px rgba(0,0,0,0.6); }
.hero-title-en { font-size: 20px; margin-top: 10px; letter-spacing: 1px; opacity: 0.9; text-shadow: 1px 1px 3px rgba(0,0,0,0.6); }

/* --- Top Page: Introduction --- */
.introduction p {
    font-size: 18px;
    line-height: 1.8;
    text-align: center;
    max-width: 930px;
    margin: 15px auto;
}
.profile-link { display: inline-block; font-weight: bold; margin-top: 10px; }

/* --- Top Page: Featured Projects (Cards) --- */
.featured-projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.project-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    text-decoration: none;
    color: inherit;
}
.project-card:hover { transform: translateY(-5px); box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.card-content { padding: 25px; flex-grow: 1; }
.project-card h3 { margin-top: 0; font-size: 22px; color: #007bff; }
.project-card p { margin-bottom: 0; line-height: 1.7; }
.card-link { padding: 15px 25px; border-top: 1px solid #e0e0e0; font-weight: bold; color: #007bff; text-align: right; }

/* --- Top Page: Latest Info --- */
.info-list ul { list-style: none; padding: 0; }
.info-list li { padding: 12px 0; border-bottom: 1px solid #eee; }
.info-list li:last-child { border-bottom: none; }
.info-list time { margin-right: 15px; color: #666; font-size: 14px; }

/* --- Top Page: Contact --- */
.contact-button { display: inline-block; padding: 12px 25px; margin: 10px; border: 1px solid #007bff; background-color: #007bff; color: white; text-decoration: none; border-radius: 5px; font-weight: bold; transition: all 0.2s ease; }
.contact-button:hover { background-color: #0056b3; border-color: #0056b3; text-decoration: none; }
.contact-button.secondary { background-color: transparent; color: #007bff; }
.contact-button.secondary:hover { background-color: #e9ecef; color: #0056b3; }

/* --- Profile Page --- */
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.profile-card { background-color: #f8f9fa; padding: 25px; border-radius: 8px; border: 1px solid #e9ecef; }
.profile-card h3 { margin-top: 0; font-size: 22px; border-bottom: 2px solid #dee2e6; padding-bottom: 10px; margin-bottom: 20px; }
.profile-item { display: flex; margin-bottom: 15px; font-size: 16px; }
.profile-item:last-child { margin-bottom: 0; }
.item-label { flex-shrink: 0; width: 100px; color: #666; }
.item-value { line-height: 1.7; }

/* --- Research/Projects Page --- */
.page-intro { text-align: center; font-size: 18px; line-height: 1.8; max-width: 800px; margin: 0 auto 50px auto; color: #555; }
.featured-research { background-color: #f8f9fa; padding: 30px; border-radius: 8px; border: 1px solid #e9ecef; }
.featured-research h3 { margin-top: 0; font-size: 24px; color: #007bff; }
.research-meta { display: flex; gap: 20px; margin: 15px 0; color: #666; }
.research-summary { line-height: 1.8; font-size: 16px; }
.research-keywords { margin-top: 20px; }
.research-keywords span { display: inline-block; background-color: #e9ecef; color: #495057; padding: 4px 10px; margin-right: 8px; margin-bottom: 8px; border-radius: 4px; font-size: 14px; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 25px; }
.project-card-item { background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; padding: 25px; display: flex; flex-direction: column; }
.project-card-item h4 { margin-top: 10px; margin-bottom: 10px; font-size: 18px; }
.card-summary { font-size: 15px; line-height: 1.7; color: #555; flex-grow: 1; }
.card-footer { margin-top: 20px; padding-top: 15px; border-top: 1px solid #eee; font-size: 14px; color: #777; }
.status-badge { display: inline-block; padding: 4px 12px; border-radius: 15px; font-size: 12px; font-weight: bold; color: white; }
.status-badge.main-research { background-color: #007bff; } .status-badge.activity { background-color: #17a2b8; } .status-badge.community { background-color: #28a745; } .status-badge.past { background-color: #6c757d; }
.researchmap-link-box { text-align: center; background-color: #f8f9fa; padding: 25px; border-radius: 8px; margin-bottom: 50px; }
.researchmap-link-box p { margin: 0 0 15px 0; font-size: 18px; }
.researchmap-link-box a { display: inline-block; padding: 10px 20px; border-radius: 5px; font-weight: bold; text-decoration: none; }
.researchmap-link-box a:hover { background-color: #218838; }
.achievements-list { border-left: 3px solid #007bff; padding-left: 25px; }
.achievement-item { margin-bottom: 30px; }
.achievement-meta { display: flex; align-items: center; gap: 15px; margin-bottom: 8px; color: #666; font-size: 14px; }
.badge { display: inline-block; padding: 4px 12px; border-radius: 15px; font-size: 12px; font-weight: bold; color: white; }
.badge.award { background-color: #ffc107; color: #333; } .badge.paper { background-color: #dc3545; } .badge.presentation { background-color: #17a2b8; }
.achievement-title { font-size: 20px; margin: 0 0 5px 0; }
.achievement-title a { color: #333; }
.achievement-title a:hover { color: #007bff; }
.achievement-details { margin: 0; font-size: 15px; color: #555; line-height: 1.7; }

/* === 4. Responsive (Mobile) --- */
@media (max-width: 768px) {
    body { padding-top: 60px; }
    .nav-container { height: 60px; }
    .nav-links { display: none; flex-direction: column; background: white; position: absolute; top: 60px; right: 0; width: 100%; box-shadow: 0 4px 5px rgba(0,0,0,0.1); }
    .nav-links.active { display: flex; }
    .nav-links li { text-align: center; border-top: 1px solid #f0f0f0; }
    .nav-links a { display: block; padding: 15px; margin: 0; }
    .menu-toggle { display: block; }
    
    .hero-header { padding: 60px 20px; }
    .hero-title-jp { font-size: 32px; }
    .hero-title-en { font-size: 16px; }

    .wrap { margin: 20px 0; }
    .session { padding: 40px 20px; }
    .section-heading { font-size: 26px; }
    
    .introduction p { font-size: 16px; }
    .profile-grid { grid-template-columns: 1fr; }
    .project-grid { grid-template-columns: 1fr; }
}

/* /bin/style.css に追記 */

/* === 制作物ページ用スタイル === */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}
.works-card {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease-in-out;
}
.works-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.works-card h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 20px;
}
.works-card h4 a { color: #007bff; }
.works-card h4 a:hover { text-decoration: none; }

.works-meta {
    margin-top: auto; /* メタ情報をカードの下部に配置 */
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
}
.meta-label {
    font-weight: bold;
    margin-right: 8px;
}
.github-link {
    margin-left: auto; /* GitHubリンクを右端に配置 */
    display: inline-block;
    background-color: #333;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
}
.github-link:hover {
    background-color: #555;
    color: white;
    text-decoration: none;
}

.works-tags {
    margin-top: 15px;
}
.works-tags span {
    display: inline-block;
    background-color: #e9ecef;
    color: #495057;
    padding: 4px 10px;
    margin-right: 8px;
    margin-bottom: 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* === お知らせページ用スタイル === */

/* --- 一覧ページ --- */
.info-list-page .info-item {
    display: flex;
    align-items: center;
    padding: 20px 15px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s ease;
}
.info-list-page .info-item:hover {
    background-color: #f8f9fa;
}
.info-list-page .info-item time {
    width: 130px;
    flex-shrink: 0;
    color: #666;
    font-size: 15px;
}
.info-list-page .info-item .info-title {
    font-weight: bold;
    font-size: 17px;
    line-height: 1.6;
}
.info-list-page .info-item .attachment-icon {
    margin-left: auto;
    font-size: 20px;
}

/* --- 詳細ページ --- */
.article-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 25px;
    margin-bottom: 30px;
}
.article-title {
    font-size: 32px;
    margin: 0 0 15px 0;
    line-height: 1.4;
}
.article-meta {
    font-size: 14px;
    color: #666;
}
.article-meta span {
    margin-right: 20px;
}
.article-content {
    font-size: 17px;
    line-height: 1.9;
    padding-bottom: 30px;
}
.article-tags {
    margin-top: 30px;
}
.tag-item {
    display: inline-block;
    background-color: #e9ecef;
    color: #495057;
    padding: 5px 12px;
    margin-right: 8px;
    margin-bottom: 8px;
    border-radius: 5px;
    font-size: 14px;
}
.attachments-wrapper {
    margin-top: 40px;
}
.attachments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}
.attachment-card {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #e9ecef;
    text-decoration: none;
    color: #333;
}
.attachment-card:hover {
    background-color: #e9ecef;
    text-decoration: none;
}
.attachment-card-icon {
    font-size: 24px;
    margin-right: 15px;
}
.attachment-card-title {
    font-weight: bold;
}
.back-link-wrapper {
    margin-top: 40px;
    text-align: right;
}
.back-link {
    font-weight: bold;
}

/* モバイル調整 */
@media (max-width: 768px) {
    .article-title { font-size: 24px; }
    .info-list-page .info-item { flex-wrap: wrap; }
    .info-list-page .info-item time { width: 100%; margin-bottom: 5px; }
}

/* === お知らせ管理ページ用スタイル === */
.editor-body {
    background-color: #f8f9fa; /* 背景色を少し変える */
}
.editor-flash-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 30px;
}
.editor-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.editor-article-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.editor-article-card {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 20px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease;
}
.editor-article-card:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    text-decoration: none;
}
.editor-article-card .card-main {
    flex-grow: 1;
}
.editor-article-card .card-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 5px 0;
}
.editor-article-card .card-date {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
}
.card-statuses .status-badge {
    margin-left: 8px;
}
.status-badge.admin-public { background-color: #28a745; }
.status-badge.admin-private { background-color: #6c757d; }
.status-badge.admin-pined { background-color: #ffc107; color: #333; }

/* --- 編集画面 --- */
.editor-grid {
    display: grid;
    grid-template-columns: 1fr 320px; /* メインとサイドバー */
    gap: 30px;
}
.editor-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}
.editor-card h3 {
    margin-top: 0;
    font-size: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
}
.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}
textarea.form-control {
    min-height: 200px;
    resize: vertical;
}
.attachments-list { margin-bottom: 20px; }
.attachment-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #f0f0f0; }
.delete-check { font-size: 14px; color: #dc3545; }
.editor-actions {
    display: flex;
    justify-content: space-between;
}
.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
}
.btn-primary { background-color: #007bff; color: white; }
.btn-danger { background-color: #dc3545; color: white; }
.btn-success { background-color: #28a745; color: white; }

/* 編集画面モバイル対応 */
@media (max-width: 992px) {
    .editor-grid {
        grid-template-columns: 1fr; /* 1列にする */
    }
    .editor-sidebar {
        grid-row: 1; /* サイドバーを上に */
    }
}

/* === 免責事項ページ用スタイル === */
.guideline-content p {
    font-size: 16px;
    line-height: 2; /* 行間を広めに設定し、読みやすくする */
    margin-bottom: 1em;
}

.contact-box {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-link {
    font-weight: bold;
}

.date-enacted {
    text-align: right;
    margin-top: 40px;
    color: #666;
    font-size: 14px;
}

/* /bin/style.css に追記 */

/* === 利用規約・免責事項ページ用スタイル === */
.guideline-content h2 {
    font-size: 24px;
}
.guideline-content p,
.guideline-content li {
    font-size: 16px;
    line-height: 2;
    margin-bottom: 1em;
}
.term-list, .term-ordered-list {
    padding-left: 20px;
}
.term-list-inner {
    padding-left: 25px;
    margin-top: 1em;
}
.history-list {
    list-style: none;
    padding-left: 0;
    font-size: 15px;
    color: #555;
}
.history-list li {
    padding: 5px 0;
}

/* 以前の免責事項ページ用スタイルと統合 */
.contact-box {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}
.contact-link {
    font-weight: bold;
}
.date-enacted {
    text-align: right;
    margin-top: 40px;
    color: #666;
    font-size: 14px;
}