/* components.css — navbar, hero, cards, botones, footer */

/* ══ NAVBAR ═════════════════════════════════════ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: 64px;
  transition: background .3s;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: .6rem;
  font-weight: 800; font-size: 1.15rem; color: var(--text);
  text-decoration: none;
}
.nav-logo .logo-icon { width: 32px; height: 32px; }
.nav-logo span { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: .25rem; }
.nav-links a {
  color: var(--text-muted); font-size: .9rem; font-weight: 500;
  padding: .4rem .75rem; border-radius: 6px;
  transition: color .2s, background .2s;
  text-decoration: none;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: color-mix(in srgb, var(--accent) 10%, transparent); }

.nav-actions { display: flex; align-items: center; gap: .75rem; }
.nav-demo { background: var(--accent); color: var(--btn-text, #000) !important; font-weight: 700 !important; padding: .45rem 1rem !important; }
.nav-demo:hover { opacity: .9; background: var(--accent) !important; }

/* Burger */
.burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; background: none; border: none; }
.burger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }
.burger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile nav */
.nav-mobile {
  display: none; position: fixed; top: 64px; left: 0; right: 0; z-index: 99;
  background: var(--bg-secondary); border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem 1.5rem; flex-direction: column; gap: .25rem;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  color: var(--text-muted); padding: .6rem .75rem; border-radius: 6px;
  text-decoration: none; font-weight: 500;
}
.nav-mobile a:hover { color: var(--text); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.nav-mobile .btn { margin-top: .5rem; text-align: center; }

@media (max-width: 768px) {
  .nav-links, .nav-actions .btn:not(.nav-theme-btn) { display: none; }
  .burger { display: flex; }
}

/* Theme button */
.nav-theme-btn {
  background: none; border: 1px solid var(--border); color: var(--text-muted);
  width: 36px; height: 36px; border-radius: 8px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, color .2s;
}
.nav-theme-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ══ BUTTONS ═════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-size: .9rem; font-weight: 600; padding: .6rem 1.4rem;
  border-radius: 8px; border: none; cursor: pointer;
  transition: transform .15s, opacity .2s, box-shadow .2s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent); color: #000;
  box-shadow: 0 0 20px color-mix(in srgb, var(--accent) 30%, transparent);
}
.btn-primary:hover { box-shadow: 0 0 30px color-mix(in srgb, var(--accent) 50%, transparent); }
[data-theme="minimal"] .btn-primary,
[data-theme="minimal"] .nav-demo,
[data-theme="corporate"] .btn-primary,
[data-theme="corporate"] .nav-demo,
[data-theme="redteam"] .btn-primary,
[data-theme="redteam"] .nav-demo { color: #fff !important; }

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

.btn-ghost {
  background: transparent; color: var(--accent); border: 1px solid var(--accent);
}
.btn-ghost:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }

.btn-lg { font-size: 1rem; padding: .8rem 1.8rem; }
.btn-sm { font-size: .8rem; padding: .4rem 1rem; }

/* ══ HERO ════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding-top: 64px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: var(--hero-glow);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .75rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.25rem;
}
.hero-eyebrow::before {
  content: ''; width: 20px; height: 1px; background: var(--accent);
}

.hero-title { margin-bottom: 1.25rem; }
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem); color: var(--text-muted);
  max-width: 560px; margin-bottom: 2.25rem; line-height: 1.7;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Hero visual / terminal */
