/* gestionation — standalone public intake form (Path B pilot).
   Rebuilt 1:1 from the Lorenia Afform branding (branding-base.css + branding-lorenia.css),
   de-scoped from CiviCRM's .crm-container and given the layout CSS Afform used to supply. */

:root {
  --g-brand-primary: #9D2235;       /* MORENA guinda */
  --g-brand-primary-dark: #6E1825;
  --g-brand-secondary: #C9A961;     /* Senado gold (lorenia) */
  --g-brand-on-primary: #FFFFFF;
  --g-text: #1f2937;
  --g-muted: #4b5563;
  --g-bg-soft: #f8f4ec;
  --g-border: #d8dee9;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: #ece7df;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--g-text);
  line-height: 1.5;
}
.g-card {
  max-width: 1000px;
  margin: 1.5rem auto;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

/* ---------- HEADER ---------- */
.gestionation-header {
  background: linear-gradient(180deg, var(--g-brand-primary) 0%, var(--g-brand-primary-dark) 100%);
  color: var(--g-brand-on-primary);
  padding: 1.5rem 2rem;
  border-bottom: 6px solid var(--g-brand-secondary);
}
.g-header-grid {
  display: grid;
  grid-template-columns: 90px 1fr 90px;
  gap: 1.5rem;
  align-items: center;
  max-width: 960px;
  margin: 0 auto;
}
.g-logo {
  width: 90px; height: 90px;
  object-fit: contain;
  background: rgba(255,255,255,0.94);
  border-radius: 8px;
  padding: 6px;
}
.g-header-title { text-align: center; }
.g-header-title h1 {
  margin: 0;
  font-size: 1.85rem; font-weight: 700; letter-spacing: 0.5px;
  line-height: 1.1;
}
.g-header-title p { margin: 0.35rem 0 0; font-size: 0.95rem; font-weight: 500; opacity: 0.92; }

/* ---------- QUOTE ---------- */
.gestionation-quote {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.75rem;
  align-items: center;
  background: var(--g-bg-soft);
  padding: 1.75rem 2rem;
  border-bottom: 1px solid #e5d9bf;
}
.g-portrait {
  width: 160px; height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--g-brand-secondary);
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.g-quote { margin: 0; border-left: 4px solid var(--g-brand-primary); padding-left: 1.25rem; }
.g-quote p { margin: 0 0 0.5rem; font-size: 1.35rem; font-style: italic; font-weight: 500; line-height: 1.4; }
.g-quote cite { display: block; font-size: 0.95rem; font-style: normal; color: var(--g-muted); font-weight: 600; }

/* ---------- INTRO ---------- */
.g-intro { padding: 1.5rem 2rem 0; max-width: 960px; margin: 0 auto; }
.g-intro h2 { color: var(--g-brand-primary); margin: 0 0 0.35rem; }
.g-intro p { margin: 0; color: var(--g-muted); }

/* ---------- FORM ---------- */
form { padding: 1rem 2rem 2rem; max-width: 960px; margin: 0 auto; }
fieldset {
  border: none;
  border-top: 1px solid var(--g-border);
  margin: 1.5rem 0 0;
  padding: 1.25rem 0 0;
}
legend {
  color: var(--g-brand-primary);
  font-size: 1.2rem;
  font-weight: 700;
  border-bottom: 2px solid var(--g-brand-secondary);
  padding: 0 0 0.35rem;
  margin-bottom: 1rem;
}
.g-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.g-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.g-field { margin-bottom: 1rem; }
label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.3rem; }
label .req { color: var(--g-brand-primary); }
input, select, textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--g-border);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--g-brand-primary);
  box-shadow: 0 0 0 3px rgba(157,34,53,0.12);
}
.g-hint { font-size: 0.8rem; color: var(--g-muted); margin-top: 0.25rem; }
.g-consent { display: flex; align-items: flex-start; gap: 0.6rem; background: var(--g-bg-soft); padding: 0.9rem 1rem; border-radius: 8px; margin-top: 1.25rem; }
.g-consent input { width: auto; margin-top: 0.25rem; }
.g-consent label { font-weight: 500; margin: 0; }
/* honeypot — hidden from humans */
.g-hp { position: absolute; left: -5000px; height: 0; overflow: hidden; }

.g-actions { margin-top: 1.5rem; text-align: center; }
button[type="submit"] {
  background: var(--g-brand-primary);
  border: 1px solid var(--g-brand-primary-dark);
  color: var(--g-brand-on-primary);
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  cursor: pointer;
  width: auto;
}
button[type="submit"]:hover { background: var(--g-brand-primary-dark); }

/* ---------- FOOTER ---------- */
.gestionation-footer {
  background: #2a1820;
  color: #f4ecd8;
  padding: 1.5rem 2rem;
  border-top: 4px solid var(--g-brand-secondary);
}
.g-footer-grid {
  display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center;
  max-width: 960px; margin: 0 auto;
}
.gestionation-footer h4 { margin: 0 0 0.35rem; font-size: 1rem; color: var(--g-brand-secondary); }
.gestionation-footer a { color: #f4ecd8; text-decoration: underline; text-decoration-color: var(--g-brand-secondary); }
.gestionation-footer a:hover { color: #fff; }
.g-footer-social { display: flex; gap: 1.25rem; font-weight: 600; }

/* ---------- SUCCESS / ERROR PANELS ---------- */
.g-panel { padding: 2.5rem 2rem; max-width: 760px; margin: 0 auto; text-align: center; }
.g-panel .folio {
  display: inline-block; font-size: 1.6rem; font-weight: 700; letter-spacing: 1px;
  color: var(--g-brand-primary); background: var(--g-bg-soft);
  padding: 0.6rem 1.4rem; border-radius: 8px; border: 2px dashed var(--g-brand-secondary); margin: 0.75rem 0;
}
.g-panel.error .folio { color: #b00020; border-color: #b00020; }

@media (max-width: 720px) {
  .g-header-grid { grid-template-columns: 56px 1fr 56px; gap: 0.75rem; }
  .g-logo { width: 56px; height: 56px; }
  .g-header-title h1 { font-size: 1.25rem; }
  .gestionation-quote { grid-template-columns: 1fr; text-align: center; }
  .g-portrait { margin: 0 auto; width: 120px; height: 120px; }
  .g-quote { border-left: none; border-top: 4px solid var(--g-brand-primary); padding-left: 0; padding-top: 1rem; }
  .g-row, .g-row-3 { grid-template-columns: 1fr; }
  .g-footer-grid { grid-template-columns: 1fr; text-align: center; }
  .g-footer-social { justify-content: center; flex-wrap: wrap; }
}
