body {
    margin: 0;
    font-family: "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f7f6;
    color: #222;
    line-height: 1.7;
}

/* ナビゲーション */
nav {
    position: relative;
    top: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    z-index: 1000;
}

nav ul {
    margin: 0;
    padding: 15px 30px;
    list-style: none;
    display: flex;
    justify-content: flex-end;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: #333;
    font-size: 14px;
}

nav a:hover {
    color: #3c7d4c;
}

/* ヘッダー */

header {
    position: relative;
    text-align: center;
    padding: 160px 20px 120px;
    color: white;
    /*background: url("gantop.jpg") center/cover no-repeat;*/
    /*background-position: center top;*/
    background-size: cover;
    background-repeas: no-repeat;
}

.home header{
    background-image: url("images/home.jpg");
}

.message header{
    background-image: url("images/message.jpg");
    background-position: 50% 30%;
}

.event header{
    background-image: url("images/event.jpg");
    background-position: 50% 20%;
}

.contact header{
    background-image: url("images/contact.jpg");
    background-position: center center;
}


header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4); /* 暗くして文字を見やすく */
}


header * {
    position: relative;
    z-index: 1;
}


h1 {
    font-size: 32px;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.catch {
    font-size: 22px;
    color: white;
    margin-bottom: 20px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.keywords {
    font-size: 20px;
    letter-spacing: 2px;
    color: white;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
    opacity: 0.85;
    letter-spacing: 3px;
}

section {
    max-width: 900px;
    margin: 80px auto;
    padding: 0 20px;
}

.card {
    background: #ffffff;
    padding: 30px;
    margin-bottom: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.card h2 {
    font-size: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #3c7d4c;
    padding-left: 10px;
}

.camera {
	width: 100%
}


.camera img {
    width: 100%;
    height: auto;
    display: block;
}


.sensor-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 10px 0;
}

.timestamp {
    grid-column: 1 / -1; /* 1列目から最終列まで */
    padding: 10px;
    text-align: center;
    font-weight: bold;
    font-size: 18px;
}

/* カテゴリ枠 */
.category {
    padding: 12px;
    margin-bottom: 20px;
}

.sensor-box {
    background: #f0f4f2;
    padding: 20px;
    text-align: center;
    border-radius: 6px;
}

.sensor-value {
    font-size: 22px;
    font-weight: bold;
    margin-top: 5px;
}

.ai-comment {
    padding: 20px;
    background: #f9faf9;
    border-left: 4px solid #3c7d4c;
}

footer {
    text-align: center;
    padding: 40px 20px;
    font-size: 12px;
    color: #888;
    background: #ffffff;
}



.message-content {
    white-space: pre-line;
}


.event-list {
    display: grid;
    gap: 30px;
    margin: 60px auto;
}

.event-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.event-card h3 {
    margin-top: 0;
}

@media (min-width: 768px) {
    .event-list {
        grid-template-columns: 1fr 1fr;
    }
}



.contact-form {
    max-width: 600px;
    margin: 40px auto;
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input, textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;

    width: 100%;              /* ← これが重要 */
    box-sizing: border-box;   /* ← はみ出し防止 */
}

button {
    padding: 12px;
    border: none;
    background: #3c7d4c;
    color: white;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
}

button:hover {
    opacity: 0.9;
}



.insta-link {
    display: inline-block;
    padding: 3px 5px;
    background: #F06292;
    color: white;
    border-radius: 8px;
    text-decoration: none;
}

.insta-link:hover {
    background: #c1275a;
}




@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    header {
        padding: 100px 15px 40px;
    }

    h1 {
        font-size: 24px;
    }

    .catch {
        font-size: 16px;
    }


    section {
        margin: 40px auto;
        padding: 0 16px;
    }

    .card {
        padding: 20px;
    }

    .sensor-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .sensor-box {
        padding: 15px;
    }

    .sensor-value {
        font-size: 18px;
    }

}
