/*
Theme Name: Medicamaru
Author: Custom Build
Description: Custom WordPress theme for Medicamaru's Column section — 人気の記事 slider, category dropdown navigation with search, sidebar widgets (new articles/categories/tags), paginated post listing, related posts, and an accordion-based Symptoms page.
Version: 1.1.2
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: medicamaru
*/

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  color: #26313b;
  background: #f6f8f9;
  line-height: 1.6;
}
a {
  color: #0b7285;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.container {
  width: 100%;
  margin: 0;
  padding: 0 16px;
}
@media (max-width: 600px) {
  .container {
    padding: 0 16px;
  }
}

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e3e8ea;
}
.site-branding {
  /* padding: 18px 0 10px; */
  padding: 16px 0!important;
  width: 250px!important;
}
.site-title {
  font-size: 26px;
  font-weight: 700;
  color: #0b7285;
  margin: 0;
}
.site-title a {
  color: inherit;
}
.site-logo img {
  max-height: 35px;
  width: auto;
  display: block;
}

.main-nav-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 12px 16px;
  background: #fff;
  border-top: 1px solid #e3e8ea;
}
@media (max-width: 760px) {
  .main-nav-row {
    grid-template-columns: 1fr;
    justify-items: end;
    padding: 12px 20px;
    row-gap: 14px;
  }
}
/* Mobile menu toggle — hidden on desktop, shown under 760px */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: #0b7285;
  cursor: pointer;
  padding: 0;
}
.mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}
@media (max-width: 760px) {
  .mobile-menu-toggle {
    display: flex;
  }
  .main-navigation {
    display: none;
  }
}

/* Mobile sidebar drawer: menu + categories + search, slides in from the right */
.mobile-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 37, 48, 0.55);
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}
.mobile-sidebar-overlay.open {
  opacity: 1;
  visibility: visible;
}
.mobile-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  max-width: 85vw;
  height: 100%;
  background: #fff;
  z-index: 310;
  overflow-y: auto;
  padding: 20px;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.mobile-sidebar.open {
  transform: translateX(0);
}
.mobile-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.mobile-sidebar-title {
  font-weight: 700;
  font-size: 16px;
  color: #0b7285;
}
.mobile-sidebar-close {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: #7a8a92;
  cursor: pointer;
}
.mobile-sidebar-search {
  display: flex;
  margin-bottom: 22px;
}
.mobile-sidebar-search input {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid #cfd8dc;
  border-radius: 4px 0 0 4px;
  border-right: none;
  font-size: 14px;
}
.mobile-sidebar-search button {
  padding: 9px 14px;
  background: #0b7285;
  border: none;
  color: #fff;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}
.mobile-sidebar-menu {
  margin-bottom: 22px;
}
.mobile-menu-list {
  display: flex;
  flex-direction: column;
}
.mobile-menu-list li a,
.mobile-menu-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid #eef1f2;
  color: #26313b;
  font-weight: 600;
  font-size: 14.5px;
}
.mobile-menu-list a:hover {
  color: #0b7285;
}
.mobile-menu-list img {
  width: 30px;
}
.mobile-sidebar-heading {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7a8a92;
  margin: 0 0 8px;
}
.mobile-cat-count {
  color: #7a8a92;
  font-weight: 400;
  font-size: 12px;
}

.category-dropdown {
  position: relative;
  justify-self: start;
}
@media (max-width: 760px) {
  .category-dropdown {
    justify-self: stretch;
    margin-top: -60px;
    width: 70%;
  }
}
.cd-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border: none;
  border-radius: 24px;
  background: linear-gradient(135deg, #0b7285, #0b2530);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  min-width: 190px;
  box-shadow: 0 3px 10px rgba(11, 114, 133, 0.25);
  transition:
    box-shadow 0.2s ease,
    transform 0.15s ease;
}
.cd-toggle:hover {
  box-shadow: 0 5px 14px rgba(11, 114, 133, 0.35);
  transform: translateY(-1px);
}
.cd-toggle-icon {
  font-size: 14px;
  opacity: 0.9;
}
.cd-toggle-label {
  flex: 1;
  text-align: left;
}
.cd-toggle-caret {
  font-size: 11px;
  transition: transform 0.2s ease;
}
.category-dropdown.open .cd-toggle-caret {
  transform: rotate(180deg);
}

