/* PAGINACIÓN */
#pag-cover {
  /* width: 750px; */
  /* max-width: 95%; */
  color: #fff;
  line-height: 1;
  margin: -10px auto 20px auto;
  background-color: #051E50;
  border-radius: 4px;
  box-shadow: 0 5px 5px hsla(225, 58%, 35%, 0.32);
  user-select: none;
  overflow-x: auto;
  scrollbar-width: none;
}
#pag-cover::-webkit-scrollbar {
  display: none;
}
#pg-links {
  display: flex;
  width: 100%;
  overflow-x: auto;
  scroll-behavior: smooth;
}
.pg-fixed {
  background-color: #051E50;
  z-index: 2;
  flex-shrink: 0;
}
#links {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  flex: 1;
}
.pg-link {
  flex-shrink: 0;
  color: #fff;
  font-size: 15px;
  text-align: center;
  padding: 15px 20px;
  background-color: transparent;
  transition: 0.2s ease background-color, 0.3s ease color;
  white-space: nowrap;
}
.pg-link:hover {
  background-color: #2d59d6;
}
.pi-section-white a {
  color: #ccd2dd;
}

/* GALERÍA DE NOTICIAS Y ESTRUCTURA */
#main-container {
  margin: 0 auto;
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 20px;
  max-width: 1200px;
}
.gallery-item {
  width: calc(33.333% - 20px) !important; /* Cambiado a 33.333% para 3 por fila */
  margin-bottom: 20px;
  text-align: left;
  position: relative;
  overflow: hidden;
  border-radius: 5px;
  box-sizing: border-box;
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gallery-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  filter: brightness(0.7);
  transition: filter 0.3s;
}
.gallery-item:hover .gallery-img {
  filter: brightness(1);
}
.details {
  text-align: left;
  padding: 10px;
}
.gallery-title {
  margin: 0 0 10px 0;
  font-size: 13px;
}
.gallery-link {
  color: #333;
  text-decoration: none;
  display: block;
}



/* RESPONSIVE */
@media screen and (max-width: 768px) {
  .gallery-img {
    height: 200px;
  }
  #main-container {
    justify-content: center;
  }
  .gallery-item {
    width: 100%;
  }
  .details {
    padding: 5px;
  }
}

/* Integración visual con hz-internas.css */

.gallery-title b {
  color: #003366;
  font-size: 1rem;
  font-weight: 600;
  display: block;
  margin-top: 0.5rem;
  line-height: 1.4;
}

.details .pi-meta {
  font-size: 0.85rem;
  color: #1c1c1c;
  opacity: 0.8;
}

.gallery-link:hover b {
  color: #00549c;
}





.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.1);
}

.gallery-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  filter: brightness(0.9);
  transition: filter 0.3s ease;
}

.pi-meta li i {
  color: #003366;
}

/* === NUEVA ESTRUCTURA PARA PÁGINA DE NOTICIAS === */


.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.1);
}

.gallery-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  filter: brightness(0.9);
  transition: filter 0.3s ease;
}

.gallery-item:hover .gallery-img {
  filter: brightness(1);
}

.gallery-title {
  font-size: 1rem;
  padding: 1rem;
  text-align: center;
  margin: 0;
}

.gallery-link {
  color: #003366;
  text-decoration: none;
}

.details {
  padding: 0 1rem 1rem;
}

.pi-meta {
  font-size: 0.85rem;
  color: #444;
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.pi-meta li {
  display: flex;
  align-items: center;
}

.pi-meta li i {
  margin-right: 4px;
  color: #003366;
}

/* Responsive - Mantener el orden correcto */
@media (max-width: 1024px) {
  .gallery-item {
    width: calc(50% - 20px); /* 2 columnas en tablets */
  }
}

@media (max-width: 768px) {
  .gallery-item {
    width: 100%; /* 1 columna en móviles */
  }
  #main-container {
    justify-content: center;
    gap: 15px;
  }
}

/* PAGINACIÓN */
#pag-cover {
  width: 90%;
  max-width: 960px;
  margin: 2rem auto;
  padding: 10px;
  background-color: #003366;
  border-radius: 6px;
  overflow-x: auto;
  color: #fff;
}

#pg-links {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  scroll-behavior: smooth;
}

#links {
  display: flex;
  gap: 1rem;
  white-space: nowrap;
}

.pg-link a {
  color: #fff;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 8px 12px;
  text-decoration: none;
  transition: background 0.2s ease;
  border-radius: 4px;
}

.pg-link a:hover {
  background: #1d4e89;
}

/* 5. BLOQUE FINAL: BANNER DE SERVICIOS LEGALES */

.hz-banner-servicios {
  position: relative;
  background-color: #1663ac;
  overflow: hidden;
  text-align: center;
  padding: 60px 20px 40px;
}

.hz-banner-fondo {
  position: absolute;
  inset: 0;
  background-image: url('/componentes/imagenes/hexagon-trama.webp');
  background-repeat: repeat;
  background-size: auto;
  opacity: 1;
  z-index: 1;
}

.hz-banner-contenido {
  position: relative;
  z-index: 2;
}

.hz-banner-texto {
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 500;
  margin: 0;
}

/* PADDING ESPECÍFICO PARA LA PÁGINA */
.hnz-page-padding {
  padding-top: 120px !important;
}

/********para salir del paso*/

