/* ============================================================
   CENTO | ARTICLE CATALOG - DOUGH BALL DESIGN SYSTEM
   Production stylesheet: cento-articles-minimal.css

   STRUCTURE (generated by the existing PHP shortcode):
   01  Fonts and editable design settings
   02  Outer panel and heading
   03  Search and filters
   04  Article grid and cards
   05  Pagination and loading states
   06  Tablet/mobile

   EDITABLE THEME SETTINGS:
   Change --ca-accent and --ca-ink for other article themes.
   The Elementor PARENT container controls the outer yellow/red
   section colors, borders and padding.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;600;700;800&family=Open+Sans:wght@400;500;600;700&display=swap');

/* ------------------------------------------------------------
   01  FONTS AND THEME SETTINGS
   ------------------------------------------------------------ */
.cento-articles-catalog {
  --ca-accent: #cc0000;
  --ca-accent-hover: #bb0202;
  --ca-ink: #252524;
  --ca-muted: #77716c;
  --ca-line: #e9e6e1;
  --ca-soft: #f8f7f5;
  --ca-surface: #ffffff;
  --ca-radius: 18px;
  --ca-gap: 18px;

  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--ca-ink);
  background: transparent;
  font-family: 'Open Sans', sans-serif;
}

.cento-articles-catalog,
.cento-articles-catalog *,
.cento-articles-catalog *::before,
.cento-articles-catalog *::after {
  box-sizing: border-box;
}

/* ------------------------------------------------------------
   02  OUTER PANEL AND HEADING
   The surrounding Elementor container provides the white card.
   ------------------------------------------------------------ */
.cento-articles-catalog .cento-articles-panel {
  width: 100%;
  margin: 0;
  padding: 30px 24px 50px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.cento-articles-catalog .cento-articles-header {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  margin: 0 0 22px;
  padding: 0;
}

.cento-articles-catalog h2.cento-articles-heading {
  margin: 0 !important;
  padding: 0 !important;
  color: var(--ca-ink) !important;
  display: flex;
  align-items: center;
  gap: 13px;
  font: 800 30px/1.2 'Figtree', sans-serif !important;
  letter-spacing: -0.04em !important;
  white-space: nowrap;
}

/* Matching accent bar used by the Featured Articles header. */
.cento-articles-catalog h2.cento-articles-heading::before {
  content: "";
  display: block;
  flex: 0 0 5px;
  width: 5px;
  height: 30px;
  border-radius: 5px;
  background: var(--ca-accent);
}

/* ------------------------------------------------------------
   03  SEARCH AND FILTERS
   Keeps all existing PHP/JS data attributes and behavior.
   ------------------------------------------------------------ */
.cento-articles-catalog .cento-articles-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  background: transparent;
}

.cento-articles-catalog .cento-articles-mobiletop { display: none; }
.cento-articles-catalog .cento-articles-search-wrap { position: relative; min-width: 0; }
.cento-articles-catalog .cento-articles-search-wrap-desktop { display: block; flex: 1 1 auto; }
.cento-articles-catalog .cento-articles-filter-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  margin: 0;
}

.cento-articles-catalog .cento-articles-search,
.cento-articles-catalog .cento-articles-select,
.cento-articles-catalog .cento-articles-filter-toggle,
.cento-articles-catalog .cento-articles-clear {
  height: 54px !important;
  min-height: 54px !important;
  margin: 0 !important;
  border: 1px solid var(--ca-line) !important;
  border-radius: 12px !important;
  background-color: var(--ca-surface) !important;
  color: var(--ca-ink) !important;
  box-shadow: none !important;
  outline: none;
  font: 700 13px/1.3 'Figtree', sans-serif !important;
}

.cento-articles-catalog .cento-articles-search {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 0 18px 0 46px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23918b85' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: 16px center !important;
  background-size: 18px 18px !important;
  text-align: left !important;
  font: 600 14px 'Open Sans', sans-serif !important;
  appearance: none;
  -webkit-appearance: none;
}
.cento-articles-catalog .cento-articles-search::placeholder { color: #99918b; opacity: 1; }

.cento-articles-catalog .cento-articles-select {
  width: 178px !important;
  min-width: 178px !important;
  padding: 0 43px 0 16px !important;
  text-align: left !important;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #77716c 50%),
                    linear-gradient(135deg, #77716c 50%, transparent 50%) !important;
  background-position: calc(100% - 21px) 25px, calc(100% - 15px) 25px !important;
  background-size: 6px 6px, 6px 6px !important;
  background-repeat: no-repeat !important;
}

.cento-articles-catalog .cento-articles-search:hover,
.cento-articles-catalog .cento-articles-search:focus,
.cento-articles-catalog .cento-articles-select:hover,
.cento-articles-catalog .cento-articles-select:focus,
.cento-articles-catalog .cento-articles-filter-toggle:focus-visible,
.cento-articles-catalog .cento-articles-clear:focus-visible {
  border-color: var(--ca-accent) !important;
  box-shadow: 0 0 0 3px rgba(204,0,0,.08) !important;
}

.cento-articles-catalog .cento-articles-filter-toggle {
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 15px !important;
  cursor: pointer;
  color: var(--ca-accent) !important;
}
.cento-articles-catalog .cento-articles-filter-toggle.is-filtered {
  border-color: var(--ca-accent) !important;
}
.cento-articles-catalog .cento-articles-clear {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 44px !important;
  min-width: 44px !important;
  padding: 0 !important;
  color: var(--ca-muted) !important;
  font-size: 23px !important;
  cursor: pointer;
}
.cento-articles-catalog .cento-articles-clear:hover { color: var(--ca-accent) !important; }
.cento-articles-catalog .is-hidden { display: none !important; }

/* ------------------------------------------------------------
   04  GRID AND ARTICLE CARDS
   Matches the compact recipe cards on the Dough Ball page.
   Category -> Title -> Excerpt -> View Article.
   The last line is decorative; the ENTIRE card is the link.
   ------------------------------------------------------------ */
.cento-articles-catalog .cento-articles-results {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.cento-articles-catalog .cento-articles-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--ca-gap);
  width: 100%;
  margin: 0;
  padding: 0;
  align-items: stretch;
}

.cento-articles-catalog .cento-article-cardlink {
  display: block;
  min-width: 0;
  height: 100%;
  color: var(--ca-ink);
  text-decoration: none !important;
}
.cento-articles-catalog .cento-article-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--ca-line);
  border-radius: var(--ca-radius);
  background: var(--ca-surface);
  box-shadow: none;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.cento-articles-catalog .cento-article-cardlink:hover .cento-article-card {
  transform: translateY(-5px);
  border-color: #d9ccc5;
  box-shadow: 0 14px 32px rgba(48,37,20,.10);
}
.cento-articles-catalog .cento-article-cardlink:focus-visible {
  outline: 3px solid var(--ca-accent);
  outline-offset: 4px;
  border-radius: var(--ca-radius);
}

.cento-articles-catalog .cento-article-thumb {
  display: block;
  flex: 0 0 auto;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  object-position: center;
  background: var(--ca-soft);
  transition: transform .4s ease;
}
.cento-articles-catalog .cento-article-cardlink:hover .cento-article-thumb {
  transform: scale(1.035);
}

.cento-articles-catalog .cento-article-cardbody {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 0;
  min-width: 0;
  padding: 18px 19px 18px;
  background: var(--ca-surface);
}
.cento-articles-catalog .cento-article-meta {
  order: 1;
  margin: 0 0 8px;
  color: var(--ca-accent);
  font: 800 10px/1.35 'Figtree', sans-serif;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}
.cento-articles-catalog h3.cento-article-title {
  order: 2;
  margin: 0 0 10px !important;
  padding: 0 !important;
  color: var(--ca-ink) !important;
  font: 800 19px/1.3 'Figtree', sans-serif !important;
  letter-spacing: -.025em !important;
}
.cento-articles-catalog .cento-article-excerpt {
  order: 3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 13px !important;
  color: var(--ca-muted);
  font: 400 12px/1.7 'Open Sans', sans-serif;
}
/* No PHP edit needed: this appears after the excerpt in every card. */
.cento-articles-catalog .cento-article-cardbody::after {
  content: 'View Article';
  order: 4;
  display: block;
  margin-top: 0;
  padding-top: 12px;
  border-top: 1px solid #eeeae5;
  color: #77716c;
  font: 700 12px/1.5 'Figtree', sans-serif;
  position: relative;
  padding-right: 25px;
}
.cento-articles-catalog .cento-article-cardbody::before {
  content: "";
  order: 5;
  position: absolute;
  right: 19px;
  bottom: 18px;
  width: 18px;
  height: 18px;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cc0000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 19 19 5M8 5h11v11'/%3E%3C/svg%3E");
}
.cento-articles-catalog .cento-article-cardlink:hover .cento-article-cardbody::after {
  color: var(--ca-accent);
}

/* ------------------------------------------------------------
   05  LOADING AND NUMBERED PAGINATION
   ------------------------------------------------------------ */
.cento-articles-catalog .cento-articles-loading-message,
.cento-articles-catalog .cento-articles-grid > p {
  grid-column: 1 / -1;
  margin: 0;
  padding: 22px 4px;
  color: var(--ca-muted);
  font: 600 14px/1.6 'Open Sans', sans-serif;
}
.cento-articles-catalog.cento-loading { opacity: .6; pointer-events: none; }
.cento-articles-catalog .cento-articles-pagination {
  grid-column: 1 / -1;
  display: flex !important;
  flex-flow: row nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 100%;
  margin: 25px auto 0 !important;
  padding: 0 !important;
}
.cento-articles-catalog .cento-articles-pagebtn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 40px !important;
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 1px solid var(--ca-line) !important;
  border-radius: 11px !important;
  background: #fff !important;
  color: var(--ca-ink) !important;
  font: 800 13px/1 'Figtree', sans-serif !important;
  box-shadow: none !important;
  cursor: pointer !important;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.cento-articles-catalog .cento-articles-pagebtn:hover,
.cento-articles-catalog .cento-articles-pagebtn:focus-visible {
  border-color: var(--ca-accent) !important;
  color: var(--ca-accent) !important;
}
.cento-articles-catalog .cento-articles-pagebtn.is-active,
.cento-articles-catalog .cento-articles-pagebtn[aria-current='page'] {
  border-color: var(--ca-accent) !important;
  background: var(--ca-accent) !important;
  color: #fff !important;
}
.cento-articles-catalog .cento-articles-pagearrow {
  font: 800 23px/1 Arial, sans-serif !important;
}
.cento-articles-catalog .cento-articles-pagebtn[disabled] {
  opacity: .35 !important;
  cursor: not-allowed !important;
}
.cento-articles-catalog .cento-articles-pageellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  min-width: 18px;
  color: var(--ca-muted);
  font: 700 16px/1 'Figtree', sans-serif;
}

/* ------------------------------------------------------------
   06  RESPONSIVE LAYOUT
   4 desktop / 3 small desktop / 2 tablet and mobile
   ------------------------------------------------------------ */
@media (max-width: 1100px) {
  .cento-articles-catalog .cento-articles-header { gap: 18px; }
  .cento-articles-catalog .cento-articles-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cento-articles-catalog .cento-articles-select { width: 155px !important; min-width: 155px !important; }
}

@media (max-width: 850px) {
  .cento-articles-catalog .cento-articles-panel { padding: 25px 15px 50px; }
  .cento-articles-catalog .cento-articles-header {
    display: block;
    margin-bottom: 24px;
  }
  .cento-articles-catalog h2.cento-articles-heading {
    font-size: 26px !important;
    white-space: normal;
  }
  .cento-articles-catalog .cento-articles-toolbar { display: block; margin-top: 18px; }
  .cento-articles-catalog .cento-articles-mobiletop {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 10px;
  }
  .cento-articles-catalog .cento-articles-search-wrap-desktop,
  .cento-articles-catalog .cento-articles-search-desktop { display: none !important; }
  .cento-articles-catalog .cento-articles-filter-toggle {
    display: inline-flex !important;
    width: 100% !important;
  }
  .cento-articles-catalog .cento-articles-search-mobile { width: 100% !important; min-width: 0 !important; }
  .cento-articles-catalog .cento-articles-filter-panel { display: none; margin-top: 10px; }
  .cento-articles-catalog .cento-articles-filter-panel.is-open {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 10px;
  }
  .cento-articles-catalog .cento-articles-filter-panel .cento-articles-select {
    width: 100% !important;
    min-width: 0 !important;
  }
  .cento-articles-catalog .cento-articles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .cento-articles-catalog .cento-article-cardbody { padding: 14px 12px; }
  .cento-articles-catalog h3.cento-article-title { font-size: 16px !important; }
  .cento-articles-catalog .cento-article-excerpt { font-size: 11px; }
  .cento-articles-catalog .cento-article-meta { font-size: 9px; }
  .cento-articles-catalog .cento-article-cardbody::after { font-size: 11px; }
  .cento-articles-catalog .cento-article-cardbody::before { right: 12px; bottom: 14px; width: 16px; height: 16px; }
}

@media (max-width: 420px) {
  .cento-articles-catalog .cento-articles-grid { gap: 10px; }
  .cento-articles-catalog .cento-article-cardbody { padding: 13px 11px; }
  .cento-articles-catalog .cento-article-cardbody::before { right: 11px; bottom: 13px; }
  .cento-articles-catalog h3.cento-article-title { font-size: 15px !important; }
  .cento-articles-catalog .cento-article-excerpt { -webkit-line-clamp: 2; }
  .cento-articles-catalog .cento-articles-mobiletop { grid-template-columns: 88px minmax(0, 1fr); }
  .cento-articles-catalog .cento-articles-pagination { gap: 4px !important; }
  .cento-articles-catalog .cento-articles-pagebtn {
    flex-basis: 33px !important;
    width: 33px !important;
    min-width: 33px !important;
    max-width: 33px !important;
    height: 33px !important;
    min-height: 33px !important;
  }
  .cento-articles-catalog .cento-articles-pageellipsis { width: 12px; min-width: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .cento-articles-catalog .cento-article-card,
  .cento-articles-catalog .cento-article-thumb,
  .cento-articles-catalog .cento-articles-pagebtn { transition: none !important; }
}


/* Compact heading accent and controls on phones. */
@media (max-width: 650px) {
  .cento-articles-catalog h2.cento-articles-heading {
    font-size: 22px !important;
    gap: 9px;
  }
  .cento-articles-catalog h2.cento-articles-heading::before {
    flex-basis: 4px;
    width: 4px;
    height: 25px;
  }
  .cento-articles-catalog .cento-articles-search,
  .cento-articles-catalog .cento-articles-select,
  .cento-articles-catalog .cento-articles-filter-toggle {
    height: 50px !important;
    min-height: 50px !important;
  }
}