.cd-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 260px;
  max-height: 360px;
  overflow-y: auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(11, 37, 48, 0.18);
  border: 1px solid #e3e8ea;
  padding: 8px;
  z-index: 50;
}
.category-dropdown.open .cd-panel {
  display: block;
}
.cd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 6px;
  font-size: 13.5px;
  color: #26313b;
}
.cd-item:hover {
  background: #f0f6f7;
  text-decoration: none;
}
.cd-item.active {
  background: #e6f4f6;
  color: #0b7285;
  font-weight: 700;
}
.cd-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
}
.cd-name {
  flex: 1;
}
.cd-count {
  font-size: 11px;
  color: #7a8a92;
  background: #f0f4f5;
  padding: 2px 7px;
  border-radius: 10px;
}
.cd-item.active .cd-count {
  color: #0b7285;
  background: #d6eef0;
}
.main-navigation {
  justify-self: center;
  min-width: 0;
}
.main-menu {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  justify-content: center;
}
.main-menu a {
  display: inline-flex;
  align-items: center;
  color: #26313b;
  font-weight: 600;
  font-size: 15px;
  background-color: rgb(248 244 236);
  padding: 0 0.5rem;
  border-radius: 1rem;
}
.main-menu a:hover {
  color: #0b7285;
}
.main-menu .menu-item-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  margin-right: 7px;
  vertical-align: middle;
}
@media (max-width: 760px) {
  .main-navigation {
    justify-self: stretch;
  }
  .main-menu {
    justify-content: center;
  }
}
.header-search-form {
  display: flex;
}
@media (max-width: 760px) {
  .header-search-form {
    justify-self: stretch;
  }
  .header-search-form input[type="search"] {
    flex: 1;
    width: auto;
  }
}
.header-search-form input[type="search"] {
  padding: 9px 12px;
  border: 1px solid #cfd8dc;
  border-radius: 4px 0 0 4px;
  border-right: none;
  width: 200px;
  font-size: 14px;
}
.header-search-form button {
  padding: 9px 14px;
  background: #0b7285;
  border: none;
  color: #fff;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

/* ---------- Popular section ---------- */
.popular-slider-wrap {
  background: #079895;
  padding: 22px 0;
}
.popular-heading {
  color: #fff;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 14px;
}

/* Left banner carousel + right scrollable grid panel — same height.
   --hero-height is tall enough to show two full rows (4 posts) of the
   grid panel by default; anything beyond that scrolls. */
.popular-hero-layout {
  --hero-height: 300px!important;
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 22px;
  align-items: stretch;
}
@media (max-width: 760px) {
  .popular-hero-layout {
    grid-template-columns: 1fr;
  }
  .popular-banner-wrap {
    height: 280px !important;
  }
  .popular-grid-panel {
    height: 420px !important;
  }
}

/* Left: banner carousel (3 posts, auto-playing) */
.popular-banner-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  height: var(--hero-height);
  background: #12303c;
}
.popular-banner-wrap .popular-slider-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}
.popular-banner {
  position: relative;
  display: block;
  flex: 0 0 100%;
  height: 100%;
}
.popular-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}
.popular-banner .banner-overlay {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.78),
    rgba(0, 0, 0, 0.05) 65%
  );
}
.popular-banner .slide-cat {
  color: #d8fff9;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
}
.popular-banner h3 {
  color: #fff;
  font-size: 21px;
  margin: 8px 0 0;
  line-height: 1.35;
}

/* Right: 3-post carousel — exactly three cards visible by default. */
.popular-grid-panel {
  position: relative;
  height: var(--hero-height);
  background: rgba(11, 37, 48, 0.18);
  border-radius: 8px;
  padding: 14px 38px;
  overflow: hidden;
}
.popular-grid-viewport {
  height: 100%;
  overflow: hidden;
}
.popular-grid-track {
  display: flex;
  height: 100%;
  gap: 14px;
  transition: transform 0.5s ease;
  will-change: transform;
}
.popular-mini-card {
  color: #fff;
  flex: 0 0 calc((100% - 28px) / 3);
  min-width: 0;
}
.popular-mini-card .mini-thumb {
  display: block;
  border-radius: 6px;
  overflow: hidden;
  background: #12303c;
  aspect-ratio: 16 / 10;
}
.popular-mini-card .mini-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.popular-mini-card .slide-cat {
  display: block;
  color: #d8fff9;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  margin-top: 6px;
}
.popular-mini-card h3 {
  font-size: 13px;
  line-height: 1.3;
  margin: 2px 0 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.popular-mini-card h3 a {
  color: #fff;
}
.right-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  background: rgba(7, 152, 149, 0.9);
  color: #fff;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}
.right-carousel-prev {
  left: 8px;
}
.right-carousel-next {
  right: 8px;
}
.right-carousel-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 7px;
  z-index: 6;
}
.right-carousel-nav button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}
.right-carousel-nav button.active {
  background: #d8fff9;
}
@media (max-width: 1100px) and (min-width: 761px) {
  .popular-mini-card {
    flex-basis: calc((100% - 14px) / 2);
  }
}
@media (max-width: 760px) {
  .popular-grid-panel {
    height: 325px !important;
    padding-left: 34px;
    padding-right: 34px;
  }
  .popular-mini-card {
    flex-basis: 100%;
  }
}

