/* ============================================================
   Calculadoras Eléctricas — estilos base
   Tema: técnico profesional, azul eléctrico + ámbar
   ============================================================ */
:root {
  --navy: #0b1e3a;
  --navy-2: #10294e;
  --amber: #ffb800;
  --amber-dark: #e09f00;
  --ink: #1e293b;
  --muted: #64748b;
  --bg: #f4f6fa;
  --card: #ffffff;
  --line: #e2e8f0;
  --ok: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(11, 30, 58, 0.08);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

/* ---------- Header ---------- */
.site-header {
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: #fff;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}
.header-inner {
  max-width: 1100px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand-logo { width: 38px; height: 38px; flex: 0 0 38px; }
.brand-name { font-size: 1.05rem; font-weight: 700; letter-spacing: 0.2px; }
.brand-name small { display: block; font-size: 0.7rem; font-weight: 400; color: #9db4d6; }
.main-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.main-nav a {
  color: #c9d8ef; text-decoration: none; font-size: 0.88rem;
  padding: 6px 12px; border-radius: 8px; transition: background 0.15s, color 0.15s;
}
.main-nav a:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* ---------- Hero (home) ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #14345e 55%, #1b4a8a 100%);
  color: #fff; text-align: center; padding: 64px 20px 56px;
}
.hero h1 { font-size: 2.3rem; line-height: 1.2; margin-bottom: 14px; }
.hero h1 span { color: var(--amber); }
.hero p { max-width: 720px; margin: 0 auto 22px; color: #c9d8ef; font-size: 1.08rem; }
.hero-badges { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.badge {
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25);
  color: #e8f0fb; font-size: 0.85rem; padding: 6px 14px; border-radius: 999px;
}

/* ---------- Layout genérico ---------- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.section { padding: 44px 0; }
.section-title { font-size: 1.6rem; margin-bottom: 6px; color: var(--navy); }
.section-sub { color: var(--muted); margin-bottom: 26px; }

/* ---------- Cards de calculadoras ---------- */
.calc-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.calc-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; text-decoration: none; color: inherit;
  box-shadow: var(--shadow); transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  display: flex; flex-direction: column; gap: 10px;
}
.calc-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(11,30,58,0.14); border-color: var(--amber); }
.calc-card .ico { font-size: 1.9rem; }
.calc-card h3 { font-size: 1.05rem; color: var(--navy); }
.calc-card p { font-size: 0.88rem; color: var(--muted); flex: 1; }
.calc-card .tag {
  align-self: flex-start; font-size: 0.72rem; font-weight: 600; color: var(--navy);
  background: #e8eefb; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.4px;
}

/* ---------- Tool (página de calculadora) ---------- */
.tool-wrap {
  display: grid; gap: 24px;
  grid-template-columns: 1fr 1fr;
  align-items: start;
}
@media (max-width: 860px) { .tool-wrap { grid-template-columns: 1fr; } }
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px;
}
.panel h2 { font-size: 1.15rem; color: var(--navy); margin-bottom: 18px; display: flex; align-items: center; gap: 8px; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 5px; color: var(--ink); }
.form-row label .hint { font-weight: 400; color: var(--muted); font-size: 0.78rem; }
input[type="number"], input[type="text"], select {
  width: 100%; padding: 10px 12px; font-size: 0.95rem;
  border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: var(--ink);
  font-family: inherit;
}
input:focus, select:focus { outline: 2px solid var(--amber); border-color: var(--amber); }
.btn {
  display: inline-block; border: none; cursor: pointer; font-family: inherit;
  font-size: 0.98rem; font-weight: 700; padding: 12px 26px; border-radius: 9px;
  transition: filter 0.15s, transform 0.1s;
}
.btn-calc { background: var(--amber); color: var(--navy); }
.btn-calc:hover { filter: brightness(1.06); }
.btn-calc:active { transform: scale(0.98); }
.btn-ghost { background: #eef2f8; color: var(--ink); font-weight: 600; margin-left: 8px; }
.btn-ghost:hover { background: #e2e8f0; }

/* Resultados */
.results { display: none; }
.results.show { display: block; }
.result-main {
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: #fff; border-radius: 10px; padding: 18px; margin-bottom: 16px;
}
.result-main .big { font-size: 2rem; font-weight: 800; color: var(--amber); line-height: 1.2; }
.result-main .lbl { font-size: 0.85rem; color: #b9cbe4; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 16px; }
.result-box {
  background: #f1f5f9; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
}
.result-box .val { font-size: 1.25rem; font-weight: 700; color: var(--navy); }
.result-box .lbl { font-size: 0.78rem; color: var(--muted); }
.semaphore { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: 0.92rem; }
.semaphore.ok { background: #dcfce7; color: var(--ok); }
.semaphore.warn { background: #fef3c7; color: var(--warn); }
.semaphore.bad { background: #fee2e2; color: var(--bad); }
.note {
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px;
  padding: 12px 14px; font-size: 0.85rem; color: #78350f; margin-top: 14px;
}
.table-wrap { overflow-x: auto; margin-top: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); }
th { background: #f1f5f9; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); }
td.num { font-variant-numeric: tabular-nums; }

/* ---------- Contenido explicativo ---------- */
.breadcrumb { font-size: 0.85rem; color: var(--muted); padding: 18px 0 0; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--navy); text-decoration: underline; }
.page-head { padding: 22px 0 8px; }
.page-head h1 { font-size: 1.9rem; color: var(--navy); line-height: 1.25; }
.page-head p { color: var(--muted); margin-top: 8px; max-width: 780px; }
.article { max-width: 780px; }
.article h2 { color: var(--navy); font-size: 1.3rem; margin: 30px 0 10px; }
.article h3 { color: var(--navy); font-size: 1.08rem; margin: 22px 0 8px; }
.article p { margin-bottom: 12px; }
.article ul, .article ol { margin: 0 0 14px 22px; }
.article li { margin-bottom: 6px; }
.formula-box {
  background: var(--navy); color: #e8f0fb; border-radius: 10px;
  padding: 16px 20px; margin: 14px 0; font-family: "Consolas", "Menlo", monospace;
  font-size: 1.02rem; overflow-x: auto;
}
.formula-box .frac { color: var(--amber); font-weight: 700; }
.example {
  background: #f0f7ff; border-left: 4px solid #2f6fd6; border-radius: 0 10px 10px 0;
  padding: 14px 18px; margin: 16px 0; font-size: 0.93rem;
}
.example strong { color: var(--navy); }
.affiliate {
  background: #fff; border: 1px dashed #cbd5e1; border-radius: 10px;
  padding: 16px 18px; margin: 26px 0; text-align: center;
}
.affiliate p { margin-bottom: 10px; color: var(--muted); font-size: 0.9rem; }
.affiliate .btn { background: var(--navy); color: #fff; text-decoration: none; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy); color: #9db4d6; margin-top: 50px; padding: 34px 20px 26px;
  font-size: 0.88rem;
}
.footer-inner { max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.footer-inner a { color: #c9d8ef; text-decoration: none; }
.footer-inner a:hover { text-decoration: underline; }
.footer-bottom { text-align: center; margin-top: 20px; font-size: 0.8rem; color: #6d84a8; }

/* ---------- Misc ---------- */
.ads-placeholder {
  border: 2px dashed #cbd5e1; border-radius: 10px; color: var(--muted);
  text-align: center; padding: 18px; margin: 30px 0; font-size: 0.82rem;
}
