/* Toolbar + nearby button */
.tec-rest-wrapper {
  margin-bottom: 1.5rem;
}

.tec-rest-toolbar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tec-rest-nearby-button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid #203040;
  background-color: #203040;
  color: #fff;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.tec-rest-nearby-button .dashicons {
  font-size: 1.1em;
  line-height: 1;
}

.tec-rest-nearby-button:hover:not([disabled]) {
  background-color: #1a2b3d;
  transform: translateY(-1px);
}

.tec-rest-nearby-button:disabled,
.tec-rest-nearby-button.is-loading {
  opacity: 0.6;
  cursor: wait;
}

.tec-rest-nearby-button.is-loading::after {
  content: "";
  width: 0.75rem;
  height: 0.75rem;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-top-color: #fff;
  border-radius: 50%;
  display: inline-block;
  animation: tec-rest-spin 0.8s linear infinite;
  margin-left: 0.4rem;
}

@keyframes tec-rest-spin {
  to {
    transform: rotate(360deg);
  }
}

.tec-rest-notice {
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: #1a1f29;
}

/* ==========================================
   TEC Events – Magazine-Style Grid
   ========================================== */

/* Grid wrapper */
.tec-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1.5rem;
  margin: 0 -0.75rem; /* offset card gutters if needed */
  padding: 1rem 0;
}

/* Card base */
.tec-events-grid .card {
  position: relative;
  overflow: hidden;
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Lift & deepen shadow on hover */
.tec-events-grid .card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Image container with gradient overlay */
.tec-events-grid .card-body {
  padding: 1rem;
  background: #fff;
}
.tec-events-grid .tec-thumb {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
  transition: transform 0.4s ease;
}
.tec-events-grid .card:hover .tec-thumb {
  transform: scale(1.05) translateY(-4px);
}

/* Title */
.tec-events-grid .card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1f29;
  margin-bottom: 0.5rem;
}

/* Description */
.tec-events-grid .tec-description {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #444;
  max-height: 4.5em; /* clamp to ~3 lines */
  overflow: hidden;
  position: relative;
  margin-bottom: 1rem;
}
.tec-events-grid .tec-description::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1.5em;
  background: linear-gradient(transparent, #fff);
}

/* Badge strips for cats & tags */
.tec-events-grid .tec-categories,
.tec-events-grid .tec-tags {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}
.tec-events-grid .tec-categories strong,
.tec-events-grid .tec-tags strong {
  color: #203040;
}
.tec-events-grid .tec-categories,
.tec-events-grid .tec-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
}
.tec-events-grid .tec-categories span,
.tec-events-grid .tec-tags span {
  background-color: #edf2f8;
  color: #203040;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
}

/* Event meta line */
.tec-events-grid .card-text {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 1rem;
}
.tec-events-grid time,
.tec-events-grid .tec-time,
.tec-events-grid .tec-location,
.tec-events-grid .tec-phone {
  display: block;
  margin-bottom: 0.25rem;
}
.tec-events-grid .tec-time::before {
  content: "⏰ ";
}
.tec-events-grid .tec-location::before {
  content: "📍 ";
}
.tec-events-grid .tec-phone::before {
  content: "📞 ";
}

/* CTA Buttons */
.tec-events-grid .btn {
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
  border-width: 1px;
  transition: background-color 0.2s ease, transform 0.2s ease;
  text-decoration: none;
  color: white;
}
.tec-events-grid .btn-primary {
  background-color: #ec1c23;
  border-color: #ec1c23;
}
.tec-events-grid .btn-primary:hover {
  background-color: #1a2b3d;
  transform: translateY(-2px);
}
.tec-events-grid .btn-secondary {
  background-color: #8a99ac;
  border-color: #8a99ac;
}
.tec-events-grid .btn-secondary:hover {
  background-color: #758496;
  transform: translateY(-2px);
}

/* Responsive tweaks */
@media (max-width: 480px) {
  .tec-events-grid .tec-thumb {
    height: 140px;
  }
  .tec-events-grid .card-title {
    font-size: 1.1rem;
  }
}
