/*
  Estilos base para el sitio de Cobra Fácil
  - Tipografía legible
  - Layout responsivo
  - Paleta accesible con buen contraste
*/

:root {
  --color-bg: #ffffff;
  --color-panel: #ffffff;
  --color-text: #111827;      /* gray-900 */
  --color-text-muted: #4b5563;/* gray-600 */
  --color-primary: #DC143C;   /* crimson */
  --color-primary-700: #a50f2e;
  --color-border: rgba(220,20,60,0.22);
  --max-w: 960px;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;
}

a { color: var(--color-text); text-decoration: none; border-bottom: 1px solid rgba(220,20,60,0.25); }
a:hover { border-bottom-color: var(--color-primary); }

header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid var(--color-border);
}

.nav {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.brand .dot {
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, var(--color-primary), #ff5a76);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(220,20,60,0.2);
}

.menu {
  display: flex;
  gap: 18px;
  align-items: center;
}

.menu a {
  color: var(--color-text);
  padding: 6px 10px;
  border-radius: 8px;
  border-bottom: none;
}

.menu a.active,
.menu a:hover {
  background: rgba(220,20,60,0.06);
  text-decoration: none;
}

main {
  max-width: var(--max-w);
  margin: 40px auto;
  padding: 0 20px 40px;
}

.hero {
  margin: 28px 0 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.hero h1 {
  font-size: clamp(26px, 4.2vw, 40px);
  line-height: 1.2;
  margin: 0 0 10px;
}

.hero p {
  color: var(--color-text-muted);
  margin: 0;
}

.panel {
  margin-top: 26px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-media {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-media img {
  max-width: 84px;
  height: auto;
}

.panel .body {
  padding: 22px;
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

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

ul.inline {
  padding: 0;
  margin: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

ul.inline li::before { content: "• "; color: var(--color-primary); }

article h2 { margin-top: 28px; }
article h3 { margin-top: 22px; font-size: 18px; }
article p { margin: 10px 0; }
article ul { padding-left: 18px; }

/* Estilos locales para contenido de políticas */
.policy-content h2 { margin-top: 28px; }
.policy-content h3 { margin-top: 18px; }
.policy-content ul { padding-left: 22px; }
.policy-content li { margin: 6px 0; }
.policy-content .tag { color: #D93025; font-weight: 700; background: #FDEAEA; padding: .5rem; border-radius: 8px; text-align: center; }

/* caja de acciones/ayuda */
.policy-content .box {
  background: #F5F5F5;
  padding: 12px;
  border-radius: 8px;
}

code, pre {
  background: #f9fafb;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

code { padding: 1px 6px; }
pre { padding: 12px; overflow: auto; }

footer {
  max-width: var(--max-w);
  margin: 0 auto 30px;
  padding: 0 20px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chip {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid rgba(148,163,184,0.25);
  border-radius: 999px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

.btn:hover { background: rgba(220,20,60,0.06); color: var(--color-primary-700); border-color: var(--color-primary-700); }

/* Insignia de logo en subrutas */
.badge-logo {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.badge-logo img {
  width: 28px;
  height: 28px;
  display: block;
}

@media (max-width: 640px) {
  .menu { gap: 10px; }
  .menu a { padding: 6px 8px; }
  footer { flex-direction: column; align-items: flex-start; }
}


