/* ════════════════════════════════════════════
   Tips Familias Digitales – redsegura
   v2.0.0 · Fuente: Raleway · Color: #ae1817
════════════════════════════════════════════ */

.tf-wrap {
  font-family: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  max-width: 100%;
  margin: 0 auto 32px;
  box-sizing: border-box;
}
.tf-wrap *, .tf-wrap *::before, .tf-wrap *::after {
  box-sizing: border-box;
}

/* ── CABECERA ── */
.tf-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  border-left: 5px solid var(--tf-color, #ae1817);
  margin-bottom: 20px;
}
.tf-header-icon {
  font-size: 2rem;
  flex-shrink: 0;
  line-height: 1;
}
.tf-title {
  font-size: 1.2rem !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  margin: 0 0 4px !important;
  padding: 0 !important;
  border: none !important;
}
.tf-desc {
  font-size: .85rem;
  color: #64748b;
  margin: 0 !important;
  padding: 0 !important;
  font-weight: 500;
}

/* ── BOTONERA DE CATEGORÍAS ── */
.tf-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.tf-cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 50px;
  border: 2px solid #e2e8f0;
  background: #fff;
  font-family: 'Raleway', sans-serif;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  color: #475569;
  transition: all .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  white-space: nowrap;
  line-height: 1.2;
}
.tf-cat-btn:hover {
  border-color: var(--tf-color, #ae1817);
  color: var(--tf-color, #ae1817);
  background: #fdf2f2;
  transform: translateY(-1px);
}
.tf-cat-btn.active {
  background: var(--tf-color, #ae1817);
  border-color: var(--tf-color, #ae1817);
  color: #fff;
  box-shadow: 0 4px 14px rgba(174,24,23,.3);
}
.tf-cat-count {
  font-size: .7rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 50px;
  background: rgba(255,255,255,.25);
  line-height: 1.4;
}
.tf-cat-btn:not(.active) .tf-cat-count {
  background: #f1f5f9;
  color: #94a3b8;
}

/* ── ÁREA DEL CARRUSEL ── */
.tf-carousel-area {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,.08);
  padding: 24px 20px 18px;
}
.tf-carousel-inner {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 12px;
}
.tf-carousel {
  min-height: 260px;
  position: relative;
}

/* ── TARJETAS ── */
.tf-card {
  display: none;
  animation: tfSlideIn .28s ease;
}
.tf-card.active { display: block; }

@keyframes tfSlideIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}

.tf-card-inner {
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  background: #fafafa;
}
.tf-card-inner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--tf-color, #ae1817);
  border-radius: 12px 12px 0 0;
}

.tf-card-emoji {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 10px;
  line-height: 1;
}
.tf-card-subtitle {
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--tf-color, #ae1817);
  margin-bottom: 8px;
  display: block;
}
.tf-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 12px;
  line-height: 1.35;
}
.tf-card-content {
  font-size: .875rem;
  color: #475569;
  line-height: 1.7;
  font-weight: 500;
}
.tf-card-content strong {
  color: #1e293b;
  font-weight: 800;
}

/* ── CTA BUTTON ── */
.tf-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  padding: 10px 20px;
  background: var(--tf-color, #ae1817);
  color: #fff !important;
  text-decoration: none !important;
  border-radius: 50px;
  font-family: 'Raleway', sans-serif;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .02em;
  transition: opacity .2s, transform .15s;
  border: none;
}
.tf-cta:hover {
  opacity: .88;
  transform: translateY(-1px);
  color: #fff !important;
}
.tf-cta::after {
  content: '↗';
  font-size: .85em;
}

/* ── FLECHAS ── */
.tf-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #e2e8f0;
  background: #fff;
  font-size: .95rem;
  cursor: pointer;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  flex-shrink: 0;
  font-family: inherit;
  padding: 0;
}
.tf-arrow:hover:not(:disabled) {
  background: var(--tf-color, #ae1817);
  border-color: var(--tf-color, #ae1817);
  color: #fff;
}
.tf-arrow:disabled {
  opacity: .25;
  cursor: default;
  pointer-events: none;
}

/* ── DOTS ── */
.tf-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  flex-wrap: wrap;
  padding: 0 8px;
}
.tf-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e2e8f0;
  cursor: pointer;
  transition: all .2s;
  border: none;
  padding: 0;
  flex-shrink: 0;
}
.tf-dot.active {
  background: var(--tf-color, #ae1817);
  transform: scale(1.35);
}
.tf-counter {
  text-align: center;
  font-size: .75rem;
  font-weight: 700;
  color: #94a3b8;
  margin-top: 8px;
  letter-spacing: .03em;
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */

/* Tablet: aprovecha el espacio */
@media (min-width: 600px) {
  .tf-carousel-area {
    padding: 28px 28px 20px;
  }
  .tf-carousel-inner {
    grid-template-columns: 44px 1fr 44px;
    gap: 16px;
  }
  .tf-card-inner {
    padding: 28px 28px 24px;
  }
  .tf-card-content {
    font-size: .9rem;
  }
}

/* Desktop: layout horizontal, más espacio */
@media (min-width: 900px) {
  .tf-carousel-area {
    padding: 32px 32px 24px;
  }
  .tf-carousel-inner {
    grid-template-columns: 48px 1fr 48px;
    gap: 20px;
  }
  .tf-card-inner {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 0 20px;
    padding: 28px 28px 24px;
    min-height: 220px;
  }
  .tf-card-inner::before {
    grid-column: 1 / -1;
  }
  .tf-card-emoji {
    font-size: 2.8rem;
    grid-column: 1;
    grid-row: 2 / 5;
    margin-bottom: 0;
    margin-top: 4px;
  }
  .tf-card-subtitle {
    grid-column: 2;
    grid-row: 2;
    margin-bottom: 6px;
  }
  .tf-card-title {
    grid-column: 2;
    grid-row: 3;
    font-size: 1.1rem;
  }
  .tf-card-content {
    grid-column: 2;
    grid-row: 4;
    font-size: .9rem;
  }
  .tf-cta {
    grid-column: 2;
    grid-row: 5;
    align-self: start;
    justify-self: start;
  }
  .tf-arrow {
    width: 48px;
    height: 48px;
    font-size: 1.05rem;
  }
  .tf-cats {
    gap: 10px;
  }
  .tf-cat-btn {
    font-size: .85rem;
    padding: 9px 18px;
  }
}

/* Mobile: columna limpia */
@media (max-width: 480px) {
  .tf-header {
    padding: 16px;
    gap: 12px;
  }
  .tf-header-icon { font-size: 1.6rem; }
  .tf-title { font-size: 1.05rem !important; }
  .tf-carousel-area {
    padding: 16px 12px 14px;
  }
  .tf-carousel-inner {
    grid-template-columns: 36px 1fr 36px;
    gap: 8px;
  }
  .tf-card-inner {
    padding: 18px 14px;
  }
  .tf-card-emoji { font-size: 1.8rem; }
  .tf-card-title { font-size: .95rem; }
  .tf-card-content { font-size: .83rem; }
  .tf-arrow {
    width: 36px;
    height: 36px;
    font-size: .85rem;
  }
  .tf-cats {
    gap: 6px;
  }
  .tf-cat-btn {
    font-size: .78rem;
    padding: 7px 12px;
  }
  .tf-dots { gap: 5px; }
}
