/* ==========================================================================
   M&F HERRAMIENTAS — sections.css
   Estilos mejorados para Distribuidores (Red) y Novedades
   Paleta: Azul #036fd3 · Negro #000000 · Inter / Montserrat Alternates
   ========================================================================== */

/* ==========================================================================
   DISTRIBUIDORES — RED DE DISTRIBUIDORES
   ========================================================================== */

/* Sub-sección encabezado de red */
.distributors-net-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.distributors-net-title {
  font-family: 'Montserrat Alternates', 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--c-ink);
  margin: 0;
  letter-spacing: -0.01em;
}

#distributors-count {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--c-blue);
  background: rgba(3, 111, 211, 0.08);
  border: 1px solid rgba(3, 111, 211, 0.25);
  padding: 0.3rem 0.75rem;
  border-radius: 30px;
}

/* City filter pills */
#distributors-city-filter {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.dist-city-pill {
  appearance: none;
  -webkit-appearance: none;
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.15);
  color: var(--c-ink);
  padding: 0.5rem 1.1rem;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  transition: all 0.25s ease;
  cursor: pointer;
  outline: none;
  box-shadow: none;
}

.dist-city-pill:hover {
  background: var(--c-blue);
  color: #fff;
  border-color: var(--c-blue);
}

.dist-city-pill.is-active {
  background: var(--c-blue);
  color: #fff;
  border-color: var(--c-blue);
  box-shadow: 0 4px 14px rgba(3, 111, 211, 0.35);
}

/* Distributor grid */
#distributors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3.5rem;
}

/* Distributor card */
.dist-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 1.6rem;
  position: relative;
  transition: transform 0.3s cubic-bezier(.16,.84,.44,1),
              border-color 0.3s,
              box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  opacity: 1 !important;
  transform: none;
}

.dist-card:hover {
  transform: translateY(-5px);
  border-color: rgba(3, 111, 211, 0.4);
  box-shadow: 0 16px 40px rgba(3, 111, 211, 0.12);
}

.dist-card--featured {
  border-color: rgba(3, 111, 211, 0.3);
  background: linear-gradient(135deg, rgba(3, 111, 211, 0.04) 0%, #fff 100%);
}

/* Card header: avatar + meta */
.dist-card-header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.4rem;
}

/* Logo image */
.dist-card-logo {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: contain;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #f8f9fb;
  flex-shrink: 0;
}

/* Initials avatar (when no logo) */
.dist-card-initials {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--c-blue) 0%, var(--c-blue-dim) 100%);
  color: #fff;
  font-family: 'Montserrat Alternates', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

/* City + department labels */
.dist-card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.dist-card-city {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--c-blue);
}

.dist-card-city svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.dist-card-dept {
  font-size: 0.76rem;
  color: rgba(10, 11, 13, 0.5);
}

/* Card name */
.dist-card-name {
  font-family: 'Montserrat Alternates', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--c-ink);
  margin: 0;
  line-height: 1.3;
}

/* Type badge */
.dist-card-type {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: rgba(10, 11, 13, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dist-type-icon {
  display: flex;
  align-items: center;
}

.dist-type-icon svg {
  width: 14px;
  height: 14px;
  color: var(--c-blue);
}

/* Description */
.dist-card-desc {
  font-size: 0.88rem;
  color: rgba(10, 11, 13, 0.7);
  line-height: 1.6;
  margin: 0;
  flex-grow: 1;
}

/* Featured badge */
.dist-card-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-blue);
  background: rgba(3, 111, 211, 0.1);
  border: 1px solid rgba(3, 111, 211, 0.25);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  align-self: flex-start;
  margin-top: 0.3rem;
}

/* Empty state */
.dist-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: rgba(10, 11, 13, 0.5);
}

/* Separator between net and CTA */
.distributors-divider {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin: 0 0 3rem;
}


/* ==========================================================================
   NOVEDADES — SECCIÓN MEJORADA
   ========================================================================== */

/* Category filter pills */
#news-category-filter {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.news-cat-pill {
  appearance: none;
  -webkit-appearance: none;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.85);
  padding: 0.5rem 1.1rem;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  transition: all 0.25s ease;
  cursor: pointer;
  outline: none;
  box-shadow: none;
}

