/* ============================================================
   PromptVault -- Main Stylesheet  (Redesigned v2)
   Materialize CSS + Custom Design System
   ============================================================ */

/* --- CSS Variables ------------------------------------------- */
:root {
  --primary:        #00897b;
  --primary-dark:   #00695c;
  --primary-light:  #e0f2f1;
  --accent:         #5e35b1;
  --accent-light:   #ede7f6;
  --text-dark:      #1a1a2e;
  --text-medium:    #374151;
  --text-light:     #6b7280;
  --border:         #e5e7eb;
  --bg-page:        #f0f4f8;
  --bg-white:       #ffffff;
  --bg-light:       #f8fafc;
  --card-shadow:    0 1px 4px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.06);
  --card-shadow-hover: 0 8px 32px rgba(0,0,0,0.13);
  --radius:         14px;
  --radius-sm:      10px;
  --font:           'Inter', sans-serif;
}

/* --- Reset / Base -------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text-dark);
  background: var(--bg-page);
  line-height: 1.6;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-dark);
  margin-top: 0;
}

a { color: var(--primary); transition: color .2s; text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }

/* --- Navigation ---------------------------------------------- */
.navbar-fixed nav {
  background: rgba(255,255,255,0.97) !important;
  box-shadow: 0 1px 0 rgba(0,0,0,0.08), 0 2px 12px rgba(0,0,0,0.06);
  backdrop-filter: blur(12px);
}

nav .brand-logo {
  color: var(--primary) !important;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.5px;
  padding-left: 16px;
}

nav .brand-logo span { color: var(--accent); }

nav ul a {
  color: var(--text-medium) !important;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color .2s;
}

nav ul a:hover {
  background: transparent !important;
  color: var(--primary) !important;
}

nav ul li.active > a {
  color: var(--primary) !important;
}

nav .nav-wrapper { padding: 0 16px; }

#nav-search-bar {
  display: none;
  width: 240px;
  background: var(--bg-light);
  border-radius: 24px;
  padding: 4px 16px;
  border: 1.5px solid var(--border);
  font-size: 0.88rem;
  outline: none;
  transition: border-color .2s;
  font-family: var(--font);
}

#nav-search-bar.active { display: block; }
#nav-search-bar:focus { border-color: var(--primary); }

/* --- Categories Dropdown ------------------------------------- */
#dd-categories.dropdown-content,
#dd-user.dropdown-content {
  min-width: 270px !important;
  max-height: 420px !important;
  overflow-y: auto !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.13) !important;
  border: 1px solid var(--border) !important;
  padding: 6px 0 !important;
  margin-top: 6px !important;
  background: #fff !important;
}

/* Each item row -- flex so icon and text stay on one line */
#dd-categories.dropdown-content li a,
#dd-user.dropdown-content li a {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px 18px !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  color: var(--text-dark) !important;
  white-space: nowrap !important;
  line-height: 1.4 !important;
  transition: background .15s, color .15s !important;
  border-radius: 0 !important;
}

#dd-categories.dropdown-content li a:hover,
#dd-user.dropdown-content li a:hover {
  background: #f0fdf9 !important;
  color: var(--primary) !important;
}

/* Icon inside dropdown items */
#dd-categories.dropdown-content li a i.material-icons,
#dd-user.dropdown-content li a i.material-icons {
  font-size: 18px !important;
  width: 20px !important;
  text-align: center !important;
  flex-shrink: 0 !important;
  color: var(--primary) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Divider */
#dd-categories.dropdown-content li.divider,
#dd-user.dropdown-content li.divider {
  margin: 6px 0 !important;
  background: var(--border) !important;
  height: 1px !important;
}

/* "View All" row at bottom */
#dd-categories.dropdown-content li:last-child a {
  color: var(--primary) !important;
  font-weight: 700 !important;
}

/* Scrollbar styling for dropdown */
#dd-categories.dropdown-content::-webkit-scrollbar { width: 4px; }
#dd-categories.dropdown-content::-webkit-scrollbar-track { background: transparent; }
#dd-categories.dropdown-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.page-body { margin-top: 64px; }


