/* =========================
   GRID SERVICIOS
========================= */

.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.tech-card {
  background: var(--bgc-card);
  padding: 2rem;
  border-radius: var(--border-r);
  display: flex;
  flex-direction: column;
  
}

.tech-card h4 {
  margin-bottom: 1rem;
}

.tech-card p {
  font-size: var(--fs-small);
  color: var(--color-text);
  margin-bottom: 2rem;
}

.tech-btn {
  margin-top: auto;
  padding: 1rem;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: var(--color-primary);
  color: white;
  transition: all 0.5s ease;
  font-size: var(--fs-small);
  width: fit-content;
}

.tech-btn:hover {
  background-color: red;
}

/* MODAL */

.tech-modal {
  position: fixed;
  inset: 0;

  background: rgba(0, 0, 0, 0.75);

  display: flex;
  justify-content: center;
  align-items: center;

  opacity: 0;
  visibility: hidden;

  transition: 0.3s ease;

  z-index: 9999;
}

.tech-modal.active {
  opacity: 1;
  visibility: visible;
}

.tech-modal-content {
  width: 90%;
  max-width: 800px;

  background: var(--bgc-card);
  color: var(--color-text);
  padding: 2rem;
  border-radius: var(--border-r);
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
}

.tech-modal-content h2 {
  color: var(--color-primary);
  margin-bottom: 2rem;
  text-align: center;
}

.tech-modal-content p {
  white-space: pre-line;
  line-height: 1.8;
}

.tech-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 2.5rem;
  cursor: pointer;
}

.tech-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);

  display: flex;
  justify-content: center;
  align-items: center;

  opacity: 0;
  visibility: hidden;

  transition: 0.3s ease;

  z-index: 9999;
}

.tech-modal.active {
  opacity: 1;
  visibility: visible;
}

.tech-modal-content {
  transform: translateY(20px);
  transition: 0.3s ease;
}

.tech-modal.active .tech-modal-content {
  transform: translateY(0);
}

.tech-btn,
.tech-modal-close {
  cursor: pointer;
}

/* =========================
   VIDEOS
========================= */

.tech-videos {
  margin-top: 6rem;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.video-card {
  background: var(--bgc-card);
  border-radius: var(--border-r);
  overflow: hidden;
}

.video-card iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
}

.video-card h4 {
  padding: 1.5rem;
  text-align: center;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1024px) {
  .video-grid {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 900px) {
  .tech-grid {
    grid-template-columns: 1fr;
  }

  .tech-card {
    text-align: center;
  }

  .tech-btn {
    margin: 1.5rem auto 0 auto;
  }
}

/* MOBILE */
@media (max-width: 768px) {
  .tech-carousel {
    width: 100%;
    max-width: 100%;
    height: 26rem;
  }

  .tech-carousel img {
    object-fit: cover;
  }
}
