/* =========================================================
   ELÉCTRICOS DEL CARIBE — Hoja de estilos principal
   Sin CDN. Sin recursos externos. 100% local.
   ========================================================= */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #0d1b2a;
  background: #ffffff;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: #1976d2; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ---------- Paleta ---------- */
:root {
  --white: #ffffff;
  --blue-50:  #e3f2fd;
  --blue-100: #bbdefb;
  --blue-200: #90caf9;
  --blue-400: #42a5f5;
  --blue-500: #1e88e5;
  --blue-600: #1976d2;
  --blue-700: #1565c0;
  --blue-900: #0d47a1;
  --ink:      #0d1b2a;
  --muted:    #546e7a;
  --border:   #e1f1ff;
  --shadow:   0 6px 20px rgba(25, 118, 210, 0.10);
}

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--blue-900);
  font-size: 18px;
}
.brand:hover { text-decoration: none; color: var(--blue-900); }
.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 20px;
}
.nav-links {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
}
.nav-links a {
  color: var(--ink);
  font-weight: 500;
  font-size: 14px;
  padding: 7px 12px;
  border-radius: 6px;
  white-space: nowrap;
}
.nav-links a:hover {
  color: var(--blue-700);
  background: var(--blue-50);
  text-decoration: none;
}
.nav-links a.active {
  color: var(--blue-700);
  background: var(--blue-50);
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(ellipse at top left, rgba(33,150,243,0.15), transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(13,71,161,0.12), transparent 50%),
    linear-gradient(180deg, var(--blue-50), var(--white));
  padding: 70px 24px 60px;
  text-align: center;
}
.hero .tag {
  display: inline-block;
  background: var(--white);
  color: var(--blue-700);
  font-weight: 700;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--blue-100);
  margin-bottom: 18px;
  letter-spacing: 0.5px;
}
.hero h1 {
  color: var(--blue-900);
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.15;
  margin-bottom: 16px;
  max-width: 820px;
  margin-left: auto; margin-right: auto;
}
.hero h1 span { color: var(--blue-500); }
.hero p.lead {
  color: var(--muted);
  font-size: clamp(16px, 2.4vw, 18px);
  max-width: 720px;
  margin: 0 auto 28px;
}
.hero-cta {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------- Page Hero (sub-páginas) ---------- */
.page-hero {
  background: linear-gradient(180deg, var(--blue-50), var(--white));
  padding: 50px 24px 30px;
}
.page-hero .container { max-width: 1100px; margin: 0 auto; }
.page-hero .breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}
.page-hero .breadcrumb a { color: var(--blue-600); }
.page-hero .breadcrumb span.sep { margin: 0 6px; opacity: 0.6; }
.page-hero h1 {
  color: var(--blue-900);
  font-size: clamp(28px, 5vw, 40px);
  margin-bottom: 12px;
}
.page-hero p {
  color: var(--muted);
  max-width: 720px;
  font-size: 16px;
}

