/* =========================================================
   ARTICLES LIST PAGE — COMPACT FINAL
   File: /assets/css/articles.css
   ========================================================= */

:root {
  --articles-brown: #4b3030;
  --articles-soft-brown: #704545;
  --articles-muted: rgba(75, 48, 48, .72);
  --articles-accent: #ffb347;
  --articles-pink: #ff7eb3;
  --articles-line: rgba(214, 154, 181, 0.34);
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: linear-gradient(135deg, #fff4c9 0%, #ffd7ab 36%, #ffbdc9 70%, #d8f2ff 100%);
}

body.articles-page {
  min-height: 100vh;
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  color: var(--articles-brown);
  background:
    radial-gradient(circle at 8% 12%, rgba(255,255,255,.78), transparent 30%),
    radial-gradient(circle at 92% 18%, rgba(255,255,255,.30), transparent 24%),
    linear-gradient(135deg, #fff4c9 0%, #ffd7ab 36%, #ffbdc9 70%, #d8f2ff 100%);
  overflow-x: hidden;
}

/* soft background details */
.article-cloud,
.article-petal {
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

.article-cloud {
  background: rgba(255, 255, 255, 0.44);
  border-radius: 999px;
}

.article-cloud::before,
.article-cloud::after {
  content: "";
  position: absolute;
  background: inherit;
  border-radius: 50%;
}

.article-cloud-one {
  width: 168px;
  height: 46px;
  left: -42px;
  top: 31%;
}

.article-cloud-one::before {
  width: 68px;
  height: 68px;
  left: 34px;
  top: -30px;
}

.article-cloud-one::after {
  width: 88px;
  height: 88px;
  right: 28px;
  top: -46px;
}

.article-cloud-two {
  width: 138px;
  height: 42px;
  right: -58px;
  bottom: 20%;
  opacity: .38;
}

.article-cloud-two::before {
  width: 58px;
  height: 58px;
  left: 22px;
  top: -25px;
}

.article-cloud-two::after {
  width: 74px;
  height: 74px;
  right: 22px;
  top: -38px;
}

.article-petal {
  width: 12px;
  height: 12px;
  border-radius: 60% 40% 60% 40%;
  background: rgba(255, 126, 179, .30);
}

.article-petal-one { left: 7%; top: 64%; }
.article-petal-two { right: 9%; top: 24%; }

.articles-shell {
  position: relative;
  z-index: 2;
  width: min(940px, calc(100% - 28px));
  margin: 0 auto;
  padding: 16px 0 106px;
}

.articles-card {
  position: relative;
  min-height: calc(100vh - 32px);
  padding: 16px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.78);
  background:
    linear-gradient(135deg, rgba(255,255,255,.72), rgba(255,238,218,.54)),
    radial-gradient(circle at top, rgba(255,255,255,.80), transparent 56%);
  box-shadow:
    0 24px 70px rgba(153, 96, 73, .14),
    inset 0 1px 0 rgba(255,255,255,.88);
  overflow: hidden;
}

.articles-card::before,
.articles-card::after {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  border-left: 1px dashed rgba(214, 154, 181, .30);
  pointer-events: none;
}

.articles-card::before { left: 12px; }
.articles-card::after { right: 12px; }

.articles-hero {
  position: relative;
  z-index: 2;
  padding: 0 16px 8px;
}

.articles-topbar {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.66);
  background: rgba(255,255,255,.44);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.70);
}

.articles-brand {
  color: #9b5c28 !important;
  -webkit-text-fill-color: #9b5c28 !important;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .24em;
  font-size: .62rem;
  font-weight: 900;
  text-shadow: none !important;
}

.articles-filter-toggle {
  border: 1px solid rgba(214,154,181,.42);
  background: rgba(255,255,255,.78);
  color: var(--articles-brown);
  border-radius: 999px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .10em;
  font-weight: 900;
  font-size: .64rem;
}

