:root {
  --er-verde: #006837;
  --er-verde-oscuro: #004d28;
  --er-verde-claro: #e8f5ee;
  --er-gris: #4a4a4a;
  --er-gris-claro: #f5f5f5;
  --er-borde: #d8e4dc;
  --sombra: 0 4px 20px rgba(0, 40, 20, 0.08);
  --radio: 12px;
  --ancho-max: 1100px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--er-gris);
  background: var(--er-gris-claro);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  background: #fff;
  border-bottom: 3px solid var(--er-verde);
  padding: 1rem 1.5rem;
}

.header-inner {
  max-width: var(--ancho-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  height: 48px;
  width: auto;
  max-width: min(280px, 70vw);
  object-fit: contain;
}

main {
  flex: 1;
  max-width: var(--ancho-max);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  width: 100%;
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--er-verde-oscuro);
  font-weight: 700;
}

.hero .subtitulo {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  color: var(--er-gris);
}

.hero .descripcion {
  margin: 0 0 2rem;
  color: #666;
  max-width: 65ch;
}

.formularios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.form-card {
  background: #fff;
  border: 2px solid var(--er-borde);
  border-radius: var(--radio);
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  text-align: left;
  font-family: inherit;
  width: 100%;
}

.form-card:hover:not(:disabled) {
  border-color: var(--er-verde);
  box-shadow: var(--sombra);
  transform: translateY(-2px);
}

.form-card.active {
  border-color: var(--er-verde);
  background: var(--er-verde-claro);
  box-shadow: var(--sombra);
}

.form-card:disabled,
.form-card.inactivo {
  opacity: 0.55;
  cursor: not-allowed;
}

.form-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  color: var(--er-verde-oscuro);
}

.form-card p {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
}

.form-card .badge {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: var(--er-verde-claro);
  color: var(--er-verde);
}

.form-card.inactivo .badge {
  background: #eee;
  color: #888;
}

.embed-section {
  display: none;
  background: #fff;
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  overflow: hidden;
  border: 1px solid var(--er-borde);
}

.embed-section.visible {
  display: block;
}

.embed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--er-verde-claro);
  border-bottom: 1px solid var(--er-borde);
}

.embed-header h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--er-verde-oscuro);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--er-verde);
  color: var(--er-verde);
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.btn-secondary:hover {
  background: var(--er-verde);
  color: #fff;
}

.embed-wrapper {
  position: relative;
  min-height: 520px;
  background: #fafafa;
}

.embed-wrapper iframe {
  display: block;
  width: 100%;
  height: min(75vh, 720px);
  border: 0;
}

.embed-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 2rem;
  text-align: center;
  color: #888;
}

.acciones-externas {
  margin-top: 1rem;
  text-align: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--er-verde);
  color: #fff;
  text-decoration: none;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary:hover {
  background: var(--er-verde-oscuro);
}

footer {
  background: var(--er-verde-oscuro);
  color: rgba(255, 255, 255, 0.9);
  padding: 1.5rem;
  font-size: 0.8rem;
  margin-top: auto;
}

footer .legal {
  max-width: var(--ancho-max);
  margin: 0 auto 1rem;
  line-height: 1.6;
  opacity: 0.9;
}

footer .footer-link {
  max-width: var(--ancho-max);
  margin: 0 auto;
  text-align: center;
}

footer a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

footer a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .embed-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .embed-wrapper iframe {
    height: 65vh;
  }
}