/* --- Hero ---------------------------------------------------- */
.hero-section {
  background: linear-gradient(135deg, #004d40 0%, #1a237e 55%, #4a148c 100%);
  padding: 88px 0 110px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Animated mesh background */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(0,150,136,0.25) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(94,53,177,0.3) 0%, transparent 60%),
    radial-gradient(ellipse at 60% 80%, rgba(26,35,126,0.2) 0%, transparent 60%);
  pointer-events: none;
}

/* Grid dots */
.hero-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
}

.hero-section h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 800;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
  letter-spacing: -1px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.hero-section h1 span { color: #80cbc4; }

.hero-section > div > p {
  color: rgba(255,255,255,0.82);
  font-size: 1.12rem;
  max-width: 560px;
  margin: 0 auto 36px;
  position: relative;
  z-index: 1;
  font-weight: 400;
}

/* --- Stats Bar ----------------------------------------------- */
.hero-stats {
  margin-top: 40px;
  display: flex;
  gap: 0;
  justify-content: center;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
  padding: 16px 32px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
}

.hero-stat:first-child { border-radius: 12px 0 0 12px; }
.hero-stat:last-child  { border-radius: 0 12px 12px 0; }
.hero-stat:not(:first-child) { border-left: none; }

.hero-stat .stat-num {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #80cbc4, #fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stat .stat-label {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* --- Hero Search ---------------------------------------------- */
.hero-search {
  max-width: 700px;
  margin: 0 auto 32px;
  position: relative;
  z-index: 2;
}

.hero-search form {
  display: flex;
  background: #fff;
  border-radius: 50px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.3);
}

.hero-search input[type="text"] {
  flex: 1;
  padding: 18px 24px;
  border: none;
  font-size: 1rem;
  outline: none;
  font-family: var(--font);
  color: var(--text-dark);
  background: transparent;
  border-bottom: none !important;
  box-shadow: none !important;
  height: auto !important;
  margin: 0 !important;
}

.hero-search button {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  border-radius: 0 50px 50px 0;
  padding: 0 28px;
  cursor: pointer;
  font-weight: 700;
  font-family: var(--font);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: opacity .2s;
  white-space: nowrap;
}

.hero-search button:hover { opacity: 0.9; }

.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--card-shadow-hover);
  overflow: hidden;
  z-index: 100;
  display: none;
  border: 1px solid var(--border);
}

.search-suggestion-item {
  padding: 12px 20px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-medium);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background .15s;
}

.search-suggestion-item:hover { background: var(--primary-light); color: var(--primary); }
.search-suggestion-item:last-child { border-bottom: none; }

/* --- Hero Buttons --------------------------------------------- */
.hero-btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.hero-btns a.btn {
  border-radius: 50px;
  padding: 13px 34px;
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: none;
  letter-spacing: 0;
  height: auto;
  line-height: 1.4;
}

.btn-primary-hero {
  background: #fff !important;
  color: var(--primary-dark) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2) !important;
}

.btn-secondary-hero {
  background: rgba(255,255,255,0.12) !important;
  color: #fff !important;
  border: 1.5px solid rgba(255,255,255,0.45) !important;
  box-shadow: none !important;
}

/* --- Section Layout ------------------------------------------- */
.site-section { padding: 64px 0; }
.site-section.light { background: var(--bg-white); }
.site-section.grey  { background: var(--bg-page); }

/* --- Section Headers ------------------------------------------ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 12px;
}

.section-header h2 {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.3px;
  margin: 0;
}

.section-header h2 .material-icons {
  color: var(--primary);
  font-size: 1.6rem;
  background: var(--primary-light);
  border-radius: 8px;
  padding: 4px;
}

.section-header a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--primary-light);
  transition: background .2s, color .2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.section-header a:hover {
  background: var(--primary);
  color: #fff;
}

/* --- Category Cards ------------------------------------------- */
/* Override Materialize col so category grid is uniform */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  margin: 0;
}