.articles-kicker {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.76);
  color: #9b5c28;
  font-size: .70rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  box-shadow: 0 8px 18px rgba(255,165,0,.10);
}

.articles-kicker span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffc107;
  box-shadow: 0 0 10px rgba(255,193,7,.70);
}

.articles-hero h1 {
  max-width: 760px;
  margin: 0;
  color: var(--articles-brown);
  font-size: clamp(2.05rem, 5.2vw, 3.65rem);
  line-height: 1.02;
  letter-spacing: -.052em;
}

.articles-subtitle {
  max-width: 620px;
  margin: 10px 0 0;
  color: rgba(84, 61, 61, .82);
  font-size: .98rem;
  line-height: 1.52;
}

.articles-filter-panel {
  position: relative;
  z-index: 3;
  margin: 12px 16px 14px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(214,154,181,.38);
  background:
    linear-gradient(135deg, rgba(255,255,255,.78), rgba(255,245,250,.72));
  box-shadow:
    0 14px 34px rgba(145,81,117,.09),
    inset 0 1px 0 rgba(255,255,255,.72);
  transition: max-height .25s ease, opacity .25s ease, margin .25s ease, padding .25s ease;
}

.articles-filter-panel.is-closed {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: 0;
  border-width: 0;
}

.articles-filter-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: rgba(74,47,47,.58);
  font-size: 2.15rem;
  line-height: 1;
  cursor: pointer;
}

.articles-filter-form {
  display: grid;
  grid-template-columns: 1fr 210px auto;
  gap: 10px;
  align-items: end;
}

.articles-field label {
  display: block;
  color: rgba(112,69,69,.70);
  text-transform: uppercase;
  letter-spacing: .20em;
  font-weight: 900;
  font-size: .66rem;
  margin: 0 0 6px;
}

.articles-filter-form input,
.articles-filter-form select {
  width: 100%;
  min-height: 42px;
  border-radius: 15px;
  border: 1px solid rgba(214,154,181,.36);
  background: rgba(255,255,255,.84);
  padding: 0 14px;
  color: var(--articles-brown);
  font: inherit;
  font-size: .94rem;
  outline: none;
}

.articles-filter-form input:focus,
.articles-filter-form select:focus {
  border-color: rgba(255,126,179,.52);
  box-shadow: 0 0 0 4px rgba(255,126,179,.09);
}

.articles-filter-form select {
  color: #4b84b6;
}

.articles-filter-actions {
  display: flex;
  gap: 8px;
}

.articles-filter-actions button,
.articles-filter-actions a {
  min-height: 42px;
  min-width: 104px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: 900;
  font-size: .68rem;
}

.articles-filter-actions button {
  border: 1px solid rgba(255,126,179,.34);
  background: rgba(255,255,255,.58);
  color: var(--articles-brown);
  cursor: pointer;
}

.articles-filter-actions a {
  border: 1px dashed rgba(214,154,181,.46);
  background: rgba(255,255,255,.38);
  color: rgba(112,69,69,.72);
}

.articles-count {
  position: relative;
  z-index: 2;
  margin: 0 18px 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  color: rgba(74,47,47,.78);
  font-size: .96rem;
}

.articles-count span {
  color: rgba(112,69,69,.62);
  font-style: italic;
}

.articles-training-note {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  margin: 0 18px 22px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255,193,7,.62);
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.84), transparent 36%),
    linear-gradient(135deg, rgba(255,250,208,.90), rgba(255,245,168,.54));
  box-shadow:
    0 14px 34px rgba(255,193,7,.10),
    inset 0 1px 0 rgba(255,255,255,.72);
}

.articles-note-icon {
  font-size: 1.42rem;
  filter: drop-shadow(0 4px 8px rgba(255,193,7,.24));
}

.articles-training-note p {
  margin: 0 0 8px;
  color: #765036;
  font-size: clamp(.96rem, 2.15vw, 1.14rem);
  line-height: 1.48;
}

