/* Electric Control — editorial public projects page. */
body.ec-projects-editorial {
  --projects-navy: #0f1c2e;
  --projects-green: #7dbf2a;
  --projects-graphite: #2b2f38;
  --projects-gray: #e6e8eb;
  color: var(--projects-navy);
  background: #fff;
  background-image: none;
  font-family: "Montserrat", "Open Sans", system-ui, sans-serif;
}

body.ec-projects-editorial .ec-page-hero--premium {
  min-height: min(760px, 78svh);
  padding: clamp(145px, 16vh, 190px) 0 clamp(76px, 9vw, 124px);
  align-items: flex-end;
  background-image:
    linear-gradient(90deg, rgba(15,28,46,.94) 0%, rgba(15,28,46,.74) 48%, rgba(15,28,46,.22) 100%),
    linear-gradient(0deg, rgba(15,28,46,.38), transparent 50%),
    url('/assets/public/heroes/hero-proyectos.jpg');
  background-position: center, center, center 56%;
  border: 0;
}
body.ec-projects-editorial .ec-page-hero--premium::before,
body.ec-projects-editorial .ec-page-hero--premium::after { display: none; }
body.ec-projects-editorial .ec-page-hero--premium .ec-container { width: min(100% - 96px, 1440px); }
body.ec-projects-editorial .ec-page-hero--premium .ec-breadcrumb { margin-bottom: 30px; }
body.ec-projects-editorial .ec-page-hero--premium .ec-heading-xl {
  max-width: 960px;
  margin: 0 0 24px;
  color: #fff;
  font-size: clamp(3.5rem, 8vw, 7.8rem);
  line-height: .96;
  letter-spacing: -.075em;
}
body.ec-projects-editorial .ec-page-hero--premium .ec-highlight {
  background: none;
  color: var(--projects-green);
  -webkit-text-fill-color: currentColor;
}
body.ec-projects-editorial .ec-page-hero--premium .ec-subtitle {
  max-width: 660px;
  color: rgba(255,255,255,.78);
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  line-height: 1.8;
}

body.ec-projects-editorial .ec-section .ec-container > .ec-text-center {
  display: grid;
  grid-template-columns: minmax(240px,.72fr) minmax(0,1.28fr);
  align-items: end;
  gap: 12px 48px;
  max-width: none !important;
  margin: 0 0 42px !important;
  text-align: left;
}
body.ec-projects-editorial .ec-section .ec-container > .ec-text-center .ec-label { grid-column: 1; margin: 0; color: #5b941c; }
body.ec-projects-editorial .ec-section .ec-container > .ec-text-center h2 { grid-column: 1; margin: 0 !important; color: var(--projects-navy); font-size: clamp(2.1rem,4vw,4rem); line-height: 1.05; letter-spacing: -.06em; }
body.ec-projects-editorial .ec-section .ec-container > .ec-text-center p { grid-column: 2; grid-row: 1 / span 2; max-width: 620px; margin: 0; color: #68717c !important; font-size: .9rem; line-height: 1.8; }
body.ec-projects-editorial .ec-section-alt { background: #f4f6f7; }
body.ec-projects-editorial .ec-section-alt .ec-container > .ec-text-center h2 { grid-column: 1 / -1; }

body.ec-projects-editorial #project-filter-bar {
  display: flex;
  gap: 8px;
  margin: 0 0 28px;
  padding: 0 0 14px;
  overflow-x: auto;
  border-bottom: 1px solid var(--projects-gray);
  scrollbar-width: thin;
}
body.ec-projects-editorial #project-filter-bar .ec-filter-btn {
  flex: 0 0 auto;
  padding: 10px 14px;
  color: #56616d;
  background: #f4f6f7;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: .7rem;
  font-weight: 600;
}
body.ec-projects-editorial #project-filter-bar .ec-filter-btn.active { color: #fff; background: var(--projects-navy); border-color: var(--projects-navy); }
body.ec-projects-editorial #project-filter-bar .ec-filter-btn svg { width: 15px; height: 15px; color: var(--projects-green); }

body.ec-projects-editorial #proyectos-list {
  display: block;
  margin: 0;
  border-top: 1px solid #cfd4d9;
  counter-reset: project-row;
}
body.ec-projects-editorial #proyectos-list > .ec-project-card-item {
  position: relative;
  display: grid !important;
  grid-template-columns: minmax(280px,.72fr) minmax(0,1.28fr);
  grid-template-rows: 1fr auto;
  gap: 0 38px;
  min-height: 340px;
  padding: 28px 0;
  color: var(--projects-navy);
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid #cfd4d9 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  counter-increment: project-row;
  transition: padding .25s ease, background-color .25s ease;
}
body.ec-projects-editorial #proyectos-list > .ec-project-card-item.is-filtered-out { display: none !important; }
body.ec-projects-editorial #proyectos-list > .ec-project-card-item::before {
  content: counter(project-row, decimal-leading-zero);
  position: absolute;
  z-index: 3;
  top: 42px;
  left: 14px;
  padding: 9px 11px;
  color: var(--projects-green);
  background: var(--projects-navy);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .1em;
}
body.ec-projects-editorial #proyectos-list > .ec-project-card-item > div:first-child { display: contents; }
body.ec-projects-editorial #proyectos-list .ec-premium-card__visual {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 100%;
  height: 100% !important;
  min-height: 284px;
  margin: 0;
  background-position: center;
  border-radius: 0;
}
body.ec-projects-editorial #proyectos-list .ec-premium-card__body {
  grid-column: 2;
  grid-row: 1;
  padding: 16px 0 22px !important;
}
body.ec-projects-editorial #proyectos-list .ec-project-card-item h3 {
  max-width: 800px;
  margin: 12px 0 14px !important;
  color: var(--projects-navy) !important;
  font-size: clamp(1.55rem,2.5vw,2.5rem) !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  letter-spacing: -.055em;
}
body.ec-projects-editorial #proyectos-list .ec-project-card-item .ec-badge-outline {
  color: #56616d;
  background: transparent;
  border-color: #cfd4d9;
}
body.ec-projects-editorial #proyectos-list .ec-project-card-item .ec-blueprint-badge { color: var(--projects-green); background: rgba(15,28,46,.88); border-color: rgba(125,191,42,.38); }
body.ec-projects-editorial #proyectos-list .ec-premium-card__visual > div:last-child { color: var(--projects-green) !important; border-color: rgba(125,191,42,.35) !important; }
body.ec-projects-editorial #proyectos-list .ec-project-card-item .ec-body-sm { color: #68717c !important; font-size: .84rem !important; line-height: 1.75 !important; }
body.ec-projects-editorial #proyectos-list .ec-project-card-item .ec-body-sm[style*="var(--ec-blue)"] { color: #56616d !important; }
body.ec-projects-editorial #proyectos-list .ec-project-card-item .ec-body-sm svg { color: var(--projects-green); }
body.ec-projects-editorial #proyectos-list .ec-project-card-item .ec-badge:not(.ec-badge-outline) {
  padding: 4px 9px !important;
  color: #56616d !important;
  background: #f2f4f6 !important;
  border-radius: 2px !important;
  font-size: .65rem !important;
}
body.ec-projects-editorial #proyectos-list > .ec-project-card-item > div:last-child {
  grid-column: 2;
  grid-row: 2;
  justify-content: flex-start !important;
  gap: 18px;
  padding: 14px 0 0 !important;
  border-top: 1px solid var(--projects-gray) !important;
}
body.ec-projects-editorial #proyectos-list .ec-premium-card__link { color: var(--projects-navy) !important; font-size: .68rem !important; font-weight: 700 !important; letter-spacing: .1em; text-transform: uppercase; }
body.ec-projects-editorial #proyectos-list > .ec-project-card-item:hover { padding-left: 10px; background: #f8f9fa !important; }

