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

/* ハンバーガーメニュー */
.hamburger-menu {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1000;
    padding: 16px;
}

.menu-toggle {
    background: rgba(30, 60, 114, 0.9);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: rgba(42, 82, 152, 0.95);
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.menu-list {
    position: absolute;
    top: 64px;
    right: 0;
    background: rgba(30, 60, 114, 0.98);
    list-style: none;
    min-width: 160px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    padding: 8px 0;
}

.menu-list.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-list li {
    margin: 0;
    padding: 0;
}

.menu-list li a {
    display: block;
    padding: 12px 20px;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    transition: background-color 0.2s ease;
    border-radius: 0;
}

.menu-list li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.menu-list li:first-child a {
    border-radius: 8px 8px 0 0;
}

.menu-list li:last-child a {
    border-radius: 0 0 8px 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    line-height: 1.7;
    color: #333;
    background-color: #f5f5f5;
    padding: 0;
    margin: 0;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    background-color: #fff;
    min-height: 100vh;
}

header {
    background-image: url('images/header-banner.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    padding: 24px 20px;
    padding-top: 80px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 60, 114, 0.6);
    z-index: 1;
}

.header-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

header h1 {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.subtitle {
    font-size: 14px;
    opacity: 0.95;
    margin-top: 8px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.mobile-br {
    display: none;
}

main {
    padding: 20px 16px 40px;
}

.section {
    margin-bottom: 32px;
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.section h2 {
    font-size: 20px;
    color: #1e3c72;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #2a5298;
    font-weight: bold;
}

.section h2.center-title {
    text-align: center;
}

.subsection {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    scroll-margin-top: 80px;
}

.subsection:first-child {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.subsection h3 {
    font-size: 18px;
    color: #2a5298;
    margin-bottom: 12px;
    font-weight: bold;
}

.content {
    font-size: 15px;
    line-height: 1.8;
}

.content p {
    margin-bottom: 12px;
    text-align: justify;
}

.content p.spaced-paragraph {
    margin-top: 1em;
}

.content ul {
    list-style: none;
    padding-left: 0;
}

.content ul li {
    margin-bottom: 10px;
    padding-left: 24px;
    position: relative;
}

.content ul li::before {
    content: "・";
    position: absolute;
    left: 8px;
    color: #2a5298;
    font-weight: bold;
}

.example {
    background-color: #f0f7ff;
    border-left: 4px solid #2a5298;
    padding: 12px 16px;
    margin-top: 16px;
    border-radius: 4px;
    font-size: 14px;
}

.example strong {
    color: #1e3c72;
}

.note {
    background-color: #fff9e6;
    border-left: 4px solid #ffa500;
    padding: 12px 16px;
    margin-top: 16px;
    border-radius: 4px;
    font-size: 14px;
}

.note strong {
    color: #cc6600;
}

.red-text {
    color: #d32f2f;
    font-weight: 500;
}

.underline {
    text-decoration: underline;
}

footer {
    background-color: #f5f5f5;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
    position: relative;
}

.footer-text {
    font-size: 12px;
    color: #666;
}

.top-button-container {
    text-align: right;
    padding: 20px;
    padding-bottom: 10px;
}

.top-button {
    display: inline-block;
    background-color: #2a5298;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.top-button:hover {
    background-color: #1e3c72;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* スマホ向けの調整 */
@media screen and (max-width: 480px) {
    .top-button-container {
        padding: 15px;
        padding-bottom: 10px;
    }

    .top-button {
        padding: 8px 16px;
        font-size: 13px;
    }
    .hamburger-menu {
        padding: 12px;
    }

    .menu-toggle {
        width: 44px;
        height: 44px;
    }

    .menu-list {
        top: 60px;
        min-width: 140px;
    }

    .menu-list li a {
        padding: 10px 16px;
        font-size: 14px;
    }

    header {
        padding: 20px 16px;
        padding-top: 72px;
        min-height: 250px;
    }

    header h1 {
        font-size: 24px;
    }

    .subtitle {
        font-size: 13px;
    }

    .mobile-br {
        display: block;
    }

    main {
        padding: 16px 12px 32px;
    }

    .section {
        padding: 16px;
        margin-bottom: 24px;
    }

    .section h2 {
        font-size: 18px;
    }

    .subsection h3 {
        font-size: 16px;
    }

    .content {
        font-size: 14px;
    }

    .example,
    .note {
        font-size: 13px;
        padding: 10px 12px;
    }
}

/* タブレット向けの調整 */
@media screen and (min-width: 481px) and (max-width: 768px) {
    .container {
        max-width: 700px;
        margin: 0 auto;
    }
}

/* PC向けの調整 */
@media screen and (min-width: 769px) {
    .container {
        max-width: 800px;
        margin: 0 auto;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    }
}
