:root{
  --bg1:#090914;
  --bg2:#05070b;
  --glow1: rgba(137, 54, 255, .35);
  --glow2: rgba(0, 173, 255, .20);
  --text:#e9e9f2;
  --muted:#b7b7c9;
  --card: rgba(255,255,255,.06);
  --card2: rgba(255,255,255,.10);
  --border: rgba(255,255,255,.10);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 700px at 20% 20%, var(--glow1), transparent 60%),
    radial-gradient(900px 700px at 75% 35%, var(--glow2), transparent 55%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 18px 26px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand{
  display:flex;
  align-items:center;
  text-decoration:none;
}

.brand img{
  height: 42px;          /* perfect balance with nav pills */
  width: auto;
  display:block;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.35));
  transition: transform .15s ease;
}

.brand:hover img{
  transform: scale(1.04);
}


.nav{ display:flex; gap:10px; }
.pill{
  display:inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  text-decoration:none;
  color: var(--text);
  background: rgba(0,0,0,.18);
  backdrop-filter: blur(8px);
}
.pill.active{
  border-color: rgba(137, 54, 255, .55);
  box-shadow: 0 0 0 2px rgba(137, 54, 255, .12) inset;
}

.wrap{
  max-width: 1200px;
  margin: 0 auto;
  display:grid;
  grid-template-columns: 240px 1fr;
  gap: 18px;
  padding: 26px;
}

.left .kicker{
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}
.left .count{
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
}
.left .status{
  display:none;
}

.left .hint{
  color: rgba(255,255,255,.70);
  font-size: 13px;
  line-height: 1.4;
}

.tabs{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:10px;
  margin: 10px auto 18px;
  width: 100%;
}

.tab{
  cursor:pointer;
  user-select:none;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  color: var(--text);
  backdrop-filter: blur(10px);
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

.tab:hover{
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.20);
  background: rgba(0,0,0,.26);
}

.tab.active{
  border-color: rgba(137, 54, 255, .65);
  box-shadow: 0 0 0 2px rgba(137, 54, 255, .12) inset, 0 10px 30px rgba(0,0,0,.25);
}

.grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  padding-bottom: 40px;
}

.card{
  border-radius: 16px;
  overflow:hidden;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  transition: transform .12s ease, border-color .12s ease;
}
.card:hover{
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.18);
}

.thumb{
  display:block;
  width:100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: rgba(0,0,0,.25);
}

.meta{
  padding: 10px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
}
.meta .title{
  font-size: 13px;
  color: rgba(255,255,255,.85);
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.meta .badge{
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.78);
}

@media (max-width: 900px){
  .wrap{ grid-template-columns: 1fr; }
  .left{ order:2; opacity:.9; }
}
.categoryGrid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 240px));
  gap: 14px;
  margin: 14px 0 18px;
}

.catCard{
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 16 / 9;   /* 👈 THIS is what’s missing */
  min-height: 140px;      /* fallback for older browsers */
  padding: 14px;          /* space for the text */
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* text sits at bottom */
}

/* The cover image layer */
.catCard::before{
  content:"";
  position:absolute;
  inset:0;
  background-image: var(--cover);
  background-size: cover;         /* ✅ fills the card */
  background-position: center 35%; /* 👈 biases upward so faces survive */
  background-repeat: no-repeat;
  transform: scale(1.00);         /* tiny scale avoids edge gaps */
  filter: saturate(1.05);
}

/* ===== Category-specific crop tuning ===== */

/* Featured – show more top (bride faces etc.) */
.catCard[data-key="featured"]::before{
  background-position: center 15%;
}

/* People/Portraits – protect faces */
.catCard[data-key="people"]::before{
  background-position: center 20%;
}

/* Weddings – slight upward bias */
.catCard[data-key="weddings"]::before{
  background-position: center 20%;
}

/* Nature – centre usually best */
.catCard[data-key="nature"]::before{
  background-position: center 25%;
}

/* Optional: darken for legibility */
.catCard::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.05) 20%,
    rgba(0,0,0,0.65) 100%
  );
}

/* Make sure the text sits above the image */
.catCard{
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.catCard:hover{
  transform: translateY(-3px);
  border-color: rgba(137, 54, 255, .35);
  box-shadow: 0 16px 44px rgba(0,0,0,.45);
}

.catTitle{
  font-weight: 750;
  letter-spacing: .2px;
  text-shadow: 0 2px 10px rgba(0,0,0,.6);
}

.catMeta{
  margin-top: 6px;
  opacity: .90;
  font-size: 0.95rem;
  text-shadow: 0 2px 10px rgba(0,0,0,.6);
}

/* FIX: ensure catCard text is visible and clicks work */
.catCard::before,
.catCard::after{
  pointer-events: none;   /* overlays won't block clicks */
}

.catCard > *{
  position: relative;
  z-index: 1;             /* text sits above overlays */
}
