@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;900&family=Open+Sans:wght@400;600&display=swap');

:root {
  --orange: #E87722;
  --gray: #8C8C8C;
  --darker: #0a0a0a;
  --white: #FFFFFF;
  --card-bg: #1a1a1a;
  --border-subtle: rgba(255,255,255,0.07);
  --text-muted: rgba(255,255,255,0.55);
  --text-body: rgba(255,255,255,0.78);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Open Sans', sans-serif;
  background: var(--darker);
  color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(10,10,10,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--orange);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 70px;
  gap: 1rem;
}

/* Logo — canto ESQUERDO */
.nav-logo { order: 1; flex-shrink: 0; }
.nav-logo a { display: flex; align-items: center; text-decoration: none; }
.nav-logo img { height: 50px; width: auto; object-fit: contain; display: block; }

/* Fallback text */
.nav-logo-text { display: flex; align-items: baseline; gap: 0.35rem; }
.nav-logo-text .brand { font-family:'Montserrat',sans-serif; font-weight:900; font-size:1.5rem; color:var(--orange); }
.nav-logo-text .sub   { font-family:'Montserrat',sans-serif; font-weight:400; font-size:0.72rem; color:var(--gray); letter-spacing:0.05em; }

/* Links — direita */
.nav-links { order: 2; display: flex; list-style: none; gap: 0.1rem; flex: 1; justify-content: flex-end; }
.nav-links a {
  color: var(--white);
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase;
  padding: 0.45rem 0.7rem; border-radius: 4px;
  transition: color .2s, background .2s;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--orange); background: rgba(232,119,34,0.1); }
.nav-links a.cta { color: var(--orange); border: 1px solid rgba(232,119,34,0.35); }
.nav-links a.cta:hover, .nav-links a.cta.active { background: var(--orange); color: var(--white); border-color: var(--orange); }

/* Hamburger — lado direito em mobile */
.hamburger {
  order: 3; display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 6px; background: none; border: none; flex-shrink: 0;
}
.hamburger span { display:block; width:24px; height:2px; background:var(--orange); border-radius:2px; transition:all .3s; }

/* Mobile menu */
.mobile-menu {
  display: none; position: fixed; top: 70px; left: 0; right: 0;
  background: rgba(8,8,8,0.99); border-bottom: 2px solid var(--orange);
  z-index: 999; padding: 0.5rem 0 1rem;
  max-height: calc(100vh - 70px); overflow-y: auto;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block; color: var(--white); text-decoration: none;
  font-family: 'Montserrat', sans-serif; font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.85rem 2rem; border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: color .2s, background .2s;
}
.mobile-menu a:hover, .mobile-menu a.active { color: var(--orange); background: rgba(232,119,34,0.06); }