@media (min-width: 993px) {
  .categories-grid { grid-template-columns: repeat(6, 1fr); }
}

@media (min-width: 601px) and (max-width: 992px) {
  .categories-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 600px) {
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
}

.category-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 22px 14px 18px;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: box-shadow .25s, transform .2s, border-color .2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  border: 1.5px solid transparent;
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary-light), transparent);
  opacity: 0;
  transition: opacity .25s;
}

.category-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-5px);
  color: inherit;
  border-color: var(--primary-light);
}

.category-card:hover::before { opacity: 1; }

.category-card .cat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  background: var(--primary-light);
  position: relative;
  transition: background .25s, transform .2s;
}

.category-card:hover .cat-icon {
  background: var(--primary);
  transform: scale(1.08);
}

.category-card .cat-icon .material-icons {
  font-size: 1.6rem;
  color: var(--primary-dark);
  transition: color .25s;
}

.category-card:hover .cat-icon .material-icons { color: #fff; }

.category-card .cat-name {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-dark);
  margin-bottom: 4px;
  line-height: 1.3;
  position: relative;
}

.category-card .cat-count {
  font-size: 0.75rem;
  color: var(--text-light);
  position: relative;
  font-weight: 500;
}

/* --- Prompt Cards --------------------------------------------- */
/* Use flexbox rows for equal-height cards */
.prompts-row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -8px;
}

.prompts-row .prompt-col {
  padding: 0 8px;
  margin-bottom: 16px;
  width: 25%;
  display: flex;
}

@media (max-width: 992px) { .prompts-row .prompt-col { width: 50%; } }
@media (max-width: 600px) { .prompts-row .prompt-col { width: 100%; } }

.prompt-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  transition: box-shadow .25s, transform .2s, border-color .2s;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  border: 1.5px solid transparent;
  position: relative;
}

.prompt-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-4px);
  border-color: var(--primary-light);
}

/* Top accent line */
.prompt-card::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity .25s;
}

.prompt-card:hover::before { opacity: 1; }

.prompt-card .card-header {
  padding: 18px 18px 10px;
  flex: 1;
}

.prompt-card .card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prompt-card .card-title a { color: inherit; }
.prompt-card .card-title a:hover { color: var(--primary); }

.prompt-card .card-desc {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prompt-card .card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 18px;
}

.prompt-card .card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg-light);
}