/* GALERÍA ESPECÍFICA hnz-gallery - 3 ELEMENTOS POR FILA */
.hnz-gallery {
  margin: 0 auto;
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 20px;
  max-width: 1100px; /* Cambiado de 1200px a 1100px */
}

.hnz-gallery-item {
  width: calc(33.333% - 20px); /* Ajustado para 1100px */
  margin-bottom: 20px;
  text-align: left;
  position: relative;
  overflow: hidden;
  border-radius: 5px;
  box-sizing: border-box;
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hnz-gallery-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  filter: brightness(0.9);
  transition: filter 0.3s ease;
}

.hnz-gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.1);
}

.hnz-gallery-item:hover .hnz-gallery-img {
  filter: brightness(1);
}

.hnz-gallery-title {
  font-size: 1rem;
  padding: 1rem;
  text-align: center;
  margin: 0;
}

.hnz-gallery-link {
  color: #003366;
  text-decoration: none;
  display: block;
}

.hnz-gallery-link b {
  color: #003366;
  font-size: 1rem;
  font-weight: 600;
  display: block;
  margin-top: 0.5rem;
  line-height: 1.4;
  transition: color 0.2s;
}

.hnz-gallery-link:hover b {
  color: #00549c;
}

.hnz-details {
  padding: 0 1rem 1rem;
  text-align: left;
}

.hnz-pi-meta {
  font-size: 0.85rem;
  color: #444;
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.hnz-pi-meta li {
  display: flex;
  align-items: center;
  color: #1c1c1c;
  opacity: 0.8;
}

.hnz-pi-meta li i {
  margin-right: 4px;
  color: #003366;
}

/* RESPONSIVE hnz-gallery - Ajustado para 1100px */
@media (max-width: 1100px) {
  .hnz-gallery {
    max-width: 95%; /* Se adapta mejor en pantallas más pequeñas */
    padding: 10px 15px;
  }
  
  .hnz-gallery-item {
    width: calc(50% - 20px); /* 2 columnas en tablets */
  }
}

@media (max-width: 768px) {
  .hnz-gallery-item {
    width: 100%; /* 1 columna en móviles */
  }
  
  .hnz-gallery {
    justify-content: center;
    gap: 15px;
    max-width: 100%;
    padding: 10px;
  }
  
  .hnz-gallery-img {
    height: 200px;
  }
}



        /* CONTENEDOR PRINCIPAL */
        .publicaciones-anteriores {
            font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            color: #333;
            padding: 40px 20px;
            background-color: #f9f9f9;
            border-top: 1px solid #e1e1e1;
            margin-bottom: 40px;
        }

        /* TÍTULO PRINCIPAL */
        .publicaciones-anteriores h2 {
            font-size: 2rem;
            font-weight: 600;
            color: #2c3e50;
            margin-bottom: 30px;
            padding-bottom: 15px;
           border-bottom: 2px solid rgb(88, 35, 211);
            text-align: center;
        }

        /* TÍTULOS DE AÑO */
        .publicaciones-anteriores h3 {
            font-size: 1.5rem;
            font-weight: 500;
            color: #34495e;
            margin: 25px 0 15px;
            padding-left: 10px;
            border-left: 4px solid rgb(60, 86, 231);
        }

        /* LISTA DE PUBLICACIONES */
        .lista-publicaciones {
            list-style-type: none;
            padding: 0;
            margin: 0 0 30px 0;
            counter-reset: publication-counter;
        }

        .lista-publicaciones li {
            counter-increment: publication-counter;
            padding: 12px 15px;
            margin-bottom: 8px;
            background-color: white;
            border-radius: 4px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            transition: all 0.3s ease;
            position: relative;
            padding-left: 50px;
        }

        .lista-publicaciones li:hover {
            transform: translateX(5px);
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
        }

        .lista-publicaciones li::before {
            content: counter(publication-counter);
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            background-color: rgb(60, 106, 231);
            color: white;
            width: 25px;
            height: 25px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8rem;
            font-weight: bold;
        }

        /* ENLACES */
        .lista-publicaciones a {
            color: #2c3e50;
            text-decoration: none;
            font-weight: 500;
            display: inline-block;
            margin-right: 10px;
            transition: color 0.2s;
        }

        .lista-publicaciones a:hover {
            color: rgb(60, 86, 231);
            text-decoration: underline;
        }

        /* FECHAS */
        .lista-publicaciones .date {
            color: #7f8c8d;
            font-size: 0.9rem;
            font-style: italic;
        }

        /* RESPONSIVE */
        @media (max-width: 768px) {
            .publicaciones-anteriores {
                padding: 30px 15px;
            }

            .publicaciones-anteriores h2 {
                font-size: 1.7rem;
            }

            .publicaciones-anteriores h3 {
                font-size: 1.3rem;
            }

            .lista-publicaciones li {
                padding: 10px 15px 10px 45px;
                font-size: 0.95rem;
            }

            .lista-publicaciones .date {
                display: block;
                margin-top: 5px;
                margin-left: 0;
            }
        }

        @media (max-width: 480px) {
            .publicaciones-anteriores h2 {
                font-size: 1.5rem;
            }

            .lista-publicaciones li {
                padding: 8px 12px 8px 40px;
                font-size: 0.9rem;
            }

            .lista-publicaciones li::before {
                width: 22px;
                height: 22px;
                font-size: 0.7rem;
            }
        }