/* WebForge CMS — style.css (sitio público) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0f1117;
  --surface:  #1a1d27;
  --border:   #2a2d3a;
  --accent:   #4f8ef7;
  --accent2:  #7c3aed;
  --text:     #e2e8f0;
  --muted:    #6b7280;
  --radius:   10px;
  --font:     'Segoe UI', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── HEADER ──────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 17, 23, .85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: .9rem;
  transition: color .2s;
}

.main-nav a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .25rem;
}

.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--muted);
  border-radius: 2px;
  transition: all .3s;
}

/* ── HERO ────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 7rem 0 5rem;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(79,142,247,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,142,247,.05) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.hero-grid-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(79,142,247,.08), transparent 70%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: .3rem .9rem;
  background: rgba(79,142,247,.12);
  border: 1px solid rgba(79,142,247,.25);
  border-radius: 20px;
  font-size: .8rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
  letter-spacing: .06em;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text) 60%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 2rem;
}

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: .7rem 1.5rem;
  border-radius: 7px;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s;
  cursor: pointer;
  border: none;
  font-family: var(--font);
  margin: .3rem .2rem;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #3a7de8; transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--muted); }

/* ── SECTIONS ────────────────────────────────────────────────── */
.section { padding: 4rem 0; }

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: .4rem;
}

.section-header p { color: var(--muted); font-size: .95rem; }

/* ── CARDS GRID ──────────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.25rem;
}

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, transform .2s;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.card-icon { font-size: 1.75rem; margin-bottom: .75rem; }
.card h3   { font-size: 1rem; font-weight: 600; margin-bottom: .4rem; }
.card p    { font-size: .85rem; color: var(--muted); margin-bottom: .75rem; }
.card-link { font-size: .82rem; color: var(--accent); }

/* ── EMPTY STATE ─────────────────────────────────────────────── */
.section-empty { text-align: center; padding: 5rem 0; }
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h2 { font-size: 1.4rem; margin-bottom: .5rem; }
.empty-state p  { color: var(--muted); }
.empty-state a  { color: var(--accent); }

/* ── FOOTER ──────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-top: 2rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
}

.footer-logo { font-weight: 700; font-size: .9rem; }
.footer-copy { color: var(--muted); font-size: .82rem; }
.footer-admin { color: var(--muted); font-size: .82rem; text-decoration: none; }
.footer-admin:hover { color: var(--text); }

/* ── PAGE CONTENT (páginas generadas) ───────────────────────── */
.page-hero {
  padding: 4rem 0 2rem;
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  margin-bottom: .5rem;
}

.page-hero .page-meta { color: var(--muted); font-size: .85rem; }

.page-body {
  padding: 3rem 0 5rem;
  max-width: 760px;
}

.page-body h2 { font-size: 1.4rem; margin: 2rem 0 .75rem; }
.page-body h3 { font-size: 1.15rem; margin: 1.5rem 0 .5rem; }
.page-body p  { margin-bottom: 1rem; color: var(--text); line-height: 1.75; }
.page-body a  { color: var(--accent); }
.page-body ul, .page-body ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.page-body li { margin-bottom: .35rem; }

.page-nav {
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.page-nav a { color: var(--muted); text-decoration: none; font-size: .85rem; }
.page-nav a:hover { color: var(--accent); }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .nav-toggle { display: flex; }

  .main-nav {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.5rem;
    gap: 1rem;
  }

  .main-nav.open { display: flex; }

  .footer-inner { flex-direction: column; text-align: center; }
}