/* --- Badges --------------------------------------------------- */
.badge-category {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s, color .2s;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-category:hover {
  background: var(--primary);
  color: #fff;
}

.badge-model {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Card Buttons --------------------------------------------- */
.btn-copy {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 7px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: opacity .2s, transform .1s;
  font-family: var(--font);
  box-shadow: 0 2px 8px rgba(0,137,123,0.3);
}

.btn-copy:hover { opacity: 0.88; transform: scale(1.03); }
.btn-copy .material-icons { font-size: 0.95rem; }

.btn-save {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 24px;
  padding: 6px 14px;
  font-size: 0.78rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-light);
  transition: all .2s;
  font-family: var(--font);
}

.btn-save:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.btn-save.saved { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.btn-save .material-icons { font-size: 0.95rem; }

/* --- Prompt Detail -------------------------------------------- */
.prompt-detail-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--card-shadow);
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.prompt-content-box {
  background: #0f1117;
  border: 1px solid rgba(255,255,255,0.08);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 24px;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.9;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
  position: relative;
  margin: 20px 0;
}

.btn-copy-large {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 13px 32px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: opacity .2s, transform .1s;
  font-family: var(--font);
  margin-bottom: 8px;
  box-shadow: 0 4px 20px rgba(0,137,123,0.35);
}

.btn-copy-large:hover { opacity: 0.9; transform: scale(1.02); }
.btn-copy-large .material-icons { font-size: 1.2rem; }
.btn-copy-large.copied { background: linear-gradient(135deg, #43a047, #2e7d32); }

/* --- Share Buttons -------------------------------------------- */
.share-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }

.share-btn {
  padding: 8px 18px;
  border-radius: 24px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity .2s;
}

.share-btn:hover { opacity: 0.85; }
.share-btn.twitter  { background: #1da1f2; color: #fff; }
.share-btn.facebook { background: #1877f2; color: #fff; }
.share-btn.copy-link { background: var(--bg-light); color: var(--text-dark); border: 1px solid var(--border); }

/* --- Tags ----------------------------------------------------- */
.tag-pill {
  display: inline-block;
  background: var(--bg-light);
  color: var(--text-medium);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  margin: 3px;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: all .2s;
}

.tag-pill:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); }

/* --- FAQ ------------------------------------------------------ */
.faq-section { margin: 8px 0; }

.faq-item {
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color .2s;
}

.faq-item.open { border-color: var(--primary-light); }

.faq-question {
  padding: 18px 22px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-dark);
  transition: background .2s;
  user-select: none;
  gap: 12px;
}

.faq-question:hover { background: var(--bg-light); }
.faq-question .material-icons { transition: transform .3s; color: var(--primary); flex-shrink: 0; }
.faq-item.open .faq-question { color: var(--primary); }
.faq-item.open .faq-question .material-icons { transform: rotate(180deg); }

.faq-answer {
  display: none;
  padding: 0 22px 18px;
  color: var(--text-medium);
  font-size: 0.88rem;
  line-height: 1.75;
  border-top: 1px solid var(--border);
}

.faq-item.open .faq-answer { display: block; }

/* --- Blog Cards ----------------------------------------------- */
.blog-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: box-shadow .25s, transform .2s;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--border);
}

.blog-card:hover { box-shadow: var(--card-shadow-hover); transform: translateY(-3px); }

.blog-card img { width: 100%; height: 190px; object-fit: cover; }

.blog-card .blog-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card .blog-category {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}

.blog-card .blog-title {
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 10px;
  line-height: 1.45;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card .blog-title:hover { color: var(--primary); }

.blog-card .blog-excerpt {
  font-size: 0.84rem;
  color: var(--text-light);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card .blog-meta {
  font-size: 0.77rem;
  color: var(--text-light);
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* --- Collection Cards ----------------------------------------- */
.collection-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--radius);
  padding: 28px 24px;
  color: #fff;
  box-shadow: var(--card-shadow);
  transition: box-shadow .25s, transform .2s;
  text-decoration: none;
  display: block;
  position: relative;
  overflow: hidden;
}

.collection-card:hover { box-shadow: var(--card-shadow-hover); transform: translateY(-4px); color: #fff; }

.collection-card::after {
  content: '';
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 110px;
  height: 110px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}

.collection-card .col-title { font-size: 1.05rem; font-weight: 800; margin-bottom: 8px; }
.collection-card .col-count { font-size: 0.84rem; opacity: 0.85; }

/* --- Pagination ----------------------------------------------- */
.pagination-wrapper { display: flex; justify-content: center; margin: 32px 0; }
.pagination-wrapper .pagination li a,
.pagination-wrapper .pagination li.disabled span,
.pagination-wrapper .pagination li.active a { border-radius: 8px; font-weight: 600; }

/* --- Newsletter ----------------------------------------------- */
.newsletter-section {
  background: linear-gradient(135deg, #004d40 0%, #1a237e 100%);
  padding: 72px 0;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.newsletter-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 24px 24px;
}

.newsletter-section h2 { color: #fff; margin-bottom: 12px; position: relative; z-index: 1; }
.newsletter-section p  { opacity: 0.8; margin-bottom: 32px; position: relative; z-index: 1; }

.newsletter-form {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  background: #fff;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
  position: relative;
  z-index: 1;
}

.newsletter-form input {
  flex: 1;
  padding: 16px 22px;
  border: none;
  outline: none;
  font-size: 0.95rem;
  font-family: var(--font);
  background: transparent;
}

.newsletter-form button {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  padding: 16px 28px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  transition: opacity .2s;
  white-space: nowrap;
}

.newsletter-form button:hover { opacity: 0.9; }

/* --- Breadcrumb ----------------------------------------------- */
.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.84rem;
  margin-bottom: 20px;
  color: var(--text-light);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.breadcrumb-nav a { color: var(--text-light); transition: color .2s; }
.breadcrumb-nav a:hover { color: var(--primary); }
.breadcrumb-nav span { color: var(--text-dark); font-weight: 600; }
.breadcrumb-nav .material-icons { font-size: 1rem; opacity: 0.5; }

/* --- Sidenav -------------------------------------------------- */
.sidenav {
  background: var(--bg-white) !important;
}

.sidenav .sidenav-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  padding: 24px;
  color: #fff;
}

.sidenav .sidenav-header .brand { font-size: 1.2rem; font-weight: 800; }
.sidenav li a { color: var(--text-medium); font-weight: 500; }

/* --- Cookie Banner -------------------------------------------- */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1a1a2e;
  color: rgba(255,255,255,0.9);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 9999;
  font-size: 0.87rem;
  flex-wrap: wrap;
  border-top: 2px solid var(--primary);
}

#cookie-banner a { color: var(--primary-light); }

#cookie-accept {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 8px 22px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font);
  font-size: 0.85rem;
}

#cookie-decline {
  background: transparent;
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 24px;
  padding: 8px 22px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font);
  font-size: 0.85rem;
  transition: border-color 0.2s, color 0.2s;
}

