body {
    margin: 0 ;
    font-family: sans-serif; /*フォントの指定*/
    display: grid;
    grid-template-rows: auto 1fr auto; /*行の高さ指定*/
    grid-template-areas:
        "header"
        "hero-section"
        "main"
        "footer";    
    grid-gap: 10px; /*余白*/
    padding: 20px;
    background: linear-gradient(135deg, #f4fbff 60%, #e0f7fa 100%);
}

header {
    grid-area: header;
    background-color: #ffffff;
    padding:20px;
    display: flex;  /*横並び*/
    justify-content: space-between; /*均等に配置*/
    align-items: center; /*中央に配置*/
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.10);
    border-radius: 8px; /*角を丸くする*/
    border-bottom: 4px solid #ffe066;
}

html {
    scroll-behavior: smooth;
}

nav ul {
    list-style: none; /*リストの・を消す*/
    margin: 0;
    padding: 0;
    display: flex;
}
nav li {
    margin: 0 10px;
}
nav a {
    text-decoration: none;
    color: #34495e;
    padding: 8px 12px;
    transition: color 0.3s ease, background-color 0.3s ease; /*ホバー時の変化をスムーズに*/
    border-radius: 5px;
}

nav a:hover {
    color: #ffffff;
    background-color: #5d7a8d; /* 青灰色 */
    border-bottom: 2px solid #ffe066;
}

.hero-section {
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #34495e;
    text-shadow: 1px 1px 2px rgba(52, 152, 219, 0.10);
    border-radius: 8px;
    margin-top: 10px;
    background: linear-gradient(120deg, #ffffff 0%, #f4fbff 50%, #e0f7fa 100%); /* 淡い青系グラデーション */
    border: 2px solid #ffe066; /* ボーダーは黄色 */
}

.hero-section h1 {
    margin: 0;
    font-size: 3em;
    text-align: center;
    color: #3498db;
    background: linear-gradient(90deg, #3498db 70%, #ffe066 90%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 768px) { /*画面幅が768px以下の場合*/
    header {
        flex-direction: column; /*要素を縦並び*/
        align-items: flex-start; /*左寄せ*/
        padding-bottom: 10px;
    }

    nav {
        width: 100%; /*全体を横幅いっぱい*/
    }

    nav ul {
        flex-direction: column;
        align-items: flex-start; 
        width: 100%;
    }

    nav li {
        margin: 5px 0; 
        width: 100%; 
    }

    nav a {
        display: block; /*ブロック要素にしてクリックしやすく*/
        width: 100%; 
        text-align: left; 
        padding: 10px 15px; 
        box-sizing: border-box; /*パディングを含めて幅を計算*/
    }

    .hero-section {
        height: 200px;
        padding: 0 10px;
    }

    .hero-section h1 {
        font-size: 2em;
    }
}

main {
    grid-area: main;
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px; 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-top: 4px solid #ffe066;
}

.profile {
    background-color: #f0f8ff;
    border: #333 solid 1px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.profile::before {
    content: none; /* 擬似要素による上線を消す */
}

.profile h2 {
    color: #2c3e50;
    font-size: 1.8em;
    margin-top: 0;
    margin-bottom: 10px;
}

.profile p {
    line-height: 1.6;
    color: #34495e;
}

.profile a {
    color: #3498db; 
    text-decoration: none;
}

.profile a:hover {
    text-decoration: underline;
    color: #ffe066;
}

footer {
    grid-area: footer;
    background-color: #ffffff;
    color: #5d7a8d;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 -2px 4px rgba(52, 152, 219, 0.04);
    border-top: 4px solid #ffe066;
}

footer p {
    margin: 5px 0; /*段落間の余白*/
    font-size: 0.9em;
}

footer a {
    color: #87d4e9; 
    text-decoration: none; 
}

footer a:hover {
    text-decoration: underline;
    color: #ffe066;
}

.image-container {
    display: flex;
    justify-content: center; /*画像を中央に配置*/
    gap: 2px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.image-container img {
    height: auto;
    border-radius: 7px;
    box-shadow: 0 4px 8px rgba(52,152,219,0.10);
    filter: brightness(1);
    border:2px solid #f7f0f0;
    background-color: #fffde7;
}

.image-container.slideshow {
  width: 450px;
  max-width: 90%;
  margin: 0 auto;
}

.image-container.slideshow img {
  width: 100%;
  max-width: 100%;
  height: auto;
}

@media (max-width: 768px) {
    .image-container {
        flex-direction: column;
        align-items: center;
        gap: 15px; /* 余白を増やす */
    }

    .image-container img {
        margin-bottom: 10px; /* 画像下に余白 */
    }
}