body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background-color: #000000;
  }
  
  .Contenedor{
       
      display:grid;
      grid-template-columns: repeat(5,20% 20% 20% 20% 20%);
      grid-template-rows:repeat(1, auto);
      grid-template-areas:"topnav topnav topnav topnav topnav"
                          "bloque1 bloque1 bloque1 bloque1 bloque1"
                          "publicaciones publicaciones publicaciones publicaciones publicaciones"
                          "eventos eventos eventos eventos eventos"
                          "todos todos todos todos todos"
                           "footer-mx footer-mx footer-mx footer-mx footer-mx"
                        
                         
      ;}
  
  
      .topnav {grid-area: topnav;
        overflow: hidden;
        background-color: #000000;
    position: fixed;
    width: 100%;
    z-index: 3;
    margin-bottom: 50px;
      }
      .topnav a {
        float: left;
        display: block;
        color: #f2f2f2;
        text-align: center;
        padding: 14px 16px;
        text-decoration: none;
        font-size: 15px;
        font-weight:600;
      }

      .topnav a:hover {
        background-color: #009de6;
        color: rgb(255, 255, 255);
        text-decoration: underline;
      }
    
      .topnav .im{
        background-color: #000000;
        color: rgb(255, 255, 255);
       font-size: 9px;
      }
      .topnav .im:hover{
        background-color: #000000;
        color: #009de6;
        text-decoration: underline;
       
      }
    
      .topnav .im img:hover{
        margin: auto;
        width: 30px;
        
      }
     
    
      .topnav a.active {
        background-color: #000000;
        color: rgb(255, 255, 255);
      }
      .topnav .icon {
        display: none;
      }
  
  
/**/
.bloque1 {
  grid-area: bloque1;
  margin-top: 50px;
  position: relative;
  height: 45vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background:
    linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.6)),
    url('../img/galaxi.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  text-align: center;
  z-index: 1;
  margin-top: 0px;
}

  
  
  
/* Contenedor principal */
.publicaciones {
  grid-area: publicaciones;
  padding: 20px;
  box-sizing: border-box;
  /*background-color: #e2e2e2;*/
background-color: #000000;
  /* Scroll horizontal */
  overflow-x: auto;
  overflow-y: hidden;

  white-space: nowrap; /* Mantiene las cards en fila */
  width: 100%;
  max-width: 100%;
  height: auto;

  margin: 0 auto;
}

/* Contenedor interno que alinea las tarjetas en fila */
.publicaciones .scro {
  display: inline-flex;
  flex-direction: row; /* horizontal */
  gap: 20px;
  padding: 20px;
}

/* Cada tarjeta */
.publicaciones .cards {
  display: flex;
  flex-direction: column;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: 1px solid #ddd;

  width: 320px;     /* Tamaño fijo para slider */
  min-width: 320px; /* IMPORTANTE para scroll horizontal */
  height: auto;

  white-space: normal; /* permite que su contenido siga normal */
}