#cookie-decline:hover {
  border-color: rgba(255,255,255,0.7);
  color: #fff;
}

/* --- Submission Form ------------------------------------------ */
.submit-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
}

/* --- Ad Zones ------------------------------------------------- */
.ad-zone { margin: 20px 0; text-align: center; }
.ad-zone-header { margin-bottom: 8px; }
.ad-zone-sidebar { margin: 16px 0; }
.ad-zone-in-content { margin: 28px 0; }
.ad-zone-footer { margin-top: 8px; }

/* --- 404 Page ------------------------------------------------- */
.page-404 {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 0;
}

.page-404 .error-code {
  font-size: 8rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 8px;
}

.page-404 h2 { font-size: 1.8rem; color: var(--text-dark); margin-bottom: 12px; }
.page-404 p  { color: var(--text-light); margin-bottom: 28px; }

/* --- Footer --------------------------------------------------- */
footer.site-footer {
  background: #0f1117;
  color: rgba(255,255,255,0.7);
  padding: 60px 0 0;
}

footer .footer-heading {
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

footer .footer-links { list-style: none; padding: 0; margin: 0; }
footer .footer-links li { margin-bottom: 10px; }

footer .footer-links a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.87rem;
  transition: color .2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

footer .footer-links a:hover { color: var(--primary-light); padding-left: 4px; }

footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 20px 0;
  margin-top: 40px;
  text-align: center;
  font-size: 0.81rem;
  color: rgba(255,255,255,0.35);
}

footer .footer-bottom a { color: rgba(255,255,255,0.45); margin: 0 8px; }
footer .footer-bottom a:hover { color: var(--primary-light); }
footer .about-text { font-size: 0.87rem; line-height: 1.75; margin-bottom: 16px; color: rgba(255,255,255,0.5); }

/* --- Filters Bar ---------------------------------------------- */
.filters-bar {
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 24px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
}

.filter-chip {
  padding: 6px 16px;
  border-radius: 24px;
  border: 1.5px solid var(--border);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-medium);
  background: var(--bg-white);
  transition: all .2s;
  text-decoration: none;
  line-height: 1.4;
}

.filter-chip:hover, .filter-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* --- Loading Spinner ------------------------------------------ */
.search-loading { text-align: center; padding: 40px 0; }

/* --- Materialize Input Overrides ------------------------------ */
.input-field input[type="text"]:focus,
.input-field input[type="email"]:focus,
.input-field input[type="password"]:focus,
.input-field textarea:focus {
  border-bottom-color: var(--primary) !important;
  box-shadow: 0 1px 0 var(--primary) !important;
}

