/**
 * Hub - Archivos de proyecto, servicio y producto
 * Diseño alineado con la referencia (code.html)
 */

body.archive-hub {
  background: #f5f5f5;
  padding-top: 0;
}

:root {
  --hub-red: #dc2626;
  --hub-red-hover: #b91c1c;
  --hub-max-width: 1600px;
  --hub-container-padding: 1rem;
  --hub-card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

@media (min-width: 640px) {
  :root {
    --hub-container-padding: 1.5rem;
  }
}

@media (min-width: 1024px) {
  :root {
    --hub-container-padding: 2rem;
  }
}

.hub-filters {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 1rem 0;
}

.hub-filters .hub-filters-inner {
  max-width: var(--hub-max-width);
  margin: 0 auto;
  padding: 0 var(--hub-container-padding);
  overflow-x: auto;
}

.hub-filters .hub-filters-list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

@media (min-width: 768px) {
.hub-filters .hub-filters-list {
    gap: 1rem;
  }
}

.hub-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  border-radius: 9999px;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s, transform 0.2s;
  background: #f3f4f6;
  color: #6b7280;
}

.hub-filter:hover:not(.hub-filter--active) {
  background: #e5e7eb;
  color: #374151;
}

.hub-filter--active {
  background: var(--hub-red);
  color: #fff;
  box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.25);
}

.hub-filter svg {
  width: 14px;
  height: 14px;
  vertical-align: text-bottom;
}

.hub-main {
  max-width: var(--hub-max-width);
  margin: 0 auto;
  padding: 2rem var(--hub-container-padding);
  background: transparent;
}

@media (min-width: 768px) {
  .hub-main {
    padding: 3rem var(--hub-container-padding);
  }
}

.hub-hero {
  margin-bottom: 2.5rem;
}

.hub-hero .hub-hero__title {
  font-family: var(--font-heading, 'Neue Haas Grotesk Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif) !important;
  font-size: 2.25rem;
  font-weight: 100 !important;
  font-style: normal;
  -webkit-text-stroke: 0.5px currentColor;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: var(--color-text, #111827);
  margin: 0 0 1rem;
}

@media (min-width: 768px) {
  .hub-hero .hub-hero__title {
    font-size: 3rem;
  }
}

@media (min-width: 1024px) {
  .hub-hero .hub-hero__title {
    font-size: 3.5rem;
  }
}

.hub-hero .hub-hero__description {
  font-size: 1.125rem;
  line-height: 1.6;
  color: #6b7280;
  max-width: 48rem;
  margin: 0;
}

@media (min-width: 768px) {
  .hub-hero .hub-hero__description {
    font-size: 1.25rem;
  }
}

.hub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  grid-auto-rows: minmax(0, auto);
}

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

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

.hub-card {
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: var(--hub-card-shadow);
  background: #111827;
  transition: box-shadow 0.3s ease;
}

.hub-card:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

.hub-card:hover .hub-card__img {
  transform: scale(1.05);
  opacity: 0.6;
}

.hub-card--large {
  height: 500px;
}

@media (min-width: 1024px) {
.hub-card--large {
    grid-row: span 2;
    height: auto;
    min-height: 500px;
  }
}

.hub-card--normal {
  height: 350px;
}

.hub-card--wide {
  height: 350px;
}

@media (min-width: 768px) {
.hub-card--wide {
    grid-column: span 2;
  }
}

.hub-card--tall {
  height: 350px;
}

@media (min-width: 768px) {
.hub-card--tall {
    grid-row: span 2;
    height: auto;
    min-height: 500px;
  }
}

.hub-card__link {
  position: absolute;
  inset: 0;
  z-index: 10;
}

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

.hub-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
  pointer-events: none;
}

.hub-card__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  z-index: 2;
}

@media (min-width: 768px) {
.hub-card__content {
    padding: 2rem;
  }
}

.hub-card__badge-label {
  display: block;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.25rem;
}

.hub-card__subtitle {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.hub-card__title {
  font-family: var(--font-heading, 'Neue Haas Grotesk Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif) !important;
  font-size: 1.75rem;
  font-weight: 100 !important;
  font-style: normal;
  -webkit-text-stroke: 0.5px currentColor;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: #fff;
  margin: 0 0 0.75rem;
}

.hub-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.5rem;
}

.hub-card__tag {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: #fff;
}

.hub-card--large .hub-card__title,
.hub-card--wide .hub-card__title {
  font-size: 1.75rem;
}

@media (min-width: 768px) {
.hub-card--large .hub-card__title,
.hub-card--wide .hub-card__title {
    font-size: 2rem;
  }
}

@media (min-width: 1024px) {
.hub-card--large .hub-card__title {
    font-size: 2.5rem;
  }
}

.hub-card__excerpt {
  font-size: 0.875rem;
  color: #d1d5db;
  margin: 0 0 1rem;
  max-width: 32rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 768px) {
.hub-card__excerpt {
    font-size: 1rem;
  }
}

.hub-card__cta-wrap {
  display: flex;
  justify-content: flex-end;
}

.hub-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: var(--hub-red);
  color: #fff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: background-color 0.2s, transform 0.3s;
  pointer-events: none;
}

.hub-card:hover .hub-card__cta {
  background: var(--hub-red-hover);
  transform: rotate(45deg);
}

@media (min-width: 768px) {
.hub-card--large .hub-card__cta,
.hub-card--wide .hub-card__cta {
    width: 3rem;
    height: 3rem;
    padding: 0.75rem;
  }
}

.hub-load-more-wrap {
  margin-top: 4rem;
  display: flex;
  justify-content: center;
}

.hub-load-more {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  font-family: inherit;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: #111827;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  transition: border-color 0.3s;
  cursor: pointer;
}

.hub-load-more:hover {
  border-color: var(--hub-red);
}

.hub-load-more .hub-load-more__icon {
  color: var(--hub-red);
  transition: transform 0.3s;
}

.hub-load-more:hover .hub-load-more__icon {
  transform: translateY(4px);
}

.hub-empty {
  grid-column: 1 / -1;
  color: #4b5563;
}