.articles-training-note a {
  color: #8e4a38;
  font-weight: 800;
}

.articles-list {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 14px;
  margin: 0 18px;
}

.article-list-item {
  padding: 18px 18px 17px;
  border-radius: 22px;
  border: 1px solid rgba(214,154,181,.30);
  background:
    linear-gradient(135deg, rgba(255,255,255,.72), rgba(255,242,248,.56));
  box-shadow:
    0 12px 28px rgba(145,81,117,.07),
    inset 0 1px 0 rgba(255,255,255,.70);
}

.article-list-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.article-list-meta span,
.article-list-meta em {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: .66rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.article-list-meta span {
  color: #9b5576;
  background: rgba(255,236,246,.84);
}

.article-list-meta em {
  color: #9b5c28;
  background: rgba(255,242,211,.90);
  border: 1px solid rgba(255,190,112,.48);
}

.article-list-item h2 {
  margin: 0 0 8px;
  color: var(--articles-brown);
  font-size: clamp(1.18rem, 2.7vw, 1.65rem);
  line-height: 1.16;
  letter-spacing: -.035em;
}

.article-list-item h2 a {
  color: inherit;
  text-decoration: none;
}

.article-list-item h2 a:hover {
  text-decoration: underline;
}

.article-list-item p {
  max-width: 760px;
  margin: 0 0 10px;
  color: rgba(74,47,47,.82);
  line-height: 1.62;
  font-size: .96rem;
}

.article-read-more {
  color: #8e4a38;
  font-weight: 850;
}

.article-empty {
  text-align: center;
}

.articles-pagination {
  position: relative;
  z-index: 2;
  margin: 22px 18px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.articles-pagination a,
.articles-pagination span,
.articles-pagination strong {
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.66);
  border: 1px solid rgba(214,154,181,.32);
  color: var(--articles-brown);
  text-decoration: none;
  font-weight: 800;
  font-size: .92rem;
}

.articles-pagination span {
  opacity: .45;
}

body.articles-page #pageFloatingMenuButton,
body.articles-page .float-menu,
body.articles-page .floating-menu,
body.articles-page .page-floating-menu {
  bottom: calc(74px + env(safe-area-inset-bottom)) !important;
}

@media (max-width: 760px) {
  .articles-shell {
    width: min(100% - 14px, 520px);
    padding-top: 8px;
  }

  .articles-card {
    border-radius: 22px;
    padding: 13px 10px 94px;
  }

  .articles-card::before,
  .articles-card::after {
    top: 12px;
    bottom: 12px;
  }

  .articles-card::before { left: 8px; }
  .articles-card::after { right: 8px; }

  .articles-hero {
    padding: 0 16px 6px;
  }

  .articles-topbar {
    min-height: 40px;
    padding: 7px 11px;
  }

  .articles-brand {
    font-size: .58rem;
    letter-spacing: .20em;
  }

  .articles-filter-toggle {
    padding: 8px 11px;
  }

  .articles-filter-toggle strong {
    display: none;
  }

  .articles-kicker {
    margin-top: 18px;
    margin-bottom: 9px;
    padding: 8px 12px;
    font-size: .68rem;
  }

  .articles-hero h1 {
    font-size: clamp(1.95rem, 9.6vw, 2.75rem);
    line-height: 1.03;
    letter-spacing: -.05em;
  }

  .articles-subtitle {
    margin-top: 9px;
    font-size: .94rem;
    line-height: 1.48;
  }

  .articles-filter-panel {
    margin: 10px 12px 12px;
    padding: 40px 14px 14px;
    border-radius: 20px;
  }

  .articles-filter-close {
    top: 9px;
    right: 10px;
    width: 32px;
    height: 32px;
    font-size: 2rem;
  }

  .articles-filter-form {
    display: block;
  }

  .articles-field label {
    margin-top: 10px;
    margin-bottom: 6px;
    font-size: .64rem;
  }

  .articles-filter-form input,
  .articles-filter-form select {
    min-height: 42px;
    border-radius: 15px;
    font-size: .92rem;
  }

  .articles-filter-actions {
    display: grid;
    gap: 10px;
    margin-top: 12px;
  }

  .articles-filter-actions button,
  .articles-filter-actions a {
    width: 100%;
    min-height: 42px;
  }

  .articles-count,
  .articles-training-note,
  .articles-list,
  .articles-pagination {
    margin-left: 12px;
    margin-right: 12px;
  }

  .articles-count {
    margin-bottom: 10px;
    font-size: .92rem;
  }

  .articles-training-note {
    grid-template-columns: 30px 1fr;
    gap: 12px;
    padding: 15px 14px;
    border-radius: 18px;
    margin-bottom: 18px;
  }

  .articles-note-icon {
    font-size: 1.25rem;
  }

  .articles-training-note p {
    font-size: .98rem;
    line-height: 1.46;
  }

  .article-list-item {
    padding: 16px 14px;
    border-radius: 18px;
  }

  .article-list-item h2 {
    font-size: 1.24rem;
  }

  .article-list-item p {
    font-size: .94rem;
    line-height: 1.58;
  }

  body.articles-page #pageFloatingMenuButton,
  body.articles-page .float-menu,
  body.articles-page .floating-menu,
  body.articles-page .page-floating-menu {
    bottom: calc(76px + env(safe-area-inset-bottom)) !important;
  }
}

@media (max-width: 390px) {
  .articles-hero h1 {
    font-size: 1.86rem;
  }

  .articles-subtitle {
    font-size: .9rem;
  }

  .articles-filter-panel {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* =========================================================
   FINAL ARTICLES BUTTON CLICK FIX
   Keeps filter/search buttons above decorative layers.
   ========================================================= */

.articles-topbar,
.articles-filter-toggle,
.articles-filter-panel,
.articles-filter-close,
.articles-filter-form,
.articles-filter-actions,
.articles-filter-actions button,
.articles-filter-actions a {
  position: relative !important;
  z-index: 40 !important;
  pointer-events: auto !important;
}

.articles-card::before,
.articles-card::after,
.article-cloud,
.article-petal {
  pointer-events: none !important;
}

.articles-filter-toggle,
.articles-filter-close,
.articles-filter-actions button,
.articles-filter-actions a {
  cursor: pointer !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
}

/* =========================================================
   FINAL ARTICLES TOP MENU + NO FILTER CLOSE X
   Keep this at the bottom of /assets/css/articles.css.
   ========================================================= */

.articles-top-menu-button {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 999px !important;
  border: 1px solid rgba(214,154,181,.48) !important;
  background: rgba(255,255,255,.78) !important;
  color: #4b3030 !important;
  font-size: 1.05rem !important;
  line-height: 1 !important;
  box-shadow:
    0 10px 26px rgba(145,81,117,.12),
    inset 0 1px 0 rgba(255,255,255,.76) !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
}

.articles-filter-close,
.js-articles-filter-close {
  display: none !important;
}

.articles-filter-panel {
  max-height: none !important;
  opacity: 1 !important;
  overflow: visible !important;
  border-width: 1px !important;
}

.articles-filter-panel.is-closed {
  max-height: none !important;
  opacity: 1 !important;
  overflow: visible !important;
  padding-top: 16px !important;
  padding-bottom: 16px !important;
  margin-top: 12px !important;
  margin-bottom: 14px !important;
  border-width: 1px !important;
}

.articles-topbar,
.articles-top-menu-button {
  position: relative !important;
  z-index: 60 !important;
}

@media (max-width: 760px) {
  .articles-top-menu-button {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
  }

  .articles-filter-panel.is-closed {
    padding-top: 40px !important;
    padding-bottom: 14px !important;
    margin-top: 10px !important;
    margin-bottom: 12px !important;
  }
}