body.ec-projects-editorial .ec-grid-4 { gap: 0; margin-top: 28px; border-top: 1px solid #cfd4d9; }
body.ec-projects-editorial .ec-stat-card {
  min-height: 0;
  padding: 26px 18px 24px 0;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #cfd4d9;
  border-radius: 0;
  box-shadow: none;
}
body.ec-projects-editorial .ec-stat-card__value { color: #5b941c; font-size: clamp(2.4rem,4.5vw,4.5rem); font-weight: 700; letter-spacing: -.07em; }
body.ec-projects-editorial .ec-stat-card__label { color: #68717c; font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }

body.ec-projects-editorial .ec-page-cta { background: var(--projects-navy); border-radius: 0; }
body.ec-projects-editorial .ec-page-cta h2,
body.ec-projects-editorial .ec-page-cta p { color: #fff; }
body.ec-projects-editorial .ec-page-cta p { color: rgba(255,255,255,.72); }
body.ec-projects-editorial .ec-page-cta .ec-btn-outline { color: #fff; border-color: rgba(255,255,255,.42); }

@media (max-width: 900px) {
  body.ec-projects-editorial .ec-page-hero--premium .ec-container { width: min(100% - 48px, 1440px); }
  body.ec-projects-editorial .ec-section .ec-container > .ec-text-center { gap: 12px 28px; }
  body.ec-projects-editorial #proyectos-list > .ec-project-card-item { grid-template-columns: minmax(220px,.75fr) minmax(0,1.25fr); gap: 0 24px; min-height: 300px; }
  body.ec-projects-editorial #proyectos-list .ec-premium-card__visual { min-height: 250px; }
  body.ec-projects-editorial .ec-grid-4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 640px) {
  body.ec-projects-editorial .ec-page-hero--premium { min-height: 72svh; padding: 130px 0 64px; background-position: center, center, 56% center; }
  body.ec-projects-editorial .ec-page-hero--premium .ec-container { width: min(100% - 40px, 1440px); }
  body.ec-projects-editorial .ec-page-hero--premium .ec-heading-xl { font-size: clamp(3rem, 14vw, 5rem); }
  body.ec-projects-editorial .ec-section .ec-container > .ec-text-center { display: block; text-align: left; margin-bottom: 28px !important; }
  body.ec-projects-editorial .ec-section .ec-container > .ec-text-center h2 { margin: 12px 0 !important; }
  body.ec-projects-editorial .ec-section .ec-container > .ec-text-center p { margin-top: 16px; }
  body.ec-projects-editorial #proyectos-list > .ec-project-card-item { grid-template-columns: 1fr; grid-template-rows: auto auto auto; gap: 0; padding: 20px 0; }
  body.ec-projects-editorial #proyectos-list .ec-premium-card__visual { grid-column: 1; grid-row: 1; height: 230px !important; min-height: 230px; }
  body.ec-projects-editorial #proyectos-list .ec-premium-card__body { grid-column: 1; grid-row: 2; padding: 20px 0 14px !important; }
  body.ec-projects-editorial #proyectos-list > .ec-project-card-item > div:last-child { grid-column: 1; grid-row: 3; }
  body.ec-projects-editorial #proyectos-list > .ec-project-card-item::before { top: 32px; left: 12px; }
  body.ec-projects-editorial .ec-grid-4 { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  body.ec-projects-editorial #proyectos-list > .ec-project-card-item { transition: none; }
}