.news-cat-pill:hover {
  background: var(--c-blue);
  color: #fff;
  border-color: var(--c-blue);
}

.news-cat-pill.is-active {
  background: var(--c-blue);
  color: #fff;
  border-color: var(--c-blue);
  box-shadow: 0 4px 14px rgba(3, 111, 211, 0.35);
}

/* Featured card */
#news-featured-container {
  margin-bottom: 2rem;
}

.news-featured-card {
  display: grid;
  grid-template-columns: 400px 1fr;
  background: #ffffff;
  border: 1px solid rgba(3, 111, 211, 0.2);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  transition: transform 0.35s cubic-bezier(.16,.84,.44,1),
              border-color 0.3s,
              box-shadow 0.3s;
  opacity: 1 !important;
}

.news-featured-card:hover {
  transform: translateY(-4px);
  border-color: var(--c-blue);
  box-shadow: 0 20px 40px rgba(3, 111, 211, 0.15);
}

.news-featured-visual {
  position: relative;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 2rem;
  overflow: hidden;
  background: linear-gradient(135deg, #036fd3 0%, #013d75 100%);
}

.news-featured-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.news-featured-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.25;
  z-index: 2;
}

.news-featured-icon svg {
  width: 100px;
  height: 100px;
  color: #fff;
}

.news-featured-badge {
  position: relative;
  z-index: 3;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--c-blue);
  padding: 0.35rem 0.8rem;
  border-radius: 4px;
}

.news-featured-body {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #ffffff;
}

.news-featured-title {
  font-family: 'Montserrat Alternates', 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  color: #000000;
  margin: 0.5rem 0 1rem;
  line-height: 1.25;
}

.news-featured-excerpt {
  font-size: 0.98rem;
  color: #475569;
  line-height: 1.7;
  margin: 0 0 1.75rem;
}

.news-featured-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  background: var(--c-blue);
  padding: 0.7rem 1.4rem;
  border-radius: 6px;
  align-self: flex-start;
  transition: background 0.25s, transform 0.2s;
  text-decoration: none;
}

.news-featured-link:hover {
  background: #0256a5;
  transform: translateX(3px);
}

/* Improved news cards */
.news-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s cubic-bezier(.16,.84,.44,1),
              border-color 0.3s,
              box-shadow 0.3s;
  opacity: 1 !important;
}

.news-card:hover {
  transform: translateY(-5px);
  border-color: var(--c-blue);
  box-shadow: 0 16px 35px rgba(3, 111, 211, 0.12);
}

/* Visual area (image or gradient) inside each card */
.news-card-visual {
  position: relative;
  height: 160px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.news-card-visual-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  z-index: 1;
}

.news-card-visual-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.2;
  z-index: 2;
}

.news-card-visual-icon svg {
  width: 56px;
  height: 56px;
  color: #fff;
}

.news-card .news-badge {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  z-index: 3;
  /* Inherit existing badge styles */
}

.news-card .news-body {
  padding: 1.4rem 1.5rem 1.5rem;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-card-title {
  color: #000000 !important;
  font-family: 'Montserrat Alternates', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  margin: 0.4rem 0 0.6rem;
  line-height: 1.35;
}

.news-card-excerpt {
  color: #475569 !important;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.2rem;
}

.news-card .news-date {
  color: #036fd3;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.news-link {
  color: #036fd3 !important;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  margin-top: auto;
  transition: transform 0.2s ease;
}

.news-link:hover {
  transform: translateX(4px);
}

/* Empty state */
.news-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: rgba(255, 255, 255, 0.4);
}

/* Responsive: featured card stacks on tablet */
@media (max-width: 860px) {
  .news-featured-card {
    grid-template-columns: 1fr;
  }
  .news-featured-visual {
    min-height: 200px;
  }
}

/* Responsive: distributor grid */
@media (max-width: 600px) {
  #distributors-grid {
    grid-template-columns: 1fr;
  }

  .dist-city-pill {
    font-size: 0.78rem;
    padding: 0.4rem 0.8rem;
  }

  #news-category-filter {
    gap: 0.4rem;
  }
}
