.wpmg-shell {
  --wpmg-bg: #181818;
  --wpmg-surface: #101010;
  --wpmg-ink: #ffffff;
  --wpmg-muted: #a8a8a8;
  --wpmg-line: #2b2b2b;
  --wpmg-accent: #ffd600;
  --wpmg-accent-text: #050505;
  --wpmg-card: #181818;
  --wpmg-accent-rgb: 255, 214, 0;
  --wpmg-ink-rgb: 255, 255, 255;
  --wpmg-accent-text-rgb: 5, 5, 5;
  --wpmg-accent-soft: rgba(var(--wpmg-accent-rgb), 0.12);
  --wpmg-accent-line: rgba(var(--wpmg-accent-rgb), 0.62);
  --wpmg-radius: 24px;
  --wpmg-columns: 3;
  color: var(--wpmg-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  width: 100%;
}

.wpmg-shell *, .wpmg-shell *::before, .wpmg-shell *::after { box-sizing: border-box; }
.wpmg-shell button, .wpmg-shell input, .wpmg-shell select { font: inherit; }
.wpmg-shell [hidden] { display: none !important; }

.wpmg-filter-panel {
  background: var(--wpmg-surface);
  border: 1px solid rgba(var(--wpmg-accent-rgb), 0.24);
  border-radius: 28px;
  padding: 10px;
  margin-bottom: 28px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.48);
}

.wpmg-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wpmg-category-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: -14px 0 28px;
  padding: 0 2px;
}

.wpmg-category-label {
  flex: 0 0 auto;
  color: var(--wpmg-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.wpmg-category-list {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--wpmg-line) transparent;
}

.wpmg-category-chip {
  flex: 0 0 auto;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--wpmg-line);
  border-radius: 999px;
  background: var(--wpmg-surface);
  color: var(--wpmg-ink);
  padding: 0 14px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
  transition: transform .25s ease, border-color .25s ease, background .25s ease, color .25s ease, box-shadow .25s ease;
}

.wpmg-category-chip:hover {
  transform: translateY(-1px);
  border-color: var(--wpmg-accent-line);
  color: var(--wpmg-accent);
}

.wpmg-category-chip.is-active,
.wpmg-category-chip[aria-pressed="true"] {
  border-color: var(--wpmg-accent);
  background: var(--wpmg-accent);
  color: var(--wpmg-accent-text);
  box-shadow: 0 10px 24px rgba(var(--wpmg-accent-rgb),.15);
}

.wpmg-category-chip:focus-visible {
  outline: 2px solid var(--wpmg-accent);
  outline-offset: 3px;
}

.wpmg-category-count {
  min-width: 21px;
  height: 21px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(var(--wpmg-ink-rgb),.1);
  font-size: 11px;
  line-height: 1;
}

.wpmg-category-chip.is-active .wpmg-category-count,
.wpmg-category-chip[aria-pressed="true"] .wpmg-category-count {
  background: rgba(var(--wpmg-accent-text-rgb),.12);
}

.wpmg-field { position: relative; display: flex; align-items: center; }
.wpmg-field--search { flex: 1 1 380px; min-width: 220px; }
.wpmg-field--search input {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 20px;
  background: var(--wpmg-bg);
  color: var(--wpmg-ink);
  padding: 0 52px;
  outline: none;
  transition: box-shadow .28s ease, background .28s ease, transform .28s ease;
}
.wpmg-field--search input:focus { background: var(--wpmg-card); box-shadow: inset 0 0 0 1.5px var(--wpmg-accent), 0 0 0 3px var(--wpmg-accent-soft); }
.wpmg-field-icon { position: absolute; left: 18px; width: 20px; height: 20px; z-index: 1; color: var(--wpmg-muted); }
.wpmg-field-icon svg { width: 100%; height: 100%; }

.wpmg-search-progress {
  position: absolute;
  right: 17px;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(var(--wpmg-ink-rgb),.16);
  border-top-color: var(--wpmg-accent);
  border-radius: 50%;
  opacity: 0;
  transform: scale(.7);
  transition: opacity .2s ease, transform .2s ease;
}
.wpmg-shell.is-loading .wpmg-search-progress { opacity: 1; transform: scale(1); animation: wpmg-spin .7s linear infinite; }

.wpmg-field--select select,
.wpmg-field--stacked select,
.wpmg-field--stacked input {
  appearance: none;
  border: 1px solid var(--wpmg-line);
  background: var(--wpmg-card);
  color: var(--wpmg-ink);
  border-radius: 16px;
  min-height: 52px;
  padding: 0 42px 0 16px;
  outline: none;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.wpmg-field--select::after,
.wpmg-field--stacked:has(select)::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 22px;
  width: 8px;
  height: 8px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  pointer-events: none;
  color: var(--wpmg-muted);
  transform: rotate(45deg);
  transition: transform .25s ease, color .25s ease;
}
.wpmg-field--select:hover::after,
.wpmg-field--stacked:has(select):hover::after { color: var(--wpmg-accent); transform: translateY(2px) rotate(45deg); }
.wpmg-field--select select:focus,
.wpmg-field--stacked select:focus,
.wpmg-field--stacked input:focus { border-color: var(--wpmg-accent); box-shadow: 0 0 0 3px var(--wpmg-accent-soft); }
.wpmg-field select option { background: var(--wpmg-card); color: var(--wpmg-ink); }

.wpmg-advanced-toggle,
.wpmg-load-more,
.wpmg-clear {
  border: 0;
  cursor: pointer;
}

.wpmg-advanced-toggle {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 20px;
  padding: 0 18px;
  background: var(--wpmg-accent);
  color: var(--wpmg-accent-text);
  transition: transform .28s cubic-bezier(.2,.7,.2,1), background .25s ease;
}
.wpmg-advanced-toggle:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(var(--wpmg-accent-rgb),.18); }
.wpmg-advanced-toggle svg { width: 20px; height: 20px; transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.wpmg-advanced-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.wpmg-filter-count {
  min-width: 21px;
  height: 21px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 99px;
  background: var(--wpmg-accent);
  color: var(--wpmg-accent-text);
  font-size: 12px;
  font-weight: 800;
}

.wpmg-advanced {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transform: translateY(-8px);
  transition: grid-template-rows .45s cubic-bezier(.2,.7,.2,1), opacity .3s ease, transform .45s cubic-bezier(.2,.7,.2,1);
}
.wpmg-advanced.is-open { grid-template-rows: 1fr; opacity: 1; transform: translateY(0); }
.wpmg-advanced-inner {
  overflow: hidden;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.wpmg-advanced.is-open .wpmg-advanced-inner { padding: 18px 6px 6px; }
.wpmg-field--stacked { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.wpmg-field--stacked > span { color: var(--wpmg-muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.wpmg-advanced-actions { display: flex; align-items: end; }
.wpmg-clear {
  min-height: 52px;
  border-radius: 16px;
  padding: 0 18px;
  background: transparent;
  color: var(--wpmg-ink);
  box-shadow: inset 0 0 0 1px var(--wpmg-line);
  transition: background .25s ease, transform .25s ease;
}
.wpmg-clear:hover { background: var(--wpmg-accent-soft); color: var(--wpmg-accent); box-shadow: inset 0 0 0 1px var(--wpmg-accent-line); transform: translateY(-1px); }

.wpmg-status {
  min-height: 24px;
  margin: 0 2px 16px;
  color: var(--wpmg-muted);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .02em;
  transition: opacity .2s ease, transform .2s ease;
}
.wpmg-shell.is-loading .wpmg-status { opacity: .5; transform: translateY(2px); }
.wpmg-shell.has-error .wpmg-status { animation: wpmg-shake .35s ease; }

.wpmg-grid {
  display: grid;
  grid-template-columns: repeat(var(--wpmg-columns), minmax(0, 1fr));
  gap: 22px;
}

.wpmg-card {
  position: relative;
  min-width: 0;
  border: 1px solid var(--wpmg-line);
  border-radius: var(--wpmg-radius);
  overflow: hidden;
  background: var(--wpmg-card);
  box-shadow: 0 8px 30px rgba(0,0,0,.34);
  opacity: 0;
  transform: translateY(32px) scale(.985);
  filter: blur(5px);
  transition:
    opacity .65s ease var(--wpmg-delay, 0ms),
    transform .75s cubic-bezier(.16,1,.3,1) var(--wpmg-delay, 0ms),
    filter .55s ease var(--wpmg-delay, 0ms),
    box-shadow .4s ease,
    border-color .4s ease;
}
.wpmg-card.is-visible { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
.wpmg-card.is-leaving {
  opacity: 0;
  transform: translateY(-18px) scale(.975);
  filter: blur(5px);
  transition-delay: var(--wpmg-exit-delay, 0ms);
  transition-duration: .22s;
}
.wpmg-card:hover {
  transform: translateY(-8px) scale(1.008);
  border-color: var(--wpmg-accent-line);
  box-shadow: 0 28px 70px rgba(0,0,0,.58), 0 0 0 1px var(--wpmg-accent-soft);
}

.wpmg-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--wpmg-card);
}
.wpmg-media img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.001); transition: transform .9s cubic-bezier(.16,1,.3,1), filter .5s ease; }
.wpmg-card:hover .wpmg-media img { transform: scale(1.075); filter: saturate(1.04); }
.wpmg-media-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.22)); opacity: .7; transition: opacity .45s ease; }
.wpmg-card:hover .wpmg-media-shade { opacity: .35; }

.wpmg-card-open {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--wpmg-accent);
  color: var(--wpmg-accent-text);
  transform: translateY(-8px) rotate(-18deg) scale(.82);
  opacity: 0;
  transition: transform .45s cubic-bezier(.16,1,.3,1), opacity .3s ease;
}
.wpmg-card-open svg { width: 21px; height: 21px; }
.wpmg-card:hover .wpmg-card-open { transform: translateY(0) rotate(0) scale(1); opacity: 1; }

.wpmg-placeholder { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; background: var(--wpmg-card); }
.wpmg-placeholder span { position: absolute; width: 44%; aspect-ratio: 1; border: 1px solid rgba(var(--wpmg-ink-rgb),.12); border-radius: 50%; }
.wpmg-placeholder span:nth-child(1) { transform: translate(-42%, -10%); }
.wpmg-placeholder span:nth-child(2) { transform: translate(42%, 15%) scale(.72); }
.wpmg-placeholder span:nth-child(3) { transform: translate(8%, 62%) scale(1.2); }

.wpmg-card-body {
  min-width: 0;
  padding: 22px 22px 20px;
}
.wpmg-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.wpmg-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--wpmg-accent);
  color: var(--wpmg-accent-text);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.wpmg-date { color: var(--wpmg-muted); font-size: 12px; }
.wpmg-title { margin: 0 0 12px; font-size: clamp(20px, 2vw, 28px); line-height: 1.08; letter-spacing: -.035em; }
.wpmg-title a { color: inherit; text-decoration: none; background-image: linear-gradient(currentColor,currentColor); background-size: 0 1.5px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .45s cubic-bezier(.16,1,.3,1); }
.wpmg-card:hover .wpmg-title a { background-size: 100% 1.5px; }
.wpmg-excerpt {
  width: 100%;
  max-width: 100%;
  margin: 0;
  color: var(--wpmg-muted);
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}
.wpmg-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--wpmg-line); }
.wpmg-author { color: var(--wpmg-muted); font-size: 12px; font-weight: 650; }
.wpmg-read { display: inline-flex; align-items: center; gap: 8px; color: var(--wpmg-ink); text-decoration: none; font-size: 13px; font-weight: 800; transition: color .25s ease; }
.wpmg-read:hover { color: var(--wpmg-accent); }
.wpmg-read-icon {
  width: 17px;
  height: 17px;
  display: inline-grid;
  place-items: center;
  transition: transform .35s cubic-bezier(.16,1,.3,1);
}
.wpmg-read-icon svg { width: 100%; height: 100%; }
.wpmg-read:hover .wpmg-read-icon { transform: translateX(4px); }

