/* ===========================
   Base - matibanegas.com
=========================== */

:root{
  --bg: #0f1115;
  --text: #e9eef5;
  --muted: #b6c2d1;
  --card: #171a21;
  --link: #8ab4ff;
}

*{
  box-sizing: border-box;
}

body{
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Layout */

header,
main,
footer{
  width: min(1100px, 92%);
  margin: 0 auto;
}

header{
  padding: 20px 0;
  position: relative;
  z-index: 9999;
}

main{
  padding: 40px 0 60px;
}

section{
  background: var(--card);
  padding: 28px;
  border-radius: 14px;
}

p{
  color: var(--muted);
}

footer{
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 14px;
}

/* ===========================
   MENU PRINCIPAL
=========================== */

.nav{
  width: 100%;
}

.menu{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 18px;
  align-items: center;
}

.menu li{
  position: relative;
}

/* Links base */

.menu a{
  color: var(--text);
  text-decoration: none;
  padding: 8px 12px;
  display: inline-block;
  border-radius: 8px;
  opacity: .9;
  cursor: pointer;
  transition: all .15s ease;
}

/* Hover visible (fondo oscuro) */

.menu a:hover{
  color: #ffffff;
  background: rgba(255,255,255,.15);
  box-shadow: inset 0 -2px 0 var(--link);
  opacity: 1;
}

/* ===========================
   SUBMENU
=========================== */

.submenu{
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 230px;
  background: var(--card);
  list-style: none;
  padding: 10px;
  margin-top: 8px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  z-index: 99999;
}

/* Zona puente invisible */
.has-submenu::after{
  content: "";
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  height: 10px;
}

/* Activación estable */
.has-submenu:hover > .submenu,
.has-submenu:focus-within > .submenu{
  display: block;
}

/* Links submenu */

.submenu li a{
  padding: 10px 12px;
  display: block;
  border-radius: 8px;
  white-space: nowrap;
}

.submenu li a:hover{
  background: rgba(255,255,255,.10);
}

/* Enlaces globales dentro del contenido */

main a{
  color: var(--link);
  text-decoration: none;
}

main a:hover{
  text-decoration: underline;
}

