.magic-card {
  padding: 40px;
  background: radial-gradient(circle at top, #1b1b1b, #0a0a0a);
}
.magic-box-title{
  border-bottom: 1px solid aquamarine;
  border-radius: 5px;
}

.magic-title {
  font-family: 'Inter', system-ui, sans-serif;
  text-transform: uppercase;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  color: aquamarine;
  margin-bottom: 40px;
}

.magic-sub{
  font-family: 'Inter', system-ui, sans-serif;
  color: #bbb;
  font-size: 1.2rem;
  font-style: italic;
  font-weight: 400;
  margin-bottom: 20px;
}

.magic-det{
  font-family: 'Inter', system-ui, sans-serif;
  color: #ccc;
  font-size: .9rem;
  font-style: italic;
  font-weight: 300;
  margin-bottom: 20px;
  
}

/* GRID */
.magic-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 60px;
}

/* CARD */
.magic-item {
  position: relative;
  height: 420px;
  border-radius: 26px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 40px 80px rgba(0,0,0,0.45);
}

/* IMAGE */
.magic-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.6s ease, transform 0.8s ease;
}

.magic-item:hover img {
  filter: grayscale(0%);
  transform: scale(1.05);
}

.magic-item.active img {
  filter: grayscale(0%);
  transform: none;
}

/* OVERLAY (solo visual) */
.magic-overlay {
  position: absolute;
  inset: 0;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.5),
    rgba(0,0,0,0.15)
  );
  z-index: 2;
  pointer-events: none;
}

.magic-overlay-det{
  position: absolute;
  inset: 0;
  padding: 20px 32px;
  top: 150px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.3),
    rgba(0,0,0,0.15)
  );
  z-index: 3;
  pointer-events: none;
}

.magic-overlay-det p{
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.85rem;
  color: #bbb;
}

.magic-overlay-det p:nth-child(1),
.magic-overlay-det p:nth-child(3){
  margin: 10px 0;
}

.magic-overlay-det p:nth-child(2),
.magic-overlay-det p:nth-child(4){
  margin-left: 20px;
}

.magic-overlay h3 {
  font-family: 'Inter', system-ui, sans-serif;  
  color: rgb(153, 153, 170);
  font-weight: 700;
  line-height: 1.3;
}

.magic-overlay p {
  font-family: 'Inter', system-ui, sans-serif;
  color: #ccc;
  font-size: 0.9rem;
  color: aquamarine;
}

/* BOTÓN SABER MÁS (DERECHA) */
.magic-btn {
  position: absolute;
  bottom: 28px;
  right: 28px;

  z-index: 10;            /* 🔥 encima de TODO */
  cursor: pointer;
  pointer-events: auto;

  padding: 10px 22px;
  border-radius: 22px;
  border: none;
  background: aquamarine;
  color: #000;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color .3s ease-in-out;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.magic-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
  background: yellow;
}

/* CAJA DE TEXTO */
.magic-box {
  position: absolute;
  
  bottom: 0;
  left: 50%;
  width: 90%;
  height: 50%;

  transform: translate(-50%, 65%);
  opacity: 0;

  background: rgba(15,15,15,0.96);
  border-radius: 22px 22px 0 0;
  padding: 26px;
  color: #d0d0d0;

  z-index: 9;

  transition: transform 0.55s ease, opacity 0.55s ease;

  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.85rem;
  color: #bbb;
}

.magic-item.active .magic-box {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* BOTÓN CERRAR */
.magic-close {
  margin-top: 18px;
  padding: 8px 18px;
  border-radius: 18px;
  border: none;
  cursor: pointer;
  background: yellow;
  color: #000;
  font-weight: 900;
  transform: translate(0, 0);
  transition: transform 0.55s ease, opacity 0.55s ease;
}

.magic-close:hover { background: rgb(145, 145, 24); transform: translate( 0, -10%); }

/* MOBILE */
@media (max-width: 900px) {
  .magic-grid {
    grid-template-columns: 1fr;
  }

  .magic-item img {
    filter: grayscale(0%);
  }
}

@media (max-width: 767px) {
  .magic-card {
    padding: 40px 10px;
  }

  .magic-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
  }

  .magic-sub{
    font-size: 1rem;
    font-weight: 300;
    margin-bottom: 10px;
    text-decoration: underline aquamarine;
  }

  .magic-det{
  font-size: .85rem;
  }

  .magic-det p{
    background: red;
  }

  .magic-overlay-det{
    padding: 20px 10px;
    background: linear-gradient(
      to bottom,
      rgba(0,0,0,0.5),
      rgba(0,0,0,0.15)
    );
  }

  .magic-overlay {
    padding: 32px 10px;
  }

  .magic-overlay h3 {
    font-weight: 600;
    line-height: 1.2;
  }

  .magic-overlay-det p {
    color: #ffffff;
  }

  /* BOTÓN SABER MÁS (DERECHA) */
  .magic-btn {
    bottom: 10px;
    right: 10px;
    padding: 10px 12px;
    font-weight: 500;
  }

  /* CAJA DE TEXTO */
  .magic-box {
    width: 96%;
    padding: 26px 15px;
    z-index: 9;
    color: #ffffff;
  }
}

.magic-card,
.magic-grid,
.magic-item,
.magic-item img,
.magic-box {
  max-width: 100%;
}

.magic-item {
  min-width: 0;
}