/* ===================================
   WHC Med Articles - Main Stylesheet
   =================================== */

/* CSS Variables */
:root {
  /* Colors */
  --primary-blue: #253354;
  --button-blue: #00b2a9;
  --error-red: #b62929;
  --button-yellow: #d5b690;
  --gray-light: #e0e0e0;
  --white: #ffffff;
  --black: #000;
}
html,
body {
  background-color: #ffffff;
  color: var(--black);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
a , a:visited{
  text-decoration: none;
  color: var(--black);
}
a:hover {
  color: var(--primary-blue);
}
header {
  background-color: var(--primary-blue);
  height: 80px;
  color: var(--white);
}
.container {
  max-width: 1440px;
  margin: 0 auto;
}
header .container {
  display: flex;
  height: 100%;
  padding: 10px;
}
header a {
  color: var(--white);
}
.logo {
  width: 60px;
}
/* Navigation Submenu */
.menu-left {
  padding: 0px 12px 0px 24px;
}
/* Use direct child selector > to avoid affecting nested .submenu ul */
.menu-left > ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.menu-left > ul > li {
  position: relative;
  padding: 1rem 0;
}

.menu-left > ul > li > a {
  text-decoration: none;
  color: var(--white);
  transition: color 0.3s ease;
}

/* Submenu Styles */
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: white;
  min-width: 180px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  padding: 0.5rem 0;
  z-index: 100;
  flex-direction: column;
  gap: 0;
}

/* Show submenu on hover */
.has-submenu:hover .submenu {
  display: flex;
}

/* Invisible bridge to prevent closing when moving mouse */
.has-submenu::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 10px; /* Bridge gap */
}

.submenu li {
  padding: 0;
}

.submenu a {
  display: block;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  color: var(--black);
  text-decoration: none;
  cursor:pointer;
}

.submenu a:hover {
  background-color: var(--gray-light);
  color: var(--primary-blue);
}
main {
    min-height: calc(100% - 64px - 80px - 40px); 
}
.article-header h1 {
  color:var(--primary-blue);

    margin-bottom: 20px;
    text-align: center;
}
.article-nav {
  margin:20px 0;
}
footer {
  background:var(--primary-blue);
  color:var(--white);
    padding: 20px;
    text-align: center;
    margin-top: 40px;
}
footer a, footer a:visited {
    color:var(--white);
}
/* ===================================
   Article Images Slider Styles
   =================================== */
.article-container {

    padding: 0 16px;
}
/* Article Images Container */
.article-images {
  width: 100%;
  max-width: 1200px;
  margin: 2rem auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Single Image (No Slider) */
.article-images:not(.swiper) img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Swiper Container */
.article-images.swiper {
  height: 500px;
  position: relative;
}

/* Swiper Slide */
.article-images .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
}

.article-images .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Navigation Buttons */
.article-images .swiper-button-prev,
.article-images .swiper-button-next {
  color: var(--white);
  background: rgba(0, 0, 0, 0.5);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.article-images .swiper-button-prev:hover,
.article-images .swiper-button-next:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

.article-images .swiper-button-prev::after,
.article-images .swiper-button-next::after {
  font-size: 20px;
}

/* Pagination Dots */
.article-images .swiper-pagination {
  bottom: 20px;
}

.article-images .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: var(--white);
  opacity: 0.6;
  transition: all 0.3s ease;
}

.article-images .swiper-pagination-bullet-active {
  opacity: 1;
  background: var(--button-blue);
  transform: scale(1.2);
}
.article-body {
  text-align:center;
}
.article-body p , .article-body h2, .article-body h3, .article-body h4{
  text-align: left;
}
.article-body img {
  max-width: 800px;
    max-height: 400px;
    width: auto;
    margin: 10px 0;
    display: inline-block;
}
.article-body li {
  text-align:left;
}
.article-terms {

    margin-top: 40px;
    font-size: 0.8em;
}
.article-meta {
  text-align: center;
    margin-bottom: 20px;
}
.article-author{
      font-size: 1.2em;
    font-weight: bold;
} 
.article-date {
     font-size: 0.8em;
}

/* ===================================
   Search Bar Styles
   =================================== */
.search-bar {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.search-bar form {
  display: flex;
  align-items: center;
  gap: 0;
}

.search-bar input[type="text"] {
  padding: 8px 16px;
  border: 2px solid var(--white);
  border-radius: 20px 0 0 20px;
  background: var(--white);
  color: var(--black);
  font-size: 0.9rem;
  outline: none;
  width: 200px;
  transition: all 0.3s ease;
}

.search-bar input[type="text"]:focus {
  width: 250px;
  border-color: var(--button-blue);
}

.search-bar input[type="text"]::placeholder {
  color: #999;
}

.search-bar button {
  padding: 8px 16px;
  background: var(--button-blue);
  border: 2px solid var(--button-blue);
  border-radius: 0 20px 20px 0;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  height: 42px;
}

.search-bar button:hover {
  background: var(--button-yellow);
  border-color: var(--button-yellow);
}

.search-bar button svg {
  width: 16px;
  height: 16px;
}


#whc-editorial-wrapper .hero-image {

    max-width: fit-content !important; 
}
#whc-editorial-wrapper .faq-section {
  text-align: left !important;
}
#whc-editorial-wrapper .image-grid img {
  height: auto !important;
}
#whc-editorial-wrapper details summary {
  cursor:pointer !important;
}