* {
    margin: 0px;
    padding: 0px;
    font-family: sans-serif;
    color: white;
    text-decoration: none;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: auto;
    background: #0c0c0c;
}

header {
    background: darkred;
    height: 80px;
    width: 100%;
    display: block;
}

a.Premos img {
    max-width: 73px;
    margin: 5px;
    border-radius: 20%;
    overflow: hidden;
}

.navbar {
    float: right;
    margin-right: 20px;
}

.navbar a {
    display: inline-block;
    line-height: 80px;
    margin: 0 5px;
}

.admin-link {
  color: inherit;
  text-decoration: none;
  font-weight: bold;
}

.admin-link:hover {
  text-decoration: underline;
}
/* Estilo general de la sección de noticias */
.news-section {
  padding: 40px 20px;
  background-color: #0c0c0c;
  text-align: center; /* Centra el título y otros textos */
  margin-bottom: 40px;
}

.news-section h1 {
  font-size: 2.5em;
  color: white;
  margin-bottom: 20px;
  border-bottom: 2px solid blue;
  display: inline-block;
  padding-bottom: 10px;
}

/* Grid responsive para las tarjetas */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  padding: 20px;
  justify-items: center; /* Centra cada tarjeta en su celda */
}

/* Estilo de cada tarjeta de noticia/proyecto */
.news-card {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s forwards;
  width: 90%; /* Ajusta el ancho de las tarjetas */
}

/* Animación de aparición */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Imagen de la tarjeta – se mantiene centrada */
.news-card img {
  width: 400px;
  display: block;
  margin: 0 auto;
}

/* Contenido interno de la tarjeta centrado */
.news-card-content {
  padding: 20px;
  text-align: center;
}

.news-card-content .news-label {
  font-size: 14px;
  color: #777;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.news-card-content h2 {
  font-size: 1.6em;
  color: #002147;
  margin-bottom: 15px;
}

.news-card-content p {
  font-size: 1em;
  color: #555;
  margin-bottom: 15px;
}

/* Botón de llamado a la acción */
.news-card-content a.bx-link {
  text-decoration: none;
  display: inline-block;
  font-weight: bold;
  color: #ffcc00;
  border: 1px solid #ffcc00;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.news-card-content a.bx-link:hover {
  background-color: #ffcc00;
  color: #002147;
}

/* Efecto hover general en las tarjetas */
.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.funciones {
    margin: 40px;
    background: #0c0c0c;
}

.funciones h2 {
    margin-bottom: 30px;
}

/* Estilos para la sección de Novedades */
.funciones {
  padding: 40px 20px;
  background-color: #0c0c0c;  /* Fondo claro para contrastar el grid, si se desea */
  text-align: center;
}

.funciones h2 {
  font-size: 2.5em;
  color: blue;
  margin-bottom: 30px;
  border-bottom: 2px solid blue;
  display: inline-block;
  padding-bottom: 10px;
}

.funciones h3 {
  color: white;
}
/* Grid responsive para los contenedores */
#sistema {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  padding: 20px;
}

/* Estilo de las tarjetas individuales */
#sistema .contenedor {
  background: #000;  /* Fondo negro para cada tarjeta */
  color: #fff;       /* Texto en blanco para mayor legibilidad */
  border: 1px solid gray;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Aseguramos que la imagen se muestre de forma responsiva y centrada */
#sistema .contenedor img {
  max-width: 100%;
  margin: 0 auto 15px;
  display: block;
  border-radius: 4px;
}

/* Ajustes de tipografía */
#sistema .contenedor h2 {
  font-size: 1.2em;
  font-weight: 400;
  margin-bottom: 10px;
}

#sistema .contenedor h5 {
  font-size: 0.9em;
  font-weight: 300;
  color: #ccc;
  margin-bottom: 15px;
}

#sistema .contenedor h3 {
  font-size: 1em;
  font-weight: 500;
  margin-bottom: 10px;
  line-height: 1.4;
}

/* Estilo del enlace de llamado a la acción */
#sistema .contenedor .bx-link {
  text-decoration: none;
  color: #ffcc00;
  font-weight: 600;
  border: 1px solid #ffcc00;
  padding: 6px 12px;
  border-radius: 4px;
  transition: background-color 0.3s ease, color 0.3s ease;
  display: inline-block;
  margin-top: 10px;
}

#sistema .contenedor .bx-link:hover {
  background-color: #ffcc00;
  color: #002147;
}

/* Efecto hover para toda la tarjeta */
#sistema .contenedor:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Variables globales */
:root {
  --espacio: 20px;
  --color-naranja: #ff7f00;
  --color-naranja-dark: #e67100; /* Color manualmente definido en lugar de darken() */
  --color-blanco: #ffffff;
}

/* ========== SECCIÓN ÚNETE ========== */
#Unete {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: red; /* Fondo rojo definido aquí */
  padding: calc(var(--espacio) * 2) var(--espacio);
  position: relative;
  color: var(--color-blanco);
  animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.unete__logo img {
  max-width: 150px;
  margin-bottom: var(--espacio);
}

.unete__mensaje h2 {
  font-size: 1.8rem;
  margin-bottom: var(--espacio);
  font-weight: 600;
}

/* Formulario centrado y responsivo */
.unete__form {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  width: 100%;
  max-width: 500px;
  justify-content: center;
}

.unete__form input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s ease;
}

.unete__form input:focus {
  border-color: var(--color-naranja);
}

.btn-unete {
  background-color: var(--color-naranja);
  color: var(--color-blanco);
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn-unete:hover,
.btn-unete:focus {
  background-color: var(--color-naranja-dark);
  transform: scale(1.05);
  outline: none;
}
  /* ========== FOOTER ========== */
  footer {
    background-color: var(--color-footer);
    color: #ccc;
    padding: var(--espacio);
    margin-top: var(--espacio);
  }
  
  .footer__nav ul {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: flex-start;  /* alineado a la izquierda */
  }
  
  .footer__nav a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.2s;
  }
  
  .footer__nav a:hover {
    color: var(--color-blanco);
  }
  
  .footer__copy {
    text-align: center;
    margin-top: var(--espacio);
    font-size: 0.9rem;
  }

@media (min-width: 1024px) {
    .principal p {
        font-size: 14px;
        position: relative;
        display: flex;
        top: 580px;
        right: 690px;
        white-space: nowrap;
    }
    
    /* Responsive general */
@media (max-width: 768px) {
  header {
    height: auto;
    text-align: center;
  }

  .navbar {
    float: none;
    margin: 10px 0;
  }

  .navbar a {
    display: block;
    line-height: normal;
    padding: 10px;
  }

  .news-card img {
    width: 100%;
    height: auto;
  }

  #sistema {
    grid-template-columns: 1fr; /* Una sola columna en móvil */
    gap: 20px;
  }

  .unete__form {
    flex-direction: column;
    gap: 10px;
  }

  .btn-unete {
    width: 100%;
  }
}
@media (max-width: 480px) {
  h1, h2 {
    font-size: 1.4em;
  }

  p {
    font-size: 0.9em;
  }

  
  .news-section h1,
  .funciones h2 {
    font-size: 1.8em;
  }
  .news-card-content h2 {
    font-size: 1.2em;
  }
}
}
