body {
  font-family: 'Oxygen', sans-serif;
  background: rgba(0, 0, 0, 0);
  height: auto;
  min-height: 5px;
  margin: 0;
}

/* En vez de atributos HTML (bgcolor/link...), controlamos colores aquí */
body, p, td, td a { color: #707070; }
a { color: #000000; text-decoration: none; }

table, tbody { background-color: #fff; }

#pagewrap{
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
  box-sizing: border-box;
}

select.convenios, input.convenios {
  width: 100%;
  height: 34px;
  border: #ccc 1px solid;
  text-indent: .33em;
  box-shadow: none;
  -webkit-box-shadow: none;
  box-sizing: border-box;
  color: #787878;
  font-size: 14px;
  font-weight: 100;
}

#CodigoConvenio, #dia, #any, #mes { width: 78%; }

.convenios {
  padding-bottom: 5px;
  font-size: 14px;
  font-weight: normal;
  font-style: normal;
  color: #a4a4a5;
}

.titolapartat {
  font-size: 1.4em;
  font-weight: 700;
  color: #72c6ee;
}

p, td, td a {
  font-size: 14px;
  padding-bottom: 20px;
  text-decoration: none;
}

td.destacado {
  color: #8fc5ec;
  font-size: 16px;
  line-height: 17px;
  padding-bottom: 5px;
  text-transform: uppercase;
  border-bottom: 1px solid #8fc5ec;
}

.texteboto {
  display: inline-block;
  width: auto;
  height: 22px;
  margin: 20px 0 10px 0;
  padding: 6px 20px;
  color: #FFF;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 14px;
  font-weight: bold;
  border: 0px;
  background-color: #5bc5f2;
  cursor: pointer;
}

#NombreComunidad, #Comunidades, #NombreProvincia, #Provincia {
  margin-left: 15px;
  width: 96.5%;
}

form { margin-bottom: 0; }

.resultados a {
  display: block;
  margin-bottom: 20px;
  padding-bottom: 0;
}

.destacado {
  color: #8fc5ec;
  font-weight: bold;
  font-size: 18px;
  line-height: 20px;
  padding-bottom: 5px;
  border-bottom: 1px solid #8fc5ec;
}

.unnamed2 p {
  color: #005f9b;
  text-decoration: none;
  font-weight: bold;
  line-height: 19px;
  margin: 0 0 5px 0;
  padding: 0;
}

.unnamed2 p img { padding-right: 5px; }

.unnamed2 span {
  display: block;
  padding-bottom: 5px;
  font-size: 14px;
  font-weight: normal;
  font-style: normal;
  color: #a4a4a5;
}

/* =========================================================
   GALLERY / HOVER (CORREGIDO Y RESPONSIVE SIN BOOTSTRAP)
   ========================================================= */

.cgsb-container{
  width: 100%;
}

.cgsb-container__gallery{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.cgsb-container__gallery__item{
  display: flex;
}

/* Tarjeta */
.cgsb-container__gallery__journal{
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  width: 100%;

  /* Control del tamaño para que no se “dispare” */
  height: 230px;          /* ajusta si quieres más alto */
  max-width: 420px;       /* opcional */
  margin: 0 auto;

  transition: transform .25s ease, box-shadow .25s ease;
}

/* Que el <a> ocupe toda la tarjeta */
.cgsb-container__gallery__journal > a{
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}

/* Imagen dentro de la tarjeta */
.cgsb-container__gallery__journal img{
  border-radius: 3px;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Efecto hover en la tarjeta (box-shadow correcto) */
.cgsb-container__gallery__journal:hover{
  transform: scale(1.03);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

/* Overlay */
.cgsb-container__gallery__journal--hover{
  position: absolute;
  inset: 0;
  border-radius: 3px;

  opacity: 0;
  background-color: rgba(0, 29, 78, 0.76);
  transition: opacity .35s ease;
  display: flex;
  align-items: center;
  justify-content: center;

  /* Para que el click siga siendo del <a> */
  pointer-events: none;
}

.cgsb-container__gallery__hover-inner{
  padding: 16px;
  text-align: center;
}

.cgsb-container__gallery__hover-inner p{
  margin: 0;
  padding: 0;
  color: #ffffff;
  font-weight: bold;
  font-size: 16px;
}

/* Mostrar overlay al hover del contenedor */
.cgsb-container__gallery__journal:hover .cgsb-container__gallery__journal--hover{
  opacity: 1;
}

/* Mantengo tus estilos de iframe por si los usas en otras páginas */
.cgsb-container__gallery__iframe {
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.21);
  background-color: white;
  margin-bottom: 45px;
  max-height: 407px;
}

@media (max-width: 991.98px) {
  .cgsb-container__gallery__iframe { max-height: unset; }
}

.cgsb-container__gallery__iframe__info { max-width: 382px; }
.cgsb-container__gallery__iframe__info p { margin: 0; }

.cgsb-container__gallery__iframe iframe {
  min-height: 407px;
  max-height: 407px;
  height: 100%;
}

.cgsb-container__gallery__simple { margin: 0 -1rem !important; }
.cgsb-container__gallery__simple__container {
  padding: 0 1rem !important;
  margin-bottom: 2rem;
  min-height: 168px;
}

.cgsb-container__gallery__simple__helper {
  box-shadow: 0 2px 4px 1px rgba(0, 0, 0, 0.21);
  background-position: center center;
  background-repeat: no-repeat;
  border: 1px solid #385d9c;
  background-color: white;
  background-size: contain;
  transition: all ease 0.5s;
  height: 100%;
  width: 100%;
}

.cgsb-container__gallery__simple__helper--covered { background-size: cover !important; }

.cgsb-container__gallery__simple__helper:hover {
  transform: translate(3px, 3px);
  box-shadow: none;
  cursor: pointer;
}

.cgsb-container__gallery__simple__helper > a { height: 100%; width: 100%; }

.cgsb-container__gallery__text { margin: 0 -1rem !important; }
.cgsb-container__gallery__text__container {
  padding: 0 1rem !important;
  transition: all ease 0.5s;
  margin-bottom: 2rem;
  min-height: 160px;
}

.cgsb-container__gallery__text__container > a,
.cgsb-container__gallery__text__container > span {
  flex-direction: column;
  display: flex;
  height: 100%;
}

.cgsb-container__gallery__text__helper {
  box-shadow: 0 2px 4px 1px rgba(0, 0, 0, 0.21);
  background-color: white;
  transition: all ease 0.5s;
  height: 100%;
}

.cgsb-container__gallery__text__helper--hovered:hover { transform: translate(3px, 3px); }
.cgsb-container__gallery__text__helper > a { height: 100%; width: 100%; }

.cgsb-container__gallery__text__logo {
  background-position: center center;
  border-bottom: 1px solid #385d9c;
  background-repeat: no-repeat;
  background-size: contain;
  min-height: 160px;
}

.cgsb-container__gallery__text__logo--covered { background-size: cover; }

.cgsb-container__gallery__text__text {
  justify-content: space-around;
  align-content: space-around;
  padding: 1rem !important;
  flex-direction: column;
  text-align: center;
  min-height: 128px;
  flex-wrap: wrap;
  display: flex;
}

.cgsb-container__gallery__helper { margin: 0 -1rem !important; }

/* Extras que tenías */
.image-container-normas {
  border: 2px solid #ccc;
  display: inline-block;
  padding: 4px;
}

.image-container-normas img {
  display: block;
  width: 100%;
  height: auto;
}

.selected {
  background-color: #9A054A !important;
  font-weight: bold;
  border: 1px solid #ccc;
  color: #FFF;
}

.marcado { color: #FFF; }
