/* ========================================
   nozhanshop | Articles Listing Page
   ======================================== */

.articles-page {
  padding: 30px 0 84px;
  background:
    linear-gradient(
      180deg,
      #f8f8f8 0%,
      #eef7f6 100%
    );
}

.articles-container {
  width: min(100% - 40px, 1240px);
  margin: 0 auto;
  direction: rtl;
}

/* ---------- Breadcrumb ---------- */

.articles-container .breadcrumb {
  margin-bottom: 28px;
}

.articles-container .breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  color: #8a8175;
  font-size: 0.86rem;
  list-style: none;
}

.articles-container .breadcrumb-list a {
  color: #766b5e;
  text-decoration: none;
  transition: color 0.2s ease;
}

.articles-container .breadcrumb-list a:hover {
  color: #05668d;
}

.articles-container .breadcrumb-list .separator {
  color: #c9bda9;
}

.articles-container .breadcrumb-list [aria-current="page"] {
  color: #4e463d;
  font-weight: 600;
}

/* ---------- Header ---------- */

.articles-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 42px;
  padding-bottom: 30px;
  border-bottom: 1px solid #e5ddd2;
}

.articles-header-content {
  min-width: 0;
}

.articles-header h1 {
  position: relative;
  margin: 0;
  padding-right: 18px;
  color: #27231f;
  font-size: clamp(1.75rem, 3vw, 2.55rem);
  font-weight: 800;
  line-height: 1.55;
  letter-spacing: -0.02em;
}

.articles-header h1::before {
  position: absolute;
  top: 10%;
  right: 0;
  width: 4px;
  height: 80%;
  content: "";
  background: #05668d;
  border-radius: 999px;
}

.articles-header p {
  max-width: 720px;
  margin: 12px 0 0;
  color: #71685e;
  font-size: 0.94rem;
  line-height: 2.05;
}

.articles-count {
  flex: 0 0 auto;
  padding: 9px 16px;
  color: #028090;
  background: #eef7f6;
  border: 1px solid #c8dfd8;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- Section Heading ---------- */

.articles-section-heading {
  margin-bottom: 20px;
}

.articles-section-heading h2 {
  margin: 0;
  color: #332e29;
  font-size: 1.25rem;
  font-weight: 750;
  line-height: 1.7;
}

.articles-section-heading p {
  margin: 6px 0 0;
  color: #8a8175;
  font-size: 0.84rem;
  line-height: 1.9;
}

/* ---------- Categories ---------- */

.articles-categories {
  margin-bottom: 52px;
}

.articles-category-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.articles-category-card {
  position: relative;
  display: flex;
  min-height: 88px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 15px 19px;
  overflow: hidden;
  color: #514941;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e5ddd2;
  border-radius: 17px;
  box-shadow: 0 7px 24px rgba(65, 53, 38, 0.045);
  text-decoration: none;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease,
    background-color 0.2s ease;
}

/* ---------- Oncology Category Menu ---------- */

/* ---------- Oncology Dropdown Menu ---------- */

.articles-category-menu {
  position: relative;
  min-width: 0;
  z-index: 20;
}

.articles-category-menu > summary {
  list-style: none;
}

.articles-category-menu > summary::-webkit-details-marker {
  display: none;
}

.articles-category-card-menu {
  position: relative;
  cursor: pointer;
  padding-left: 48px;
}

.articles-category-menu-title {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.articles-category-menu-arrow {
  position: absolute;
  top: 50%;
  left: 17px;
  display: flex;
  width: 25px;
  height: 25px;
  align-items: center;
  justify-content: center;
  color: #a27a3c;
  font-size: 0.95rem;
  line-height: 1;
  transform: translateY(-50%);
  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.2s ease;
}

.articles-category-menu-arrow::before {
  content: "";
}

.articles-category-menu[open]
.articles-category-menu-arrow {
  color: #028090;
  transform:
    translateY(-50%)
    rotate(180deg);
}

/* Dropdown shell */

.articles-category-submenu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  left: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
  max-width: none;
  padding: 10px;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.84),
      rgba(248, 251, 250, 0.80)
    );

  border: 1px solid rgba(205, 190, 167, 0.48);
  border-radius: 17px;

  box-shadow:
    0 20px 42px rgba(54, 43, 31, 0.10),
    0 5px 14px rgba(54, 43, 31, 0.035);

  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transform:
    translateY(-7px)
    scale(0.985);

  transform-origin: top center;

  transition:
    opacity 0.24s ease,
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.24s ease;
}

/* Small floating pointer */