.hero-visual { position: relative; }
.hero-visual .floating-badge {
  position: absolute; background: var(--card-bg);
  border: 1px solid var(--border); border-radius: 10px;
  padding: .6rem .9rem; font-size: .78rem; font-weight: 600;
  box-shadow: var(--shadow);
  animation: float 4s ease-in-out infinite;
}
.hero-visual .floating-badge .badge-num { font-size: 1.1rem; color: var(--accent); display: block; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ══ STATS BAR ═══════════════════════════════════ */
.stats-bar { background: var(--bg-secondary); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stats-bar .container { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 0; }
.stat-item { padding: 1.5rem 1rem; text-align: center; flex: 1; min-width: 120px; }
.stat-item + .stat-item { border-left: 1px solid var(--border); }
.stat-num { font-size: 1.75rem; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat-label { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .1em; margin-top: .2rem; }

@media (max-width: 640px) {
  .stats-bar .container { gap: 0; }
  .stat-item { flex: 0 0 50%; border-left: none; }
  .stat-item:nth-child(2n) { border-left: 1px solid var(--border); }
  .stat-item:nth-child(3), .stat-item:nth-child(4) { border-top: 1px solid var(--border); }
}

/* ══ CARDS ═══════════════════════════════════════ */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-accent);
  transform: translateY(-3px);
}

.card-icon {
  width: 48px; height: 48px; border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid var(--border-accent);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.1rem;
}
.card-icon svg { width: 22px; height: 22px; stroke: var(--accent); fill: none; }

.card h3 { margin-bottom: .5rem; }
.card p { font-size: .9rem; line-height: 1.65; }

/* Feature card with number */
.feature-num {
  font-size: 2.5rem; font-weight: 900; font-variant-numeric: tabular-nums;
  color: var(--border); position: absolute; top: 1rem; right: 1.25rem;
  font-family: 'JetBrains Mono', monospace; line-height: 1;
}
.card { position: relative; overflow: hidden; }

/* Pricing card */
.pricing-card { text-align: center; }
.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-accent);
}
.pricing-badge {
  display: inline-block; font-size: .7rem; font-weight: 700;
  background: var(--accent); color: #000;
  padding: .2rem .6rem; border-radius: 100px; margin-bottom: .75rem;
}
.price-main { font-size: 2.5rem; font-weight: 900; color: var(--text); line-height: 1; }
.price-main span { font-size: 1rem; font-weight: 500; color: var(--text-muted); }
.price-sub { font-size: .8rem; color: var(--text-muted); margin-top: .25rem; }
.price-features { list-style: none; text-align: left; margin: 1.5rem 0; }
.price-features li { display: flex; align-items: flex-start; gap: .5rem; font-size: .875rem; padding: .35rem 0; color: var(--text-muted); }
.price-features li::before { content: '✓'; color: var(--accent); font-weight: 700; flex-shrink: 0; margin-top: .05rem; }
.price-features li.no::before { content: '✕'; color: var(--text-muted); }
.price-features li.no { opacity: .5; }

/* Blog card */
.blog-card { display: flex; flex-direction: column; }
.blog-card .blog-meta { display: flex; gap: .5rem; margin-bottom: .75rem; flex-wrap: wrap; align-items: center; }
.blog-card h3 { margin-bottom: .5rem; }
.blog-card p { flex: 1; }
.blog-card .blog-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 1.25rem; font-size: .8rem; color: var(--text-muted); }

/* Badge "en vivo" para cards de artículos con datos dinámicos */
.tag-live {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .68rem;
  font-weight: 700;
  padding: .18rem .55rem;
  border-radius: 99px;
  background: color-mix(in srgb, #00ff88 10%, transparent);
  border: 1px solid color-mix(in srgb, #00ff88 35%, transparent);
  color: #00cc66;
  letter-spacing: .02em;
  line-height: 1;
}
.tag-live .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #00ff88;
  flex-shrink: 0;
  animation: live-pulse 2s ease-in-out infinite;
}
@keyframes live-pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .4; transform: scale(.75); }
}

/* Solution card */
.solution-card { border-top: 3px solid var(--accent); }
.solution-card .sector-icon { font-size: 2rem; margin-bottom: 1rem; }

/* ══ TESTIMONIALS ════════════════════════════════ */
.testimonial-card { border-left: 3px solid var(--accent); }
.testimonial-quote { font-size: 1.05rem; font-style: italic; color: var(--text); line-height: 1.7; margin-bottom: 1.25rem; }
.testimonial-author { display: flex; align-items: center; gap: .75rem; }
.author-avatar { width: 40px; height: 40px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 20%, transparent); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--accent); font-size: .9rem; }
.author-name { font-weight: 600; font-size: .9rem; }
.author-role { font-size: .78rem; color: var(--text-muted); }

/* ══ CTA BANNER ══════════════════════════════════ */
.cta-banner {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: ''; position: absolute; inset: 0;
  background: var(--hero-glow); pointer-events: none;
}
.cta-banner h2 { margin-bottom: 1rem; }
.cta-banner p { max-width: 500px; margin: 0 auto 2rem; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ══ FOOTER ══════════════════════════════════════ */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem; margin-bottom: 3rem;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand p { font-size: .875rem; max-width: 260px; margin-top: .75rem; }
.footer-col h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); margin-bottom: 1rem; }
.footer-col ul { list-style: none; }
.footer-col ul li + li { margin-top: .5rem; }
.footer-col ul li a { color: var(--text-muted); font-size: .875rem; transition: color .2s; }
.footer-col ul li a:hover { color: var(--accent); }

.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-bottom p { font-size: .8rem; color: var(--text-muted); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: .8rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--accent); }

/* ══ PAGE HERO ═══════════════════════════════════ */
.page-hero {
  padding: 8rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before { content: ''; position: absolute; inset: 0; background: var(--hero-glow); pointer-events: none; }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { margin-bottom: .75rem; }
.page-hero > .container > p { font-size: 1.1rem; max-width: 600px; margin: 0 auto 2rem; }

/* ══ LOGIN PAGE ══════════════════════════════════ */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 2rem;
}
.login-box {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 16px; padding: 2.5rem; width: 100%; max-width: 400px;
  box-shadow: var(--shadow);
  text-align: center;
}
.login-box h1 { font-size: 1.5rem; margin-bottom: .5rem; }
.login-box .login-sub { font-size: .875rem; margin-bottom: 2rem; }

.input-group { display: flex; flex-direction: column; gap: .5rem; text-align: left; margin-bottom: 1.25rem; }
.input-group label { font-size: .8rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; }
.input-field {
  width: 100%; background: var(--bg-secondary); border: 1px solid var(--border);
  color: var(--text); border-radius: 8px; padding: .7rem 1rem; font-size: .9rem;
  font-family: 'JetBrains Mono', monospace;
  transition: border-color .2s;
}
.input-field:focus { outline: none; border-color: var(--accent); }
.input-field::placeholder { color: var(--text-muted); }

