/* Global Variables & Theme */
:root {
  /* Brand Colors */
  --primary: #800000;
  --primary-hover: #600000;
  --secondary: #1a1a1a;
  --accent: #e5e7eb;
  
  /* Backgrounds */
  --bg-white: #ffffff;
  --bg-light: #f8f9fa;
  --bg-dark: #111827;
  
  /* Text */
  --text-main: #374151;
  --text-light: #6b7280;
  --text-white: #ffffff;
  
  /* Spacing */
  --container-width: 1200px;
  --header-height: 80px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  
  /* Transitions */
  --transition-speed: 0.3s;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-speed);
}

ul {
  list-style: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: var(--secondary);
  line-height: 1.2;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Utilities */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-white);
  border: 2px solid var(--primary);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: var(--text-white);
}

/* Header & Nav */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-menu {
  display: flex;
  gap: 30px;
}

.nav-link {
  font-weight: 500;
  color: var(--secondary);
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--primary);
  transition: width var(--transition-speed);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.hamburger {
  display: none;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--bg-white);
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow-md);
    transform: translateY(-150%);
    transition: transform var(--transition-speed);
  }
  
  .nav-menu.active {
    transform: translateY(0);
  }
  
  .hamburger {
    display: block;
  }
}

/* --- Staging/UX helpers --- */
.system-card.disabled{
  opacity: .65;
  cursor: not-allowed;
  pointer-events: auto; /* allow tooltip */
}
.badge-soon{
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.15);
  margin-bottom: 10px;
}
.form-note{
  margin: 12px 0 0;
  font-size: 14px;
  opacity: .85;
}

.nav-menu a.active{
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* ===== Dropdown Sistemas ===== */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-caret {
  font-size: 0.7em;
  opacity: 0.7;
}

/* Menú */
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  padding: 8px 0;
  display: none;
  z-index: 2000;
}

.nav-dropdown-menu a {
  display: block;
  padding: 10px 16px;
  font-size: 0.95rem;
  color: var(--text-main);
  text-decoration: none;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover {
  background: var(--bg-light);
  color: var(--primary);
}

.nav-dropdown-sep {
  height: 1px;
  background: #eee;
  margin: 6px 0;
}

/* Hover desktop */
@media (hover: hover) {
  .nav-dropdown:hover .nav-dropdown-menu {
    display: block;
  }
}

/* Mobile: se maneja con clase .open */
.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}