body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: linear-gradient(to right, #c2e9fb, #bfcfe9);
  color: #222;
}

header {
  background-color: #0b3d91;
  color: white;
  text-align: center;
  padding: 30px 10px;
}

nav {
  background: #1565c0;
  padding: 10px 0;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 0;
}

nav li {
  margin: 0 20px;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 8px 15px;
  border-radius: 8px;
  transition: 0.3s ease-in-out;
}

nav a:hover {
  background: white;
  color: #1565c0;
  transform: scale(1.1);
}

main {
  padding: 20px;
}

section {
  background-color: transparent;
  margin: 20px auto;
  padding: 20px;
  max-width: 900px;
}

section h2 {
  color: #0b3d91;
  text-align: center;
}

.animada {
  animation: aparecer 1.5s ease-in-out;
}

@keyframes aparecer {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tabla-recursos {
  width: 100%;
  text-align: center;
  border-collapse: collapse;
}

.tabla-recursos th {
  background: #1565c0;
  color: white;
  padding: 12px;
}

.tabla-recursos td {
  border: 1px solid #ddd;
  padding: 12px;
}

img, iframe {
  width: 220px;
  border-radius: 15px;
  margin: 5px auto;
  display: block;
  transition: 0.3s ease;
}

img:hover, iframe:hover {
  transform: scale(1.05);
}

.caja-relativa {
  position: relative;
  width: 420px;
  height: 220px;
  margin: 40px auto;
  padding: 25px;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  border-radius: 20px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 18px;

  animation: flotar 3s infinite ease-in-out;

  transition: 0.4s ease;
}

.caja-relativa:hover {
  transform: scale(1.05) rotate(1deg);
}

.caja-absoluta {
  position: absolute;
  top: -15px;
  right: -15px;
  background: white;
  color: #2575fc;
  padding: 10px 14px;
  border-radius: 50%;
  font-size: 20px;
}

@keyframes flotar {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}

footer {
  background-color: #0b3d91;
  color: white;
  text-align: center;
  padding: 15px;
  margin-top: 30px;
}

@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    align-items: center;
  }

  img, iframe {
    width: 100%;
  }

  .caja-relativa {
    width: 90%;
    height: auto;
  }
}
