/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "ヒラギノ角ゴ Pro","Hiragino Kaku Gothic Pro", Arial, sans-serif;
    line-height: 1.6;
    color: #111827;
    background: #f5f5f7;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== Layout Container ===== */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 0;
}

/* ===== Header 共通 ===== */
header {
    background: #ffffff;
    padding: 10px 0;
    color: #111827;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #e5e7eb;
}

/* 头部里的 container 不需要 40px 的上下 padding，单独压掉 */
header .container {
    padding-top: 0;
    padding-bottom: 0;
}

/* layout.html: <div class="container header-inner"> */
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 100px;
    display: block;
}

/* ===== Global Nav ===== */
.global-nav {}

/* 顶部主菜单一行排布 */
.nav-list {
    display: flex;
    gap: 20px;
    list-style: none;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: #4b5563;
    font-weight: bold;
    font-size: 0.95rem;
    padding: 4px 0;
    display: inline-block;
}

.nav-link:hover {
    color: #111827;
}

/* ▼ ドロップダウン（企業情報） */
.nav-submenu {
    /* 子菜单自己的基础设置，防止被其他 ul 样式影响 */
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 180px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    list-style: none;

    /* 关键：用 padding 顶出视觉间距，取消 margin，避免 hover 断层 */
    padding: 12px 0 8px;
    margin: 0;

    display: none;          /* 默认隐藏 */
    z-index: 200;
}

/* 只有带 has-submenu 的 li 才有下拉 */
.nav-item.has-submenu:hover .nav-submenu {
    display: block;         /* hover 时显示 */
}

.nav-submenu li a {
    display: block;
    padding: 8px 16px;
    font-size: 0.9rem;
    color: #4b5563;
    white-space: nowrap;
}

.nav-submenu li a:hover {
    background: #f3f4f6;
    color: #111827;
}

/* ===== 共通フッター（layout :: siteFooter 用） ===== */
/* layout.html: <footer th:fragment="siteFooter" class="site-footer" ...> */
.site-footer {
    margin-top: 40px;
    background: #111827;
    color: #f9fafb;
    text-align: center;          /* ✅ 改成居中 */
    padding: 20px 16px 26px;
    font-size: 0.85rem;
    line-height: 1.7;
}

/* 兼容写成 <footer class="site-footer"> 的情况 */
footer.site-footer {
    margin-top: 40px;
    background: #111827;
    color: #f9fafb;
    text-align: center;          /* ✅ 这里也改成居中 */
    padding: 20px 16px 26px;
    font-size: 0.85rem;
    line-height: 1.7;
}

.site-footer a {
    color: #f9fafb;
    text-decoration: underline;
}

/* ===== Responsive (Header / Container / Nav 共通) ===== */
@media (max-width: 768px) {

    header {
        padding: 8px 0;
    }

    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .logo img {
        height: 100px;
    }

    .global-nav {
        margin-top: 6px;
        width: 100%;
    }

    .nav-list {
        flex-wrap: wrap;
        gap: 12px;
        font-size: 0.9rem;
    }

    .container {
        padding: 24px 0;
    }
}

/* 表单用 badge */
.badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    font-size: 0.75rem;
    border-radius: 999px;
    background: #e5e7eb;
    color: #374151;
}

.badge-required {
    background: #dc2626; /* 红色 */
    color: #ffffff;
}

.service-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

