.af-main {
  width: 100%;
  background: var(--af-bg-page);
}

.af-main-inner {
  display: flex;
  align-items: stretch;
  margin-top: 24px;
}

/* SIDEBAR (desktop) */

.af-sidebar {
  width: 280px;
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 0 0 1px var(--af-border-soft);
  display: flex;
  flex-direction: column;
}

.af-sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.af-sidebar-list li {
  border-bottom: 1px solid var(--af-border-soft);
  transition: background-color 0.18s ease, color 0.18s ease;
}

.af-sidebar-list li:last-child {
  border-bottom: none;
}

.af-sidebar-list a {
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 18px;
  text-decoration: none;
  color: var(--af-text-main);
  font-size: 0.9rem;
  transition: color 0.18s ease;
}

.af-sidebar-list i {
  font-size: 19px;
  margin-right: 10px;
  color: var(--af-text-muted);
  transition: color 0.18s ease;
}

/* hover categorías */

.af-sidebar-list li:hover {
  background-color: #f3f4f6;
}

.af-sidebar-list li:hover a {
  color: var(--af-primary);
}

.af-sidebar-list li:hover i {
  color: var(--af-primary);
}

/* SLIDER (desktop) */

.af-banner {
  flex: 1;
  margin-left: 24px;
  position: relative;
}

.af-banner-inner {
  width: 100%;
  min-height: 360px;
  max-height: 360px;
  background: linear-gradient(135deg, #0a3047, #03131f);
  border-radius: 4px;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
  overflow: hidden;
  position: relative;
}

.af-slide {
  position: absolute;
  inset: 0;
  display: flex;
  padding: 32px 36px 40px 36px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.af-slide.af-slide-active {
  opacity: 1;
  pointer-events: auto;
}

.af-slide-left {
  flex: 0 0 62%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.af-slide-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9ca3ff;
  margin-bottom: 6px;
}

.af-slide-title {
  font-size: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0 0 10px 0;
}

.af-slide-text {
  font-size: 0.9rem;
  color: #e5e7eb;
  max-width: 420px;
  margin: 0 0 18px 0;
}

.af-slide-cta {
  border: none;
  background: var(--af-secondary);
  color: #062133;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.af-slide-right {
  flex: 0 0 38%;
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
}

.af-slide-right img {
  max-height: 90%;
  object-fit: contain;
  display: block;
}

/* Dots */

.af-slider-dots {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.af-slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #e5e7eb;
  opacity: 0.6;
  cursor: pointer;
  transition: background-color 0.2s ease, width 0.2s ease, opacity 0.2s ease;
}

.af-slider-dot.af-dot-active {
  width: 14px;
  background: var(--af-secondary);
  opacity: 1;
}

/* BENEFICIOS */

.af-benefits-wrap {
  background: #f7f7f9;
  margin-top: 34px;
  padding: 24px 0 36px;
}

.af-benefits-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.af-benefit {
  width: 24%;
  min-height: 150px;
  max-height: 170px;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 0 0 1px var(--af-border-soft);
  padding: 18px 14px;
  text-align: center;
  position: relative;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.af-benefit::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 6px 6px 0 0;
  background: transparent;
  transition: background-color 0.18s ease;
}

.af-benefit-icon {
  font-size: 1.5rem;
  color: var(--af-primary);
  margin-bottom: 8px;
  transition: color 0.18s ease;
}

.af-benefit h4 {
  margin: 0 0 6px 0;
  font-size: 0.95rem;
}

.af-benefit p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--af-text-muted);
}

/* hover beneficios */

.af-benefit:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
}

.af-benefit:hover::before {
  background-color: var(--af-secondary);
}

.af-benefit:hover .af-benefit-icon {
  color: var(--af-secondary);
}

/* TABLET --------------------------------------------------- */

@media (max-width: 1024px) {
  .af-slide-title {
    font-size: 1.7rem;
  }

  .af-slide-text {
    font-size: 0.88rem;
  }

  .af-banner-inner {
    min-height: 330px;
    max-height: 330px;
  }

  .af-benefits-row {
    flex-wrap: wrap;
  }

  .af-benefit {
    width: calc(50% - 9px);  /* 2 columnas */
  }
}

/* MÓVIL ---------------------------------------------------- */

@media (max-width: 768px) {
  .af-main-inner {
    flex-direction: column;
    gap: 16px;
  }

  /* sidebar se vuelve acordeón: ocupa ancho completo arriba del slider */
  .af-sidebar {
    width: 100%;
    box-shadow: 0 0 0 1px var(--af-border-soft);
  }

  .af-sidebar-list a {
    height: 46px;
    font-size: 0.86rem;
  }

  /* slider 1 columna: texto arriba, imagen abajo */

  .af-banner {
    margin-left: 0;
  }

  .af-banner-inner {
    position: relative;
    min-height: auto;
    max-height: none;
  }

  .af-slide {
    position: relative;
    flex-direction: column;
    padding: 22px 18px 34px;
  }

  .af-slide-left {
    flex: none;
    align-items: flex-start;
  }

  .af-slide-title {
    font-size: 1.5rem;
  }

  .af-slide-text {
    font-size: 0.86rem;
    max-width: none;
  }

  .af-slide-right {
    flex: none;
    justify-content: center;
    align-items: center;
    margin-top: 14px;
  }

  .af-slide-right img {
    max-height: 200px;
  }

  .af-slider-dots {
    position: static;
    margin: 10px auto 4px;
  }

  /* beneficios en 1 columna */

  .af-benefits-row {
    flex-direction: column;
  }

  .af-benefit {
    width: 100%;
  }
}
