 /* ==========================================================================
   PromptVault - Meta / Zuckerberg Aesthetic Stylesheet
   ========================================================================== */

/* 1. Global Reset & Core Typography */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --meta-blue: #0866FF;
  --meta-blue-hover: #0052D4;
  --meta-bg: #F0F2F5;
  --meta-card-bg: #FFFFFF;
  --meta-text-primary: #050505;
  --meta-text-secondary: #65676B;
  --meta-border: #CED0D4;
  --meta-border-subtle: #E4E6EB;
  --meta-radius-card: 16px;
  --meta-radius-btn: 10px;
  --meta-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  --meta-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.12);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  font-family: var(--font-family);
  background-color: var(--meta-bg);
  color: var(--meta-text-primary);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* 2. Sticky Header */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--meta-border-subtle);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

header > div {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

header .flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

/* Brand Logo */
header a[aria-label="PromptVault Home"] {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
}

/* Gradient effect on 'Pro' */
header a span:first-child {
  background: linear-gradient(135deg, #0866FF 0%, #00C6FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Desktop Navigation */
nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

nav a {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--meta-text-secondary);
  padding: 8px 16px;
  border-radius: 8px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

nav a:hover {
  background-color: var(--meta-bg);
  color: var(--meta-blue);
}

/* Mobile Button */
#mobile-menu-button {
  border: none;
  background: transparent;
  padding: 8px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--meta-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

#mobile-menu-button:hover {
  background-color: var(--meta-bg);
}

/* 3. Main Hero & Search Section */
main {
  flex: 1;
}

main > section:first-child {
  background-color: var(--meta-card-bg);
  border-bottom: 1px solid var(--meta-border-subtle);
  padding: 48px 16px 32px 16px;
  text-align: center;
}

main h1 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--meta-text-primary);
}

/* Search Bar Container */
form {
  margin-top: 24px;
}

form > div {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 640px;
  margin: 0 auto;
}

/* Input Styling */
input[type="search"] {
  width: 100%;
  padding: 14px 20px;
  font-size: 1rem;
  border-radius: 50px; /* Pill style like Meta search */
  border: 1px solid var(--meta-border);
  background-color: var(--meta-bg);
  color: var(--meta-text-primary);
  outline: none;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

input[type="search"]:focus {
  background-color: var(--meta-card-bg);
  border-color: var(--meta-blue);
  box-shadow: 0 0 0 3px rgba(8, 102, 255, 0.2);
}

/* Primary Action Button */
button[type="submit"] {
  background-color: var(--meta-blue);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  box-shadow: 0 2px 4px rgba(8, 102, 255, 0.2);
}

button[type="submit"]:hover {
  background-color: var(--meta-blue-hover);
}

button[type="submit"]:active {
  transform: scale(0.98);
}

/* Results text */
main section p {
  font-size: 0.875rem;
  color: var(--meta-text-secondary);
  font-weight: 500;
}

/* 4. Cards Grid & Cards */
main > section:nth-child(2) {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 20px;
}

article {
  background-color: var(--meta-card-bg);
  border-radius: var(--meta-radius-card);
  border: 1px solid var(--meta-border-subtle);
  box-shadow: var(--meta-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

article:hover {
  box-shadow: var(--meta-shadow-hover);
  transform: translateY(-2px);
}

article img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

article > div {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

article h3 {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
}

article h3 a:hover {
  color: var(--meta-blue);
}

article p {
  color: var(--meta-text-secondary);
  font-size: 0.875rem;
  margin-top: 8px;
  line-height: 1.5;
}

/* Meta Data Footer on Cards */
article div > div {
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid var(--meta-border-subtle);
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--meta-text-secondary);
}

/* 5. Footer */
footer {
  background-color: var(--meta-card-bg);
  border-top: 1px solid var(--meta-border-subtle);
  margin-top: 48px;
  padding: 40px 16px 24px;
}

footer > div {
  max-width: 1280px;
  margin: 0 auto;
}

footer .grid {
  gap: 32px;
}

footer h2 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--meta-text-secondary);
}

footer ul {
  list-style: none;
  margin-top: 12px;
}

footer ul li {
  margin-bottom: 8px;
}

footer ul a {
  font-size: 0.875rem;
  color: var(--meta-text-secondary);
  transition: color 0.2s;
}

footer ul a:hover {
  color: var(--meta-blue);
}

/* 6. Mobile Responsiveness */
@media (min-width: 640px) {
  form > div {
    flex-direction: row;
  }
  
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  footer .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Utility Class Fixes from raw HTML */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }