@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,400;0,500;0,600;0,700;1,700&display=swap');

:root {
  --bg: #000000;
  --surface: #0d0d0d;
  --border: #222;
  --text: #a3a3a3;
  --text-muted: #808080;
  --heading: #ffffff;
  --accent: #d1ff00;
  --accent-dim: rgba(209, 255, 0, 0.15);
  --code-bg: #141414;
  --sans: 'Montserrat', system-ui, sans-serif;

  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

body {
  margin: 0;
  min-height: 100svh;
}

/* Radios para pestañas (solo CSS) */
.tab-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.layout {
  max-width: 920px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.header {
  margin-bottom: 1.75rem;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

@media (min-width: 640px) {
  .brand {
    flex-direction: row;
    text-align: left;
    align-items: center;
  }
}

.brand__logo {
  max-width: min(280px, 100%);
  height: auto;
  display: block;
}

.brand__location {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent);
}

.brand__title {
  margin: 0 0 0.25rem;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 700;
  font-style: italic;
  color: var(--heading);
  letter-spacing: -0.02em;
}

.brand__tagline {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.tabs__btn {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition:
    color 0.15s,
    border-color 0.15s,
    background 0.15s;
}

.tabs__btn:hover {
  color: var(--heading);
  border-color: #333;
}

.tabs__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

#main-preventia:checked ~ .tabs--main label[for='main-preventia'],
#main-ordenli:checked ~ .tabs--main label[for='main-ordenli'],
#main-agendli:checked ~ .tabs--main label[for='main-agendli'],
#main-vecinapp:checked ~ .tabs--main label[for='main-vecinapp'] {
  color: #000;
  background: var(--accent);
  border-color: var(--accent);
}

.subtabs {
  display: none;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: -0.5rem 0 1.25rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
}

#main-ordenli:checked ~ .subtabs {
  display: flex;
}

.subtabs__btn {
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  transition:
    color 0.15s,
    border-color 0.15s,
    background 0.15s;
}

.subtabs__btn:hover {
  color: var(--heading);
  border-color: #333;
}

.subtabs__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#ordenli-pedidos:checked ~ .subtabs label[for='ordenli-pedidos'],
#ordenli-pos:checked ~ .subtabs label[for='ordenli-pos'] {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: rgba(209, 255, 0, 0.35);
}

.main {
  flex: 1;
}

.footer {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

/* Paneles: visibilidad */
.panel {
  display: none;
  text-align: left;
}

#main-preventia:checked ~ main .panel--preventia {
  display: block;
}

#main-agendli:checked ~ main .panel--agendli {
  display: block;
}

#main-vecinapp:checked ~ main .panel--vecinapp {
  display: block;
}

#main-ordenli:checked ~ #ordenli-pedidos:checked ~ main .panel--ordenli-pedidos {
  display: block;
}

#main-ordenli:checked ~ #ordenli-pos:checked ~ main .panel--ordenli-pos {
  display: block;
}

/* Tipografía contenido (equivalente al markdown) */
.content h1 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.content h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--heading);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.content h2:first-of-type {
  margin-top: 0;
}

.content h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #e5e5e5;
}

.content p {
  margin: 0 0 0.85rem;
}

.content ul,
.content ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.content li {
  margin-bottom: 0.35rem;
}

.content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

.content a {
  color: var(--accent);
  text-decoration: none;
}

.content a:hover {
  text-decoration: underline;
}

.content strong {
  color: #e8e8e8;
  font-weight: 600;
}

.content code {
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-size: 0.88em;
  padding: 0.15em 0.45em;
  border-radius: 4px;
  background: var(--code-bg);
  color: #e0e0e0;
  border: 1px solid #2a2a2a;
}

.content pre {
  margin: 0 0 1.1rem;
  padding: 1rem 1.1rem;
  border-radius: 8px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  overflow-x: auto;
  line-height: 1.45;
}

.content pre code {
  padding: 0;
  border: none;
  background: none;
  font-size: 0.82rem;
  color: #d4d4d4;
}

.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  display: block;
  overflow-x: auto;
}

.content th,
.content td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.65rem;
  text-align: left;
}

.content th {
  background: var(--surface);
  color: var(--heading);
  font-weight: 600;
}

.content tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

.content blockquote {
  margin: 0 0 1rem;
  padding: 0.5rem 0 0.5rem 1rem;
  border-left: 3px solid var(--accent);
  color: var(--text-muted);
}

.content input[type='checkbox'] {
  accent-color: var(--accent);
  margin-right: 0.35rem;
}

.content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0.75rem 0 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.content figure {
  margin: 1rem 0 1.25rem;
}

.content figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.content .video-embed {
  position: relative;
  width: 100%;
  margin: 1rem 0 1.25rem;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0a0a0a;
}

.content .video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.content video {
  width: 100%;
  max-height: 480px;
  margin: 0.75rem 0 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #000;
}

.content .flow {
  margin: 1rem 0 1.25rem;
  padding: 1rem 1.25rem;
  background: #0a0a0a;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
  color: #d4d4d4;
  overflow-x: auto;
  line-height: 1.5;
}
