:root {
  --primary: #be0c11;
  --primary-light: #ff2a2f;
  --white: #ffffff;
}

/* BASE */
section * {
  font-family: 'Poppins', sans-serif!important;
}

.dp-arrow-wrap {
  display: flex;
  align-items: center;
}

.dp-arrow-bounce {
  display: block;
  animation: dpArrowFloat 1.8s ease-in-out infinite;
  transform-origin: center;
}

@keyframes dpArrowFloat {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(12px);
  }
  100% {
    transform: translateY(0);
  }
}

.team-hero {
  background: #f5f5f5;
  padding: 80px 0;
}

.hero-img {
  width: 100%;
  border-radius: 10px;
}

.team-hero h2 {
  font-size: 40px;
  font-weight: 700;
}

.scroll-indicator {
  margin-top: 20px;
  color: #c00;
  font-size: 22px;
}

.ceo-section {
  background: #e8e8e8;
  padding: 80px 0;
}

.ceo-img-wrap {
  position: relative;
  display: inline-block;
}

.ceo-img-wrap img {
  width: 280px;
  border-radius: 10px;
  position: relative;
  z-index: 2;
}

/* detalle rojo */
.ceo-img-wrap::before {
  content: "";
  position: absolute;
  right: -15px;
  top: -15px;
  width: 100%;
  height: 100%;
  background: #bc0a24;
  z-index: 1;
  border-radius: 10px;
}

.ceo-img-wrap img {
  transform: translateY(0);
  transition: transform 0.6s ease;
}

.ceo-section:hover .ceo-img-wrap img {
  transform: translateY(-5px) scale(1.02);
}

.team-section {
  padding: 60px 0;
  background: #f5f5f5;
  text-align: center;
}

.team-title {
  color: #c00;
  font-weight: 700;
  margin-bottom: 40px;
}

/* GRID */
.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

/* CARD */
.team-card {
  width: 200px;
  text-align: center;
  position: relative;
}

.team-card img {
  width: 100%;
  border-radius: 6px;
  filter: grayscale(100%);
  transition: 0.3s;
}

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

.team-card h6 {
  font-size: 14px;
  margin: 6px;
}

.team-card span {
  font-size: 14px;
  text-transform: uppercase;
  color: #c00;
}

.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
}

.ceo-section .team-card {
  width: 0;
}

.team-card {
  width: 160px;
}


/* BOTON */
.open-modal {
  margin-top: 5px;
  width: 24px;
  height: 24px;
  border: 1px solid #373737;
  background: transparent;
  color: #c00;
  border-radius: 50%;
  cursor: pointer;
  display: block;
  margin: 4px auto;
}

.open-modal {
  transition: all 0.3s ease;
}

.open-modal:hover {
  transform: scale(1.2) rotate(90deg);
}

.team-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.team-modal.active {
  display: flex;
}

.modal-content {
  background: #fff;
  border-radius: 15px;
  padding: 30px;
  max-width: 999px;
  width: 90%;
  position: relative;
}

.modal-body {
  display: flex;
  gap: 20px;
  align-items: center;
}

.modal-body img {
  width: 180px;
  border-radius: 10px;
}

#modalName {
  color: #c00;
}

#modalRole {
  margin-bottom: 10px;
}

/* CLOSE */
.close-modal {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 25px;
  cursor: pointer;
}

.why-section {
  padding: 80px 0;
  background: #f5f5f5;
}

.why-img {
  width: 100%;
  border-radius: 10px;
}

/* =========================
   UNIVERSAL VIEWER
========================= */
.universal-viewer {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.universal-viewer.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.universal-viewer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(4px);
}

.universal-viewer__content {
  position: relative;
  z-index: 2;
  width: min(95vw, 1200px);
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.universal-viewer__media {
  width: 100%;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.universal-viewer__media img,
.universal-viewer__media video {
  max-width: 100%;
  max-height: 85vh;
  width: auto;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  object-fit: contain;
  background: #000;
}

.universal-viewer__media video {
  width: auto;
  min-width: min(90vw, 420px);
}

.universal-viewer__close {
  position: absolute;
  top: -8px;
  right: 0;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  transition: transform 0.2s ease, background 0.2s ease;
}

.universal-viewer__close:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.05);
}

/* cursor bonito para indicar que se puede ampliar */
[data-lightbox] {
  cursor: pointer;
}

/* en movil */
@media (max-width: 768px) {
  .universal-viewer__content {
    width: 100vw;
    padding: 14px;
  }

  .universal-viewer__close {
    top: 10px;
    right: 10px;
    position: fixed;
  }

  .universal-viewer__media img,
  .universal-viewer__media video {
    max-height: 80vh;
    border-radius: 10px;
  }
}