.articles-category-submenu::before {
  position: absolute;
  top: -6px;
  right: 50%;
  width: 11px;
  height: 11px;
  content: "";
  background: #ffffff;
  border-top: 1px solid rgba(205, 190, 167, 0.65);
  border-right: 1px solid rgba(205, 190, 167, 0.65);
  transform: translateX(50%) rotate(-45deg);
}

/* Open state */

.articles-category-menu[open]
> .articles-category-card-menu {
  color: #028090;
  background:
    linear-gradient(
      145deg,
      #f8fbfa 0%,
      #eef7f6 100%
    );
  border-color: #c8dfd8;
  box-shadow:
    0 9px 27px rgba(65, 53, 38, 0.065);
}

.articles-category-menu[open]
> .articles-category-card-menu::after {
  right: 10px;
  left: 10px;
  background: #05668d;
}

.articles-category-menu[open]
.articles-category-submenu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;

  transform:
    translateY(0)
    scale(1);
}

/* Menu items */

.articles-category-menu[open]
.articles-category-submenu-item {
  animation:
    oncology-menu-item-in
    0.24s cubic-bezier(0.22, 1, 0.36, 1)
    both;
}

.articles-category-menu[open]
.articles-category-submenu-item:nth-child(1) {
  animation-delay: 0.015s;
}

.articles-category-menu[open]
.articles-category-submenu-item:nth-child(2) {
  animation-delay: 0.025s;
}

.articles-category-menu[open]
.articles-category-submenu-item:nth-child(3) {
  animation-delay: 0.035s;
}

.articles-category-menu[open]
.articles-category-submenu-item:nth-child(4) {
  animation-delay: 0.045s;
}

.articles-category-menu[open]
.articles-category-submenu-item:nth-child(5) {
  animation-delay: 0.055s;
}

.articles-category-menu[open]
.articles-category-submenu-item:nth-child(6) {
  animation-delay: 0.065s;
}

.articles-category-menu[open]
.articles-category-submenu-item:nth-child(7) {
  animation-delay: 0.075s;
}

.articles-category-menu[open]
.articles-category-submenu-item:nth-child(8) {
  animation-delay: 0.085s;
}

.articles-category-menu[open]
.articles-category-submenu-item:nth-child(9) {
  animation-delay: 0.095s;
}

.articles-category-menu[open]
.articles-category-submenu-item:nth-child(10) {
  animation-delay: 0.105s;
}

.articles-category-menu[open]
.articles-category-submenu-item:nth-child(11) {
  animation-delay: 0.115s;
}

.articles-category-menu[open]
.articles-category-submenu-item:nth-child(12) {
  animation-delay: 0.125s;
}

