/* 🔹 Header con fondo negro */
.logo img { height: 50px; }

.header {
  background: #000; /* Fondo negro */
  color: #F2F2F2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  border-bottom: 2px solid #000000;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header .logo {
  font-size: 1.5em;
  font-weight: bold;
  color: #05C7F2;
}

/* 🔹 Navegación */
.nav {
  display: flex;
  gap: 20px;
}

.nav a {
  color: #F2F2F2;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

.nav a:hover {
  color: #0CB1F2;
}

/* 🔹 Botón hamburguesa */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 6px;
}

.hamburger span {
  width: 30px;
  height: 3px;
  background: #fff;
  border-radius: 5px;
  transition: 0.35s ease; 
}

/* 🔹 Animación hamburguesa → X */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* 🔹 Estilos responsive menú */
@media (max-width: 768px) {

  .nav {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: #000;
    flex-direction: column;
    text-align: center;
    gap: 20px;
    padding: 20px 0;

    display: none;
    opacity: 0;
    transform: translateY(-25px);
  }

  /* Cuando se abre */
  .nav.show {
    display: flex;
    animation: dropdown 0.45s ease forwards; /* 👈 velocidad real */
  }

  .hamburger {
    display: flex;
  }
}

/* 🔹 Animación suave hacia abajo */
@keyframes dropdown {
  0% {
    opacity: 0;
    transform: translateY(-25px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}


body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;

  /* 🔥 Fondo con imagen */
  background-image: url("../imagenes/noticias.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;

  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: #ffffff;
}


h2 {
  text-align: center;
  margin: 2rem 0;
  font-size: 2rem;
}

.noticias-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  padding: 0 2rem 2rem;
}

.noticia {
  background: #fffcfc;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.5);
  transition: transform 0.3s;
}

.noticia:hover {
  transform: translateY(-5px);
}

.noticia img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.contenido {
  padding: 1rem;
}

.fecha {
  font-size: 0.9rem;
  color: #000000;
  display: block;
  margin-bottom: 0.5rem;
}

h3 {
  margin: 0.5rem 0;
  font-size: 1.2rem;
}

p {
  font-size: 0.95rem;
  color: #000000;
}

.btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: #00bfff;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.3s;
}

.btn:hover {
  background: #008ecc;
}

