.flip-card {
      width: 350px;
      height: 320px;
      perspective: 1000px;
    }

    .flip-inner {
      position: relative;
      width: 100%;
      height: 100%;
      transition: transform 0.8s;
      transform-style: preserve-3d;
    }

    .flip-card:hover .flip-inner {
      transform: rotateY(180deg);
    }

    .flip-front, .flip-back {
      position: absolute;
      width: 100%;
      height: 100%;
      border-radius: 3px;
      overflow: hidden;
      backface-visibility: hidden;
    }

    .flip-front {
      display: flex;
    }

    .flip-front img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .flip-back {
      transform: rotateY(180deg);
      display: flex;
      justify-content: center;
      align-items: center;
      position: relative;
    }

    /* Imagen compartida en back */
    .flip-back img {
      position: absolute;
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: filter 0.5s ease;
      z-index: 0;
      filter: brightness(1); /* normal al inicio */
    }

    /* Al voltear, imagen más opaca */
    .flip-card:hover .flip-back img {
      filter: brightness(0.6); /* ✅ menos brillo al voltear */
    }

    .back-content {
      position: relative;
      z-index: 1;
      text-align: center;
      color: #fff;
    }

    .back-content h2 {
      margin-bottom: 10px;
    }

    .category-btn {
      display: inline-block;
      padding: 10px 20px;
      background: #ffffff;
      color: #333;
      border-radius: 25px;
      text-decoration: none;
      font-weight: bold;
      transition: background 0.3s ease, color 0.3s ease, transform 0.2s;
    }

    .category-btn:hover {
      background: #00c8ff;
      color: #fff;
      transform: scale(1.05);
    }
    
    .highlight-btn {
  padding: 12px 28px;
  background: transparent;
  border: 2px solid #ecdddd;
    border-top-color: rgb(236, 221, 221);
    border-right-color: rgb(236, 221, 221);
    border-bottom-color: rgb(236, 221, 221);
    border-left-color: rgb(236, 221, 221);
  color: #333;
  font-weight: bold;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  text-transform: uppercase;
}


   .highlight-btn:hover {
  border-color: #fff;
  color: #FFF;
  box-shadow: 0 0 10px rgba(27, 112, 202, 0.4);
  transform: scale(1.05);
}

 .image-text {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      margin: 0;
      color: white;
      font-size: 35px;
      font-weight: bold;
      text-align: center;
      white-space: nowrap;
    }
/**************/
.front-btn-responsive {
  display: none;
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  text-transform: uppercase;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  z-index: 2;
}

.front-btn-responsive:hover {
  background-color: #00c8ff;
  color: #fff;
  box-shadow: 0 0 10px rgba(0, 200, 255, 0.4);
}

@media (max-width: 768px) {
 .front-btn-responsive {
    display: inline-block;
    font-size: 14px;            /* texto más pequeño */
    padding: 8px 16px;          /* menos padding */
    bottom: 15px;               /* menos espacio inferior */
    border-width: 1.5px;        /* borde más fino */
  }

  .image-text {
    font-size: 22px;            /* tamaño de texto más chico */
    white-space: normal;        /* permite salto de línea */
    max-width: 90%;             /* que no se desborde */
    padding: 0 10px;            /* espacio lateral interno */
  }

  .flip-card {
    width: 90%;                 /* carta más adaptable */
    height: 280px;              /* menos alta para móvil */
    margin: 0 auto;             /* centrado horizontal */
  }
}

.image-text, .back-content h2 {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

@media (max-width: 768px) {
  .flip-inner {
    transform: rotateY(180deg) !important; /* muestra parte trasera directamente */
    transition: none;
  }

  .flip-card:hover .flip-inner {
    transform: rotateY(180deg); /* asegura que no cambie en hover */
  }

  .flip-front {
    display: none !important; /* oculta parte frontal */
  }

  .flip-back .highlight-btn {
    display: inline-block !important; /* asegúrate que se muestre el botón trasero */
  }

  .front-btn-responsive {
    display: none !important; /* oculta el botón frontal responsivo */
  }
}