@keyframes oncology-menu-item-in {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.articles-category-submenu-item {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 40px;
  align-items: center;

  margin: 1px;
  padding: 7px 11px;

  color: #625b53;
  background: transparent;
  border: 0;
  border-radius: 9px;

  text-decoration: none;

  transition:
    color 0.24s ease,
    background-color 0.24s ease,
    box-shadow 0.24s ease,
    transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.articles-category-submenu-item strong {
  overflow: hidden;
  color: inherit;
  font-size: 0.73rem;
  font-weight: 600;
  line-height: 1.7;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.articles-category-submenu-item span {
  display: none;
}

.articles-category-submenu-item::after {
  position: absolute;
  right: 11px;
  bottom: 4px;
  left: 11px;
  height: 1px;
  content: "";
  background: transparent;
  border-radius: 999px;
  transition:
    background-color 0.22s ease,
    right 0.22s ease,
    left 0.22s ease;
}

.articles-category-submenu-item:hover {
  color: #028090;
  background: rgba(5, 102, 141, 0.045);
  box-shadow:
    inset 0 0 0 1px rgba(5, 102, 141, 0.035),
    0 3px 12px rgba(5, 102, 141, 0.035);
  transform: translateY(-1px);
}

.articles-category-submenu-item:hover::after {
  right: 12px;
  left: 12px;
  background: rgba(5, 102, 141, 0.22);
}

.articles-category-submenu-item.active {
  color: #028090;
  background: rgba(5, 102, 141, 0.055);
  box-shadow:
    inset 0 0 0 1px rgba(5, 102, 141, 0.045),
    0 2px 9px rgba(5, 102, 141, 0.025);
}

.articles-category-submenu-item.active::after {
  right: 13px;
  left: 13px;
  background: #05668d;
}

.articles-category-submenu-item.active {
  color: #028090;
  background: #eef7f6;
  border-color: #c8dfd8;
  box-shadow: inset 0 -2px 0 #05668d;
}

.articles-category-card::after {
  position: absolute;
  right: 16px;
  bottom: 0;
  left: 16px;
  height: 2px;
  content: "";
  background: transparent;
  border-radius: 999px 999px 0 0;
  transition:
    background-color 0.2s ease,
    right 0.2s ease,
    left 0.2s ease;
}

.articles-category-card strong {
  color: inherit;
  font-size: 0.93rem;
  font-weight: 700;
  line-height: 1.7;
}

.articles-category-card span {
  color: #968d82;
  font-size: 0.75rem;
  line-height: 1.7;
}

.articles-category-card:hover {
  color: #028090;
  background: #fff;
  border-color: #c8dfd8;
  box-shadow: 0 12px 30px rgba(65, 53, 38, 0.08);
  transform: translateY(-3px);
}

.articles-category-card:hover::after {
  right: 10px;
  left: 10px;
  background: #05668d;
}

.articles-category-card.active {
  color: #028090;
  background:
    linear-gradient(
      145deg,
      #f8fbfa 0%,
      #eef7f6 100%
    );
  border-color: #c8dfd8;
  box-shadow: 0 9px 27px rgba(65, 53, 38, 0.065);
}

.articles-category-card.active::after {
  right: 10px;
  left: 10px;
  background: #05668d;
}

.articles-category-card:focus-visible {
  outline: 3px solid rgba(5, 102, 141, 0.28);
  outline-offset: 3px;
}

/* ---------- Results ---------- */

.articles-subcategories {
  margin-top: 15px;
  margin-bottom: 50px;
  padding: 18px 20px 20px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid #e8e0d5;
  border-radius: 20px;
  box-shadow: 0 7px 24px rgba(65, 53, 38, 0.035);
}

.articles-subcategories-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.articles-subcategories-heading strong {
  color: #5a5148;
  font-size: 0.88rem;
  font-weight: 700;
}

.articles-subcategories-heading span {
  color: #9a9187;
  font-size: 0.74rem;
}

.articles-subcategory-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.articles-subcategory-card {
  position: relative;
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  color: #6a6259;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #e7dfd4;
  border-radius: 12px;
  text-decoration: none;
  text-align: center;
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.articles-subcategory-card strong {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.7;
}

.articles-subcategory-card:hover {
  color: #028090;
  background: #f8fbfa;
  border-color: #c8dfd8;
  box-shadow: 0 5px 15px rgba(65, 53, 38, 0.05);
  transform: translateY(-1px);
}

.articles-subcategory-card.active {
  color: #028090;
  background: #eef7f6;
  border-color: #c8dfd8;
  box-shadow: 0 5px 16px rgba(65, 53, 38, 0.055);
}

.articles-subcategory-card.active::after {
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 2px;
  content: "";
  background: #05668d;
  border-radius: 999px 999px 0 0;
}

.articles-results {
  min-width: 0;
}

/* ---------- Article Grid ---------- */

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.article-card {
  position: relative;
  display: flex;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e8e1d7;
  border-radius: 22px;
  box-shadow: 0 10px 34px rgba(65, 53, 38, 0.055);
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.article-card:hover {
  border-color: #c8dfd8;
  box-shadow: 0 20px 48px rgba(65, 53, 38, 0.105);
  transform: translateY(-5px);
}

.article-card-link {
  display: flex;
  width: 100%;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.article-card-link:focus-visible {
  outline: 3px solid rgba(5, 102, 141, 0.3);
  outline-offset: -3px;
}

/* ---------- Cover ---------- */

.article-card-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f5f5f5;
}

.article-card-cover::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(18, 52, 59, 0) 55%,
      rgba(18, 52, 59, 0.12) 100%
    );
}

.article-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.article-card:hover .article-card-cover img {
  transform: scale(1.045);
}

.article-card-cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a8175;
  background:
    radial-gradient(
      circle at 30% 25%,
      #ffffff 0%,
      #eef7f6 45%,
      #eee7dc 100%
    );
}

.article-card-cover-placeholder span {
  color: #9a8d7c;
  font-size: 1rem;
  font-weight: 700;
}

/* ---------- Card Body ---------- */

.article-card-body {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  padding: 22px 23px 20px;
}

.article-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 13px;
}

.article-card-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  color: #028090;
  background: #eef7f6;
  border: 1px solid #eadbc1;
  border-radius: 999px;
  font-size: 0.69rem;
  font-weight: 650;
  line-height: 1.4;
}

.article-card-badge-subcondition {
  color: #756b60;
  background: #f5f5f5;
  border-color: #e5ddd2;
}

.article-card-title {
  margin: 0;
  color: #2e2924;
  font-size: 1.1rem;
  font-weight: 750;
  line-height: 1.82;
  letter-spacing: -0.01em;
}