/* ── PAGE HEADER ── */
.page-header {
  background: linear-gradient(135deg, #111 0%, #1a0a00 100%);
  padding: 5rem 3rem 3rem; border-bottom: 3px solid var(--orange);
  position: relative; overflow: hidden;
}
.page-header::before {
  content: ''; position: absolute; top: -50%; right: -5%;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(232,119,34,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.page-header h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 900;
  color: var(--white); position: relative; line-height: 1.1;
}
.page-header h1 span { color: var(--orange); }
.page-header p { color: rgba(255,255,255,0.55); margin-top: 0.6rem; font-size: 1rem; position: relative; max-width: 600px; }

/* ── SECTION ── */
.section { padding: 4rem 3rem; max-width: 1200px; margin: 0 auto; }

/* ── BUTTONS ── */
.btn-primary {
  background: var(--orange); color: var(--white); border: none;
  padding: 0.9rem 2rem; font-family: 'Montserrat', sans-serif;
  font-weight: 700; font-size: 0.8rem; letter-spacing: 0.1em;
  text-transform: uppercase; cursor: pointer; border-radius: 4px;
  transition: background .2s, transform .2s; text-decoration: none; display: inline-block;
}
.btn-primary:hover { background: #ff8c2a; transform: translateY(-2px); }

.btn-outline {
  background: transparent; color: var(--white);
  border: 2px solid rgba(255,255,255,0.35);
  padding: 0.9rem 2rem; font-family: 'Montserrat', sans-serif;
  font-weight: 700; font-size: 0.8rem; letter-spacing: 0.1em;
  text-transform: uppercase; cursor: pointer; border-radius: 4px;
  transition: border-color .2s, color .2s; text-decoration: none; display: inline-block;
}
.btn-outline:hover { border-color: var(--orange); color: var(--orange); }

/* ── FORMS ── */
.form-container {
  background: var(--card-bg); border-radius: 12px;
  border: 1px solid rgba(232,119,34,0.2); padding: 3rem;
  max-width: 700px; margin: 0 auto;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.form-group { margin-bottom: 1.5rem; }
.form-group label {
  display: block; font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(255,255,255,0.65); margin-bottom: 0.5rem;
}
.form-group label span { color: var(--orange); }
.form-control {
  width: 100%; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 6px;
  padding: 0.8rem 1rem; color: var(--white);
  font-family: 'Open Sans', sans-serif; font-size: 0.92rem;
  transition: border-color .2s, background .2s, box-shadow .2s;
  outline: none; -webkit-appearance: none;
}
.form-control:focus {
  border-color: var(--orange); background: rgba(232,119,34,0.04);
  box-shadow: 0 0 0 3px rgba(232,119,34,0.12);
}
textarea.form-control { min-height: 140px; resize: vertical; line-height: 1.6; }
select.form-control option { background: #1a1a1a; color: var(--white); }

.captcha-box {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px; padding: 1.1rem 1.2rem;
  display: flex; align-items: center; gap: 1rem;
}
.captcha-check {
  width: 24px; height: 24px; border: 2px solid rgba(255,255,255,0.3);
  border-radius: 4px; cursor: pointer; display: flex; align-items: center;
  justify-content: center; transition: all .2s; flex-shrink: 0;
  user-select: none; font-size: 0.85rem;
}
.captcha-check.checked { background: var(--orange); border-color: var(--orange); color: #fff; }
.captcha-label { color: rgba(255,255,255,0.7); font-size: 0.88rem; }
.captcha-logo { margin-left: auto; text-align: right; font-size: 0.62rem; color: rgba(255,255,255,0.28); line-height: 1.5; }

.form-submit { text-align: center; margin-top: 2rem; }
.btn-submit {
  background: var(--orange); color: var(--white); border: none;
  padding: 1rem 3rem; font-family: 'Montserrat', sans-serif;
  font-weight: 700; font-size: 0.85rem; letter-spacing: 0.1em;
  text-transform: uppercase; cursor: pointer; border-radius: 6px;
  transition: background .2s, transform .2s;
}
.btn-submit:hover { background: #ff8c2a; transform: translateY(-2px); }

.success-msg {
  background: rgba(232,119,34,0.08); border: 1px solid var(--orange);
  border-radius: 8px; padding: 1rem 1.5rem; color: var(--orange);
  font-weight: 600; text-align: center; margin-top: 1.2rem; font-size: 0.92rem;
}

/* ── FOOTER ── */
footer { background: #000; border-top: 2px solid rgba(232,119,34,0.25); padding: 3rem 2rem; text-align: center; }
.footer-logo { height: 52px; width: auto; margin-bottom: 1.5rem; object-fit: contain; }
.footer-links { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.footer-links a {
  color: rgba(255,255,255,0.45); text-decoration: none; font-size: 0.8rem;
  transition: color .2s; font-family: 'Montserrat', sans-serif;
  font-weight: 600; letter-spacing: 0.05em;
}
.footer-links a:hover { color: var(--orange); }
.footer-copy { color: rgba(255,255,255,0.25); font-size: 0.78rem; line-height: 1.6; }

/* ════════════════════════════════
   REGULAMENTO — estilos dedicados
   ════════════════════════════════ */
.reg-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem;
  align-items: start;
}

/* Sidebar */
.reg-sidebar {
  position: sticky; top: 88px;
  background: var(--card-bg);
  border: 1px solid rgba(232,119,34,0.2);
  border-radius: 10px;
  overflow: hidden;
  /* Reset any nav-inherited layout */
  display: block;
  height: auto;
  padding: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.reg-sidebar-header {
  background: rgba(232,119,34,0.1);
  border-bottom: 1px solid rgba(232,119,34,0.2);
  padding: 0.9rem 1.2rem;
  font-family: 'Montserrat', sans-serif; font-size: 0.64rem;
  font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--orange);
}
/* Force column list — reset any flex inheritance from .nav-links */
.reg-sidebar ul {
  list-style: none;
  padding: 0.4rem 0;
  margin: 0;
  display: flex !important;
  flex-direction: column !important;
  flex: none !important;
  justify-content: flex-start !important;
  gap: 0 !important;
}
.reg-sidebar ul li {
  display: block;
  width: 100%;
  flex: none;
  white-space: normal;
}
/* Explicitly override any global nav a styles */
.reg-sidebar ul li a,
.reg-sidebar ul li a:link,
.reg-sidebar ul li a:visited {
  display: block !important;
  color: var(--text-muted) !important;
  text-decoration: none !important;
  font-family: 'Open Sans', sans-serif !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  white-space: normal !important;
  padding: 0.6rem 1rem 0.6rem 1.2rem !important;
  border-left: 3px solid transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  transition: color .2s, border-color .2s, background .2s, padding-left .15s;
}
.reg-sidebar ul li a:hover,
.reg-sidebar ul li a.reg-active {
  color: var(--orange) !important;
  border-left-color: var(--orange) !important;
  background: rgba(232,119,34,0.07) !important;
  padding-left: 1.5rem !important;
}
.reg-sidebar-footer {
  padding: 0.9rem 1.2rem; border-top: 1px solid var(--border-subtle);
  font-size: 0.7rem; color: rgba(255,255,255,0.28); line-height: 1.5;
}

/* Container */
.reg-container {
  background: var(--card-bg); border-radius: 12px;
  border: 1px solid rgba(232,119,34,0.18); overflow: hidden;
}
.reg-doc-header {
  background: linear-gradient(135deg, rgba(232,119,34,0.1), rgba(232,119,34,0.03));
  border-bottom: 1px solid rgba(232,119,34,0.2);
  padding: 1.8rem 2.5rem;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.reg-doc-title { font-family:'Montserrat',sans-serif; font-weight:900; font-size:1rem; color:var(--white); }
.reg-doc-title span { color: var(--orange); }
.reg-version-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(232,119,34,0.12); border: 1px solid rgba(232,119,34,0.3);
  color: var(--orange); font-family:'Montserrat',sans-serif;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 0.3rem 0.75rem; border-radius: 20px;
}
.reg-body { padding: 2.5rem; }

/* Seções do documento */
.reg-section {
  margin-bottom: 2.8rem; padding-bottom: 2.8rem;
  border-bottom: 1px solid var(--border-subtle);
  scroll-margin-top: 90px;
}
.reg-section:last-of-type { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }

.reg-section-heading { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.2rem; }
.reg-section-icon {
  width: 36px; height: 36px; background: rgba(232,119,34,0.12);
  border: 1px solid rgba(232,119,34,0.25); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0;
}
.reg-section h2 { font-family:'Montserrat',sans-serif; font-size:1.05rem; font-weight:800; color:var(--white); line-height:1.2; }
.reg-section h2 .sec-num { color: var(--orange); margin-right: 0.15rem; }

/* Parágrafos */
.reg-section p { color: var(--text-body); line-height: 1.9; font-size: 0.92rem; margin-bottom: 1rem; }
.reg-section p:last-child { margin-bottom: 0; }

/* Listas estilizadas */
.reg-section ul, .reg-section ol {
  padding-left: 0; list-style: none;
  display: flex; flex-direction: column; gap: 0.45rem; margin-top: 0.7rem;
}
.reg-section li {
  display: flex; align-items: flex-start; gap: 0.75rem;
  color: var(--text-body); font-size: 0.9rem; line-height: 1.75;
  padding: 0.6rem 0.9rem; background: rgba(255,255,255,0.02);
  border-radius: 6px; border-left: 2px solid rgba(232,119,34,0.3);
}
.reg-section ul li::before {
  content: '›'; color: var(--orange); font-weight: 700;
  font-size: 1.1rem; flex-shrink: 0; line-height: 1.5;
}
.reg-section ol { counter-reset: rc; }
.reg-section ol li { counter-increment: rc; }
.reg-section ol li::before {
  content: counter(rc);
  background: var(--orange); color: #fff;
  font-family:'Montserrat',sans-serif; font-weight:700; font-size:0.62rem;
  min-width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 0.25rem;
}
.reg-section strong { color: var(--white); font-weight: 700; }

/* Info box */
.reg-info-box {
  background: rgba(232,119,34,0.06); border: 1px solid rgba(232,119,34,0.2);
  border-radius: 8px; padding: 1rem 1.2rem; margin-top: 0.8rem;
  font-size: 0.88rem; color: var(--text-body); line-height: 1.7;
  display: flex; gap: 0.75rem; align-items: flex-start;
}
.reg-info-box .ii { font-size: 1rem; flex-shrink: 0; margin-top: 0.1rem; }

/* Tabela de patentes */
.rank-table { width: 100%; border-collapse: collapse; margin-top: 1rem; border-radius: 8px; overflow: hidden; font-size: 0.87rem; }
.rank-table thead tr { background: rgba(232,119,34,0.1); }
.rank-table th {
  font-family:'Montserrat',sans-serif; font-size:0.66rem; font-weight:700;
  letter-spacing:0.12em; text-transform:uppercase; color:var(--orange);
  text-align:left; padding:0.85rem 1.1rem; border-bottom:1px solid rgba(232,119,34,0.25);
}
.rank-table td { padding:0.75rem 1.1rem; color:var(--text-body); border-bottom:1px solid var(--border-subtle); vertical-align:middle; }
.rank-table tbody tr:last-child td { border-bottom: none; }
.rank-table tbody tr:hover td { background: rgba(232,119,34,0.04); color: var(--white); }

/* Rodapé do doc */
.reg-footer-note {
  margin-top: 2rem; padding: 1rem 1.4rem;
  background: rgba(255,255,255,0.02); border-radius: 8px;
  border: 1px solid var(--border-subtle);
  color: rgba(255,255,255,0.3); font-size: 0.76rem; line-height: 1.6;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
}
.reg-footer-note a { color: var(--orange); text-decoration: none; }
.reg-footer-note a:hover { text-decoration: underline; }

/* ── RESPONSIVO ── */
@media (max-width: 1000px) {
  .reg-layout { grid-template-columns: 1fr; padding: 2rem 1.5rem; gap: 1.5rem; }
  .reg-sidebar { position: static; }
  .reg-body { padding: 1.5rem; }
  .reg-doc-header { padding: 1.5rem; }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .section { padding: 2.5rem 1.5rem; }
  .page-header { padding: 4.5rem 1.5rem 2.5rem; }
  .form-container { padding: 2rem 1.5rem; }
  nav { padding: 0 1rem; }
}
@media (max-width: 600px) {
  .nav-logo img { height: 40px; }
  footer { padding: 2.5rem 1.2rem; }
  .footer-links { gap: 1.2rem; }
}