.login-error { color: #ff6b6b; font-size: .825rem; margin-bottom: .75rem; display: none; }
.login-error.show { display: block; }

/* ══ ACCORDION (FAQ) ══════════════════════════════ */
.accordion { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.accordion-item + .accordion-item { border-top: 1px solid var(--border); }
.accordion-btn {
  width: 100%; background: var(--card-bg); border: none; color: var(--text);
  padding: 1.15rem 1.5rem; text-align: left; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  font-size: .95rem; font-weight: 600; font-family: inherit;
  transition: background .2s;
}
.accordion-btn:hover { background: var(--bg-tertiary); }
.accordion-btn .chevron { transition: transform .25s; flex-shrink: 0; color: var(--accent); }
.accordion-btn[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.accordion-body { background: var(--bg-secondary); max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.accordion-body.open { max-height: 400px; }
.accordion-body-inner { padding: 1rem 1.5rem 1.25rem; font-size: .9rem; color: var(--text-muted); line-height: 1.7; }

/* ══ TABS ════════════════════════════════════════ */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 2rem; overflow-x: auto; }
.tab-btn {
  background: none; border: none; color: var(--text-muted); font-size: .875rem; font-weight: 600;
  padding: .65rem 1.1rem; cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px; white-space: nowrap; font-family: inherit;
  transition: color .2s, border-color .2s;
}
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-btn:hover { color: var(--text); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ══ INTEGRATION BADGES ══════════════════════════ */
.integrations { display: flex; flex-wrap: wrap; gap: .75rem; }
.integration-badge {
  display: flex; align-items: center; gap: .5rem;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 8px; padding: .5rem .9rem; font-size: .8rem; font-weight: 600;
  color: var(--text-muted); transition: border-color .2s, color .2s;
}
.integration-badge:hover { border-color: var(--accent); color: var(--accent); }
.integration-badge .int-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ══ TIMELINE ════════════════════════════════════ */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding-bottom: 2.5rem; }
.timeline-item::before {
  content: ''; position: absolute; left: -2.375rem; top: .35rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg-primary);
  box-shadow: 0 0 8px var(--accent);
}
.timeline-year { font-size: .75rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .1em; margin-bottom: .35rem; }
.timeline-item h3 { margin-bottom: .35rem; }
.timeline-item p { font-size: .875rem; }

/* ══ TEAM CARD ═══════════════════════════════════ */
.team-card { text-align: center; }
.team-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem; font-weight: 800; color: #000;
  margin: 0 auto 1rem;
}
.team-role { font-size: .8rem; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.team-card p { font-size: .85rem; margin-top: .5rem; }

/* ══ ARCHITECTURE DIAGRAM ════════════════════════ */
.arch-diagram {
  background: var(--bg-primary); border: 1px solid var(--border);
  border-radius: 12px; padding: 2rem; overflow-x: auto;
  font-family: 'JetBrains Mono', monospace; font-size: .78rem;
  line-height: 2; color: var(--text-muted);
}
.arch-diagram .node { color: var(--accent); }
.arch-diagram .arrow { color: var(--accent-2); }
.arch-diagram .comment { color: var(--text-muted); opacity: .5; }

/* ══ MAP PLACEHOLDER ═════════════════════════════ */
.map-placeholder {
  height: 280px; background: var(--bg-secondary);
  border: 1px solid var(--border); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: .9rem; flex-direction: column; gap: .5rem;
}

/* ══ ADMIN PANEL ═════════════════════════════════ */
.admin-layout { display: flex; min-height: 100vh; padding-top: 64px; }
.admin-sidebar {
  width: 220px; background: var(--bg-secondary); border-right: 1px solid var(--border);
  padding: 1.5rem 1rem; flex-shrink: 0;
}
.admin-sidebar h2 { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-muted); margin-bottom: 1rem; padding: 0 .5rem; }
.admin-nav { list-style: none; }
.admin-nav li a {
  display: block; padding: .55rem .75rem; border-radius: 6px;
  color: var(--text-muted); text-decoration: none; font-size: .875rem; font-weight: 500;
  transition: background .2s, color .2s;
}
.admin-nav li a:hover, .admin-nav li a.active { background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); }
.admin-content { flex: 1; padding: 2rem; }
.admin-section + .admin-section { margin-top: 3rem; }
.admin-section h2 { font-size: 1.15rem; margin-bottom: 1.5rem; }

.theme-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.25rem; }
.theme-card {
  background: var(--card-bg); border: 2px solid var(--border);
  border-radius: 12px; padding: 1.25rem; cursor: pointer;
  transition: border-color .2s, transform .2s; text-align: center;
}
.theme-card:hover { transform: translateY(-3px); }
.theme-card.active { border-color: var(--accent); }
.theme-preview { height: 80px; border-radius: 8px; margin-bottom: .75rem; position: relative; overflow: hidden; }
.theme-preview-bar { height: 16px; display: flex; gap: 4px; padding: 4px; }
.theme-preview-bar span { height: 8px; flex: 1; border-radius: 2px; }
.theme-name { font-weight: 700; font-size: .9rem; margin-bottom: .25rem; }
.theme-desc { font-size: .75rem; color: var(--text-muted); }
.theme-active-badge { display: inline-block; margin-top: .5rem; font-size: .7rem; font-weight: 700; background: var(--accent); color: #000; padding: .15rem .5rem; border-radius: 100px; }

@media (max-width: 768px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
  .admin-nav { display: flex; flex-wrap: wrap; gap: .25rem; }
}
