/* Estilo global */
body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  background: #f9f9f9;
  color: #333;
  overflow-x: hidden;
  padding-top: 80px; /* compensa el header fijo */
}

/* Enlaces globales */
a {
  text-decoration: none;
  color: #333;
  font-weight: 600;
}
a:visited { color: #333; }
a:hover   { color: #00cfff; }
a:active  { color: #00cfff; }

/* Header fijo */
header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  background: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 40px;
  z-index: 1000;
  box-sizing: border-box;
}
header img { height: 40px; }

nav {
  display: flex;
  flex-wrap: wrap;       /* permite que los enlaces bajen si no caben */
  justify-content: flex-end;
  gap: 20px;             /* espacio uniforme entre enlaces */
  max-width: 70%;        /* evita que se coma todo el header */
}
nav a {
  flex-shrink: 0;        /* evita que se compriman demasiado */
  padding: 8px 12px;
  border-radius: 6px;
  transition: background 0.3s, color 0.3s;
}
nav a:hover {
  background: #00cfff;
  color: white;
}

/* Hero con gradiente animado */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
  background: linear-gradient(135deg, #40e0d0, #87cefa, #fff176);
  background-size: 200% 200%;
  animation: moveGradient 15s linear infinite;
}
@keyframes moveGradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.hero h1 { font-size: 3em; margin: 0; }
.hero p  { font-size: 1.2em; margin: 20px 0; }
.hero a {
  background: white;
  color: #00cfff;
  padding: 12px 24px;
  border-radius: 25px;
  font-weight: bold;
  transition: transform 0.3s;
}
.hero a:hover { transform: scale(1.1); }

/* Secciones */
section {
  padding: 120px 40px;
  opacity: 0;
  transform: translateY(50px);
  transition: all 1s ease;
}
section.visible {
  opacity: 1;
  transform: translateY(0);
}
section h2 {
  margin-bottom: 40px;
}

/* Galería de apps */
.gallery {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: 30px;
  padding: 20px;
}
.gallery::-webkit-scrollbar { display: none; }
.card {
  min-width: 250px;
  flex: 0 0 auto;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  padding: 30px 20px;
  text-align: center;
  transition: transform 0.3s;
  opacity: 0;
  transform: translateY(30px);
}
.card.visible {
  opacity: 1;
  transform: translateY(0);
}
.card img {
  height: 70px;
  margin-bottom: 15px;
}
.card:hover { transform: translateY(-10px); }

/* Footer */
footer {
  background: #333;
  color: white;
  text-align: center;
  padding: 40px;
}

/* Responsivo */
@media (max-width: 600px) {
  nav {
    flex-direction: column;
    align-items: flex-start;
    max-width: 100%;
  }
  nav a {
    margin: 10px 0;
    width: 100%; /* cada enlace ocupa toda la línea */
    text-align: left;
  }
  section {
    padding: 80px 20px;
  }
}

/* Contenedor del dropdown */
.dropdown {
  position: relative;
  display: inline-block;
  vertical-align: middle; /* Alinea con los demás enlaces */
}

/* Enlace principal del dropdown */
.dropdown > a {
  color: #333;
  font-weight: 600;
  text-decoration: none;
  padding: 0.5rem 1rem;
  display: inline-block; /* Igual que los demás enlaces */
}

.dropdown > a:hover {
  text-decoration: underline;
}

/* Submenú */
.dropdown-content {
  display: none;
  position: absolute;
  top: 100%; /* Se coloca justo debajo del enlace */
  left: 0;
  background-color: #fff;
  min-width: 220px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  z-index: 1;
}

.dropdown-content a {
  color: #333;
  padding: 0.7rem 1rem;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: #f1f1f1;
}

/* Mostrar submenú al pasar el mouse */
.dropdown:hover .dropdown-content {
  display: block;
}