/* ==========================================================================
   ECF Gateway - sitio público
   Paleta alineada con el portal (e-ncf-portal/src/index.css).
   ========================================================================== */

:root {
  --primary: #1e40af;
  --primary-dark: #1e3a8a;
  --primary-light: #3b82f6;
  --primary-hover: #1d4ed8;

  --success: #059669;
  --success-light: #d1fae5;
  --warning: #d97706;
  --warning-light: #fef3c7;

  --text: #374151;
  --text-h: #111827;
  --text-muted: #6b7280;

  --bg: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;

  --border: #e5e7e6;
  --border-light: #f3f4f6;

  --radius: 0.5rem;
  --radius-lg: 1rem;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);

  --container: 1100px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  color: var(--text-h);
  line-height: 1.25;
  margin: 0 0 0.5rem;
  font-weight: 700;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.25rem; }

p {
  margin: 0 0 1rem;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* --- Header ---------------------------------------------------------------- */

.site-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: #fff;
  font-weight: 700;
  font-size: 1.125rem;
}

.brand:hover {
  color: #fff;
  text-decoration: none;
}

.brand img {
  height: 32px;
  width: auto;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9375rem;
  font-weight: 500;
}

.site-nav a:hover {
  color: #fff;
  text-decoration: none;
}

/* --- Hero ------------------------------------------------------------------ */

.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 5rem 0 4.5rem;
  text-align: center;
}

.hero h1 {
  color: #fff;
  font-size: 2.75rem;
  margin-bottom: 1rem;
}

.hero .lead {
  font-size: 1.1875rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 42rem;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Buttons --------------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9375rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #fff;
}

.btn-outline-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-outline {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* --- Sections -------------------------------------------------------------- */

.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--bg-secondary);
}

.section-header {
  text-align: center;
  max-width: 42rem;
  margin: 0 auto 2.5rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.0625rem;
  margin: 0;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

/* --- Grid ------------------------------------------------------------------ */

.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card h3 {
  font-size: 1.0625rem;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.9375rem;
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--bg-tertiary);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

/* --- Plans ----------------------------------------------------------------- */

.plans {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  align-items: start;
}

.plan {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
}

.plan-featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  position: relative;
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}

.plan-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-h);
  margin-bottom: 0.25rem;
}

.plan-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-h);
  line-height: 1.2;
}

.plan-price span {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.plan-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0.25rem 0 1rem;
}

.plan ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
}

.plan li {
  padding: 0.375rem 0 0.375rem 1.5rem;
  position: relative;
  border-top: 1px solid var(--border-light);
}

.plan li:first-child {
  border-top: 0;
}

.plan li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

.plan .btn {
  width: 100%;
  text-align: center;
  margin-top: auto;
}

/* --- Legal pages ----------------------------------------------------------- */

.legal {
  max-width: 48rem;
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

.legal h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.legal .updated {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

.legal h2 {
  font-size: 1.25rem;
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.legal ul,
.legal ol {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.legal li {
  margin-bottom: 0.375rem;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

.legal th,
.legal td {
  text-align: left;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  vertical-align: top;
}

.legal th {
  background: var(--bg-secondary);
  font-weight: 600;
}

.legal .callout {
  background: var(--bg-secondary);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

/* --- Footer ---------------------------------------------------------------- */

.site-footer {
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 2fr 1fr 1fr;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  max-width: 24rem;
  margin: 0.75rem 0 0;
}

.footer-title {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-h);
  margin-bottom: 0.75rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9375rem;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-identity {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  line-height: 1.8;
}

.footer-identity strong {
  color: var(--text-h);
  font-weight: 600;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* --- Responsive ------------------------------------------------------------ */

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  .hero h1 { font-size: 2rem; }
  .hero { padding: 3.5rem 0 3rem; }
  .section { padding: 3rem 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .site-header { position: static; }
}