.wpmg-empty { min-height: 290px; display: grid; place-items: center; align-content: center; gap: 10px; text-align: center; border: 1px dashed rgba(var(--wpmg-ink-rgb),.2); border-radius: var(--wpmg-radius); color: var(--wpmg-muted); animation: wpmg-empty-in .45s cubic-bezier(.16,1,.3,1) both; }
.wpmg-empty strong { color: var(--wpmg-ink); font-size: 20px; }
.wpmg-empty-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: var(--wpmg-accent); color: var(--wpmg-accent-text); margin-bottom: 4px; }
.wpmg-empty-icon svg { width: 27px; height: 27px; }

.wpmg-footer { display: flex; justify-content: center; padding-top: 32px; }
.wpmg-load-more {
  min-height: 54px;
  min-width: 190px;
  border-radius: 999px;
  background: var(--wpmg-accent);
  color: var(--wpmg-accent-text);
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-weight: 750;
  transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s ease, opacity .25s ease;
}
.wpmg-load-more:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(var(--wpmg-accent-rgb),.22); }
.wpmg-load-more:disabled { opacity: .62; cursor: progress; }
.wpmg-button-arrow {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  transition: transform .35s cubic-bezier(.16,1,.3,1);
}
.wpmg-button-arrow svg { width: 100%; height: 100%; }
.wpmg-load-more:hover .wpmg-button-arrow { transform: translateX(4px); }

.wpmg-whatsapp {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9998;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--wpmg-accent-text-rgb),.12);
  border-radius: 50%;
  background: var(--wpmg-accent);
  color: var(--wpmg-accent-text);
  text-decoration: none;
  box-shadow: 0 18px 42px rgba(0,0,0,.42), 0 8px 22px rgba(var(--wpmg-accent-rgb),.24);
  transition: transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s ease;
}

.wpmg-whatsapp svg { width: 31px; height: 31px; }
.wpmg-whatsapp:hover { transform: translateY(-4px) scale(1.04); box-shadow: 0 24px 52px rgba(0,0,0,.5), 0 12px 28px rgba(var(--wpmg-accent-rgb),.3); }
.wpmg-whatsapp:focus-visible { outline: 3px solid var(--wpmg-ink); outline-offset: 4px; }

.wpmg-notice { padding: 16px; border: 1px solid rgba(255,92,92,.42); border-radius: 14px; background: #241010; color: #ffb5b5; }

@keyframes wpmg-spin { to { transform: rotate(360deg); } }
@keyframes wpmg-shake { 25% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
@keyframes wpmg-empty-in { from { opacity: 0; transform: translateY(20px) scale(.98); } to { opacity: 1; transform: none; } }

@media (max-width: 1050px) {
  .wpmg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wpmg-advanced-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .wpmg-filter-row { flex-wrap: wrap; }
  .wpmg-category-strip { align-items: flex-start; flex-direction: column; gap: 8px; margin-top: -16px; }
  .wpmg-category-list { width: 100%; }
  .wpmg-category-chip { min-height: 36px; padding: 0 12px; }
  .wpmg-field--search { flex-basis: 100%; }
  .wpmg-field--select { flex: 1; }
  .wpmg-field--select select { width: 100%; }
  .wpmg-advanced-toggle { flex: 0 0 auto; }
  .wpmg-advanced-inner { grid-template-columns: 1fr; }
  .wpmg-grid { grid-template-columns: 1fr; gap: 16px; }
  .wpmg-card-body { padding: 19px; }
  .wpmg-card:hover { transform: translateY(-4px); }
  .wpmg-card-open { opacity: 1; transform: scale(.88); }
  .wpmg-whatsapp { right: 16px; bottom: 16px; width: 56px; height: 56px; }
  .wpmg-whatsapp svg { width: 28px; height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .wpmg-shell *, .wpmg-shell *::before, .wpmg-shell *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }
  .wpmg-card { opacity: 1; transform: none; filter: none; }
}
