/* =========================================================
   MC Portfolio — Estilos base
   Paleta del sitio: fondo #0d0d0d, dorado #c9a84c, texto #f0ead6
   ========================================================= */

/* ── Controles: filtros + toggle ── */
.mc-portfolio__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px 0 24px;
  border-bottom: 1px solid rgba(201, 168, 76, 0.2);
  margin-bottom: 0;
}

.mc-portfolio__filters {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.mc-portfolio__filter-label {
  color: rgba(240, 234, 214, 0.5);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-right: 8px;
}

.mc-filter-btn,
.mc-view-btn {
  background: transparent;
  border: none;
  color: rgba(240, 234, 214, 0.5);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 6px 14px;
  transition: color 0.2s ease;
  font-family: inherit;
}

.mc-filter-btn:hover,
.mc-filter-btn.active {
  color: #f0ead6;
}

.mc-filter-dot {
  display: inline-block;
  margin-left: 2px;
}

.mc-portfolio__view-toggle {
  display: flex;
  gap: 2px;
}

.mc-view-btn {
  padding: 5px 14px;
  border: 1px solid transparent;
  border-radius: 20px;
}

.mc-view-btn.active {
  color: #0d0d0d;
  background: #f0ead6;
  border-color: #f0ead6;
}

/* ── Vistas: mostrar/ocultar ── */
.mc-list-view,
.mc-grid-view {
  display: none;
}

.mc-list-view.is-active,
.mc-grid-view.is-active {
  display: block;
}

/* =========================================================
   VISTA LISTA
   ========================================================= */
.mc-list {
  width: 100%;
}

.mc-list__header {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr 140px;
  border-bottom: 1px solid rgba(201, 168, 76, 0.2);
  padding: 10px 0;
  align-items: center;
  height: 36px;        /* altura fija — no crece con el contenido */
  box-sizing: border-box;
}

.mc-list__header > div {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(240, 234, 214, 0.4);
  padding: 0 12px;
  line-height: 1;
}

.mc-list__body {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr 140px;
}

/* Columna de clientes */
.mc-list__col--client.mc-list__body > div,
.mc-list__col--client {
  border-right: 1px solid rgba(201, 168, 76, 0.1);
}

/* ── Filas unificadas (columnas 1, 3, 4) ── */
.mc-list__row {
  height: 52px;
  padding: 0 12px;
  font-size: 14px;
  color: rgba(240, 234, 214, 0.55);
  cursor: pointer;
  border-bottom: 1px solid rgba(201, 168, 76, 0.08);
  transition: color 0.15s ease, background 0.15s ease;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  overflow: hidden;
  white-space: nowrap;
}

/* Resaltado de la fila activa: fondo crema, texto oscuro (como la maqueta) */
.mc-list__row:hover,
.mc-list__row.is-active {
  color: #0d0d0d;
  background: #f0ead6;
}

/* Las letras heredan el color de la fila incluso en hover del link
   (el tema pinta a:hover dorado; aqui debe quedarse negro sobre crema) */
.mc-list__row a,
.mc-list__row a:hover,
.mc-list__row a:focus {
  color: inherit !important;
}

/* Toda la fila navega, no solo el texto */
.mc-list__row { cursor: pointer; }

.mc-list__row.mc-hidden {
  display: none;
}

.mc-list__client-link {
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Columna de imagen — solo el body tiene altura mínima, no el header */
.mc-list__col--image {
  border-right: 1px solid rgba(201, 168, 76, 0.1);
  overflow: hidden;
}

.mc-list__body .mc-list__col--image {
  position: relative;
  min-height: 200px;
}

.mc-list__image-wrap {
  /* ventana de imagen que se desliza siguiendo la fila activa (JS pone translateY) */
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: clamp(220px, 21vw, 400px);
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.55s cubic-bezier(0.22, 0.8, 0.3, 1);
  will-change: transform;
  pointer-events: none;
}

.mc-list__image-wrap.is-active {
  opacity: 1;
}

.mc-list__image-link {
  display: block;
  width: 100%;
  height: 100%;
}

.mc-list__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mc-list__image-placeholder {
  width: 100%;
  height: 100%;
  background: rgba(201, 168, 76, 0.05);
}

/* Columna de nombre del proyecto */
.mc-list__col--project {
  border-right: 1px solid rgba(201, 168, 76, 0.1);
}

/* Columna de tipo */
.mc-list__project-type {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(201, 168, 76, 0.7);
}

/* En estado activo el texto del tipo se oscurece (fondo crema) */
.mc-list__project-type.is-active {
  color: #0d0d0d;
}

/* Sin proyectos */
.mc-no-projects {
  padding: 40px 12px;
  color: rgba(240, 234, 214, 0.4);
  font-size: 13px;
}

/* =========================================================
   VISTA GRID
   ========================================================= */
.mc-grid {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -8px;
  padding-top: 8px;
}

.mc-grid__item {
  width: calc(50% - 16px);
  margin: 8px;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .mc-grid__item {
    width: calc(100% - 16px);
  }
}

@media (min-width: 1200px) {
  .mc-grid__item {
    width: calc(33.333% - 16px);
  }
}

.mc-grid__card {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #1a1a1a;
  text-decoration: none;
  cursor: pointer;
}

.mc-grid__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.mc-grid__card:hover img {
  transform: scale(1.04);
}

.mc-grid__image-placeholder {
  width: 100%;
  height: 100%;
  background: rgba(201, 168, 76, 0.05);
}

.mc-grid__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px 16px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 2px;
  /* info del proyecto siempre visible (todas las resoluciones) */
  opacity: 1;
}

.mc-grid__client {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c9a84c;
}

.mc-grid__title {
  font-size: 15px;
  color: #f0ead6;
  font-weight: 600;
  line-height: 1.3;
}

.mc-grid__type {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(240, 234, 214, 0.55);
}

/* =========================================================
   PÁGINA DE DETALLE — Scroll horizontal
   ========================================================= */
.mc-single {
  overflow: hidden;
  height: 100vh;
  position: relative;
}

.mc-single__track {
  display: flex;
  height: 100%;
  will-change: transform;
}

.mc-single__section {
  flex-shrink: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
}

/* Sección hero (primera) */
.mc-single__hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100%;
  width: 100%;
}

