@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
}

body {
  min-height: 100vh;
  background: url("background.jpg") no-repeat center center fixed;
  background-size: cover;
  display: flex;
  flex-direction: column;
}

/* Grey header / navbar */
.topbar {
  width: min(1100px, calc(100% - 24px));
  margin: 16px auto 0 auto;
  padding: 14px 16px;
  background: rgba(120, 120, 120, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;

  display: flex;
  align-items: center;
  justify-content: center;

  position: relative;
  backdrop-filter: blur(8px);
}

.title {
  color: #fff;
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-weight: 600;
  text-align: center;
}

/* Top-right button inside header */
.topbar-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);

  width: 42px;
  height: 42px;
  border-radius: 10px;

  display: grid;
  place-items: center;

  background: rgba(90, 90, 90, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  text-decoration: none;
  font-size: 22px;

  transition: transform 0.15s ease, background 0.15s ease;
}

.topbar-btn:hover {
  background: rgba(70, 70, 70, 0.9);
  transform: translateY(-50%) scale(1.03);
}

/* Main page container */
.page {
  width: min(1100px, calc(100% - 24px));
  margin: 18px auto 28px auto;
  flex: 1;
}

/* Responsive grid */
.grid {
  display: grid;
  gap: 18px;

  /* Auto layout: as many columns as fit */
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* Card button */
.card {
  text-decoration: none;
  color: inherit;

  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  overflow: hidden;

  display: flex;
  flex-direction: column;

  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.22);
  background: rgba(245, 245, 245, 0.95);
}

.card-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #eaeaea;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-text {
  padding: 14px 14px 16px 14px;
}

.card-text h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: #111;
}

.card-text p {
  font-size: 0.92rem;
  color: #444;
  line-height: 1.35;
}

/* Disabled cards */
.card-disabled {
  opacity: 0.7;
  cursor: default;
  pointer-events: none;
}

/* Mobile tweaks */
@media (max-width: 420px) {
  .topbar {
    padding: 12px 12px;
  }

  .topbar-btn {
    width: 40px;
    height: 40px;
    right: 10px;
  }

  .grid {
    gap: 14px;
  }
}