/* ---------- Container ---------- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ---------- Sections ---------- */
section { padding: 50px 24px; }
.section-title { text-align: center; margin-bottom: 36px; }
.section-title .eyebrow {
  display: inline-block;
  color: var(--blue-600);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.section-title h2 {
  color: var(--blue-900);
  font-size: clamp(24px, 4vw, 32px);
  margin-bottom: 8px;
}
.section-title p {
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto;
}

/* ---------- Content Cards ---------- */
.content-card {
  background: var(--white);
  border-radius: 12px;
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.content-card h3 {
  color: var(--blue-900);
  font-size: 20px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--blue-100);
}
.content-card h4 {
  color: var(--blue-700);
  font-size: 17px;
  margin: 18px 0 8px;
}
.content-card p {
  color: var(--ink);
  margin-bottom: 12px;
  font-size: 15px;
}
.content-card ul { margin: 8px 0 12px 22px; }
.content-card ul li {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 15px;
}
.content-card strong { color: var(--blue-700); }

/* ---------- Cajas de aviso ---------- */
.info-box {
  background: var(--blue-50);
  border-left: 4px solid var(--blue-500);
  padding: 16px 18px;
  border-radius: 8px;
  margin: 18px 0;
  font-size: 14px;
  color: var(--blue-900);
}
.info-box strong { color: var(--blue-900); }

.alert {
  background: #fff8e1;
  border-left: 4px solid #ffb300;
  padding: 16px 18px;
  border-radius: 8px;
  margin: 18px 0;
  font-size: 14px;
  color: #5d4037;
}
.alert strong { color: #5d4037; }

.alert-danger {
  background: #ffebee;
  border-left: 4px solid #d32f2f;
  padding: 16px 18px;
  border-radius: 8px;
  margin: 18px 0;
  font-size: 14px;
  color: #b71c1c;
}
.alert-danger strong { color: #b71c1c; }

.alert-success {
  background: #e8f5e9;
  border-left: 4px solid #43a047;
  padding: 16px 18px;
  border-radius: 8px;
  margin: 18px 0;
  font-size: 14px;
  color: #1b5e20;
}
.alert-success strong { color: #1b5e20; }

/* ---------- Grid de tarjetas ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--white);
  border-radius: 12px;
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(25,118,210,0.18);
}
.feature-card .icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--blue-50);
  color: var(--blue-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 14px;
}
.feature-card h3 {
  color: var(--blue-900);
  margin-bottom: 8px;
  font-size: 19px;
}
.feature-card p {
  color: var(--muted);
  font-size: 15px;
}
.feature-card .link {
  display: inline-block;
  margin-top: 12px;
  color: var(--blue-700);
  font-weight: 600;
  font-size: 14px;
}
.feature-card .link::after { content: " →"; }

/* ---------- Pros / Contras / Peligros ---------- */
.proscons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}
.pc-card {
  border-radius: 12px;
  padding: 26px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--white), var(--blue-50));
}
.pc-card.pros    { border-left: 5px solid var(--blue-500); }
.pc-card.cons    { border-left: 5px solid #90a4ae; }
.pc-card.danger  { border-left: 5px solid #d32f2f; }
.pc-card h3 {
  color: var(--blue-900);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pc-card ul { list-style: none; padding: 0; }
.pc-card ul li {
  padding: 8px 0 8px 24px;
  position: relative;
  color: var(--ink);
  font-size: 15px;
}
.pc-card.pros ul li::before   { content: "✓"; position: absolute; left: 0; color: var(--blue-600); font-weight: 800; }
.pc-card.cons ul li::before   { content: "✗"; position: absolute; left: 0; color: #607d8b; font-weight: 800; }
.pc-card.danger ul li::before { content: "⚠"; position: absolute; left: 0; color: #d32f2f; font-weight: 800; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.1s ease, background 0.2s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--blue-600);
  color: var(--white);
}
.btn-primary:hover { background: var(--blue-700); color: var(--white); text-decoration: none; }
.btn-outline {
  background: var(--white);
  color: var(--blue-700);
  border: 2px solid var(--blue-200);
}
.btn-outline:hover { border-color: var(--blue-500); color: var(--blue-700); text-decoration: none; }

/* ---------- Formulario ---------- */
.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 30px;
  box-shadow: var(--shadow);
}
.form-row { margin-bottom: 16px; }
.form-row label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-900);
  margin-bottom: 6px;
}
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--blue-100);
  border-radius: 8px;
  font: inherit;
  background: #fafcff;
  color: var(--ink);
  transition: border 0.2s, background 0.2s;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--blue-500);
  background: var(--white);
}
.form-row textarea { resize: vertical; min-height: 100px; }
.submit-btn {
  width: 100%;
  background: #25D366;
  color: var(--white);
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s;
}
.submit-btn:hover { background: #1ebd5a; }
.form-note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; margin: 18px 0; }
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  font-size: 14px;
}
table thead { background: var(--blue-700); color: var(--white); }
table th, table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
table tbody tr:hover { background: var(--blue-50); }
table tbody tr:last-child td { border-bottom: none; }

/* ---------- Contacto (info card azul) ---------- */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 760px) {
  .contact-wrap { grid-template-columns: 1fr; }
}
.contact-info {
  background: linear-gradient(160deg, var(--blue-600), var(--blue-900));
  color: var(--white);
  padding: 30px;
  border-radius: 14px;
}
.contact-info h3 { font-size: 22px; margin-bottom: 16px; }
.contact-info ul { list-style: none; padding: 0; }
.contact-info li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.18);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 15px;
}
.contact-info li:last-child { border-bottom: none; }
.contact-info li .ic {
  width: 28px;
  flex-shrink: 0;
  font-size: 18px;
  text-align: center;
}
.contact-info a { color: var(--white); text-decoration: underline; }
.contact-info .author {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.25);
  font-size: 14px;
  opacity: 0.95;
}

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--blue-900);
  color: #e3f2fd;
  padding: 36px 24px 20px;
  margin-top: auto;
}
.footer-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.footer-grid h4 {
  color: var(--white);
  margin-bottom: 10px;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.footer-grid p, .footer-grid a {
  color: #bbdefb;
  font-size: 14px;
  line-height: 1.7;
}
.footer-grid a:hover { color: var(--white); }
.footer-grid ul { list-style: none; padding: 0; }
.footer-grid ul li { margin-bottom: 4px; }
.footer-bottom {
  max-width: 1180px;
  margin: 24px auto 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.15);
  text-align: center;
  font-size: 13px;
  color: #bbdefb;
}

