@charset "utf-8";

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
    font-size: 16px;
    line-height: 1.7;
    background-image: url("images/blue-gradation.jpg");
    background-size: cover;
    background-attachment: fixed;
    word-break: break-word;
    overflow-wrap: break-word;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== Layout wrapper ===== */
.site-wrapper {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 16px 32px;
}

/* ===== Language switch ===== */
.lang-switch {
    text-align: right;
    padding: 6px 0;
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.lang-btn {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: bold;
    border: 1px solid #2980b9;
    color: #2980b9;
    text-decoration: none;
    background: white;
}

.lang-btn:hover {
    background: #2980b9;
    color: white;
}

.lang-active {
    background: #1a5276;
    color: white;
    border-color: #1a5276;
}

/* ===== Site title ===== */
.site-title {
    background: #2980b9;
    color: white;
    font-size: clamp(18px, 4vw, 32px);
    font-weight: bold;
    border: 4px solid #2980b9;
    padding: 4px 8px;
}

/* ===== Navigation ===== */
nav {
    margin: 4px 0;
}

ul.topnav {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    background-color: #d6eaf8;
}

ul.topnav li a {
    display: block;
    color: #1a5276;
    text-align: center;
    padding: 6px 12px;
    text-decoration: none;
    white-space: nowrap;
    font-size: 16px;
}

ul.topnav li a:hover,
ul.topnav li a.active {
    background-color: #aed6f1;
}

/* ===== Hero image ===== */
.hero {
    position: relative;
    margin-top: 4px;
}

.hero img {
    width: 100%;
    max-width: 1100px;
}

.hero-text {
    position: absolute;
    top: 8%;
    left: 2%;
    color: white;
    font-size: clamp(11px, 2.2vw, 18px);
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.85);
    max-width: 80%;
    line-height: 1.5;
}

/* ===== Divider ===== */
.divider {
    border: none;
    border-top: 2px solid #1a5276;
    margin: 16px 0 8px;
}

/* ===== Section card ===== */
.section-card {
    background: rgba(255, 255, 255, 0.88);
    border-radius: 8px;
    padding: 16px 20px 20px;
    margin: 12px 0;
}

/* ===== Section headings ===== */
.section-heading {
    display: inline-block;
    padding: 2px 8px;
    font-size: 18px;
    color: white;
    font-style: italic;
    background: #1a5276;
    border-radius: 5px;
    margin: 8px 0 4px;
}

.sub-heading {
    font-size: 16px;
    color: #1a5276;
    padding-left: 10px;
    font-weight: bold;
    margin: 12px 0 4px;
}

/* ===== Body text & indents ===== */
.body-text {
    padding-left: 10px;
    margin: 8px 0;
}

.indent-link {
    padding-left: 20px;
    margin: 8px 0;
}

/* ===== Topics table ===== */
.topics-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

.topics-table tr {
    border-bottom: 1px solid #d6eaf8;
}

.topics-table tr:last-child {
    border-bottom: none;
}

.topics-table td {
    vertical-align: top;
    padding: 10px 6px;
}

.topics-date {
    white-space: nowrap;
    width: 100px;
}

.topics-date span {
    display: inline-block;
    background: #1a5276;
    color: white;
    font-size: 13px;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 12px;
}

.new-label {
    font-size: 14px;
    color: red;
    font-style: italic;
    font-weight: bold;
}

/* ===== Contact ===== */
.contact-name {
    font-size: 18px;
    padding-left: 10px;
    margin: 8px 0 4px;
}

/* ===== Footer ===== */
.last-update {
    text-align: right;
    font-size: 14px;
    color: #555;
    margin-top: 8px;
}

/* ===== Box (existing) ===== */
#box {
    width: 280pt;
    float: left;
}

.photobox {
    border-radius: 10px;
}

/* ===== Mobile (600px以下) ===== */
@media screen and (max-width: 600px) {
    body {
        background-attachment: scroll;
        background-size: cover;
    }

    .site-wrapper {
        padding: 0 10px 24px;
    }

    ul.topnav li a {
        font-size: 14px;
        padding: 6px 8px;
    }

    .hero-text {
        font-size: clamp(10px, 3vw, 14px);
    }

    /* トピックス表: 縦並びに切り替え */
    .topics-table,
    .topics-table tbody,
    .topics-table tr,
    .topics-table td {
        display: block;
        width: 100%;
    }

    .topics-date {
        padding-bottom: 4px;
    }

    .topics-table tr {
        border-top: 1px solid #ccc;
        padding: 8px 0;
    }

    .topics-table tr:first-child {
        border-top: none;
    }

    /* 本文の横スクロール防止 */
    ul {
        padding-left: 20px;
    }
}