.input-field input[type="text"]:focus + label,
.input-field input[type="email"]:focus + label,
.input-field input[type="password"]:focus + label,
.input-field textarea:focus + label {
  color: var(--primary) !important;
}

.input-field .prefix.active { color: var(--primary); }
.select-wrapper .caret { fill: var(--primary); }
[type="checkbox"]:checked + span::before { border-right-color: var(--primary) !important; border-bottom-color: var(--primary) !important; }

/* --- Dropdown ------------------------------------------------- */
.dropdown-content li > a {
  color: var(--text-medium) !important;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dropdown-content li > a:hover { color: var(--primary) !important; }
.dropdown-content { border-radius: var(--radius-sm) !important; border: 1px solid var(--border); }

/* --- Utility Classes ------------------------------------------ */
.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-elevated {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
  padding: 24px;
}

/* --- Responsive ----------------------------------------------- */
@media (max-width: 992px) {
  .site-section { padding: 48px 0; }
  .section-header h2 { font-size: 1.35rem; }
}

@media (max-width: 600px) {
  .hero-section { padding: 60px 0 80px; }
  .hero-section h1 { font-size: 1.9rem; letter-spacing: -0.5px; }
  .hero-section > div > p { font-size: 1rem; }
  .hero-search form { border-radius: 14px; flex-direction: column; box-shadow: 0 6px 30px rgba(0,0,0,0.2); }
  .hero-search button { border-radius: 0 0 14px 14px; justify-content: center; padding: 14px; }
  .hero-search input[type="text"] { padding: 16px 20px; border-bottom: 1px solid var(--border) !important; }
  .hero-stat:first-child { border-radius: 12px 12px 0 0; }
  .hero-stat:last-child  { border-radius: 0 0 12px 12px; }
  .hero-stat:not(:first-child) { border-left: 1px solid rgba(255,255,255,0.15); border-top: none; }
  .prompt-detail-card { padding: 20px; }
  .site-section { padding: 36px 0; }
  .newsletter-section { padding: 48px 0; }
  .newsletter-form { flex-direction: column; border-radius: 14px; }
  .newsletter-form button { border-radius: 0 0 14px 14px; width: 100%; padding: 15px; text-align: center; }
  #cookie-banner { flex-direction: column; align-items: flex-start; }
  .filters-bar { gap: 8px; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .prompts-row .prompt-col { width: 100%; }
  .hero-btns a.btn { padding: 12px 24px; font-size: 0.9rem; }
}

/* ===============================================================
   MATERIALIZE OVERRIDE -- must come last to win specificity wars
   =============================================================== */

/* Force category grid -- Materialize sets `a { display: inline }` which
   breaks grid children. Override to block/flex so grid places them. */
.categories-grid {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 14px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
}

@media (max-width: 992px) {
  .categories-grid { grid-template-columns: repeat(4, 1fr) !important; }
}

@media (max-width: 600px) {
  .categories-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* Every direct child of categories-grid (the <a> tags) must be block */
.categories-grid > .category-card {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
}

/* Force prompt row layout -- flex with wrap */
.prompts-row {
  display: flex !important;
  flex-wrap: wrap !important;
  margin-left: -8px !important;
  margin-right: -8px !important;
  margin-bottom: 0 !important;
}

/* Force prompt col widths -- override Materialize col rules */
.prompts-row > .prompt-col {
  display: flex !important;
  flex-direction: column !important;
  width: 25% !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
  margin-bottom: 16px !important;
  float: none !important;
  box-sizing: border-box !important;
}

@media (max-width: 992px) {
  .prompts-row > .prompt-col { width: 50% !important; }
}

@media (max-width: 600px) {
  .prompts-row > .prompt-col { width: 100% !important; }
}

/* Prompt card must fill the column height */
.prompt-col > .prompt-card {
  width: 100% !important;
  flex: 1 !important;
}

/* Override Materialize nav link colours in white nav */
.navbar-fixed nav a,
.navbar-fixed nav .brand-logo {
  line-height: 64px;
}

/* Override Materialize body background that can override our bg-page */
body { background-color: var(--bg-page) !important; }

/* Materialize sets .container margin:auto with left/right padding.
   Ensure our grid fills it cleanly */
.container > .categories-grid,
.container > .prompts-row {
  box-sizing: border-box;
}

/* Remove Materialize's default row negative margin from interfering */
.site-section .container > .prompts-row {
  margin-left: -8px;
  margin-right: -8px;
  width: calc(100% + 16px);
}

/* --- Category Section -- Dark Branded Background --------------- */
.section-cats {
  background: linear-gradient(160deg, #0d1b2a 0%, #1a237e 60%, #00695c 100%) !important;
  position: relative;
  overflow: hidden;
}

/* Subtle dot grid overlay */
.section-cats::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

/* Glowing blobs */
.section-cats::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0,150,136,0.18) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
}

.section-cats .container { position: relative; z-index: 1; }

/* Dark section header -- white text */
.section-header--dark h2 {
  color: #fff !important;
}

.section-header--dark h2 .material-icons {
  color: #80cbc4 !important;
  background: rgba(255,255,255,0.12) !important;
}

.section-link--dark {
  background: rgba(255,255,255,0.12) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
}

.section-link--dark:hover {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
}

/* Category cards on dark background -- frosted glass style */
.category-card--dark {
  background: rgba(255,255,255,0.08) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.category-card--dark .cat-name {
  color: #fff !important;
}

.category-card--dark .cat-count {
  color: rgba(255,255,255,0.55) !important;
}

.category-card--dark .cat-icon {
  background: rgba(0,150,136,0.25) !important;
  border: 1px solid rgba(0,150,136,0.4) !important;
}

.category-card--dark .cat-icon .material-icons {
  color: #80cbc4 !important;
}

.category-card--dark:hover {
  background: rgba(0,150,136,0.25) !important;
  border-color: rgba(0,150,136,0.6) !important;
  transform: translateY(-6px) !important;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4) !important;
}

.category-card--dark:hover .cat-icon {
  background: var(--primary) !important;
}

.category-card--dark:hover .cat-icon .material-icons {
  color: #fff !important;
}

.category-card--dark:hover .cat-name {
  color: #80cbc4 !important;
}

/* --- Trending Section -- Warm Purple/Indigo Gradient ----------- */
.section-trending {
  background: linear-gradient(150deg, #1a0533 0%, #2d1b69 40%, #1a237e 100%) !important;
  position: relative;
  overflow: hidden;
}

.section-trending::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

/* Glowing blobs */
.section-trending::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -40px;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(94,53,177,0.25) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
}

.section-trending .container { position: relative; z-index: 1; }

/* Trending prompt cards -- brighter on dark bg */
.section-trending .prompt-card {
  background: rgba(255,255,255,0.97) !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3) !important;
}

.section-trending .prompt-card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.45) !important;
  transform: translateY(-5px) !important;
  border-color: #ce93d8 !important;
}

