/* Encuestas — listado full-bleed (como empleos) + detalle */

body.page-encuestas {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.page-encuestas > header.site-header,
body.page-encuestas > .dir-breadcrumb {
  flex-shrink: 0;
}

body.page-encuestas > footer {
  flex-shrink: 0;
  margin-top: 0;
}

body.site-public main.encuestas-page {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  margin: 0;
  margin-bottom: 0;
  padding: 0;
  background: #fff !important;
  background-color: #fff !important;
  box-sizing: border-box;
}

.encuestas-page__panel {
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: #fff;
  border: none;
  border-radius: 0;
  box-shadow: none;
  box-sizing: border-box;
}

.encuestas-page__inner {
  width: 100%;
  max-width: var(--container-max, 1320px);
  margin: 0 auto;
  padding: clamp(18px, 3vw, 28px) clamp(16px, 3vw, 32px) 40px;
  box-sizing: border-box;
}

.encuestas-page__header {
  margin-bottom: 1.25rem;
}

.encuestas-page__intro {
  min-width: 0;
}

.encuestas-page__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  color: var(--color-text-dark, #1e293b);
}

.encuestas-page__subtitle {
  margin: 0;
  color: var(--color-text-medium, #64748b);
  font-size: 0.98rem;
  line-height: 1.45;
  max-width: 52rem;
}

.encuestas-page .enc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 1.25rem;
}

.encuestas-page-panel .enc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 1.25rem;
}

.enc-tab {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--color-input-border, #d9dbbc);
  background: #fff;
  color: var(--color-text-dark, #334155);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.enc-tab:hover {
  border-color: var(--color-brand-gold, #b9984b);
}

.enc-tab.is-active {
  background: var(--color-brand-gold, #b9984b);
  border-color: var(--color-brand-gold, #b9984b);
  color: #fff;
}

.enc-list {
  display: grid;
  gap: 14px;
}

.enc-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--color-input-border, #d9dbbc);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.enc-item:hover {
  border-color: var(--color-brand-gold, #b9984b);
  box-shadow: 0 4px 14px rgba(185, 152, 75, 0.12);
}

.enc-item--no-thumb {
  grid-template-columns: 1fr;
}

.enc-item__thumb {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 10px;
  overflow: hidden;
  background: #f3f4f6;
  flex-shrink: 0;
}

.enc-item__thumb img {
  position: absolute;
  inset: auto;
  left: 0;
  top: 50%;
  width: 100%;
  height: auto;
  transform: translateY(-50%);
  object-fit: cover;
  object-position: center center;
  display: block;
}

.enc-item__body {
  min-width: 0;
}

.enc-item__title {
  margin: 0 0 6px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text-dark, #1e293b);
}

.enc-item__desc {
  margin: 0;
  font-size: 0.92rem;
  color: var(--color-text-medium, #64748b);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
}

.enc-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.enc-chip--publico { background: #e0f2fe; color: #075985; }
.enc-chip--portal { background: #faf3d9; color: #7a5c1e; }

.encuestas-page-panel--detalle .enc-card {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.enc-cover {
  position: relative;
  margin: 0 0 1rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--color-input-border, #d9dbbc);
  background: #f8f8f4;
  max-height: 320px;
}

.enc-cover img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: cover;
  object-position: center center;
}

.enc-desc {
  margin-top: 0;
}

.enc-disclaimer {
  font-size: 0.88rem;
  color: var(--color-text-medium, #64748b);
  background: rgba(185, 152, 75, 0.08);
  border-left: 3px solid var(--color-brand-gold, #b9984b);
  padding: 10px 12px;
  margin: 0 0 1.25rem;
  border-radius: 0 8px 8px 0;
}

.enc-form {
  text-align: left;
}

.enc-q {
  border: 1px solid var(--color-input-border, #d9dbbc);
  border-radius: 12px;
  margin: 0 0 1rem;
  padding: 14px 14px 12px;
  background: #fff;
}

.enc-q legend {
  font-weight: 700;
  padding: 0 4px;
  color: var(--color-text-dark, #1e293b);
}

.enc-q__media {
  margin: 8px 0 12px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--color-input-border, #d9dbbc);
  background: #f8f8f4;
  max-width: 420px;
}

.enc-q__media img {
  display: block;
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  background: #f8f8f4;
}

.enc-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  cursor: pointer;
  font-size: 0.95rem;
}

.enc-opt--media {
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--color-input-border, #d9dbbc);
  border-radius: 10px;
  background: #fafafa;
}

.enc-opt--media input {
  margin-top: 18px;
}

.enc-opt__thumb {
  position: relative;
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--color-input-border, #d9dbbc);
  background: #fff;
}

.enc-opt__thumb img {
  position: absolute;
  inset: auto;
  left: 0;
  top: 50%;
  width: 100%;
  height: auto;
  transform: translateY(-50%);
  object-fit: cover;
  object-position: center center;
  display: block;
}

.enc-opt__text {
  flex: 1 1 auto;
  padding-top: 4px;
  line-height: 1.4;
}

.enc-scale {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.enc-opt--scale {
  min-width: 2.5rem;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid var(--color-input-border, #d9dbbc);
  border-radius: 8px;
  background: #fafafa;
}

.enc-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--color-input-border, #d9dbbc);
  border-radius: 10px;
  font: inherit;
  background: #fff;
}

.enc-input:focus {
  border-color: var(--color-brand-gold, #b9984b);
  outline: none;
  box-shadow: 0 0 0 3px rgba(185, 152, 75, 0.15);
}

.enc-submit {
  appearance: none;
  border: none;
  background: var(--color-brand-gold, #b9984b);
  color: #fff;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 10px;
  cursor: pointer;
  width: 100%;
  max-width: 320px;
}

.enc-submit:hover {
  filter: brightness(0.96);
}

.enc-msg {
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
}

.enc-msg--ok { background: #dcfce7; color: #166534; }
.enc-msg--err { background: #fee2e2; color: #991b1b; }

.enc-resultados { margin-top: 20px; }
.enc-result-block {
  border-top: 1px solid var(--color-input-border, #d9dbbc);
  padding: 12px 0;
}
.enc-result-block h3 { margin: 0 0 6px; font-size: 1rem; }

.enc-loading,
.enc-empty {
  text-align: center;
  color: var(--color-text-medium, #64748b);
  padding: 28px 12px;
}

.enc-login-needed a {
  color: var(--color-brand-primary, #b20f0f);
  font-weight: 700;
}

.enc-thanks { font-weight: 600; color: #166534; }
.enc-closed { color: #991b1b; }

.encuestas-page__pagination {
  margin-top: 1.25rem;
}

.encuestas-page__pagination.admin-pagination-root {
  --pg-primary: var(--color-brand-gold, #B9984B);
  --pg-primary-soft: color-mix(in srgb, var(--color-brand-gold, #B9984B) 18%, transparent);
}

@media (max-width: 640px) {
  .enc-item {
    grid-template-columns: 1fr;
  }

  .enc-item__thumb {
    width: 100%;
    height: 160px;
  }

  .enc-submit {
    max-width: none;
  }
}
