/* ===========================
   HOME PAGE (Gallery Styles)
   =========================== */

/* -- Filter Chips -- */
.gallery-controls {
  margin-top: 2rem;
}

.home-hero .hero-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.95fr);
  gap: 2rem;
  align-items: start;
}

.home-hero-shell {
  display: grid;
  gap: 1.25rem;
}

.home-controls-wrap {
  width: min(980px, 100%);
}

.home-hero .gallery-controls {
  margin-top: 0;
}

.controls-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  margin-bottom: 0.8rem;
}

.gallery-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.chip {
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: 999px; /* Pill shape */
  padding: 0.5rem 1.1rem;
  font-family: inherit;
  font-size: 0.95rem; /* Slightly larger text for legibility */
  color: var(--color-text-soft);
  cursor: pointer;
  transition: all 150ms ease-out;
}

.chip:hover {
  border-color: var(--color-text-main);
  color: var(--color-text-main);
  background: #f7f5f2; /* Very subtle darken on hover */
}

.chip.active {
  background: var(--color-text-main);
  color: var(--color-surface);
  border-color: var(--color-text-main);
}

/* -- Masonry Grid (Pinterest Layout) -- */
.gallery-section {
  padding-bottom: 4rem;
}

.masonry-grid {
  /* This creates the waterfall effect */
  column-count: 3;
  column-gap: 1.5rem;
  width: 100%;
}

.masonry-item {
  /* Prevents the card from splitting across columns */
  break-inside: avoid;
  margin-bottom: 1.5rem;
  
  background: var(--color-surface);
  
  /* REPLACED SHADOW WITH BORDER */
  border: 1px solid var(--color-border-subtle);
  border-radius: 12px; /* Slightly tighter radius */
  
  overflow: hidden;
  transition: border-color 200ms ease-out;
  cursor: pointer;
}

.masonry-item:hover {
  /* No lift/shadow on hover, just a clearer border color */
  border-color: var(--color-accent-sage);
}

.pin-image {
  width: 100%;
  display: block;
  height: auto; 
  border-bottom: 1px solid var(--color-border-subtle); /* Separates image from text clearly */
}

.pin-content {
  padding: 1.2rem 1.2rem 1.4rem;
}

.pin-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-muted);
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: block;
}

.pin-title {
  font-family: "Fraunces", serif;
  font-size: 1.2rem;
  margin: 0 0 0.6rem;
  line-height: 1.3;
  color: var(--color-text-main);
}

.pin-desc {
  font-size: 0.95rem;
  color: var(--color-text-soft);
  margin: 0;
  line-height: 1.6;
}

.gallery-empty {
  text-align: center;
  padding: 3rem;
  color: var(--color-text-muted);
  border: 1px dashed var(--color-border-subtle);
  border-radius: 12px;
}

.gallery-empty.hidden {
  display: none;
}

/* -- How It Works Section -- */
.how-it-works-section {
  padding-block: 1.2rem 1.6rem;
}

.help-section-head {
  margin-bottom: 1.1rem;
}

.help-section-subtitle {
  margin: 0.45rem 0 0;
  max-width: 52rem;
  color: var(--color-text-soft);
  font-size: 0.98rem;
  line-height: 1.55;
}

.help-step-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.85rem;
}

.help-step {
  background: var(--color-surface);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 24px;
  box-shadow: 1px 1px 12px rgba(39, 26, 20, 0.04);
  padding: 0.95rem 1.05rem;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.85rem;
  align-items: start;
}

.help-step-index {
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 1.2rem;
  line-height: 1;
  padding-top: 0.15rem;
  color: var(--color-text-main);
}

.help-step-title {
  margin: 0;
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 1.03rem;
  line-height: 1.25;
  color: var(--color-text-main);
}

.help-step-text {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--color-text-soft);
}

/* -- CTA Section -- */
.cta-section {
  padding: 2rem 0 2rem;
}

.home-subscribe-section {
  padding-top: 0;
  padding-bottom: 3rem;
}

.cta-card {
  background: #f4f4f4; /* Flat, warm background */
  border: 1px solid var(--color-border-subtle);
  border-radius: 16px;
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-card h2 {
  font-family: "Fraunces", serif;
  font-size: 1.6rem;
  margin-bottom: 0.6rem;
}

.cta-card p {
  color: var(--color-text-soft);
  max-width: 450px;
  margin: 0 auto 1.8rem;
  font-size: 1rem;
}

/* -- Responsive -- */
@media (max-width: 900px) {
  .home-hero .hero-layout {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }

  .home-controls-wrap {
    width: 100%;
  }

  .masonry-grid {
    column-count: 2;
  }

  .help-step {
    grid-template-columns: 56px 1fr;
  }
}

@media (max-width: 600px) {
  .masonry-grid {
    column-count: 1;
  }
  
  .hero-layout {
    grid-template-columns: 1fr;
  }
  
  .pin-title {
    font-size: 1.3rem; /* Larger headings on mobile for readability */
  }
}

/* CHANGED — supports multiple categories cleanly */
.pin-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.pin-category {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: 999px;
  background: hsla(209, 99%, 60%, 0.05);
  color: #329afe;
  line-height: 1;
}
