*,*::before,*::after{
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /*移動先がヘッダーで隠れないように、表示領域の上のほうに空間を作る*/
    scroll-padding-top: 108px;
}
/*ユーザーがアニメーションを減らす設定にしていた時用*/
@media(prefers-reduced-motion){
    html{
        scroll-behavior: auto;
    }
}

:root {
    --green-50: #f4fbf5;
    --green-100: #e6f6ea;
    --green-200: #d7f0db;
    --green-300: #c4e5c7;
    --green-500: #7eb58d;
    --green-700: #2f6a4d;
    --green-900: #1f3f33;
    --cream: #fffdf7;
    --text: #244d3d;
    --muted: #5d766a;
    --line: rgba(53,99,72,0.16);
    --shadow: 0 12px 28px rgba(43,82,59,0.08);
}

header {
    position:fixed;
    top:0;
    left:0;
    width:100%;
    z-index: 100;
    background-color:rgb(255, 255, 255);
}

header h1 {
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px 24px;
    font-size: clamp(1.5rem, 2vw, 2.3rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--green-700);
    /*border: 2px solid red;とかで大枠確認しつつ理解した！*/
}

.hamburger {
    position: absolute;
    top: 50%;
    right: 24px;
    transform: translateY(-50%);
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 20;
    padding: 0;
}

.hamburger span {
    display: block;
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: var(--green-900);
    border-radius: 2px;
    transition: all 0.2s ease;
}

.hamburger span:nth-child(1) {
    top: 0;
}
.hamburger span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}
.hamburger span:nth-child(3) {
    bottom: 0;
}
/*右上のメニューが開いたとき*/
.hamburger.is-active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}
.hamburger.is-active span:nth-child(2) {
    opacity: 0;
}
.hamburger.is-active span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

.side-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 250px;
    height: 100vh;
    background-color: ffffff;
    box-shadow: -2px 0 10px rgba(0,0,0,0.2);
    padding: 40px 20px 20px;
    z-index: 10;
    transform: translateX(100%);
    transition: transform 0.2s ease;
}
.side-menu.is-active {
    transform: translateX(0);
}

.side-menu h2 {
    font-size: 1.2rem;
    color: var(--green-900);
    border-bottom: 2px solid rgba(61,120,86,0.18);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.side-menu ul{
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.side-menu a {
    display: block;
    text-decoration: none;
    color: var(--green-700);
    font-weight: bold;
    padding: 8px;
    /*メインのボタンデザインをリセットして点線が見えるようにする*/
    background: none;
    border: none;
    box-shadow: none;
    border-radius: 0;
}
.side-menu a::before,
.side-menu a::after {
    display: none;
}

main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 40px;
}

main h2 {
    margin: 0 0 18px;
    padding-bottom: 10px;
    font-size: clamp(1.5rem, 2vw, 2.2rem);
    border-bottom: 2px solid rgba(61,120,86,0.18);
    color: var(--green-900);
}

.map-and-nav-container{
    display:flex;
    align-items:flex-start;
    gap:20px;
    justify-content:center;
    margin: 16px 108px 16px 16px;
}

@media(max-width: 767px){
    .map-and-nav-container{
        flex-direction: column;
        align-items: left;
    }
}

body {
    margin: 0;
    padding-top:88px;
    font-family: "Segoe UI","Yu Gothic Medium","Hiragino Kaku Gothic ProN",sans-serif;
    color: var(--text);
    line-height: 1.7;
}

.sagamihara-map{
   width:70%;
   max-width:400px;
   margin:0 auto;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 4px;
}

nav[aria-label="棟を選択"] ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

nav li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid rgba(68,117,82,0.15);
    border-radius: 10px;
    background: rgb(247, 249, 247);
    color: var(--green-900);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 4px 10px rgba(55,99,72,0.05);
}

nav li a::after{
    content:"→";
    color: var(--green-700);
    font-size: 0.9rem;
}

nav li a:hover, nav li a:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(53,99,72,0.28);
    box-shadow: 0 10px 18px rgba(55, 99, 72, 0.08);
    text-decoration: none;
}

.side-menu nav li a {
    display: inline-flex;
    padding: 0;
}

.side-menu nav li a:hover, .side-menu nav li a:focus-visible {
    transform: none;
    box-shadow: none;
    color: var(--text);
    text-decoration: underline;
}

nav li a:active {
    transform: translateY(2px);
}

.location-card{
    margin: 0 0 12px;
    padding: 10px 12px 12px;
    background: rgba(255,255,255,0.56);
    border: 1px solid var(--line);
    border-left: 3px solid rgba(4, 79, 29, 0.8);
    border-radius: 4px;
    box-shadow: var(--shadow);
}

.location-card h3 {
    border-bottom: 1px solid var(--line);
    margin: 0 0 6px;
    padding: 0 4px;
    color: var(--green-900);
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
}

.location-card {
    & p {
        margin: 0 0 6px;
        color: var(--text);
        font-size: 0.86rem;
    }
    & ul {
        margin: 0;
        padding-left: 1.1rem;
    }
    & li {
        /*二行以上になった時の文字と文字の上下の隙間*/
        margin: 0.15rem 0;
        /*リスト同士の隙間*/
        line-height: 1.45;
        color: var(--text);
        font-size: 0.86rem;
    }
    & .status-note{
        color: var(--muted);
    }
}

.recommendations p {
    font-size: 0.9rem;
    margin-top: 0;
}
.recommendations h3 {
    font-size: 1.05rem;
    margin-top: 32px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--line);
}