/**
 * ======================================================
 * ARCHIVO: aliados-estrategicos.css
 * UBICACIÓN: frontend/public/styles/
 * VERSIÓN: 1.1 — Resaltado HU-04
 * ÚLTIMA ACTUALIZACIÓN: 2026-04-20 19:00
 *
 * 🎯 PROPÓSITO:
 * Layout de filtros, grid de tarjetas y logos uniformes (responsive).
 *
 * [1.1] - 2026-04-20 19:00 — .aliado-card--highlight (llegada desde home)
 * ======================================================
 */

.aliados-page-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

.aliados-hero {
  text-align: center;
  margin-bottom: 28px;
}

.aliados-hero h1 {
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}

.aliados-hero .aliados-lead {
  max-width: 720px;
  margin: 0 auto;
  color: #64748b;
  font-size: 1.02rem;
  line-height: 1.55;
}

/* ----------------------------------------------------------------- */
/* Filtros (pestañas) — sin recarga: solo clases JS */
/* ----------------------------------------------------------------- */
.aliados-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 26px 0 32px;
}

.aliados-filter-btn {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.2s;
}

.aliados-filter-btn:hover {
  border-color: #94a3b8;
  color: #1e293b;
}

.aliados-filter-btn.is-active {
  background: linear-gradient(135deg, #1f4fd8 0%, #163fc1 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(31, 79, 216, 0.35);
}

.aliados-status {
  text-align: center;
  color: #64748b;
  min-height: 1.25em;
  margin-bottom: 12px;
}

/* ----------------------------------------------------------------- */
/* Grid tarjetas */
/* ----------------------------------------------------------------- */
.aliados-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.aliado-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.aliado-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.1);
}

.aliado-card-logo-wrap {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e2e8f0;
}

.aliado-card-logo-wrap img {
  max-width: 100%;
  max-height: 72px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.aliado-card-body {
  padding: 16px 18px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aliado-card-cat {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1f4fd8;
}

.aliado-card h2 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.aliado-card-desc {
  margin: 0;
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.45;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.aliado-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.aliado-card-actions a {
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  color: #1f4fd8;
  background: #fff;
}

.aliado-card-actions a:hover {
  background: rgba(31, 79, 216, 0.08);
}

.aliado-card-actions a.aliado-wa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-color: rgba(37, 211, 102, 0.45);
  color: #128c7e;
}

.aliado-card-actions a.aliado-wa .aliado-wa-icon {
  flex-shrink: 0;
  display: block;
}

.aliados-empty {
  text-align: center;
  padding: 48px 20px;
  color: #64748b;
  font-size: 1rem;
}

/* ----------------------------------------------------------------- */
/* HU-04: resaltar tarjeta al llegar desde logo del inicio (?highlight=) */
/* ----------------------------------------------------------------- */
.aliado-card--highlight {
  outline: 3px solid rgba(31, 79, 216, 0.65);
  outline-offset: 3px;
  border-radius: 18px;
  transition: outline-color 0.3s ease;
}

@media (max-width: 600px) {
  .aliados-filters {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .aliados-filter-btn {
    flex: 0 0 auto;
  }
}