.section-trending .prompt-card::before {
  background: linear-gradient(90deg, var(--accent), #e040fb) !important;
}

/* --- Breadcrumb Navigation ------------------------------------ */
.breadcrumb-bar {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 10px 0;
  flex-wrap: wrap;
  gap: 0;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  font-size: 0.83rem;
  font-weight: 500;
}

/* Chevron separator using ::before on all items after the first */
.breadcrumb-item + .breadcrumb-item::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid var(--text-light);
  border-top: 1.5px solid var(--text-light);
  transform: rotate(45deg);
  margin: 0 10px;
  opacity: 0.45;
  flex-shrink: 0;
}

.breadcrumb-item a {
  color: var(--text-light);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color .18s;
  padding: 3px 0;
  border-bottom: 1.5px solid transparent;
}

.breadcrumb-item a:hover {
  color: var(--primary);
  border-bottom-color: var(--primary-light);
}

/* Home link -- CSS-only house icon via ::before */
.breadcrumb-home > a::before {
  content: '~';
  font-size: 1rem;
  margin-right: 4px;
  line-height: 1;
  display: inline;
}

/* Suppress any Material Icons inside breadcrumb items -- prevents float bugs */
.breadcrumb-item .material-icons {
  display: none !important;
}

/* Active / current page */
.breadcrumb-item.active span {
  color: var(--text-dark);
  font-weight: 600;
  cursor: default;
}

