/* ============================================================
   NETICA - CSS Principal
   Colores de marca: #103a39 · #66c3cb · #69c3ca · #5fa7ab
                     #070707 · #7b8286 · #edeeef · #fffcf4
   ============================================================ */

/* ---- VARIABLES ---- */
:root {
  --green-dark:   #103a39;
  --teal-light:   #66c3cb;
  --teal-mid:     #5fa7ab;
  --teal-soft:    #69c3ca;
  --black:        #070707;
  --gray:         #7b8286;
  --gray-light:   #edeeef;
  --cream:        #fffcf4;
  --white:        #ffffff;

  /* Semánticos */
  --primary:      var(--green-dark);
  --accent:       var(--teal-light);
  --text:         #1a1a1a;
  --text-muted:   var(--gray);
  --bg:           var(--cream);
  --bg-card:      var(--white);
  --border:       #d8dfe0;
  --shadow:       0 2px 16px rgba(16,58,57,.08);
  --shadow-lg:    0 8px 40px rgba(16,58,57,.14);

  /* Tipografía */
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  /* Espaciado */
  --radius:       12px;
  --radius-sm:    6px;
  --radius-lg:    20px;
  --gap:          1.5rem;

  /* Transiciones */
  --transition:   0.22s ease;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: 1rem; }

/* ---- UTILIDADES ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.sr-only { position: absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.mb-4 { margin-bottom: 2rem; }

/* ---- TIPOGRAFÍA ---- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--primary);
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
p  { margin-bottom: .85rem; }
p:last-child { margin-bottom: 0; }

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--primary);
  margin-bottom: .5rem;
}
.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin-bottom: 2.5rem;
}

/* ---- BOTONES ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn--primary {
  background: var(--primary);
  color: var(--white);
}
.btn--primary:hover {
  background: #0d2e2d;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(16,58,57,.3);
}
.btn--accent {
  background: var(--accent);
  color: var(--white);
}
.btn--accent:hover {
  background: var(--teal-mid);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(102,195,203,.4);
}
.btn--ghost {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn--ghost:hover {
  background: var(--primary);
  color: var(--white);
}
.btn--outline-light {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,.5);
}
.btn--outline-light:hover {
  background: rgba(255,255,255,.15);
  border-color: var(--white);
}
.btn--whatsapp {
  background: #25d366;
  color: var(--white);
}
.btn--whatsapp:hover {
  background: #1ebe5d;
  transform: translateY(-1px);
}
.btn--lg { padding: .85rem 2rem; font-size: 1.05rem; border-radius: var(--radius); }
.btn--sm { padding: .4rem .9rem; font-size: .85rem; }
.btn--full { width: 100%; justify-content: center; }
.btn--danger { background: #e53935; color: var(--white); }
.btn--danger:hover { background: #c62828; }

/* ---- NAVBAR ---- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
}
.navbar__inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 68px;
}
.navbar__logo img { height: 42px; width: auto; }
.navbar__links {
  display: flex;
  gap: 2rem;
  margin-left: auto;
}
.nav-link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .9rem;
  color: var(--text);
  letter-spacing: .02em;
  padding: .3rem 0;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--accent);
}
.navbar__actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-left: 1rem;
}
.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
}
.navbar__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: all var(--transition);
}

/* User menu dropdown */
.navbar__user-menu { position: relative; }
.btn-avatar {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .75rem .35rem .35rem;
  border-radius: 50px;
  border: 2px solid var(--border);
  transition: border-color var(--transition);
}
.btn-avatar:hover { border-color: var(--accent); }
.avatar-img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.avatar-initials {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-name-short { font-weight: 600; font-size: .9rem; color: var(--text); }
.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + .5rem);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: .5rem;
  display: none;
  z-index: 200;
}
.dropdown-menu.open { display: block; }
.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  color: var(--text);
  transition: background var(--transition);
}
.dropdown-menu a:hover { background: var(--gray-light); }
.dropdown-menu hr { border: none; border-top: 1px solid var(--border); margin: .3rem 0; }

