/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #333;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
}

/* Header */
header {
    height: 8vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    color: #fff;
    position: fixed;
    width: 100%;
    z-index: 10;
}

#icon {
    float: left;
    margin-left: 20px;
}

#icon img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #333;
    transition: transform 0.3s;
}

#icon img:hover {
    transform: scale(1.1);
    cursor: pointer;
}

header nav ul {
    display: flex;
    list-style: none;
    padding: 0;
}

header nav ul li {
    margin: 0 15px;
}

header nav ul li a {
    color: #333;
    text-decoration: none;
    font-size: 1.8rem;
}

header nav ul li a:hover {
    text-decoration: underline;
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-image: url('background-image.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

#hero h1 {
    font-size: 8rem;
    margin: 0;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Gallery Section */
#gallery {
    padding: 2rem 1rem;
    display: flex;
    justify-content: center;
    background-color: #f4f4f4;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2列 */
    grid-auto-rows: auto;
    gap: 20px;
    width: 100%;
    margin: 0 auto;
}

.image-item {
    text-align: center;
    background-color: #fff;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-item:hover {
    background-color: #f0f8ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.image-item .title {
    margin-bottom: 10px;
    font-size: 2rem;
    color: #333;
    font-weight: bold;
    position: relative;
}

/* Image inside card */
.image-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border: 2px solid #ccc;
    border-radius: 8px;
}

.image-item p {
    margin-top: 8px;
    font-size: 1rem;
    color: #666;
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 20px;
}

.modal-content {
    background-color: #fff;
    margin: 10vh auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    position: relative;
    text-align: center;
    box-shadow: 0 5px 10px rgba(0,0,0,0.3);
}

.modal-content img {
    width: 100%;
    height: auto;
    margin-bottom: 15px;
    border-radius: 8px;
}

.modal-content h2 {
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.modal-content p {
    font-size: 1rem;
    color: #333;
}

/* 閉じるボタン */
.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #666;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

/* Footer */
footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

footer p {
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 600px) {
    header {
        height: auto;
        flex-direction: column;
        padding: 10px 0;
        text-align: center;
        position: static;
    }

    header nav ul {
        flex-direction: column;
    }

    header nav ul li {
        margin: 10px 0;
    }

    header nav ul li a {
        font-size: 1.2rem;
    }

    #icon img {
        width: 40px;
        height: 40px;
    }

    .image-grid {
        grid-template-columns: 1fr; /* スマホでは1列 */
    }

    .image-item img {
        width: 100%;
    }

    .modal-content {
        width: 95%;
        padding: 15px;
    }
}

