/* GRID */
.gt-apartados-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 25px;
}

/* CARD */
.gt-card {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  transition: transform 0.25s ease;
  cursor: pointer;
}

/* LINK */
.gt-card a {
  display: block;
  position: relative;
  text-decoration: none;
  color: inherit;
}

/* IMAGEN */
.gt-card-img img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

/* OVERLAY */
.gt-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.1));
  transition: opacity 0.3s ease;
}

/* TÍTULO */
.gt-card-title {
  position: absolute;
  bottom: 15px;
  left: 15px;
  right: 15px;
  z-index: 2;
}

.gt-card-title h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #fff;

  /* estilo tipo "badge" */
  background: #f4c542;
  color: #1a1a1a;
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
}

/* HOVER */
.gt-card:hover {
  transform: translateY(-4px);
}

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

.gt-card:hover::after {
  opacity: 0.85;
}

.gt-card-link {
  display: block;
  position: relative;
  z-index: 10;
  height: 100%;
}

.gt-card:active {
  transform: scale(0.98);
}

/* botón volver */
.gt-volver-home {
  margin: 20px 0 30px;
}

.gt-volver-home a {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  background: #9a0019;
  color: #fff;
  padding: 10px 18px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 500;

  transition: all 0.2s ease;
}

.gt-volver-home a:hover {
  background: #7a0014;
  transform: translateY(-1px);
}

.gt-icon {
  font-size: 16px;
}

/* separación grid */
.gt-otros-apartados {
  margin: 40px 0;
}

.gt-main-title {
  font-size: 32px;
  margin-bottom: 25px;
}

.gt-pdf-viewer {
  margin: 30px 0;
}

.gt-pdf-actions {
  margin-bottom: 10px;
}

.gt-pdf-actions a {
  display: inline-block;
  background: #9a0019;
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 500;
}

.gt-pdf-actions a:hover {
  background: #7a0014;
}

.gt-separator {
  margin: 50px 0 30px;
  text-align: center;
  position: relative;
}

.gt-separator span {
  background: #fff;
  padding: 0 15px;
  color: #666;
  font-size: 14px;
  position: relative;
  z-index: 2;
}

.gt-separator::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  z-index: 1;
  background: #9a0019;
  opacity: 0.3;
}

/* contenedor general */
.gt-apartado-detalle {
  margin-bottom: 40px;
}

/* título */
.gt-apartado-detalle h1 {
  margin-bottom: 20px;
}

/* descripción */
.gt-apartado-desc {
  margin-bottom: 40px;
  line-height: 1.6;
  font-size: 16px;
}

/* si hay visor PDF debajo */
.gt-pdf-viewer {
  margin-top: 30px;
}

/* elementos */
/* GRID */
.gt-elementos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

/* CARD */
.gt-elemento-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: all 0.25s ease;
}

/* HOVER (suave, no protagonista) */
.gt-elemento-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
}

/* IMAGEN */
.gt-elemento-img img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.gt-elemento-content h4 {
  display: inline-block;
  background: #f5f5f5;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 17px;
  font-weight: 600;
}

.gt-elemento-content {
  padding: 14px 16px;
  background: #fff;
  border-top: 1px solid #eee;
}

.gt-elemento-card:hover h4 {
  background: #9a0019;
  color: #fff;
}

.gt-elemento-card a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.gt-ext {
  font-size: 12px;
  margin-left: 5px;
  opacity: 0.6;
}

.gt-tipos-grid .gt-elemento-card {
  cursor: pointer;
}

.gt-tipos-grid .gt-elemento-img img {
  height: 140px;
  object-fit: cover;
}

.gt-subcontext {
  color: #777;
  margin-top: -10px;
  margin-bottom: 20px;
  font-size: 14px;
}

.gt-elemento-img-detalle img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 20px;
}

.gt-elemento-desc {
  font-size: 16px;
  line-height: 1.6;
}

.gt-subcontext a {
  color: #9a0019;
  text-decoration: none;
  font-weight: 500;
}

.gt-subcontext a:hover {
  text-decoration: underline;
}