.cards-section-action {
  margin: 0 auto;
  padding-top: 80px;;
}

/* Grid externo: 2 cards por fila */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

/* Cada card usa grid interno 55/45 */
.cards-section-action .card {
  display: grid;
  grid-template-columns: 55% 45%;
  align-items: center;
  /*gap: 20px;*/
  width: 100%;
  border-radius: 16px;   /* contorno redondeado */
  overflow: hidden;       /* recorta la imagen que sobresalga */
  background-color: var(--primary-color); /* opcional, color de fondo */
  box-shadow: 0 4px 12px rgba(0,0,0,0.1); /* opcional */
}

.card-image {
  position: relative;
  width: 100%;
  height: 280px;
  /*padding-right: 10%; /* deja espacio hacia el borde derecho */
  box-sizing: border-box; /* para que el padding no aumente el ancho */
    overflow: visible; /* si quieres que la forma se vea fuera del contenedor */
}




/* Card text e image */
.card-text {
  justify-self: start;
  color: white;
  padding: 20px;        /* espacio interno alrededor del contenido */
  box-sizing: border-box; /* asegura que el padding no rompa la proporción 55% */
  /*background-color: #fff; /* opcional: fondo blanco para que se vea separado */
  display: flex;
  flex-direction: column;
  /*justify-content: center; /* centra verticalmente si la card es alta */
  height: 100%;            /* ocupa toda la altura de la card */
}

.card-text .btn{
    display: inline-block;
    background: #fff;
    color: var(--primary-color);
    padding: 0.8rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.card-text .btn:hover{
    background: var(--primary-area-color);
}
.card-text .btn i::before{
  transform: rotate(-45deg);
}

.card-text p {
  color: white;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* asegura que la imagen llene el contenedor */
  display: block;
  clip-path: ellipse(100% 100% at 50% 0%); /* default forma "up" */
}

/* Cada card con su orientación */
.card-image-up img {
  clip-path: ellipse(70% 100% at 50% 0%);
}

.card-image-down img {
  clip-path: ellipse(70% 100% at 50% 100%);
}

.card-image-left img {
  clip-path: ellipse(100% 70% at 0% 50%);
}

.card-image-right img {
  clip-path: ellipse(100% 70% at 100% 50%);
}



/* Responsive */
@media (max-width: 768px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }
  .card {
    grid-template-columns: 1fr; /* apilar card-text y card-image */
  }
  .card-image img {
    clip-path: none;
  }
}



/* Desktop: grid visible, swiper oculto */
.desktop-only { display: grid; }
.mobile-only { display: none !important; }

/* Mobile: invertimos visibilidad y acomodamos card */
@media(max-width: 768px){
  .desktop-only { display: none; }
  .mobile-only { display: block !important; }

  .card-mobile {
    display: flex;
    flex-direction: column;
  }

  .card-mobile .card-image {
    order: 1;
    height: auto;
    margin: auto;
    width: 90%;
  }

  .cards-section-action .card {
    display: block;
  }

  .card-mobile .card-text {
    order: 2;
  }

  .card-image img {
    clip-path: none !important; /* limpieza de formas */
  }

  .cards-section-action .swiper{
    padding-bottom: 100px;
  }

    /* Ocultamos flechas por defecto de swiper */
  .cards-section-action .swiper-button-prev,
  .cards-section-action .swiper-button-next {
    position: absolute !important;
    margin: 0;
    transform: none;
    color: #fff;
    font-size: 20px;
    background: var(--primary-color);
    width: 50px;
    height: 50px;
    border-radius: 50px;
    top: 85%;
  }

  .cards-section-action .swiper-button-next, .cards-section-action .swiper-rtl .swiper-button-prev{
      left: auto;
      right: 30%;
  }
  .cards-section-action .swiper-button-prev, .cards-section-action .swiper-rtl .swiper-button-next {
      left: 30%;
      right: auto;
  }

  .cards-section-action .swiper-pagination-bullet{
    width: 15px;
    height: 15px;
  }


  .cards-section-action .swiper-button-prev:after, .cards-section-action .swiper-rtl .swiper-button-next:after,
  .cards-section-action .swiper-button-next:after, .cards-section-action .swiper-rtl .swiper-button-prev:after {
      content: '';
  }

  .cards-section-action {
    padding-top: 64px;
  }
}


