/* ============================================================
   custom.css — DesignRule
   Estilos PROPIOS (no del template). Acá van:
   - Grilla de proyectos (works) que reemplaza el carrusel
   - Toggle de idioma ES/EN
   - Ajustes responsive
   No tocar plugins.css ni style.css del vendor para esto.
   ============================================================ */

/* ---------- Grilla de proyectos (works) ---------- */
.dr-works {
  padding: 20px 0 40px;
}

.dr-works-title {
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 700;
  color: rgba(25, 27, 29, .15);
  margin: 0 0 40px;
  line-height: 1;
}

.dr-works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px 40px;
}

.dr-work {
  display: block;
  text-decoration: none;
  color: inherit;
}

.dr-work-img {
  overflow: hidden;
  border-radius: 10px;
  aspect-ratio: 4 / 3;
  background: #f1f1f1;
}

.dr-work-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s cubic-bezier(.16, 1, .3, 1);
}

.dr-work:hover .dr-work-img img {
  transform: scale(1.05);
}

.dr-work-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.dr-work-title::after {
  content: "\2197"; /* flecha ↗ */
  font-size: 1.1rem;
  opacity: 0;
  transform: translate(-6px, 6px);
  transition: opacity .3s ease, transform .3s ease;
}

.dr-work:hover .dr-work-title::after {
  opacity: 1;
  transform: translate(0, 0);
}

.dr-work-cat {
  color: rgba(25, 27, 29, .6);
  margin-top: 6px;
  font-size: 1rem;
}

/* Placeholder cuando todavia no hay imagen del proyecto (ej: Trece Cafe) */
.dr-work-img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ececec 0%, #dcdcdc 100%);
}

.dr-work-img--placeholder span {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: rgba(25, 27, 29, .35);
  text-align: center;
  padding: 0 16px;
}

/* Tarjeta de proyecto todavia sin dominio (ej: Mando): no es clickeable */
.dr-work--soon {
  cursor: default;
}

.dr-work--soon .dr-work-img img {
  transition: none;
}

.dr-work--soon:hover .dr-work-img img {
  transform: none;
}

.dr-work--soon .dr-work-title::after {
  content: none;
}

.dr-work-soon-badge {
  display: inline-block;
  margin-left: 10px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(25, 27, 29, .55);
  border: 1px solid rgba(25, 27, 29, .22);
  border-radius: 999px;
  padding: 3px 10px;
  vertical-align: middle;
}

/* ---------- Toggle de idioma ES/EN ---------- */
.dr-lang {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 22px;
  font-size: 13px;
  letter-spacing: .04em;
}

.dr-lang button {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  color: rgba(25, 27, 29, .45);
  padding: 2px 5px;
  transition: color .2s ease;
}

.dr-lang button:hover {
  color: rgba(25, 27, 29, .8);
}

.dr-lang button.active {
  color: #191b1d;
  font-weight: 600;
}

.dr-lang .dr-lang-sep {
  color: rgba(25, 27, 29, .25);
}

/* Toggle de idioma en mobile: el de desktop vive en .header-widgets, que el
   template oculta en <=450px. Este clon aparece solo ahi, al lado del menu. */
.dr-lang--mobile {
  display: none;
}

@media (max-width: 450px) {
  .header-wrapper {
    position: relative;
  }
  .dr-lang--mobile {
    display: inline-flex;
    position: absolute;
    top: 50%;
    right: 90px;
    transform: translateY(-50%);
    margin: 0;
    z-index: 30;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .dr-works-grid {
    gap: 36px 28px;
  }
}

@media (max-width: 767px) {
  .dr-works-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .dr-work-title {
    font-size: 1.3rem;
  }
  /* En mobile dejamos siempre visible la flecha del proyecto */
  .dr-work-title::after {
    opacity: 1;
    transform: none;
  }
  .dr-lang {
    margin-right: 14px;
  }
}
