/* =========================================================
   CLOUD-TECNOLOGIES — card.css
   Tarjeta 3D flip con glassmorphism y sombras premium
   ========================================================= */

/* =========================================================
   CONTENEDOR CENTRADOR
   ========================================================= */
.card-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  overflow: hidden;
  padding: 24px 16px;
}

/* =========================================================
   CARD PRINCIPAL — Efecto 3D flip
   ========================================================= */
.card {
  position: relative;
  width: 100%;
  max-width: 1000px;
  height: auto;
  aspect-ratio: 16 / 9;
  background-color: rgba(17, 17, 24, 0.9);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  perspective: 1000px;

  /* Sombra elevada premium */
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.35),
    0 0 30px rgba(234, 88, 12, 0.08),
    0 0 0 1px rgba(234, 88, 12, 0.12);

  /* Borde glassmorphism sutil */
  border: 1px solid rgba(234, 88, 12, 0.12);

  transition:
    transform    1.1s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    box-shadow   0.4s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  margin: 0 auto;
}

/* =========================================================
   IMAGEN PRINCIPAL
   ========================================================= */
.card .img_principal {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
  transition: all 1.1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  filter: brightness(0.9) saturate(1.1);
}

/* =========================================================
   HOVER — Elevación + glow naranja
   ========================================================= */
.card:hover {
  transform: scale(1.02) translateY(-4px);
  box-shadow:
    0 35px 70px rgba(0, 0, 0, 0.4),
    0 0 50px rgba(234, 88, 12, 0.18),
    0 0 0 1px rgba(234, 88, 12, 0.30);
  border-color: rgba(234, 88, 12, 0.30);
}

/* =========================================================
   CARD CONTENT — Panel flip (glassmorphism)
   ========================================================= */
.card__content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: clamp(20px, 3vw, 36px);
  box-sizing: border-box;

  /* Glassmorphism sobre fondo oscuro */
  background: rgba(10, 10, 15, 0.93);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  transform: rotateX(-90deg);
  transform-origin: bottom;
  transition: all 1.1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  justify-content: center;

  /* Borde superior naranja al revelar */
  border-top: 2px solid var(--ct-orange);
}

.card:hover .card__content {
  transform: rotateX(0deg);
}

/* =========================================================
   TÍTULO DE LA CARD
   ========================================================= */
.card__title {
  margin: 0 0 12px;
  font-size: clamp(18px, 3.5vw, 26px);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-align: center;

  /* Gradiente naranja */
  background: linear-gradient(135deg, var(--ct-orange), var(--ct-orange-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card:hover .img_principal {
  scale: 0;
}

/* =========================================================
   DESCRIPCIÓN
   ========================================================= */
.card__description {
  margin: clamp(8px, 1.5vw, 14px) 0;
  font-size: clamp(13px, 1.8vw, 15px);
  color: var(--ct-text-muted);
  line-height: 1.7;
  text-align: center;
}

.card__description span {
  color: var(--ct-orange-light);
  font-weight: 600;
}

/* =========================================================
   IMAGEN SECUNDARIA
   ========================================================= */
.image-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  margin-top: auto;
  overflow: hidden;
}

.img-secondary {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(200px, 80%, 600px);
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.35));
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (min-width: 1200px) {
  .card { aspect-ratio: 16 / 9; }
  .image-container { padding-top: 40%; }
  .img-secondary { width: 70%; }
}

/* Tablets */
@media (max-width: 991px) {
  .card {
    width: 85%;
    aspect-ratio: 3 / 2;
  }
  .image-container,
  .img-secondary { display: none; }
  .card__content { padding: 24px; }
}

/* Móviles */
@media (max-width: 767px) {
  .card {
    width: 90%;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
  }
  .card__content {
    padding: 18px;
    justify-content: center;
  }
  .image-container,
  .img-secondary { display: none; }
}

/* Móviles pequeños */
@media (max-width: 480px) {
  .card {
    width: 95%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
  }
  .card__content { padding: 14px; }
  .card__title { margin-bottom: 8px; }
  .card:hover { transform: scale(1.01) translateY(-2px); }
}

/* =========================================================
   PREFERS-REDUCED-MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .card,
  .card .img_principal,
  .card__content {
    transition: none !important;
    animation: none !important;
  }
}