/* Encabezado */
.publicaciones .cards-header {
  padding: 15px;
  border-bottom: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.publicaciones .cards-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

/* Cuerpo */
.publicaciones .cards-body {
  flex-grow: 1;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.publicaciones .cards-body img {
  width: 100%;
  height: 180px;
  border-radius: 8px;
  object-fit: cover;
}

/* Pie */
.publicaciones .cards-footer {
  padding: 10px;
  border-top: 1px solid #ddd;
  background-color: #f7f7f7;
  display: flex;
  justify-content: space-between;
}

/* Responsivo */
@media (max-width: 768px) {
  .publicaciones {
    padding: 10px;
    font-size: 12px;
  }

  .publicaciones .cards {
    width: 340px;
    min-width: 340px;
  }
}

@media (max-width: 480px) {
  .publicaciones .cards {
    width: 340px;
    min-width: 340px;
  }

  .publicaciones .cards-header h3 {
    font-size: 16px;
  }
}





/* Contenedor de paginación fijo */
.paginacion {
  position: sticky;      /* Se queda fija mientras haces scroll */
  bottom: 0;             /* Siempre pegada abajo */
  left: 0;
  width: 100%;
  background: #fff;
  padding: 15px 0;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;

  border-top: 2px solid #ccc;
  z-index: 999;          /* Se superpone a las cards */
}

/* Estilo general para los botones */
.paginacion a {
  padding: 8px 14px;
  background: #007bff;
  color: white;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.paginacion a:hover {
  background: #0056b3;
}

.paginacion span {
  font-size: 14px;
  font-weight: bold;
}

.publicaciones {
  position: relative;
  padding: 20px;
  background-color: #e2e2e2;
  overflow: hidden;
  box-sizing: border-box;
}

/* Botones laterales SOLO para eventos */
.publicaciones .btn-left-1,
.publicaciones .btn-right-1 {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(0,0,0,0.35);
  border-radius: 50%;
  color: #fff;
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 50; /* menor que otros si tienes overlays globales */
  transition: background .18s ease;
  user-select: none;
}

.publicaciones .btn-left-1:hover,
.publicaciones .btn-right-1:hover {
  background: rgba(0,0,0,0.6);
}

.publicaciones .btn-left-1 { left: 8px; }
.publicaciones .btn-right-1 { right: 8px; }

/* Si quieres que los botones se oculten en pantallas pequeñas: */
@media (max-width: 480px) {
  .publicaciones .btn-left-1,
  .publicaciones .btn-right-1 {
    display: none;
  }
}

.btn-left:hover, .btn-right:hover {
  background: rgba(0,0,0,0.8);
}

.btn-left {
  left: 10px;
}

.btn-right {
  right: 10px;
}
/* === PUBLICACIONES - SCROLL HORIZONTAL REAL === */
.publicaciones .scro {
  display: flex !important;         /* Scroll horizontal */
  flex-wrap: nowrap !important;     /* NO se bajan */
  overflow-x: auto !important;      /* Activa scroll */
  scroll-behavior: smooth;
  gap: 15px;
  padding: 10px 0;
}

/* Cada tarjeta debe tener tamaño fijo para hacer scroll */
.publicaciones .cards {
  flex: 0 0 auto !important;        /* No crecer, no reducir */
  width: 300px !important;          /* Ajusta si quieres más grande */
}




/* ================================
    CONTENEDOR PRINCIPAL
================================ */
.eventos {
  grid-area: eventos;
  position: relative;
  padding: 20px;
  background-color: #e2e2e2;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  height: 120vh;
}

.eventos h2 {
  text-align: center;
  margin-bottom: 10px;
  font-size: 24px;
  font-weight: 700;
  color: #333;
}

/* ================================
    SLIDER / SCROLL HORIZONTAL
================================ */
.eventos .scro {
  display: flex;
  flex-direction: row;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 20px 40px; /* deja espacio para los botones */
  white-space: nowrap;
}

.eventos .scro::-webkit-scrollbar {
  height: 10px;
}

.eventos .scro::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 10px;
}

/* ================================
    TARJETAS (CARDS)
================================ */
.eventos .cards {
  display: flex;
  flex-direction: column;
  background-color: #fff;
  border-radius: 12px;
  border: 1px solid #ddd;
  box-shadow: 0 4px 6px rgba(0,0,0,0.15);

  width: 320px;
  min-width: 320px;
  height: auto;

  overflow: hidden;
  white-space: normal;
}

/* ENCABEZADO */
.eventos .cards-header {
  padding: 15px;
  border-bottom: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.eventos .cards-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.eventos .cards-header h6 {
  margin: 0;
  color: #777;
  font-size: 14px;
}

/* CUERPO */
.eventos .cards-body {
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.eventos .cards-body img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
}

.eventos .cards-body p {
  margin: 0;
  font-size: 14px;
  color: #333;
}

/* FOOTER */
.eventos .cards-footer {
  padding: 12px;
  border-top: 1px solid #ddd;
  background-color: #f7f7f7;
  display: flex;
  justify-content: flex-end;
}

.eventos .cards-footer a {
  text-decoration: none;
  font-size: 14px;
  color: #007bff;
}

.eventos .cards-footer a:hover {
  text-decoration: underline;
}

/* ================================
    BOTONES LATERALES
================================ */
/* Asegura posicionamiento del contenedor eventos */
.eventos {
  position: relative;
  padding: 20px;
  background-color: #e2e2e2;
  overflow: hidden;
  box-sizing: border-box;
}

/* Botones laterales SOLO para eventos */
.eventos .btn-left-event,
.eventos .btn-right-event {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(0,0,0,0.35);
  border-radius: 50%;
  color: #fff;
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 50; /* menor que otros si tienes overlays globales */
  transition: background .18s ease;
  user-select: none;
}

.eventos .btn-left-event:hover,
.eventos .btn-right-event:hover {
  background: rgba(0,0,0,0.6);
}

.eventos .btn-left-event { left: 8px; }
.eventos .btn-right-event { right: 8px; }

/* Si quieres que los botones se oculten en pantallas pequeñas: */
@media (max-width: 480px) {
  .eventos .btn-left-event,
  .eventos .btn-right-event {
    display: none;
  }
}


/* ================================
    PAGINACIÓN
================================ */
.paginacion {
  text-align: center;
  margin-top: 20px;
}

.paginacion a,
.paginacion strong {
  margin: 0 5px;
  padding: 6px 10px;
  background: #fff;
  border-radius: 5px;
  border: 1px solid #ccc;
  color: #007bff;
  font-size: 14px;
  text-decoration: none;
}

.paginacion strong.activo {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
}

.paginacion .dots {
  padding: 6px 10px;
  color: #555;
}




/* ÁREA PRINCIPAL */
section.todos {
    grid-area: todos;
    width: 100%;
    padding: 20px 10px;
    box-sizing: border-box;
    background: #fafafa;
    margin: auto;
    text-align: center;
}

/* GRID INTERNO — MÁS JUNTOS Y ORDENADOS */
.contenedor-publicidad {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px; /* Más cerca entre sí */
    width: 100%;
}

/* ITEM — MÁS DELGADO, LIMPIO Y AJUSTADO */
.pub-item {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e2e2e2;
    padding: 8px;     /* Mucho más compacto */
    transition: transform .2s ease;
}

/* IMAGEN DEL LOGO */
.pub-item img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* EFECTO SUTIL */
.pub-item:hover {
    transform: scale(1.03);
}


/* -------------------------------- */
/*     TAMAÑOS SEGÚN PUBLICIDAD     */
/* -------------------------------- */

/* GRANDE → LOGO MÁS ALTO */
.pub-item.grande {
    grid-column: span 3;
    padding: 12px;
}
.pub-item.grande img {
    height: 200px;
}

/* MEDIANO */
.pub-item.mediano {
    grid-column: span 2;
    padding: 10px;
}
.pub-item.mediano img {
    height: 100px;
}

/* CHICO */
.pub-item.chico {
    grid-column: span 1;
    padding: 8px;
}
.pub-item.chico img {
    height: 60px;
}

.paginacion {
    margin-top: 30px;
    text-align: center;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.paginacion a {
    padding: 8px 14px;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: 0.25s ease;
}

.paginacion a:hover {
    background: #f0f0f0;
    border-color: #bbb;
}

.paginacion .active {
    background: #005bbb;
    color: white !important;
    border-color: #005bbb;
}

/* --------------------------- */
/*        RESPONSIVE           */
/* --------------------------- */

@media (max-width: 900px) {
    .pub-item.grande {
        grid-column: span 2;
    }
}

@media (max-width: 700px) {
    .contenedor-publicidad {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }

    .pub-item.grande,
    .pub-item.mediano,
    .pub-item.chico {
        grid-column: span 1;
    }

    .pub-item.grande img { height:130px;  width: 130px;}
    .pub-item.mediano img { height: 90px; }
    .pub-item.chico img { height: 50px; }
}








.footer-mx {grid-area: footer-mx;
    display: block;
    width: 95%;
    margin-top: 300px;
}

.footer-mx {
    background: #0a0a0a;
    color: #f1f1f1;
    padding: 40px 20px 20px;
    font-family: Arial, sans-serif;
    margin-top: 40px;
}

.footer-contenedor {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-col {
    flex: 1 1 250px;
}

.footer-col h3,
.footer-col h4 {
    margin-bottom: 12px;
    color: #00e1ff;
}

.footer-col p {
    line-height: 1.6;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col a {
    text-decoration: none;
    color: #ffffff;
    transition: 0.3s;
}

.footer-col a:hover {
    color: #00e1ff;
}

.footer-copy {
    width: 100%;
    text-align: center;
    margin-top: 30px;
    padding: 18px 0;
    border-top: 1px solid #333;
    font-size: 14px;
    color: #cccccc;
    display: block;
}

/* ================================
    RESPONSIVO
================================ */
@media (max-width: 768px) {
  .eventos .cards {
    width: 280px;
    min-width: 280px;
  }

  .btn-left, .btn-right {
    width: 40px;
    height: 40px;
    font-size: 26px;
  }
}

@media (max-width: 480px) {
  .eventos .cards {
    width: 240px;
    min-width: 240px;
  }

  .eventos h2 {
    font-size: 20px;
  }
}











@media screen and (max-width: 900px) {
  .topnav a:not(:first-child) {display: none;}
  .topnav a.icon {
    float: right;
    display: block;
  }
}




  @media screen and (max-width: 900px) {
    .topnav.responsive {position: relative;}
    .topnav.responsive .icon {
      position: absolute;
      right: 0;
      top: 100px;
    }
    .topnav.responsive a {
      float: none;
      display: block;
      text-align: left;
    }
  
  .topnav.responsive{
  width: 100%; margin: auto; 
  }
  }
  













  
    @media (max-width:900px){
      .Contenedor{ 
      width:100%;
      display:grid;
      grid-gap:0px;
      grid-template-columns: repeat(1, 100%);
      grid-template-rows:repeat(3, auto);
      grid-template-areas:"topnav"
                          "bloque1"
                         "publicaciones"
                         "eventos"
                         "footer-mx"
                         
                          
      ;}
  
       /*inicia header*/
     /*inicia header*/
     .topnav .im{ font-size: 20px;
      
     }
     .topnav a{ display: none;}
     .topnav{width: 100%;}
     .Contenedor .footer-mx{width: 70%; margin: auto;}
    .Contenedor .bloque1{width: 100%; margin-top: 50px;}
 .Contenedor .publicaciones{width:100%;}  
.publicidad ul div{ font-size: 10px; font-weight: 800; width: 100%;  background-color: #000000; align-items: center; }

    }