.mc-single__hero-left {
  padding: 60px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mc-single__hero-right {
  position: relative;
  overflow: hidden;
}

.mc-single__hero-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mc-single__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(240, 234, 214, 0.5);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid rgba(240, 234, 214, 0.3);
  border-radius: 20px;
  padding: 6px 16px;
  transition: color 0.2s, border-color 0.2s;
  align-self: flex-start;
}

.mc-single__back:hover {
  color: #f0ead6;
  border-color: #f0ead6;
}

.mc-single__title-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.mc-single__type {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c9a84c;
}

.mc-single__title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  color: #f0ead6;
  line-height: 1.1;
  margin: 0;
}

.mc-single__thumb {
  width: 160px;
  height: 100px;
  object-fit: cover;
  border: 1px solid rgba(201, 168, 76, 0.2);
}

.mc-single__credits {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mc-single__credit-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c9a84c;
  margin-bottom: 2px;
}

.mc-single__credit-value {
  font-size: 14px;
  color: #f0ead6;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Secciones de contenido (scroll horizontal) */
.mc-single__content-section {
  padding: 60px 80px;
  box-sizing: border-box;
}

.mc-single__content-section img {
  max-height: 80vh;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

.mc-single__content-section .wp-block-gallery {
  display: flex;
  gap: 12px;
  align-items: center;
}

.mc-single__content-section .wp-block-gallery img {
  height: 60vh;
  width: auto;
}

.mc-single__content-section p {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(240, 234, 214, 0.8);
  max-width: 520px;
}

/* Indicador de scroll horizontal */
.mc-single__scroll-hint {
  position: fixed;
  bottom: 28px;
  right: 32px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(240, 234, 214, 0.35);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  transition: opacity 0.4s;
}

.mc-single__scroll-hint::after {
  content: '→';
  font-size: 14px;
}

/* ── Lista MOVIL simplificada (la genera el JS): imagen izq + textos der ── */
.mc-list-mobile { display: none; }
@media (max-width: 900px) {
  .mc-portfolio__filter-label { margin-left: 14px; }
  .mc-list-view.is-active .mc-list { display: none; }
  .mc-list-view.is-active .mc-list-mobile { display: block; }
  .mc-lm__row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 2px;
    border-bottom: 1px solid rgba(201, 168, 76, 0.14);
    text-decoration: none;
  }
  .mc-lm__img {
    width: 96px;
    height: 64px;
    object-fit: cover;
    flex: 0 0 96px;
    display: block;
    background: rgba(201, 168, 76, 0.05);
  }
  .mc-lm__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .mc-lm__client { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: #c9a84c; }
  .mc-lm__name { font-size: 15px; font-weight: 700; color: #f0ead6; line-height: 1.25; }
  .mc-lm__type { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(201, 168, 76, 0.7); }
  .mc-lm__row.mc-hidden { display: none; }
}
