/* Tarjetas editorial #proyectos: cabecera taupé, imagen, pie = fondo sección, marco blanco, barra naranja */

/* Cuadrícula: misma receta que #servicios.g6-services-s3::before (continuidad visual) */
body.g6-brand #proyectos.wpo-project-section-s3 {
  position: relative;
  isolation: isolate;
}

body.g6-brand #proyectos.wpo-project-section-s3::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg, rgba(114, 108, 99, 0.07) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(0deg, rgba(114, 108, 99, 0.055) 0 1px, transparent 1px 48px);
  background-size: 100% 100%;
  opacity: 0.55;
}

body.g6-brand #proyectos.wpo-project-section-s3 .container-fulid {
  position: relative;
  z-index: 1;
}

body.g6-brand .g6-editorial-project-card {
  --g6-card-header: #736d64;
  --g6-card-ink-footer: #555555;
  --g6-card-frame: rgba(255, 255, 255, 0.95);

  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: var(--g6-card-header);
}

body.g6-brand .g6-editorial-project-card:hover,
body.g6-brand .g6-editorial-project-card:focus-visible {
  text-decoration: none;
  color: inherit;
  outline: none;
}

body.g6-brand .g6-editorial-project-card:focus-visible {
  box-shadow: 0 0 0 3px var(--g6-accent, #fe3b1f);
}

/* Marco blanco (z-index 3); la barra va en ::before con z 5 para quedar “encima” de la regla */
body.g6-brand .g6-editorial-project-card::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid var(--g6-card-frame);
  pointer-events: none;
  z-index: 3;
}

/* Barra naranja: más alta, centrada en la línea blanca inferior del marco (inset 12px) */
body.g6-brand .g6-editorial-project-card::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translate(-50%, 50%);
  width: min(38%, 12rem);
  height: 8px;
  background: var(--g6-orange, #fe3b1f);
  z-index: 5;
  pointer-events: none;
  border-radius: 1px;
}

body.g6-brand .g6-editorial-project-card .g6-card-header {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  padding: 28px 28px 32px;
  text-align: center;
  background: var(--g6-card-header);
}

body.g6-brand .g6-editorial-project-card .g6-card-kicker {
  display: block;
  margin: 0 0 8px;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: clamp(0.7rem, 0.9vw, 0.88rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #ffffff !important;
  line-height: 1.35;
}

body.g6-brand .g6-editorial-project-card .g6-card-title-serif {
  margin: 0;
  font-weight: 500;
  color: #ffffff !important;
}

body.g6-brand .g6-editorial-project-card .g6-card-header .g6-card-title-serif {
  color: #ffffff !important;
}

body.g6-brand .g6-editorial-project-card .image {
  position: relative;
  z-index: 2;
  width: 100%;
  flex: 0 0 auto;
  aspect-ratio: 4 / 5;
  min-height: 220px;
  max-height: min(52vh, 460px);
  overflow: hidden;
  background: #2a2825;
}

body.g6-brand .g6-editorial-project-card .g6-card-footer {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  padding: 26px 24px 32px;
  text-align: center;
  background: var(--g6-surface-warm) !important;
}

body.g6-brand .g6-editorial-project-card .g6-card-zone {
  margin: 0 0 6px;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: clamp(0.7rem, 0.85vw, 0.8rem);
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--g6-card-ink-footer) !important;
  line-height: 1.4;
}

body.g6-brand .g6-editorial-project-card .g6-card-desc {
  margin: 0 auto 0;
  padding-bottom: 1.15rem;
  max-width: 32ch;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: clamp(0.8rem, 0.95vw, 0.9rem);
  font-weight: 400;
  line-height: 1.45;
  color: #666666 !important;
}

body.g6-brand #proyectos .g6-editorial-project-card .image picture {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

body.g6-brand #proyectos .g6-editorial-project-card .image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: none;
  opacity: 1 !important;
  filter: none !important;
  transition:
    transform 0.36s var(--g6-ease-out, cubic-bezier(0.25, 1, 0.5, 1)),
    filter 0.36s var(--g6-ease-out, cubic-bezier(0.25, 1, 0.5, 1));
}

body.g6-brand #proyectos .g6-editorial-project-card:hover .image img,
body.g6-brand #proyectos .g6-editorial-project-card:focus-within .image img {
  transform: scale(1.035);
  filter: brightness(1.04);
}

@media (max-width: 575px) {
  body.g6-brand .g6-editorial-project-card .image {
    max-height: none;
    aspect-ratio: 3 / 4;
  }
}

/* Socios (#socios): mismo cuerpo que galería; marco invertido (fondo claro, trazo piedra), barra naranja igual */
body.g6-brand .g6-editorial-project-card.g6-editorial-project-card--socios {
  --g6-card-header: var(--g6-surface-warm);
  --g6-card-ink-footer: #555555;
  --g6-card-frame: rgba(114, 108, 99, 0.45);
  background: #ffffff;
}

body.g6-brand .g6-editorial-project-card.g6-editorial-project-card--socios .g6-card-header {
  background: var(--g6-surface-warm) !important;
}

body.g6-brand .g6-editorial-project-card.g6-editorial-project-card--socios .g6-card-kicker {
  color: var(--g6-ink) !important;
  opacity: 0.92;
}

body.g6-brand .g6-editorial-project-card.g6-editorial-project-card--socios .g6-card-title-serif,
body.g6-brand .g6-editorial-project-card.g6-editorial-project-card--socios .g6-card-header .g6-card-title-serif {
  color: var(--g6-ink) !important;
}

body.g6-brand .g6-editorial-project-card.g6-editorial-project-card--socios .g6-card-footer {
  background: #ffffff !important;
}

/* Formulario: misma piel que #proyectos (cabecera taupé, bloque .image, pie crema) */
body.g6-brand .g6-editorial-project-card.g6-editorial-project-card--form {
  max-width: 44rem;
  margin-left: auto;
  margin-right: auto;
  cursor: default;
}

body.g6-brand .g6-editorial-project-card.g6-editorial-project-card--form .g6-card-header {
  padding: 28px 28px 32px;
}

body.g6-brand .g6-editorial-project-card.g6-editorial-project-card--form .image {
  position: relative;
  z-index: 2;
  width: 100%;
  flex: 0 0 auto;
  aspect-ratio: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
  background: #ffffff;
  padding: 22px 22px 12px;
}

body.g6-brand .g6-editorial-project-card.g6-editorial-project-card--form .g6-form-card__lede {
  margin: 0 auto 1.1rem;
  max-width: 32ch;
  text-align: center;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: clamp(0.8rem, 0.9vw, 0.92rem) !important;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #666666 !important;
}

body.g6-brand .g6-editorial-project-card.g6-editorial-project-card--form .g6-card-footer {
  padding: 26px 24px 32px;
}

body.g6-brand .g6-editorial-project-card.g6-editorial-project-card--form:focus-within {
  box-shadow: 0 0 0 3px var(--g6-accent, #fe3b1f);
  outline: none;
}

@media (max-width: 575px) {
  body.g6-brand .g6-editorial-project-card.g6-editorial-project-card--form .image {
    aspect-ratio: auto;
    max-height: none;
  }
}
