/* ========================================
   TIPOGRAFÍA Y COLOR GLOBAL
   ======================================== */
.mineco-menu-wrap,
.mineco-menu-wrap * {
  font-family: Verdana, Geneva, sans-serif !important;
  color: #141F42 !important;
}

/* ========================================
   CONTENEDOR PRINCIPAL
   ======================================== */
.mineco-menu-wrap { 
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 0;
  box-sizing: border-box;
}

/* ========================================
   CONTENEDOR DEL CARRUSEL CON FLECHAS
   ======================================== */
.mineco-carousel-container {
  display: flex;
  align-items: center;
  gap: 30px;
  position: relative;
  width: 100%;
  max-width: 100%;
  padding: 0 20px 20px 20px;
}

/* ========================================
   CARRUSEL CENTRAL
   ======================================== */
.mineco-carousel {
  flex: 1;
  position: relative;
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

/* ========================================
   PISTA CON TARJETAS
   ======================================== */
.mineco-track {
  --perPage: 5;
  display: flex;
  align-items: stretch;
  transition: transform .28s ease;
  will-change: transform;
  width: 100%;
}

/* ========================================
   TARJETAS
   ======================================== */
.mineco-card {
  flex: 0 0 calc((100% - (var(--perPage) - 1) * 16px) / var(--perPage));
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  text-decoration: none !important;
  padding: 8px;
  margin-right: 16px;
  box-sizing: border-box;
  cursor: pointer;
  transition: transform .15s ease;
  position: relative;
}

.mineco-card:nth-child(5n) {
  margin-right: 0;
}

.mineco-card:hover { 
  transform: translateY(-3px); 
}

.mineco-card,
.mineco-card:hover,
.mineco-card:focus,
.mineco-card:active,
.mineco-card:visited {
  text-decoration: none !important;
  border-bottom: none !important;
  outline: none;
}

/* Asegurar que los clones tengan el mismo estilo */
.mineco-card[data-clone="1"] {
  flex: 0 0 calc((100% - (var(--perPage) - 1) * 16px) / var(--perPage));
}

/* ========================================
   TEXTO "CONOCER MÁS"
   ======================================== */
.mineco-more {
  color: #4079B7 !important;
  display: block;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.25s ease;
  margin-top: -15px;
}

.mineco-card:hover .mineco-more {
  opacity: 1;
}

/* Ocultar "Conocer Más" en móvil */
@media (max-width: 600px) {
  .mineco-more {
    display: none !important;
  }
  
  .mineco-card {
    justify-content: center;
    padding: 20px 8px;
  }
}

/* ========================================
   ICONOS
   ======================================== */
.mineco-icon {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: #4079B7;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  transition: transform .2s ease, box-shadow .2s ease;
}

.mineco-card:hover .mineco-icon {
  transform: scale(1.05);
  box-shadow: 0 4px 12px #4079B7;
}

.mineco-icon img {
  width: 72%;
  height: 72%;
  object-fit: contain;
  display: block;
  margin: auto;
}

/* ========================================
   TÍTULOS - Con soporte para \n
   ======================================== */
.mineco-title {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  line-height: 1.3;
  max-width: 200px;
  background: transparent;
  white-space: pre-line; /* Esto respeta los \n del texto */
  overflow: hidden;
  transition: all .2s ease;
  word-wrap: break-word;
}

.mineco-card.is-active .mineco-title { 
  font-weight: 900;
  transform: scale(1.02);
}

.mineco-card:hover .mineco-title {
  font-weight: 800;
}

/* ========================================
   FLECHAS DE NAVEGACIÓN
   ======================================== */
.mineco-menu-wrap button.mineco-arrow {
  -webkit-appearance: none !important;
  appearance: none !important;
  border: 0 !important;
  outline: 0 !important;
  background: #141F42 !important;
  color: #fff !important;

  display: block !important;
  flex-shrink: 0;
  position: relative;
  width: 50px !important;
  height: 50px !important;
  border-radius: 999px !important;
  padding: 0 !important;
  z-index: 100;
  cursor: pointer;
  user-select: none;
  align-self: center;
  margin-top: -25px;
  font-size: 40px !important;
  font-weight: 800 !important;
  line-height: 50px !important;
  text-align: center !important;
  font-family: Verdana, Geneva, sans-serif !important;
}

.mineco-menu-wrap button.mineco-arrow:hover,
.mineco-menu-wrap button.mineco-arrow:focus {
  background: #141F42!important;
  color: #fff !important;
  border: 0 !important;
  transform: none !important;
}

.mineco-menu-wrap button.mineco-arrow:active {
  transform: scale(0.96) !important;
}

.mineco-menu-wrap button.mineco-arrow:focus-visible {
  outline: 3px solid rgba(255,255,255,.6) !important;
  outline-offset: 2px;
}

.mineco-prev {
  order: -1;
}

.mineco-next {
  order: 1;
}

.mineco-menu-wrap button.mineco-arrow::before {
  display: none !important;
  content: none !important;
}

.mineco-arrow svg {
  display: none !important;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width:1200px){
  .mineco-carousel-container {
    gap: 25px;
    padding: 0 15px 20px 15px;
  }
  
  .mineco-menu-wrap button.mineco-arrow {
    width: 48px !important;
    height: 48px !important;
    margin-top: -24px;
    font-size: 38px !important;
    line-height: 48px !important;
  }
  
  .mineco-icon {
    width: 100px;
    height: 100px;
  }
  
  .mineco-title {
    font-size: 15px;
    padding: 7px 14px;
  }
}

@media (max-width:1024px){
  .mineco-track{ --perPage: 4; }
  
  .mineco-carousel-container {
    gap: 20px;
    padding: 0 15px 20px 15px;
  }
  
  .mineco-menu-wrap button.mineco-arrow {
    width: 46px !important;
    height: 46px !important;
    margin-top: -23px;
    font-size: 36px !important;
    line-height: 46px !important;
  }
  
  .mineco-card {
    flex: 0 0 calc((100% - (var(--perPage) - 1) * 16px) / var(--perPage));
  }
  
  .mineco-card:nth-child(5n) {
    margin-right: 16px;
  }
  
  .mineco-card:nth-child(4n) {
    margin-right: 0;
  }
}

@media (max-width:820px){
  .mineco-track{ --perPage: 3; }
  
  .mineco-carousel-container {
    gap: 18px;
    padding: 0 10px 18px 10px;
  }
  
  .mineco-menu-wrap button.mineco-arrow {
    width: 44px !important;
    height: 44px !important;
    margin-top: -22px;
    font-size: 34px !important;
    line-height: 44px !important;
  }
  
  .mineco-card {
    flex: 0 0 calc((100% - (var(--perPage) - 1) * 14px) / var(--perPage));
    margin-right: 14px;
    padding: 6px;
  }
  
  .mineco-card:nth-child(4n) {
    margin-right: 14px;
  }
  
  .mineco-card:nth-child(3n) {
    margin-right: 0;
  }
  
  .mineco-icon {
    width: 90px;
    height: 90px;
  }
  
  .mineco-title {
    font-size: 14px;
    padding: 6px 12px;
  }
}

@media (max-width:600px){
  .mineco-track{ 
    --perPage: 1;
  }
  
  .mineco-carousel-container {
    gap: 15px;
    padding: 0 8px 18px 8px;
  }
  
  .mineco-carousel {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100%;
  }
  
  .mineco-track {
    display: flex;
    align-items: center;
    width: 100%;
  }
  
  .mineco-menu-wrap button.mineco-arrow {
    width: 42px !important;
    height: 42px !important;
    margin-top: -21px;
    font-size: 32px !important;
    line-height: 42px !important;
  }
  
  .mineco-card {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    margin: 0 !important; /* Eliminar cualquier margen */
    padding: 30px 8px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }
  
  /* Asegurar que los clones también estén centrados */
  .mineco-card[data-clone="1"] {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    margin: 0 !important;
  }
  
  .mineco-icon {
    width: 90px;
    height: 90px;
  }
  
  .mineco-title {
    font-size: 14px;
    padding: 6px 10px;
    max-width: 180px;
  }
}

@media (max-width:420px){
  .mineco-track{ --perPage: 1; }
  
  .mineco-carousel-container {
    gap: 12px;
    padding: 0 8px 15px 8px;
  }
  
  .mineco-carousel {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .mineco-menu-wrap button.mineco-arrow {
    width: 40px !important;
    height: 40px !important;
    margin-top: -20px;
    font-size: 30px !important;
    line-height: 40px !important;
  }
  
  .mineco-card {
    flex: 0 0 100%;
    margin-right: 0;
    padding: 30px 8px;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  
  .mineco-icon {
    width: 100px;
    height: 100px;
  }
  
  .mineco-title {
    font-size: 14px;
    padding: 8px 14px;
    max-width: 200px;
  }
}

/* ========================================
   MODO EDITOR ELEMENTOR
   ======================================== */
.mineco--editor .mineco-card {
  pointer-events: none;
}

/* ========================================
   ACCESIBILIDAD
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  .mineco-track,
  .mineco-card,
  .mineco-icon,
  .mineco-arrow,
  .mineco-title {
    transition: none !important;
    animation: none !important;
  }
}

@media (prefers-contrast: high) {
  .mineco-arrow {
    border-width: 3px;
  }
  
  .mineco-title {
    font-weight: 800;
  }
}