/* ===== Honda R&D Template — Header & Footer only ===== */
/* Extracted from coding-guide/template/RandD/assets/css/randd.css */

/* Link reset for dark areas */
.RD_head a,
.RD_foot a {
  color: #fff;
  text-decoration: none;
}

/* ===== HEADER ===== */
.RD_head {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background: rgba(0, 0, 0, 0.4);
}
.RD_head .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 40px;
  max-width: none;
  width: auto;
}
.RD_head b {
  line-height: 0;
  flex-shrink: 0;
}
.RD_head b img {
  height: 28px;
  width: auto;
}
.RD_head ul {
  display: flex;
  list-style: none;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
}
.RD_head li {
  padding: 1rem;
  position: relative;
}
.RD_head li ul {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  flex-direction: column;
  padding: 1rem 0;
  background: #292222;
  transition-duration: 0.3s;
  margin-top: 4px;
  font-size: 0.9em;
  z-index: 10;
  left: 0;
}
.RD_head li:hover > ul {
  visibility: visible;
  opacity: 1;
}
.RD_head li li {
  padding: 0;
}
.RD_head li li a {
  display: block;
  padding: 10px 1rem;
  white-space: nowrap;
}
.RD_head li li a:hover {
  background: rgba(255,255,255,0.1);
}
.RD_head li.btn_english a {
  display: inline-block;
  padding: 2px 6px;
  font-size: 12px;
  border: 1px solid #fff;
}

/* ===== HAMBURGER ===== */
#btn_menu {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  padding: 6px 4px;
  flex-shrink: 0;
  position: relative;
  z-index: 1000;
}
#btn_menu span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}
.js_menu #btn_menu span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.js_menu #btn_menu span:nth-child(2) { opacity: 0; }
.js_menu #btn_menu span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===== FOOTER ===== */
.RD_foot {
  padding: 2rem 0;
  background: #000;
  color: #fff;
}
.RD_foot .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: none;
  width: auto;
  padding: 0 40px;
}
.RD_foot .footer_logo {
  flex: 0 0 320px;
}
.RD_foot .footer_logo img {
  height: 24px;
  width: auto;
}
.RD_foot .footer_txt {
  text-align: right;
}
.RD_foot .footer_txt ul {
  display: flex;
  justify-content: flex-end;
  padding-bottom: 8px;
  list-style: none;
  margin: 0;
  padding-left: 0;
}
.RD_foot .footer_txt li {
  padding: 0 1rem;
  font-size: 13px;
}
.RD_foot .footer_txt li + li {
  border-left: 1px solid #fff;
}
.RD_foot .footer_txt li:last-child {
  padding-right: 0;
}
.RD_foot .footer_txt small {
  font-size: 11px;
}

/* ===== BREAKPOINTS ===== */
@media (max-width: 920px) {
  .RD_head b { flex: 0 0 14vw; }
  .RD_head li { padding: 0 8px; }
}

@media (max-width: 768px) {
  :root { --header-height: 57px; }
  .RD_head .container {
    padding: 8px 16px;
  }
  #btn_menu {
    display: flex;
  }
  .RD_head b {
    flex: 0 0 auto;
  }
  .RD_head b img {
    height: 22px;
  }
  .RD_head ul {
    background: #292222;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100%;
    visibility: hidden;
    opacity: 0;
    overflow-y: auto;
    transition: opacity 0.5s ease, visibility 0.5s ease, transform 0.5s ease;
    display: block;
    padding: 4rem 0 1rem;
    transform: translateX(100%);
    z-index: 998;
  }
  .RD_head ul li a {
    display: block;
    padding: 1rem;
  }
  .RD_head ul li > ul {
    position: static;
    padding: 0 0 1rem 1rem;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: flex-start;
    min-height: 1px;
    height: auto;
    visibility: visible;
    opacity: 1;
    background: transparent;
    transform: none;
  }
  .RD_head ul li li {
    min-width: 50%;
  }
  .RD_head ul li li a {
    padding-top: 0;
  }
  .RD_head ul li.btn_english {
    padding-top: 1rem;
    padding-left: calc(1rem + 8px);
  }
  .js_menu .RD_head ul {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
  }

  .RD_foot .container {
    display: block;
    text-align: center;
    padding: 0 24px;
  }
  .RD_foot .footer_logo {
    flex: none;
    padding-bottom: 2rem;
  }
  .RD_foot .footer_txt {
    text-align: center;
  }
  .RD_foot .footer_txt ul {
    display: block;
  }
  .RD_foot .footer_txt li {
    padding: 0 0 1rem 0;
  }
  .RD_foot .footer_txt li + li {
    border: 0;
  }
}
