/* --- 基本設定 --- */
:root {
    --main-bg-color: #f8f9fa;
    --text-color: #333;
    --accent-color: #007bff;
    --footer-bg-color: #343a40;
    --footer-text-color: #f8f9fa;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--main-bg-color);
    margin: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

h1, h2, h3 {
    margin: 0;
    font-weight: 600;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- ヘッダー --- */
.festival-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 20px;
    background-color: #f2f2f2;
}

.festival-header .festival-logo img {
    height: 50px;
    margin-right: 15px;
}

.festival-text .festival-number {
    font-size: 0.9em;
    color: #666;
    margin: 0;
}

.festival-text .festival-title {
    font-size: 1.5em;
    font-weight: bold;
    margin: 0;
}

/* --- トップページメインビジュアル --- */
section.header {
    max-width: 1200px;
    margin: 40px auto;
    padding: 100px 20px;
    background:
        linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
        url("2025医大祭ポスター(0325)＿人物＋影のみ.png") center/cover no-repeat;
    color: #fff;
    text-align: center;
    border-radius: 20px;
    border-bottom: 1px solid #eee;
}

section.header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

section.header p {
    font-size: 1.2em;
    color: #f0f0f0;
    margin: 5px 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

/* --- カテゴリセクション --- */
.category-section {
    padding: 60px 20px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.category-card {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 1.1em;
    color: #fff;
    aspect-ratio: 1 / 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.cat-1 { background-color: #81c784; }
.cat-2 { background-color: #64b5f6; }
.cat-3 { background-color: #e57373; }
.cat-4 { background-color: #fff176; color: #555;}
.cat-5 { background-color: #9575cd; }
.cat-6 { background-color: #4db6ac; }
.cat-7 { background-color: #f06292; }
.cat-8 { background-color: #ffb74d; }

/* --- テーマセクション --- */
.theme-section {
    background-color: #fff;
    text-align: center;
    padding: 80px 20px;
}

.theme-title {
    font-size: 1.2em;
    color: #777;
    margin-bottom: 10px;
}

.theme-headline {
    font-size: 3.5em;
    margin-bottom: 20px;
}

.theme-headline a {
    background: linear-gradient(120deg, #84fab0 0%, #8fd3f4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cta-button {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 35px;
    background-color: var(--accent-color);
    color: #fff;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
}

/* --- 企画セクション --- */
.projects {
    padding: 60px 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.projects h3 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 40px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.project-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    height: 250px; 
    overflow: hidden;
    position: relative;
    color: #333;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 8px; 
}

.card-date {
    position: absolute;
    top: 1px;
    right: 1px;
    background-color: #dcbfa3;
    color: #fff;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1em;
    font-weight: bold;
    z-index: 10;
}

.card-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 95px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 15px;
    box-sizing: border-box;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    z-index: 10;
}

.card-title {
    font-size: 1.2em;
    font-weight: bold;
    line-height: 1.4;
    margin-right: 8px; 
}

.card-arrow {
    background-color: #dcbfa3;
    color: #fff;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    line-height: 1;
    align-self: center;
    flex-shrink: 0;
}

/* --- スポンサーセクション --- */
.sponsors {
    padding: 40px 20px;
    text-align: center;
    background-color: #fff;
}

.sponsors img {
    height: 40px;
    margin: 10px 15px;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.sponsors img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* --- フッター --- */
footer {
    background-color: var(--footer-bg-color);
    color: var(--footer-text-color);
    padding: 60px 20px;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap; 
    gap: 40px; 
}

.footer-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-info img {
    height: 40px;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
}

.footer-nav h3 {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #fff;
}

.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav li {
    margin-bottom: 10px;
}

.footer-nav a {
    color: #ccc;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: #fff;
}

.footer-social {
    display: flex;
    gap: 20px;
    align-items: center;
}

.footer-social a {
    font-size: 1.5em;
    color: #ccc;
    transition: color 0.3s ease;
}

.footer-social a:hover {
    color: #fff;
}

/* --- レスポンシブ対応 --- */
@media (max-width: 768px) {
    footer .container {
       flex-direction: column;
       align-items: center;
       text-align: center;
       gap: 30px;
    }
    
    .footer-nav {
        justify-content: center;
        width: 100%;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    section.header h1 {
        font-size: 2.5em; 
    }
    
    .theme-headline {
        font-size: 2.8em;
    }
}

/* --- 企画詳細ページ --- */
.project-detail-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin: 40px auto;
    overflow: hidden;
    max-width: 800px;
}

.project-detail-card img {
    width: 100%;
    height: auto;
    max-height: 450px;
    /* ▼▼▼ ここを変更しました ▼▼▼ */
    object-fit: contain; /* coverからcontainへ変更 */
    /* ▲▲▲ ここまで ▲▲▲ */
    border-bottom: 1px solid #eee;
    background-color: #f9f9f9; /* 画像の背景に薄い色を追加 */
}

.project-detail-content {
    padding: 25px 40px 40px;
}

/* --- 企画一覧「もっと見る」ボタン --- */
.project-card-link.hidden {
    display: none;
}

.load-more-button {
    display: block;
    margin: 30px auto 40px;
    padding: 12px 40px;
    font-size: 1.1em;
    font-weight: bold;
    color: #fff;
    background-color: var(--accent-color);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-button:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

/* --- 企画一覧ページ（project-list.html）のスタイル --- */
.page-title {
    font-size: 2.5em;
    text-align: center;
    margin: 40px 0;
}

.projects-by-area {
    margin-bottom: 50px;
}

.projects-by-area h2 {
    font-size: 1.8em;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
    margin-bottom: 30px;
}

/* --- 記事本文のデザイン装飾 --- */
#article-body {
    line-height: 1.8;      /* 行間を少し広げて読みやすく */
    font-size: 1.05em;     /* 文字サイズを少し大きく */
    color: #444;           /* 真っ黒より少しグレーにして目に優しく */
}

/* 小見出し（h3タグ）のデザイン */
#article-body h3 {
    font-size: 1.4em;
    margin-top: 40px;      /* 上に余白 */
    margin-bottom: 20px;   /* 下に余白 */
    padding-bottom: 10px;  /* 文字の下に余白 */
    border-bottom: 3px solid #8fd3f4; /* 下線（青いライン） */
    color: #333;
}

/* 太字（bタグ / strongタグ）のデザイン */
#article-body b, 
#article-body strong {
    background: linear-gradient(transparent 70%, #fff176 70%); /* 黄色のマーカー風 */
    font-weight: bold;
    color: #222;
}

/* 段落ごとの余白 */
#article-body p {
    margin-bottom: 20px;
}