/* ---- HERO ---- */
.hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, #1a5250 60%, #0d3130 100%);
  color: var(--white);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2366c3cb' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(102,195,203,.15);
  border: 1px solid rgba(102,195,203,.3);
  color: var(--teal-light);
  padding: .3rem .85rem;
  border-radius: 50px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  margin-bottom: 1.2rem;
}
.hero h1 { color: var(--white); margin-bottom: 1.2rem; }
.hero h1 span { color: var(--teal-light); }
.hero p { color: rgba(255,255,255,.8); font-size: 1.1rem; margin-bottom: 2rem; }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero__stats {
  display: flex;
  gap: 2rem;
  margin-top: 2.5rem;
}
.hero__stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--teal-light);
}
.hero__stat span { font-size: .85rem; color: rgba(255,255,255,.6); }
.hero__visual {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.hero__card-stack {
  position: relative;
  width: 340px;
  height: 320px;
}
.hero__floating-card {
  position: absolute;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  color: var(--white);
}
.hero__floating-card:nth-child(1) { top: 0; right: 0; width: 260px; }
.hero__floating-card:nth-child(2) { bottom: 0; left: 0; width: 220px; }
.hero__floating-card:nth-child(3) { top: 50%; left: 50%; transform: translate(-30%, -50%); width: 200px; }
.card-icon { font-size: 1.5rem; margin-bottom: .5rem; }
.card-title { font-family: var(--font-display); font-weight: 700; font-size: .9rem; }
.card-sub { font-size: .78rem; opacity: .7; margin-top: .2rem; }

/* ---- SECCIONES ---- */
.section { padding: 5rem 0; }
.section--alt { background: var(--white); }
.section--dark { background: var(--primary); color: var(--white); }
.section--dark h2, .section--dark h3, .section--dark .section-title { color: var(--white); }
.section--dark .section-subtitle { color: rgba(255,255,255,.7); }

/* ---- CARDS DE CURSOS ---- */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.course-card__thumb {
  height: 160px;
  background: linear-gradient(135deg, var(--green-dark), var(--teal-mid));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}
.course-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.course-card__modality {
  position: absolute;
  top: .75rem;
  right: .75rem;
  background: rgba(0,0,0,.5);
  color: var(--white);
  padding: .2rem .6rem;
  border-radius: 50px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
}
.course-card__modality--live { background: rgba(229,57,53,.85); }
.course-card__modality--recorded { background: rgba(16,58,57,.85); }
.course-card__body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.course-card__category {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
  margin-bottom: .4rem;
}
.course-card__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: .5rem;
  line-height: 1.3;
}
.course-card__desc { font-size: .88rem; color: var(--text-muted); flex: 1; margin-bottom: 1rem; }
.course-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.course-card__price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--primary);
}
.course-card__meta {
  display: flex;
  gap: 1rem;
  font-size: .78rem;
  color: var(--text-muted);
}

/* ---- BADGES ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .65rem;
  border-radius: 50px;
  font-size: .75rem;
  font-weight: 600;
}
.badge--live { background: #fde8e8; color: #c62828; }
.badge--recorded { background: #e3f2fd; color: #1565c0; }
.badge--beginner { background: #e8f5e9; color: #2e7d32; }
.badge--intermediate { background: #fff8e1; color: #f57f17; }
.badge--advanced { background: #fce4ec; color: #880e4f; }

/* ---- FEATURES / ICONOS ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}
.feature-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.feature-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.feature-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--green-dark), var(--teal-mid));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 1rem;
}
.feature-card h3 { font-size: 1rem; margin-bottom: .5rem; color: var(--primary); }
.feature-card p { font-size: .88rem; color: var(--text-muted); margin: 0; }

/* ---- FORMULARIOS ---- */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  color: var(--text);
  margin-bottom: .4rem;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: .7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text);
  font-size: .95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(102,195,203,.2);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-error { color: #e53935; font-size: .82rem; margin-top: .3rem; }
.form-hint  { color: var(--text-muted); font-size: .82rem; margin-top: .3rem; }

/* Auth card */
.auth-page {
  min-height: calc(100vh - 68px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, var(--gray-light) 0%, var(--bg) 100%);
}
.auth-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 420px;
}
.auth-card__logo { text-align: center; margin-bottom: 1.5rem; }
.auth-card__logo img { height: 48px; margin: 0 auto; }
.auth-card__title { font-size: 1.5rem; text-align: center; margin-bottom: .3rem; }
.auth-card__subtitle { text-align: center; color: var(--text-muted); font-size: .9rem; margin-bottom: 2rem; }
.auth-divider { text-align: center; color: var(--text-muted); font-size: .85rem; margin: 1rem 0; position: relative; }
.auth-divider::before, .auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

