/* La tipografía es la del tema. Los colores y tamaños se pueden cambiar desde el tema o el maquetador con variables CSS
   (--urbanodo-color, --urbanodo-card-width...); el segundo valor de cada var() es el de por defecto */

/* Rejilla de tarjetas de los listados */
.gs-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

/* La imagen llega en la variable --gs-image (style del enlace) */
.gs-card {
  width: var(--urbanodo-card-width, 300px);
  height: var(--urbanodo-card-height, 400px);
  margin: 30px auto;
  background-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, var(--urbanodo-color, #ab163e) 100%), var(--gs-image, none);
  background-size: cover;
  background-position: center;
  border-radius: var(--urbanodo-card-radius, 40px);
  box-shadow: 0px 2px 18px 0px rgba(0,0,0,0.3);
  display: flex;
  justify-content: center;
  align-items: end;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.gs-card:hover {
  transform: scale(1.05);
}

@media (max-width: 980px) {
  .gs-card {
    width: 100%;
  }
}

.gs-card-content {
  text-align: center;
  margin: 10px;
}

.gs-card-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 0px;
  color: white;
}

.gs-card-text {
  font-size: 16px;
  color: white;
}

.gs-card-meta {
  display: inline-block;
  font-size: 14px;
  color: white;
  background-color: rgba(0, 0, 0, 0.35);
  border-radius: 12px;
  padding: 2px 10px;
  margin-bottom: 6px;
}

/* Tarjetas en un número fijo de columnas (columns="3") */
.gs-cards-grid {
  display: grid;
  grid-template-columns: repeat(var(--urbanodo-columns, 3), minmax(0, 1fr));
  gap: 30px;
  margin: 30px 0;
}

.gs-cards-grid .gs-card {
  width: 100%;
  margin: 0;
}

@media (max-width: 980px) {
  .gs-cards-grid {
    grid-template-columns: repeat(min(var(--urbanodo-columns, 3), 2), minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .gs-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* Lista con imagen (layout="list") */
.gs-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 1em 0;
}

.gs-list-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  color: inherit;
  text-decoration: none;
}

/* Con el contenedor delante, para ganar a reglas de los editores como .elementor img { height: auto } */
.gs-list img.gs-list-image {
  flex-shrink: 0;
  width: 160px;
  height: 110px;
  object-fit: cover;
  border-radius: 8px;
}

.gs-list-body {
  min-width: 0;
}

.gs-list-meta {
  font-size: 13px;
  font-weight: bold;
  color: var(--urbanodo-color, #ab163e);
}

.gs-list-title {
  margin: 2px 0 4px;
  font-size: 20px;
}

.gs-list-item:hover .gs-list-title {
  color: var(--urbanodo-color, #ab163e);
}

.gs-list-text {
  margin: 0;
  font-size: 15px;
  opacity: 0.85;
}

@media (max-width: 600px) {
  .gs-list img.gs-list-image {
    width: 100px;
    height: 80px;
  }
}

/* Lista compacta de títulos (layout="compact") */
/* !important: temas como Divi ponen viñetas y relleno a las listas con selectores de id (#left-area ul) */
.gs-compact {
  list-style: none !important;
  margin: 1em 0;
  padding: 0 !important;
}

.gs-compact li {
  list-style: none !important;
}

.gs-compact li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.gs-compact a {
  color: inherit;
  text-decoration: none;
}

.gs-compact a:hover .gs-compact-title {
  color: var(--urbanodo-color, #ab163e);
}

.gs-compact-title {
  font-weight: bold;
}

.gs-compact-meta {
  display: block;
  font-size: 13px;
  opacity: 0.75;
}

/* Carrusel (layout="carousel"): fila con desplazamiento horizontal y flechas */
.gs-carousel {
  position: relative;
}

.gs-carousel-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 10px 4px;
}

.gs-carousel-track::-webkit-scrollbar {
  display: none;
}

.gs-carousel-track .gs-card {
  flex: 0 0 auto;
  margin: 10px 0 20px;
  scroll-snap-align: start;
}

.gs-carousel-track .gs-card:hover {
  transform: none;
}

.gs-carousel-button {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  font-size: 28px;
  line-height: 1;
  color: var(--urbanodo-color, #ab163e);
  cursor: pointer;
}

.gs-carousel-prev {
  left: -10px;
}

.gs-carousel-next {
  right: -10px;
}

@media (max-width: 980px) {
  .gs-carousel-track .gs-card {
    width: 80%;
  }
}

/* Texto cuando un listado no tiene elementos (atributo empty) */
.gs-empty {
  font-style: italic;
  opacity: 0.75;
}
