/* ============================================
   CLÍNICA VETERINARIA SILLA — Equipo
   ============================================ */

#equipo {
  position: relative;
}

.eq {
  background: var(--color-bg);
}

/* ─── HEADER ─── */
.eq__header {
  text-align: center;
  margin-bottom: 72px;
}

.eq__header-label {
  font-family: var(--font-accent);
  font-size: var(--text-xs);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.eq__header-label::before,
.eq__header-label::after {
  content: '';
  display: block;
  width: 36px;
  height: 1px;
  background: var(--color-gold);
}

.eq__header-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 300;
  color: var(--color-text);
  line-height: 1.1;
  margin-bottom: 14px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease 0.15s, transform 0.7s ease 0.15s;
}

.eq__header-intro {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 300;
  color: var(--color-text-mid);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.8;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease 0.3s, transform 0.7s ease 0.3s;
}

.eq__header.visible .eq__header-label,
.eq__header.visible .eq__header-title,
.eq__header.visible .eq__header-intro {
  opacity: 1;
  transform: translateY(0);
}

/* ─── FILA ─── */
.eq__row {
  position: relative;
  max-width: 1000px;
  margin: 0 auto 60px;
}

.eq__row:last-child { margin-bottom: 0; }

/* Franja detrás — 80px, ancho completo de pantalla */
.eq__row-stripe {
  position: absolute;
  left: 50%;
  right: auto;
  transform: translateX(-50%) translateY(-50%);
  width: 100vw;
  height: 80px;
  top: 50%;
  background: var(--color-bg-alt);
  z-index: 0;
}

/* ─── GRID ─── */
.eq__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 45px;
  position: relative;
  z-index: 1;
  padding: 40px 0;
}

/* ─── TARJETA ─── */
.eq__card {
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.eq__card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Escalonado fila 1 */
.eq__row:nth-child(2) .eq__card:nth-child(1) { margin-top: 40px; transition-delay: 0.0s; }
.eq__row:nth-child(2) .eq__card:nth-child(2) { margin-top: 0px;  transition-delay: 0.15s; }
.eq__row:nth-child(2) .eq__card:nth-child(3) { margin-top: 60px; transition-delay: 0.3s; }

/* Escalonado fila 2 */
.eq__row:nth-child(3) .eq__card:nth-child(1) { margin-top: 20px; transition-delay: 0.1s; }
.eq__row:nth-child(3) .eq__card:nth-child(2) { margin-top: 70px; transition-delay: 0.25s; }
.eq__row:nth-child(3) .eq__card:nth-child(3) { margin-top: 10px; transition-delay: 0.4s; }

/* Foto — tamaño igual */
.eq__card-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}

.eq__card-photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  transition: opacity 0.3s ease;
}

.eq__card-photo-hover {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.eq__card:hover .eq__card-photo { opacity: 0; }
.eq__card:hover .eq__card-photo-hover { opacity: 1; }

/* Línea dorada */
.eq__card-img::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--color-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
  z-index: 2;
}

.eq__card:hover .eq__card-img::after { transform: scaleX(1); }

/* Info */
.eq__card-info { padding: 14px 0 0; text-align: center; width: 100%; }

.eq__card-name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: 4px;
}

.eq__card-role {
  font-family: var(--font-accent);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gold);
}

/* ─── SIDEBAR ─── */
.eq-sidebar {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 400px;
  background: var(--color-bg);
  z-index: 2000;
  transform: translateX(100%);
  transition: transform 0.2s ease-out;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 40px rgba(28, 24, 20, 0.12);
  overflow: hidden;
  will-change: transform;
}

.eq-sidebar.open { transform: translateX(0); }

.eq-sidebar__img {
  width: 100%;
  height: 350px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center top;
  position: relative;
}

.eq-sidebar__img::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(to top, var(--color-bg), transparent);
}

.eq-sidebar__body {
  padding: 24px 36px 40px;
  overflow-y: auto;
  flex: 1;
}

.eq-sidebar__name {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 300;
  color: var(--color-gold);
  margin-bottom: 6px;
}

.eq-sidebar__role {
  font-family: var(--font-accent);
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 18px;
}

.eq-sidebar__line {
  width: 40px;
  height: 1px;
  background: var(--color-gold);
  margin-bottom: 18px;
}

.eq-sidebar__text {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 300;
  color: var(--color-text-mid);
  line-height: 1.85;
  white-space: pre-line;
}

.eq-sidebar__close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  background: rgba(247, 244, 239, 0.92);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--color-text);
  z-index: 10;
  transition: background 0.2s ease, color 0.2s ease;
  font-family: var(--font-body);
}

.eq-sidebar__close:hover {
  background: var(--color-gold);
  color: var(--color-white);
}

/* Overlay */
.eq-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 12, 0.4);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  will-change: opacity;
}

.eq-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* ─── RESPONSIVE ─── */

/* ── TABLET (481px - 900px): 2 columnas ── */
@media (max-width: 900px) and (min-width: 481px) {

  .eq { padding: 60px 24px 40px; }

  /* Sin franjas */
  .eq__row-stripe { display: none; }

  /* Sin escalonado */
  .eq__row:nth-child(2) .eq__card,
  .eq__row:nth-child(3) .eq__card { margin-top: 0 !important; }

  /* Reducir separación entre filas */
  .eq__row { margin-bottom: 0; }

  /* 2 columnas, mismo tamaño */
  .eq__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    padding: 20px 0;
  }

  /* Foto misma altura en todas */
  .eq__card-img { aspect-ratio: 3 / 4; }

  /* Sidebar estrecho */
  .eq-sidebar { width: 340px; }
}

/* ── MÓVIL (≤480px): 1 columna ── */
@media (max-width: 480px) {

  .eq { padding: 48px 16px 40px; }

  /* Sin franjas */
  .eq__row-stripe { display: none; }

  /* Sin escalonado */
  .eq__row:nth-child(2) .eq__card,
  .eq__row:nth-child(3) .eq__card { margin-top: 0 !important; }

  .eq__row { margin-bottom: 0; }

  .eq__grid {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 16px 0;
  }

  .eq__card-img { aspect-ratio: 3 / 4; }

  .eq__header-title { font-size: var(--text-2xl); }

  /* Sidebar fullscreen */
  .eq-sidebar { width: 100%; }
}

/* ─── FLAT GRID — oculto en desktop, visible en tablet/móvil ─── */
.eq__flat-grid {
  display: none;
}

/* TABLET */
@media (max-width: 900px) and (min-width: 481px) {
  /* Ocultar filas de desktop */
  .eq__row { display: none; }

  /* Mostrar flat grid */
  .eq__flat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 24px;
  }

  /* Último impar — misma anchura que los demás, alineado a la izquierda */
  .eq__flat-grid .eq__card:last-child:nth-child(odd) {
    grid-column: 1 / 2;
  }

  .eq__flat-grid .eq__card-img {
    aspect-ratio: 3 / 4;
  }
}

/* MÓVIL */
@media (max-width: 480px) {
  .eq__row { display: none; }

  .eq__flat-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 16px 16px;
  }

  .eq__flat-grid .eq__card-img {
    aspect-ratio: 3 / 4;
  }
}