/* ---- DASHBOARD ---- */
.dashboard-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 68px);
}
.dashboard-sidebar {
  background: var(--white);
  border-right: 1px solid var(--border);
  padding: 2rem 0;
}
.sidebar-nav { padding: 0 1rem; }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: .9rem;
  color: var(--text);
  margin-bottom: .2rem;
  transition: all var(--transition);
}
.sidebar-link:hover { background: var(--gray-light); color: var(--primary); }
.sidebar-link.active { background: var(--primary); color: var(--white); }
.sidebar-link .icon { font-size: 1.1rem; width: 20px; text-align: center; }
.dashboard-content { padding: 2rem; }
.page-header { margin-bottom: 2rem; }
.page-header h1 { font-size: 1.6rem; }
.page-header p { color: var(--text-muted); }

/* Progress bar */
.progress-bar { background: var(--gray-light); border-radius: 50px; height: 8px; overflow: hidden; }
.progress-bar__fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 50px; transition: width .5s ease; }

/* ---- ALERTS ---- */
.alert {
  padding: .85rem 1.2rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: .9rem;
  display: flex;
  gap: .5rem;
  align-items: flex-start;
}
.alert--success { background: #e8f5e9; color: #2e7d32; border-left: 4px solid #4caf50; }
.alert--error   { background: #fde8e8; color: #c62828; border-left: 4px solid #f44336; }
.alert--info    { background: #e3f2fd; color: #1565c0; border-left: 4px solid #2196f3; }
.alert--warning { background: #fff8e1; color: #f57f17; border-left: 4px solid #ffc107; }

/* ---- FOOTER ---- */
.footer {
  background: var(--primary);
  color: rgba(255,255,255,.8);
  padding: 4rem 0 0;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  padding-bottom: 3rem;
}
.footer__logo { mix-blend-mode: screen; margin-bottom: 1rem; }
.footer__tagline { font-size: .9rem; margin-bottom: 1.25rem; }
.footer__social { display: flex; gap: .75rem; }
.footer__social a {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  color: var(--white);
}
.footer__social a:hover { background: var(--accent); }
.footer__links h4 {
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--white);
  margin-bottom: 1rem;
}
.footer__links ul li { margin-bottom: .5rem; }
.footer__links a { font-size: .88rem; transition: color var(--transition); }
.footer__links a:hover { color: var(--white); }
.footer__contact h4 {
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--white);
  margin-bottom: 1rem;
}
.footer__contact p { font-size: .88rem; margin-bottom: .5rem; }
.footer__contact a:hover { color: var(--white); }
.footer__newsletter { margin-top: 1.25rem; }
.footer__newsletter p { font-size: .85rem; margin-bottom: .75rem; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 1.25rem 0;
}
.footer__bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .82rem;
  gap: 1rem;
}
.footer__bottom a { transition: color var(--transition); }
.footer__bottom a:hover { color: var(--white); }

/* ---- WHATSAPP FLOTANTE ---- */
.whatsapp-float {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  width: 56px;
  height: 56px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,.45);
  z-index: 999;
  transition: transform var(--transition), box-shadow var(--transition);
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37,211,102,.6);
}

/* ---- TABLA ADMIN ---- */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  background: var(--gray-light);
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .75rem 1rem;
  text-align: left;
  color: var(--text-muted);
}
td { padding: .85rem 1rem; border-bottom: 1px solid var(--border); font-size: .9rem; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(102,195,203,.04); }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .hero__inner  { grid-template-columns: 1fr; }
  .hero__visual { display: none; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .navbar__links, .navbar__actions { display: none; }
  .navbar__links.open, .navbar__actions.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0; right: 0;
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 1rem;
    gap: .5rem;
    box-shadow: var(--shadow-lg);
  }
  .navbar__hamburger { display: flex; }
  .navbar__inner { position: relative; }

  .dashboard-layout { grid-template-columns: 1fr; }
  .dashboard-sidebar { display: none; }

  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer__bottom .container { flex-direction: column; text-align: center; }
  .courses-grid { grid-template-columns: 1fr; }
  .hero__stats { flex-wrap: wrap; gap: 1rem; }
  .hero__actions { flex-direction: column; }
  .features-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .features-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 2rem 1.25rem; }
}