.slider-nav {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
}
.slider-nav button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: #4a6572;
  cursor: pointer;
  padding: 0;
}
.slider-nav button.active {
  background: #63d6c9;
}
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(7, 152, 149, 0.8);
  color: #fff;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  z-index: 5;
}
.slider-arrow.prev {
  left: 0;
}
.slider-arrow.next {
  right: 0;
}

/* ---------- Layout ---------- */
.content-layout {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 34px;
  padding: 12px 16px;
  align-items: start;
}
@media (max-width: 860px) {
  .content-layout {
    grid-template-columns: 1fr;
    padding: 12px 16px;
  }
}

/* ---------- Post list / archive: 3 per row ---------- */
.archive-title {
  font-size: 22px;
  margin: 6px 0 20px;
}
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 980px) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 620px) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.post-card {
  background: #fff;
  border: 1px solid #e3e8ea;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.post-card .thumb {
  flex: none;
}
.post-card .thumb img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 0;
}
.post-card .entry-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.post-card .entry-cat {
  color: #0b7285;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
}
.post-card h2 {
  font-size: 17px;
  margin: 6px 0 8px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card p {
  font-size: 13.5px;
  color: #4a5a63;
  margin: 0 0 10px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card .meta {
  font-size: 12px;
  color: #7a8a92;
  margin-top: auto;
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}
.pagination a,
.pagination span {
  padding: 8px 13px;
  border: 1px solid #cfd8dc;
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
}
.pagination .current {
  background: #0b7285;
  color: #fff;
  border-color: #0b7285;
}
.pagination a:hover {
  background: #f0f4f5;
  text-decoration: none;
}

/* ---------- Sidebar ---------- */
.widget {
  background: #fff;
  border: 1px solid #e3e8ea;
  border-radius: 6px;
  padding: 18px;
  margin-bottom: 22px;
}
.widget-title {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 14px;
  color: #0b2530;
  border-bottom: 2px solid #0b7285;
  padding-bottom: 8px;
}
.new-articles-list li {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.author-profile {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.author-profile .author-avatar img {
  border-radius: 50%;
  width: 72px;
  height: 72px;
}
.author-info {
  flex: 1;
  min-width: 0;
}
.author-name {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #0b2530;
}
.author-count {
  font-size: 11px;
  color: #7a8a92;
  margin: 3px 0 8px;
}
.author-bio {
  font-size: 13px;
  color: #4a5a63;
  margin: 0 0 8px;
    display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.author-website {
  font-size: 12px;
  margin-right: 10px;
}
.author-view-all {
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}
.new-articles-list img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
  flex: 0 0 64px;
}
.new-articles-list .ti {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}
.new-articles-list .dt {
  font-size: 11px;
  color: #7a8a92;
}
.cat-list li,
.archive-widget li {
  border-bottom: 1px dashed #e3e8ea;
  padding: 7px 0;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}
.tag-cloud-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-cloud-list a {
  background: #eef3f4;
  padding: 5px 10px;
  border-radius: 14px;
  font-size: 12px;
  color: #26313b;
}
.tag-cloud-list a:hover {
  background: #0b7285;
  color: #fff;
}

/* ---------- Single post ---------- */
.single-post-header .entry-cat {
  color: #0b7285;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
}
.single-post-header h1 {
  font-size: 30px;
  margin: 10px 0;
}
.single-post-header .meta {
  color: #7a8a92;
  font-size: 13px;
  margin-bottom: 18px;
}
.author-trigger {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: #0b7285;
  font-weight: 700;
  font-size: inherit;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.author-trigger:hover {
  color: #095c6b;
}

/* Author modal — overlays the post/site-main area, not the full viewport */
.author-modal-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(11, 37, 48, 0.55);
  z-index: 40;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 20px;
  border-radius: 6px;
}
.author-modal-overlay.open {
  display: flex;
}
.author-modal {
  background: #fff;
  border-radius: 8px;
  max-width: 360px;
  width: 100%;
  padding: 28px 24px 22px;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.author-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: #7a8a92;
  cursor: pointer;
}
.author-modal-close:hover {
  color: #26313b;
}
.author-modal-avatar img {
  border-radius: 50%;
  width: 88px;
  height: 88px;
  margin: 0 auto;
}
.author-modal-name {
  font-size: 18px;
  margin: 12px 0 2px;
}
.author-modal-count {
  font-size: 12px;
  color: #7a8a92;
  margin-bottom: 12px;
}
.author-modal-bio {
  font-size: 13.5px;
  color: #4a5a63;
  margin: 0 0 16px;
}
.author-modal-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}
body.single-post article,
body.single article {
  position: relative;
}
.single-featured-img {
  margin-bottom: 20px;
}
.single-featured-img img {
  border-radius: 6px;
}
.entry-content {
  background: #fff;
  border: 1px solid #e3e8ea;
  border-radius: 6px;
  padding: 26px;
}
.entry-content p {
  margin: 0 0 16px;
}

/* ---------- Related posts ---------- */
.related-posts {
  margin-top: 36px;
}
.related-posts h3 {
  font-size: 18px;
  border-left: 4px solid #0b7285;
  padding-left: 10px;
  margin-bottom: 16px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 700px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
}
.related-grid .rp-card {
  background: #fff;
  border: 1px solid #e3e8ea;
  border-radius: 6px;
  overflow: hidden;
}
.related-grid .rp-card img {
  height: 130px;
  object-fit: cover;
  width: 100%;
}
.related-grid .rp-card .rp-body {
  padding: 12px;
}
.related-grid .rp-card h4 {
  font-size: 14px;
  margin: 0 0 6px;
}
.related-grid .rp-card .meta {
  font-size: 11px;
  color: #7a8a92;
}

/* ---------- Author archive page ---------- */
.author-page-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid #e3e8ea;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 26px;
}
.author-page-avatar img {
  border-radius: 50%;
  width: 110px;
  height: 110px;
  flex: none;
}
.author-page-info h1 {
  font-size: 22px;
  margin: 0 0 4px;
}
.author-page-count {
  font-size: 12px;
  color: #7a8a92;
  margin-bottom: 4px;
}
.author-page-fullname {
  font-size: 13px;
  color: #4a5a63;
  margin-bottom: 10px;
}
.author-page-bio {
  font-size: 14px;
  color: #4a5a63;
  margin: 0 0 10px;
  max-width: 640px;
}
.author-page-website {
  font-size: 13px;
  font-weight: 700;
}
@media (max-width: 560px) {
  .author-page-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* ---------- Symptoms accordion page ---------- */
.symptoms-page-header {
  text-align: left;
  padding: 6px 0 10px;
}
.symptoms-page-header h1 {
  font-size: 26px;
  margin: 0;
}
.symptom-accordion {
  max-width: 100%;
  margin: 0 0 40px;
}
.symptom-item {
  background: #fff;
  border: 1px solid #e3e8ea;
  border-radius: 6px;
  margin-bottom: 12px;
  overflow: hidden;
}
.symptom-item-header {
  width: 100%;
  text-align: left;
  background: #fff;
  border: none;
  cursor: pointer;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #0b2530;
}
.symptom-item-header .count {
  font-weight: 400;
  font-size: 12px;
  color: #7a8a92;
  margin-left: 8px;
}
.symptom-item-header .caret {
  transition: transform 0.25s ease;
  color: #0b7285;
}
.symptom-item.active .symptom-item-header .caret {
  transform: rotate(180deg);
}
.symptom-item-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  background: #fafcfc;
}
.symptom-item.active .symptom-item-panel {
  max-height: 2000px;
}
.symptom-panel-inner {
  padding: 4px 20px 20px;
  display: grid;
  gap: 14px;
}
.symptom-post-row {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #eef1f2;
}
.symptom-post-row:first-child {
  border-top: none;
}
.symptom-post-row img {
  width: 78px;
  height: 78px;
  object-fit: cover;
  border-radius: 4px;
  flex: 0 0 78px;
}
.symptom-post-row h4 {
  font-size: 14px;
  margin: 0 0 5px;
}
.symptom-post-row .meta {
  font-size: 11px;
  color: #7a8a92;
}
.symptom-empty {
  padding: 14px 20px;
  color: #7a8a92;
  font-size: 14px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #0b2530;
  color: #cfd8dc;
  padding: 30px 0;
  margin-top: 30px;
  font-size: 13px;
  text-align: center;
}
.site-footer a {
  color: #63d6c9;
}
.footer-navigation {
  margin-bottom: 14px;
}
.footer-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
.footer-menu a {
  color: #cfd8dc;
  font-size: 13px;
  font-weight: 600;
}
.footer-menu a:hover {
  color: #63d6c9;
}

/* ---------- Body Parts directory ---------- */
.body-parts-page {
  background: #fff;
  margin: 18px 0 30px;
  padding: 0 26px 42px;
  border-radius: 4px;
}
.body-parts-heading {
  background: #f4f6f7;
  padding: 0;
  margin: 0 -26px 30px;
}
.body-parts-heading h1 {
  margin: 0;
  color: #16845f;
  font-size: 24px;
}
.body-parts-heading p {
  margin: 16px 0;
  color: #df765f;
  font-weight: 700;
  font-size: 20px;
}
.body-parts-directory {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 32px;
  max-width: 880px;
  margin: 0 auto;
  align-items: center;
}
.body-parts-figure {
  position: relative;
  width: 120px;
  height: 360px;
  margin: 0 auto;
}
.body-figure-head,
.body-figure-neck,
.body-figure-torso,
.body-figure-arm,
.body-figure-leg,
.body-figure-core {
  position: absolute;
  background: #f7a1a5;
  border: 2px solid #ff676d;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.body-figure-head.is-highlighted,
.body-figure-neck.is-highlighted,
.body-figure-torso.is-highlighted,
.body-figure-arm.is-highlighted,
.body-figure-leg.is-highlighted,
.body-figure-core.is-highlighted {
  background: #079895;
  border-color: #0b7285;
  box-shadow: 0 0 0 5px rgba(7, 152, 149, 0.22);
  z-index: 3;
}
.body-figure-head {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  top: 4px;
  left: 45px;
}
.body-figure-neck {
  width: 18px;
  height: 18px;
  top: 31px;
  left: 51px;
  border-radius: 3px;
}
.body-figure-torso {
  width: 56px;
  height: 112px;
  top: 44px;
  left: 32px;
  border-radius: 28px 28px 18px 18px;
}
.body-figure-arm {
  width: 19px;
  height: 118px;
  top: 52px;
  border-radius: 14px;
}
.body-figure-arm-left {
  left: 18px;
  transform: rotate(5deg);
}
.body-figure-arm-right {
  right: 18px;
  transform: rotate(-5deg);
}
.body-figure-leg {
  width: 22px;
  height: 145px;
  top: 145px;
  border-radius: 12px;
}
.body-figure-leg-left {
  left: 36px;
  transform: rotate(2deg);
}
.body-figure-leg-right {
  left: 62px;
  transform: rotate(-2deg);
}
.body-figure-core {
  width: 40px;
  height: 42px;
  top: 76px;
  left: 40px;
  border-radius: 50%;
  background: #ffd45a;
  border-color: #f6bf2f;
}
.body-parts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px 12px;
}
.body-part-card {
  min-height: 82px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 10px;
  background: #fff;
  border: 1px solid #e0e3e5;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.16);
  color: #153c70;
  font-weight: 700;
  text-align: center;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    color 0.15s ease;
}
.body-part-card small {
  color: #87939a;
  font-size: 10px;
  font-weight: 500;
}
.body-part-card:hover,
.body-part-card:focus-visible {
  color: #fff;
  background: #0b3946;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.18);
}
.body-part-card:hover small,
.body-part-card:focus-visible small {
  color: rgba(255, 255, 255, 0.85);
}
.body-part-card.is-active {
  background: #0b6274;
  color: #fff;
}
.body-part-card.is-active small {
  color: rgba(255, 255, 255, 0.85);
}
.body-part-archive-head {
  background: #f4f6f7;
  padding: 20px 22px;
  margin: 0 0 22px;
  border-left: 4px solid #16845f;
}
.body-part-archive-head .archive-title {
  margin: 8px 0 2px;
}
.body-part-archive-head p {
  margin: 0;
  color: #68757c;
}
.body-part-back {
  font-weight: 700;
  color: #16845f;
}

@media (max-width: 760px) {
  .body-parts-page {
    padding: 0 14px 28px;
  }
  .body-parts-heading {
    margin-left: -14px;
    margin-right: -14px;
    padding: 18px 16px;
  }
  .body-parts-heading p {
    margin-top: 36px;
    font-size: 17px;
  }
  .body-parts-directory {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .body-parts-figure {
    transform: scale(0.78);
    transform-origin: center top;
    height: 285px;
  }
  .body-parts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 420px) {
  .body-parts-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .body-part-card {
    min-height: 72px;
    font-size: 13px;
  }
}
