/* =============================
   GOOGLE FONT
============================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* =============================
   GLOBAL
============================= */

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
  padding: 0;
  background: #f7f9fb;
  color: #1a1a1a;
}

section {
  padding: 80px 0;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* =============================
   HERO
============================= */

.demos-hero {
  background: linear-gradient(90deg, #009879, #00aaff);
  color: #fff;
  text-align: center;
  padding: 20px 0 60px;
}

.demos-hero h1 {
  font-size: 2.6rem;
  font-weight: 900;
  margin-bottom: 10px;
}

.demos-hero p {
  font-size: 1.05rem;
  opacity: 0.95;
}

/* Search bar */
.demos-hero-controls {
  margin-top: 25px;
  display: flex;
  justify-content: center;
}

.demo-search-wrap {
  background: #ffffff;
  border-radius: 999px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

.demo-search-wrap i {
  color: #00aaff;
}

#demo-search {
  border: none;
  outline: none;
  width: 100%;
  font-size: 0.95rem;
  font-family: inherit;
}

/* =============================
   CATEGORY TABS
============================= */

.demos-tabs-section {
  padding: 35px 0 10px;
}

.demo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.demo-tab {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.1);
  text-decoration: none;
  color: #333;
  font-size: 0.9rem;
  font-weight: 600;
  background: #ffffff;
  transition: 0.25s;
}

.demo-tab:hover {
  border-color: #00aaff;
}

.demo-tab.active {
  background: linear-gradient(90deg, #009879, #00aaff);
  color: #fff;
  border-color: transparent;
}

/* =============================
   DEMO GRID
============================= */

.demos-list {
  padding-top: 40px;
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* KEEP 3 columns always */
  gap: 30px;
  justify-items: center; /* center each card inside its cell */
}

.no-results {
  text-align: center;
  color: #777;
}

/* =============================
   DEMO CARD
============================= */

.demo-card {
  display: block;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: #222;
  box-shadow: 0 8px 22px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.04);
  transition: 0.3s ease;
  width: 100%;
  max-width: 350px; /* lock card size, optional */
}

.demo-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 32px rgba(0,0,0,0.15);
}

/* IMAGE */
.demo-img-wrap img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

/* CONTENT */
.demo-content {
  padding: 18px 18px 20px;
  position: relative;
}

.demo-content h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.demo-content p {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 10px;
  min-height: 42px;
}

/* Price & badge */
.demo-price {
  display: block;
  font-weight: 800;
  color: #009879;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.demo-category-badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f9ff;
  color: #0077cc;
  font-weight: 600;
  margin-bottom: 10px;
}

/* Button */
.demo-btn-wrap {
  margin-top: 5px;
}

.view-btn {
  width: 100%;
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(90deg, #009879, #00aaff);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: 0.3s ease;
}

.view-btn:hover {
  opacity: 0.9;
}


@media (max-width: 900px) {
  .demo-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 per row on tablets */
  }
}

@media (max-width: 600px) {
  .demo-grid {
    grid-template-columns: repeat(1, 1fr); /* 1 per row on mobile */
  }
}

/* =============================
   PAGINATION
============================= */

.demo-pagination {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.page-link {
  padding: 8px 13px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.12);
  text-decoration: none;
  color: #333;
  font-size: 0.9rem;
  font-weight: 600;
  background: #fff;
  transition: 0.25s;
}

.page-link:hover {
  border-color: #00aaff;
}

.page-link.active {
  background: linear-gradient(90deg, #009879, #00aaff);
  color: #fff;
  border-color: transparent;
}

.page-link.prev,
.page-link.next {
  font-weight: 700;
}

/* =============================
   RESPONSIVE
============================= */

@media (max-width: 768px) {
  .demos-hero {
    padding: 20px 0 40px;
  }

  .demo-img-wrap img {
    height: 180px;
  }

  .demo-tabs {
    gap: 6px;
  }

  .demo-tab {
    font-size: 0.8rem;
    padding: 6px 10px;
  }
}
