/* CAPA 3 (PÁGINA): BLOG (WordPress & Glassmorphism Pagination) */

/* Filters */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.blog-filter {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 9px 17px;
  border: 1px solid var(--page-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: #e9e6f0;
  font: 500 15px 'Inter', Arial, sans-serif;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-filter svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.blog-filter:hover {
  transform: translateY(-1px);
  border-color: rgba(72, 216, 209, 0.65);
  background: rgba(72, 216, 209, 0.1);
  color: var(--page-cyan);
}

.blog-filter:hover svg {
  transform: scale(1.1);
}

.blog-filter[aria-pressed="true"],
.blog-filter[aria-current="page"] {
  border-color: #35ded5;
  background: linear-gradient(135deg, rgba(45, 217, 206, 0.22) 0%, rgba(45, 217, 206, 0.08) 100%);
  color: #3bf1e8;
  box-shadow:
    0 0 0 1px rgba(53, 222, 213, 0.4),
    0 0 16px rgba(45, 217, 206, 0.45),
    0 0 32px rgba(45, 217, 206, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.blog-filter[aria-pressed="true"] svg,
.blog-filter[aria-current="page"] svg {
  filter: drop-shadow(0 0 6px rgba(45, 217, 206, 0.75));
}

/* Glassmorphism Search Form */
.blog-search-form {
  position: relative;
  display: flex;
  align-items: center;
  width: min(100%, 320px);
  flex-shrink: 0;
}

.blog-search-form--results {
  width: min(100%, 440px);
  margin-bottom: 32px;
}

.blog-search-form .blog-search {
  width: 100%;
  min-height: 46px;
  padding: 10px 50px 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.blog-search-form .blog-search::placeholder {
  color: #a9a4b8;
}

.blog-search-form .blog-search:focus {
  border-color: rgba(67, 216, 209, 0.75);
  background: rgba(25, 24, 39, 0.85);
  box-shadow:
    0 0 0 3px rgba(67, 216, 209, 0.16),
    0 0 20px rgba(45, 217, 206, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.blog-search-form button[type="submit"] {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(67, 216, 209, 0.34);
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(45, 217, 206, 0.18) 0%, rgba(45, 217, 206, 0.06) 100%);
  color: var(--page-cyan, #43d8d1);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.blog-search-form button[type="submit"]:hover {
  border-color: rgba(67, 216, 209, 0.82);
  background: linear-gradient(135deg, rgba(45, 217, 206, 0.34) 0%, rgba(45, 217, 206, 0.14) 100%);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(45, 217, 206, 0.35);
}

.blog-search-form button[type="submit"] svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Search Empty State */
.search-empty {
  padding: 48px 32px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  text-align: center;
}

.search-empty h2 {
  margin: 0 0 10px;
  font: 600 28px/1.15 'Jost', Arial, sans-serif;
  color: #ffffff;
}

.search-empty p {
  margin: 0;
  color: var(--page-muted);
}

/* ==========================================================================
   Glassmorphism Pagination (.blog-pagination & WordPress .navigation.pagination)
   ========================================================================== */
.blog-pagination {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 56px;
}

.blog-pagination .navigation.pagination {
  width: 100%;
  display: flex;
  justify-content: center;
}

.blog-pagination .navigation.pagination .screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.blog-pagination .nav-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.015) 100%);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 14px 36px rgba(5, 4, 14, 0.34);
}

/* When paginate_links() renders directly inside .blog-pagination without .nav-links wrapper */
.blog-pagination:not(:has(.nav-links)) {
  width: fit-content;
  margin-inline: auto;
  padding: 8px 10px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.015) 100%);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 14px 36px rgba(5, 4, 14, 0.34);
}

.blog-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.065) 0%, rgba(255, 255, 255, 0.02) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  color: #e4e0ef;
  font: 600 14.5px/1 'Inter', Arial, sans-serif;
  text-decoration: none;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease,
    color 0.22s ease,
    box-shadow 0.22s ease;
}

.blog-pagination a.page-numbers:hover {
  transform: translateY(-2px);
  border-color: rgba(67, 216, 209, 0.68);
  background: linear-gradient(135deg, rgba(45, 217, 206, 0.2) 0%, rgba(45, 217, 206, 0.06) 100%);
  color: #ffffff;
  box-shadow:
    0 8px 22px rgba(45, 217, 206, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.blog-pagination .page-numbers.current {
  border-color: #35ded5;
  background: linear-gradient(135deg, rgba(45, 217, 206, 0.3) 0%, rgba(139, 89, 237, 0.2) 100%);
  color: #ffffff;
  box-shadow:
    0 0 0 1px rgba(53, 222, 213, 0.42),
    0 0 18px rgba(45, 217, 206, 0.42),
    0 8px 22px rgba(5, 4, 14, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  cursor: default;
}

.blog-pagination .page-numbers.prev,
.blog-pagination .page-numbers.next {
  padding: 0 18px;
  border-color: rgba(244, 20, 99, 0.34);
  background: linear-gradient(135deg, rgba(244, 20, 99, 0.16) 0%, rgba(238, 53, 167, 0.06) 100%);
  color: #fff2f8;
}

.blog-pagination .page-numbers.prev:hover,
.blog-pagination .page-numbers.next:hover {
  border-color: rgba(244, 20, 99, 0.85);
  background: linear-gradient(135deg, #f41463 0%, #ee35a7 100%);
  color: #ffffff;
  box-shadow:
    0 10px 26px rgba(244, 20, 99, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.blog-pagination .page-numbers svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  transition: transform 0.22s ease;
}

.blog-pagination .page-numbers.prev:hover svg {
  transform: translateX(-3px);
}

.blog-pagination .page-numbers.next:hover svg {
  transform: translateX(3px);
}

.blog-pagination .page-numbers.dots {
  min-width: 32px;
  padding: 0 6px;
  border-color: transparent;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  color: #9e99ae;
  pointer-events: none;
}

@media (max-width: 680px) {
  .blog-search-form {
    width: 100%;
  }
  .blog-pagination {
    margin-top: 40px;
  }
  .blog-pagination .nav-links,
  .blog-pagination:not(:has(.nav-links)) {
    width: 100%;
    padding: 8px;
    gap: 8px;
  }
  .blog-pagination .page-numbers {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
  }
  .blog-pagination .page-numbers.prev,
  .blog-pagination .page-numbers.next {
    padding: 0 14px;
  }
}

@media (max-width: 560px) {
  .blog-filters {
    gap: 8px;
  }
  .blog-filter {
    min-height: 42px;
    padding: 8px 13px;
    font-size: 14px;
  }
}
