@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;700&family=Roboto:wght@400;700&display=swap');

:root {
    --primary-color: #d4af37;
    --secondary-color: #800080;
    --background-color: #f0f0f0;
    --text-color: #333;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 16px;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    background: url(../img/bg090_05.gif);
}

.container {
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 1rem;
}

header {
    background: #6699cc;
    color: white;
    padding: 2rem;
    position: relative;
}

h1 {
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

#menu-toggle {
    display: block;
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1002;
    background: #000;
    padding: 0.5rem;
}

#close-menu {
    display: none;
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1003;
}

nav {
    display: none;
}

nav ul {
    list-style-type: none;
}

nav ul li {
    margin-bottom: 0.5rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: color 0.3s, text-shadow 0.3s;
}

nav ul li a:hover {
    color: #FFD700;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
}

main {
    padding: 1rem 0;
}

section {
    margin-bottom: 2rem;
}

h2 {
    margin-bottom: 1rem;
    font-family: 'Noto Serif JP', serif;
}

.gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.gallery_2 {
    grid-template-columns: repeat(1, 1fr);
}

.work {
    background-color: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.work img {
    width: 100%;
    height: auto;
    display: block;
}

.work-info {
    padding: 1rem;
}

.school-info {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.school-info li {
    margin-bottom: 0.5rem;
}

.school-name {
    width: 350px;
}

.grade {
    width: 100px;
}

.student-name {
    width: 300px;
}

.award {
    font-weight: bold;
    color: var(--primary-color);
}

footer {
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}

.close-button {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.mt16 {
    margin-top: 16px;
}

.mt24 {
    margin-top: 24px;
}

.bold {
    font-weight: bold;
}

.fs-sm {
    font-size: 0.875rem;
}

.fs-md {
    font-size: 1rem;
}

.fs-lg {
    font-size: 1.25rem;
}

.fs-xl {
    font-size: 1.5rem;
}

.fs-xxl {
    font-size: 2rem;
}

.variant {
    font-family: 'Noto Sans JP', sans-serif;
}

.custom-button {
    background: #6699cc;
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.3s;
}

.custom-button:hover {
    background: #5679a6;
}

.flex-img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* メディアクエリ */
@media (max-width: 1200px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1023px) {
    body {
        display: block;
    }

    header {
        width: 100%;
        height: auto;
        position: static;
    }

    nav {
        display: none;
        background-color: #6699cc;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1001;
    }

    nav.active {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    nav ul {
        text-align: center;
    }

    nav ul li {
        margin: 1rem 0;
    }

    nav ul li a {
        font-size: 1rem;
    }

    nav.active ~ #menu-toggle {
        display: none;
    }

    nav.active #close-menu {
        display: block;
    }

    main {
        margin-left: 0;
        width: 100%;
    }

    .container {
        padding: 0 2rem;
    }
}

@media (max-width: 767px) {
    body {
        font-size: 14px;
        font-size: 0.875rem;
    }

    .gallery, .gallery_2 {
        grid-template-columns: 1fr;
    }

    .school-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .school-info li {
        margin-right: 0;
    }

    .school-name, .grade, .student-name {
        width: 100%;
    }

    .gallery_2 .work-info .school-info {
        display: block !important;
        margin-bottom: 16px;
    }

    .gallery_2 .work-info .school-info li.school-name {
        display: block !important;
        width: 100% !important;
        margin-bottom: 0.5rem !important;
    }

    .gallery_2 .work-info .school-info li.grade,
    .gallery_2 .work-info .school-info li.student-name {
        display: inline-block !important;
        width: auto !important;
        margin-right: 1rem !important;
    }

    .gallery_2 .work-info .school-info li.view-work {
        display: block !important;
        width: 100% !important;
        margin-top: 0.5rem !important;
    }

    .gallery_2 .work-info .school-info .view-work {
        width: 100%;
        margin-top: 0.5rem;
    }

    .gallery_2 .work-info .school-info .view-work .custom-button {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .work-info p:nth-child(2),
    .work-info p:nth-child(3) {
        display: inline-block;
        margin-right: 1rem;
    }
}

@media (max-width: 600px) {
    .space-break::before {
        content: "\A";
        white-space: pre;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 12px;
        font-size: 0.75rem;
    }
}

@media (min-width: 768px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .school-info {
        flex-direction: row;
        align-items: center;
    }

    .school-info li {
        margin-right: 1rem;
        white-space: nowrap;
    }

    .school-info li:last-child {
        margin-right: 0;
    }

    .school-info li.school-name {
        flex: 0.75 1 auto;
    }

    .school-info li.student-name {
        flex: 1 1 auto;
        text-align: left;
    }

    .space-break::before {
        content: " ";
    }
}

@media (min-width: 1024px) {
    body {
        display: flex;
    }

    header {
        width: 325px;
        height: 100vh;
        position: fixed;
        left: 0;
        top: 0;
        overflow-y: auto;
    }

    h1 {
        margin-bottom: 2rem;
    }

    #menu-toggle,
    #close-menu {
        display: none;
    }

    nav {
        display: block !important;
    }

    nav ul {
        flex-direction: column;
    }

    nav ul li {
        margin-bottom: 1rem;
    }

    main {
        margin-left: 325px;
        width: calc(100% - 325px);
    }
}