.article-card-excerpt {
  display: -webkit-box;
  margin: 10px 0 0;
  overflow: hidden;
  color: #71685e;
  font-size: 0.84rem;
  line-height: 2.05;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
  color: #9a9187;
  border-top: 1px solid #eee8df;
  font-size: 0.73rem;
}

.article-card-read {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #9a7137;
  font-weight: 700;
  white-space: nowrap;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.article-card:hover .article-card-read {
  color: #05668d;
  transform: translateX(-2px);
}

/* ---------- Empty State ---------- */

.articles-empty {
  padding: 64px 24px;
  text-align: center;
  background: #fff;
  border: 1px solid #e8e1d7;
  border-radius: 22px;
  box-shadow: 0 10px 34px rgba(65, 53, 38, 0.05);
}

.articles-empty h2 {
  margin: 0;
  color: #332e29;
  font-size: 1.18rem;
  font-weight: 750;
}

.articles-empty p {
  margin: 10px 0 0;
  color: #8a8175;
  font-size: 0.86rem;
  line-height: 1.9;
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .articles-category-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .articles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .articles-category-menu {
    z-index: 30;
  }

  .articles-category-submenu {
    top: calc(100% + 9px);
    right: 0;
    left: 0;
    width: 100%;
    min-width: 0;
    max-width: none;

    grid-template-columns:
      repeat(2, minmax(0, 1fr));

    gap: 2px;
    padding: 8px;

    border-radius: 15px;

    background:
      linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.84),
        rgba(248, 251, 250, 0.80)
      );

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  .articles-category-submenu-item {
    min-height: 44px;
    margin: 0;
    padding: 8px 9px;
    border-radius: 8px;
  }

  .articles-category-submenu-item strong {
    font-size: 0.69rem;
    line-height: 1.65;
  }


  .articles-page {
    padding: 22px 0 58px;
  }

  .articles-container {
    width: min(100% - 24px, 1240px);
  }

  .articles-container .breadcrumb {
    margin-bottom: 22px;
  }

  .articles-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 32px;
    padding-bottom: 23px;
  }

  .articles-header h1 {
    padding-right: 14px;
    font-size: 1.55rem;
  }

  .articles-header p {
    margin-top: 10px;
    font-size: 0.84rem;
    line-height: 2;
  }

  .articles-count {
    padding: 8px 13px;
    font-size: 0.78rem;
  }

  .articles-categories {
    margin-bottom: 38px;
  }

  .articles-category-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .articles-category-card {
    min-height: 74px;
    padding: 12px 14px;
    border-radius: 14px;
  }

  .articles-subcategories {
    margin-top: 0;
    margin-bottom: 34px;
    padding: 15px 14px 16px;
    border-radius: 16px;
  }

  .articles-subcategories-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 11px;
  }

  .articles-subcategories-heading strong {
    font-size: 0.82rem;
  }

  .articles-subcategories-heading span {
    font-size: 0.7rem;
  }

  .articles-subcategory-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .articles-subcategory-card {
    min-height: 45px;
    padding: 8px 9px;
    border-radius: 10px;
  }

  .articles-subcategory-card strong {
    font-size: 0.72rem;
  }

  .articles-category-menu {
    z-index: 20;
  }

  .articles-category-card-menu {
    padding-left: 42px;
  }

  .articles-category-menu-arrow {
    left: 13px;
  }

  .articles-category-submenu {
    right: 0;
    left: 0;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px 4px;
    padding: 7px;
    border-radius: 12px;
    background: rgba(255, 253, 249, 0.93);
    box-shadow: 0 10px 26px rgba(65, 53, 38, 0.08);
  }

  .articles-category-submenu-item {
    min-height: 38px;
    padding: 6px 8px;
    border-radius: 7px;
  }

  .articles-category-submenu-item strong {
    font-size: 0.68rem;
  }

  .articles-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .article-card {
    border-radius: 19px;
  }
}

@media (max-width: 440px) {
  .articles-category-list {
    grid-template-columns: 1fr;
  }

  .articles-subcategories {
    margin-top: 0;
    margin-bottom: 28px;
    padding: 13px 11px 14px;
  }

  .articles-subcategory-list {
    grid-template-columns: 1fr;
  }

  .articles-section-heading h2 {
    font-size: 1.1rem;
  }

  .article-card-body {
    padding: 17px 16px 16px;
  }

  .article-card-title {
    font-size: 1rem;
  }

  .article-card-excerpt {
    font-size: 0.81rem;
  }

  .article-card-footer {
    font-size: 0.71rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .articles-category-submenu,
  .articles-category-submenu-item,
  .articles-category-menu-arrow {
    animation: none !important;
    transition: none !important;
  }
}