/* Teal left-border accent on the active item */
.breadcrumb-item.active {
  position: relative;
}

.breadcrumb-item.active::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  margin-left: 8px;
  opacity: 0.6;
  flex-shrink: 0;
}

/* Remove old Materialize breadcrumb overrides */
.breadcrumb-nav { display: none !important; }
nav.breadcrumb-nav { display: none !important; }

/* --- Blog Preview Section ------------------------------------- */
.section-blog {
  background: linear-gradient(150deg, #1a2a0d 0%, #0d3320 45%, #00352e 100%) !important;
  position: relative;
  overflow: hidden;
}
.section-blog::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
}
.section-blog::after {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(0,200,150,0.15) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
}
.section-blog .container { position: relative; z-index: 1; }

.section-blog .section-header--dark h2 .material-icons {
  background: rgba(255,255,255,0.1) !important;
  color: #a5d6a7 !important;
}

/* Blog card on dark background */
.blog-card--dark {
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius) !important;
  overflow: hidden;
  display: flex !important;
  flex-direction: column;
  height: 100%;
  transition: transform .25s, box-shadow .25s, border-color .25s;
  box-shadow: 0 4px 24px rgba(0,0,0,0.25) !important;
}
.blog-card--dark:hover {
  transform: translateY(-6px);
  border-color: rgba(165,214,167,0.4) !important;
  box-shadow: 0 16px 48px rgba(0,0,0,0.4) !important;
}

.blog-card-img {
  width: 100%; height: 180px;
  object-fit: cover; display: block;
}
.blog-card-placeholder {
  width: 100%; height: 180px;
  background: linear-gradient(135deg, rgba(0,150,136,0.3) 0%, rgba(94,53,177,0.3) 100%);
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.blog-card-placeholder .material-icons {
  font-size: 3rem !important;
  display: block !important;
  color: rgba(255,255,255,0.2) !important;
}

.blog-card--dark .blog-card-body {
  padding: 18px 20px 20px;
  display: flex; flex-direction: column; flex: 1;
}
.blog-card--dark .blog-category {
  display: inline-block;
  background: rgba(165,214,167,0.15);
  color: #a5d6a7;
  border: 1px solid rgba(165,214,167,0.25);
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.6px;
  padding: 3px 10px; border-radius: 20px; margin-bottom: 10px;
}
.blog-card--dark .blog-title {
  color: #fff !important;
  font-size: 0.97rem; font-weight: 700; line-height: 1.45;
  text-decoration: none; display: block; margin-bottom: 10px;
  transition: color .18s;
}
.blog-card--dark .blog-title:hover { color: #a5d6a7 !important; }
.blog-card--dark .blog-excerpt {
  color: rgba(255,255,255,0.55);
  font-size: 0.84rem; line-height: 1.65; margin-bottom: 14px;
}
.blog-card--dark .blog-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.78rem; color: rgba(255,255,255,0.35);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 12px; margin-top: auto;
}
.blog-card--dark .blog-meta span {
  display: flex; align-items: center; gap: 4px;
}
.blog-card--dark .blog-meta .material-icons {
  font-size: 0.9rem !important; display: inline !important;
}
.blog-read-more {
  color: #a5d6a7; font-weight: 600; font-size: 0.8rem;
  text-decoration: none; transition: color .18s;
}
.blog-read-more:hover { color: #fff; }

@media (max-width: 992px) {
  .section-blog .prompt-col { width: 50% !important; }
}
@media (max-width: 600px) {
  .section-blog .prompt-col { width: 100% !important; }
}