/* ---------- Banner de políticas ---------- */
.policies-overlay {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 9999;
  background: rgba(13, 27, 42, 0.55);
  backdrop-filter: blur(4px);
  padding: 14px;
  animation: slideUp 0.35s ease-out;
}
.policies-overlay.hidden { display: none; }
@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.policies-bar {
  background: var(--white);
  border-radius: 12px;
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 20px;
  box-shadow: 0 12px 36px rgba(13, 27, 42, 0.35);
  border-top: 4px solid var(--blue-500);
  flex-wrap: wrap;
}
.policies-bar .policies-text {
  flex: 1;
  min-width: 240px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}
.policies-bar .policies-text .tag {
  display: inline-block;
  background: var(--blue-50);
  color: var(--blue-700);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 3px 10px;
  border-radius: 999px;
  margin-right: 8px;
  vertical-align: middle;
  text-transform: uppercase;
}
.policies-bar .policies-text strong { color: var(--blue-700); }
.policies-bar .policies-text a { color: var(--blue-700); text-decoration: underline; }
.policies-bar .policies-actions { display: flex; gap: 10px; flex-shrink: 0; }
.policies-bar .policies-actions button {
  border: none;
  padding: 11px 22px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  white-space: nowrap;
}
.policies-bar .policies-actions button:active { transform: scale(0.97); }
.policies-bar .btn-reject { background: #eceff1; color: var(--ink); }
.policies-bar .btn-reject:hover { background: #cfd8dc; }
.policies-bar .btn-accept { background: var(--blue-600); color: var(--white); }
.policies-bar .btn-accept:hover { background: var(--blue-700); }
@media (max-width: 640px) {
  .policies-bar { flex-direction: column; align-items: stretch; text-align: center; }
  .policies-bar .policies-text { font-size: 13px; }
  .policies-bar .policies-actions { justify-content: center; }
  .policies-bar .policies-actions button { flex: 1; padding: 12px; }
}

/* ---------- Pantalla de rechazo ---------- */
.rejected-screen {
  position: fixed;
  inset: 0;
  background: var(--white);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  z-index: 9998;
}
.rejected-screen.show { display: flex; }
.rejected-card { max-width: 480px; }
.rejected-card h1 { color: var(--blue-900); margin-bottom: 12px; }
.rejected-card p { color: var(--muted); margin-bottom: 20px; }

/* ---------- Glosario / definiciones ---------- */
.glossary {
  background: var(--white);
}
.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.glossary-item {
  background: var(--blue-50);
  border-left: 4px solid var(--blue-500);
  padding: 14px 18px;
  border-radius: 6px;
}
.glossary-item .term {
  color: var(--blue-900);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
}
.glossary-item .def {
  color: var(--ink);
  font-size: 14px;
}

/* ---------- Índice lateral (TOC) ---------- */
.toc {
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: 12px;
  padding: 22px 28px;
  margin-bottom: 32px;
}
.toc h2 {
  color: var(--blue-900);
  font-size: 18px;
  margin-bottom: 12px;
}
.toc ol { margin-left: 20px; }
.toc ol li { margin-bottom: 6px; color: var(--ink); }
.toc a { color: var(--blue-700); }

/* ---------- Lista enumerada ---------- */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}
.steps li {
  counter-increment: step;
  padding: 14px 14px 14px 56px;
  position: relative;
  background: var(--blue-50);
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 15px;
  color: var(--ink);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 12px;
  width: 32px;
  height: 32px;
  background: var(--blue-600);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
}

/* ---------- CTA al final de cada página ---------- */
.cta-final {
  background: linear-gradient(135deg, var(--blue-50), var(--white));
  text-align: center;
}
.cta-final h2 {
  color: var(--blue-900);
  margin-bottom: 12px;
  font-size: clamp(22px, 3.5vw, 28px);
}
.cta-final p {
  color: var(--muted);
  max-width: 580px;
  margin: 0 auto 22px;
}
.cta-final .cta-buttons {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------- Utilidades ---------- */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mt-4 { margin-top: 40px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: #b71c1c;
}

/* ---------- Mobile nav (compacto) ---------- */
@media (max-width: 760px) {
  .nav-links { gap: 2px; }
  .nav-links a { font-size: 13px; padding: 6px 8px; }
}