.sp-content {
  padding: 5rem 0;
  background-color: #fff;
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .sp-content { padding: 6rem 0; }
}

.sp-content__container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 7%;
}

@media (min-width: 768px) {
  .sp-content__container { padding: 0 3rem; }
}

/* Header & Search */
.sp-content__header {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 2rem;
  justify-content: space-between;
}

@media (min-width: 1024px) {
  .sp-content__header {
    flex-direction: row;
    align-items: flex-end;
  }
}

.sp-content__pretitle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.sp-content__pretitle-line {
  width: 2.5rem;
  height: 2px;
  background-color: var(--analdex-yellow);
  border-radius: 9999px;
}

.sp-content__pretitle span {
  color: var(--analdex-navy);
  font-weight: 900;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.sp-content__title {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--analdex-navy);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .sp-content__title { font-size: 3rem; }
}

.sp-content__subtitle {
  color: #9ca3af;
  font-size: 0.875rem;
}

.sp-content__count {
  font-weight: 700;
  color: var(--analdex-navy);
  font-size: 1rem;
}

.sp-content__clear-btn {
  margin-left: 0.75rem;
  color: var(--analdex-yellow);
  font-weight: 700;
  background: none;
  border: none;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
}

.sp-content__clear-btn:hover {
  text-decoration: underline;
}

.sp-content__search {
  width: 100%;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .sp-content__search { max-width: 24rem; }
}

.sp-content__search-wrapper {
  position: relative;
}

.sp-content__search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #d1d5db;
  display: flex;
}

.sp-content__search-wrapper input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background-color: #f9fafb;
  font-size: 0.875rem;
  color: var(--analdex-navy);
  font-family: inherit;
  transition: colors 0.2s;
}

.sp-content__search-wrapper input:focus {
  outline: none;
  border-color: rgba(11, 34, 84, 0.3);
  background-color: #fff;
}

/* Filters */
.sp-content__filters {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #f3f4f6;
}

.sp-filter-group {
  position: relative;
}

.sp-filter-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--analdex-navy);
  background: linear-gradient(to bottom right, #f9fafb, #f3f4f6);
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.625rem 1rem;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
}

.sp-filter-group:hover .sp-filter-btn {
  border-color: var(--analdex-yellow);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.sp-filter-caret {
  color: #9ca3af;
  transition: transform 0.3s, color 0.3s;
}

.sp-filter-group:hover .sp-filter-caret {
  color: var(--analdex-yellow);
  transform: rotate(180deg);
}

.sp-filter-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.5rem;
  background-color: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  min-width: 210px;
  max-height: 16rem;
  overflow-y: auto;
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.sp-filter-group:hover .sp-filter-dropdown,
.sp-filter-group.is-open .sp-filter-dropdown {
  opacity: 1;
  visibility: visible;
}

.sp-filter-option {
  width: 100%;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.625rem 1rem;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
  font-family: inherit;
  color: #4b5563;
}

.sp-filter-option:hover {
  background-color: #f9fafb;
  color: var(--analdex-navy);
}

.sp-filter-option.is-active {
  background-color: var(--analdex-navy);
  color: #fff;
}

.sp-filter-option__dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background-color: var(--analdex-yellow);
}

/* Grid & Cards */
.sp-content__empty {
  text-align: center;
  padding: 5rem 0;
  color: #9ca3af;
  font-size: 0.875rem;
  font-weight: 600;
}

.sp-content__grid {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 3rem;
  min-height: 560px;
  align-content: start; /* Fix for less than 4 items */
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .sp-content__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .sp-content__grid { grid-template-columns: repeat(4, 1fr); }
}

.sp-card {
  display: flex;
  flex-direction: column;
  background-color: #fff;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid #f3f4f6;
  text-decoration: none;
  transition: all 0.5s;
}

.sp-card:hover {
  border-color: rgba(255, 192, 0, 0.25);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.sp-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/2;
  background-color: #f3f4f6;
}

.sp-card__media.is-video {
  background-color: #000;
}

.sp-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s, opacity 0.7s;
}

.sp-card.is-video .sp-card__img {
  opacity: 0.7;
}

.sp-card:hover .sp-card__img {
  transform: scale(1.05);
}

.sp-card.is-video:hover .sp-card__img {
  opacity: 0.88;
}

.sp-card__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.18), transparent);
}

.sp-card__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sp-card__play-btn {
  display: flex;
  width: 3.5rem;
  height: 3.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background-color: var(--analdex-yellow);
  color: var(--analdex-navy);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s;
}

.sp-card__play-btn svg {
  margin-left: 2px;
}

.sp-card:hover .sp-card__play-btn {
  transform: scale(1.1);
}

.sp-card__badge-tl {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
}

.sp-card__tema {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  border: 1px solid;
}

.sp-card__badge-tr {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
}

.sp-card__formato-top {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 8px;
  font-weight: 900;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
}

.sp-card__formato-top.is-video {
  background-color: rgba(0, 0, 0, 0.65);
  color: #fff;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.sp-card__formato-top:not(.is-video) {
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--analdex-navy);
}

.sp-card__bottom-row {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sp-card__fecha {
  font-size: 9px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
}

.sp-card__formato-bottom {
  font-size: 9px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
}

.sp-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.25rem;
}

.sp-card__title {
  color: var(--analdex-navy);
  font-weight: 900;
  font-size: 13px;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sp-card__desc {
  color: #9ca3af;
  font-size: 11px;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sp-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid #f3f4f6;
}

.sp-card__fuente {
  color: #9ca3af;
  font-weight: 600;
  font-size: 10px;
}

.sp-card__action {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--analdex-navy);
  font-weight: 900;
  font-size: 10px;
  transition: all 0.3s;
}

.sp-card:hover .sp-card__action {
  gap: 0.5rem;
  color: var(--analdex-yellow);
}

/* Pagination */
.sp-content__pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
}

.sp-page-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid #e5e7eb;
  background-color: #fff;
  color: #9ca3af;
  font-family: inherit;
}

.sp-page-btn:hover {
  border-color: #d1d5db;
  color: #4b5563;
}

.sp-page-btn.is-active {
  background-color: var(--analdex-navy);
  color: #fff;
  border-color: var(--analdex-navy);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}