:root {
  --bg: #020617;
  --bg-alt: #020617;
  --card-bg: #020617;
  --accent: #22c55e;
  --accent-soft: rgba(34, 197, 94, 0.16);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: #1f2937;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.85);
}

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

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #020617 0, #000 70%);
  color: var(--text);
}

body {
  line-height: 1.6;
}

/* Layout */

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

/* Header */

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.8));
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: radial-gradient(circle at 25% 20%, #22c55e, #0f172a);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #e5e7eb;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.6);
}

.logo-text-group {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.logo-text-main {
  font-weight: 600;
  letter-spacing: 0.03em;
}

.logo-text-sub {
  font-size: 0.8rem;
  color: var(--muted);
}

.menu a {
  margin-left: 1rem;
  font-size: 0.95rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.18s ease;
}

.menu a:hover {
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
}

.link-main {
  border-color: rgba(148, 163, 184, 0.6);
}

/* Hero */

.hero {
  padding: 3rem 0 2.4rem;
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr);
}

.hero-text h1 {
  font-size: clamp(2rem, 3vw, 2.6rem);
  margin-bottom: 0.7rem;
}

.hero-text p {
  color: var(--muted);
  max-width: 720px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.4rem;
}

.hero-note {
  margin-top: 0.8rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.4rem;
  font-size: 0.95rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #020617;
  font-weight: 600;
  box-shadow: 0 14px 35px rgba(34, 197, 94, 0.5);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 45px rgba(34, 197, 94, 0.7);
}

.btn-outline {
  background: rgba(15, 23, 42, 0.95);
  border-color: rgba(148, 163, 184, 0.6);
  color: var(--muted);
}

.btn-outline:hover {
  color: var(--text);
  border-color: var(--accent);
}

.btn-full {
  width: 100%;
}

.btn-small {
  padding: 0.5rem 1.1rem;
  font-size: 0.88rem;
}

/* Sections */

.section {
  padding: 2.6rem 0;
}

.section-alt {
  background: radial-gradient(circle at top, #020617 0, #000 80%);
}

.section-title {
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
}

.section-subtitle {
  color: var(--muted);
  max-width: 680px;
}

/* Filters */

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.4rem;
}

.filters-label {
  font-size: 0.9rem;
  color: var(--muted);
}

.tag {
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  font-size: 0.78rem;
  color: var(--muted);
}

/* Courses */

.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.3rem;
  margin-top: 1.8rem;
}

.course-card {
  background: rgba(15, 23, 42, 0.98);
  border-radius: var(--radius-xl);
  padding: 1.2rem 1.1rem 1rem;
  border: 1px solid rgba(31, 41, 55, 0.92);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.course-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.course-header h3 {
  font-size: 1.02rem;
  margin: 0;
}

.badge {
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.7);
  color: var(--muted);
  white-space: nowrap;
}

.badge-advanced {
  border-color: rgba(251, 191, 36, 0.85);
  color: #fbbf24;
}

.badge-intermediate {
  border-color: rgba(56, 189, 248, 0.85);
  color: #38bdf8;
}

.badge-basic {
  border-color: rgba(129, 140, 248, 0.85);
  color: #a5b4fc;
}

.badge-security {
  border-color: rgba(248, 113, 113, 0.85);
  color: #fca5a5;
}

.badge-custom {
  border-color: rgba(52, 211, 153, 0.9);
  color: #6ee7b7;
}

.course-desc {
  font-size: 0.92rem;
  color: var(--muted);
}

.course-meta {
  list-style: none;
  padding-left: 0;
  margin: 0.2rem 0 0.6rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.course-meta li {
  margin-bottom: 0.2rem;
}

.course-actions {
  margin-top: auto;
  display: flex;
  justify-content: flex-start;
}

/* Modes */

.modes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.3rem;
  margin-top: 1.6rem;
}

.mode-card {
  background: rgba(15, 23, 42, 0.97);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1rem;
  border: 1px solid rgba(31, 41, 55, 0.9);
}

.mode-card h3 {
  margin-top: 0;
  margin-bottom: 0.4rem;
  font-size: 1rem;
}

.mode-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Contact */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.1fr);
  gap: 2rem;
  margin-top: 1.4rem;
}

.contact-list {
  list-style: none;
  padding-left: 0;
  margin-top: 0.7rem;
}

.contact-list li {
  position: relative;
  padding-left: 1.3rem;
  margin-bottom: 0.4rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.contact-list li::before {
  content: "›";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
}

.contact-note {
  margin-top: 0.8rem;
  font-size: 0.9rem;
  color: var(--muted);
}

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

.contact-note a:hover {
  text-decoration: underline;
}

.contact-card {
  background: rgba(15, 23, 42, 0.97);
  border-radius: var(--radius-xl);
  padding: 1.4rem 1.2rem;
  border: 1px solid rgba(31, 41, 55, 0.92);
  box-shadow: var(--shadow-soft);
}

.contact-card h3 {
  margin-top: 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 0.6rem;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  font-size: 0.88rem;
  gap: 0.2rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  background: #020617;
  border-radius: 0.8rem;
  border: 1px solid rgba(55, 65, 81, 0.95);
  padding: 0.45rem 0.6rem;
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.5);
  background: #020617;
}

.contact-alt {
  margin-top: 0.9rem;
  font-size: 0.88rem;
  color: var(--muted);
}

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

.contact-alt a:hover {
  text-decoration: underline;
}

/* Footer */

.footer {
  border-top: 1px solid rgba(31, 41, 55, 0.9);
  padding: 1.3rem 0;
  background: #020617;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

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

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

/* Responsive */

@media (max-width: 1024px) {
  .courses-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .modes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .nav {
    justify-content: space-between;
  }

  .menu {
    display: none; /* si luego quieres un menú móvil lo agregas */
  }

  .hero {
    padding-top: 2.2rem;
  }

  .courses-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .modes-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
