/* ==========================================================================
   Vidzy Theme — Shared Styles
   Consolidated patterns used across blog, pages, and tools templates.
   Imported once in the global enqueue; page-specific files extend these.
   ========================================================================== */

/* ==========================================================================
   Section 1: Breadcrumbs
   Canonical version — previously duplicated in blog.css, pages.css, tools.css.
   ========================================================================== */

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-xs);
  font-size: var(--text-body-small);
  line-height: var(--text-body-small-lh);
  margin-bottom: var(--space-lg);
}

.breadcrumbs a {
  color: var(--color-text-tertiary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumbs a:hover {
  color: var(--color-accent);
}

.breadcrumbs .breadcrumb-separator {
  color: var(--color-text-tertiary);
}

.breadcrumbs .breadcrumb-separator::after {
  content: '›';
}

.breadcrumbs .breadcrumb-current {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-medium);
}

/* ==========================================================================
   Section 2: CTA Banner
   Canonical version — previously duplicated in pages.css, tools.css, and
   the index.html inline <style>.
   ========================================================================== */

.cta-banner {
  background: transparent;
  border-top: none;
  border-bottom: none;
  padding: var(--space-xxxl) 0;
}

.cta-banner-inner {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 0 var(--screen-padding);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

.cta-banner h2 {
  font-size: 24px;
  line-height: 32px;
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin: 0;
}

.cta-banner p {
  font-size: var(--text-body-large);
  line-height: var(--text-body-large-lh);
  color: var(--color-text-secondary);
  max-width: 480px;
  margin: 0;
}

@media (min-width: 768px) {
  .cta-banner h2 {
    font-size: 28px;
    line-height: 36px;
  }
}

@media (min-width: 1024px) {
  .cta-banner h2 {
    font-size: var(--text-display-medium);
    line-height: var(--text-display-medium-lh);
  }
}

/* ==========================================================================
   Section 3: Form Inputs
   Canonical dark-background form controls — previously duplicated across
   pages.css (contact form) and tools.css (tool inputs).
   Generic class names; page-specific selectors in their own files can
   extend or override these.
   ========================================================================== */

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-surface);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--corner-radius-sm);
  font-family: inherit;
  font-size: var(--text-body-medium);
  line-height: var(--text-body-medium-lh);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-tertiary);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-purple);
  box-shadow: 0 0 0 3px var(--color-purple-dim);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999999' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-md) center;
  padding-right: var(--space-xl);
  cursor: pointer;
}

.form-label {
  display: block;
  font-size: var(--text-body-medium);
  line-height: var(--text-body-medium-lh);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  margin-bottom: var(--space-xs);
}

.form-label-hint {
  font-size: var(--text-body-small);
  line-height: var(--text-body-small-lh);
  color: var(--color-text-tertiary);
  font-weight: var(--font-weight-regular);
  margin-left: var(--space-xs);
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

/* ==========================================================================
   Section 4: Page Hero Section — Splash Background
   Shared splash-bg hero used across all page types (blog, tools, static, 404).
   ========================================================================== */

.page-hero-section {
  position: relative;
  overflow: hidden;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.page-hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0.35;
}

/* Gradient overlay */
.page-hero-section::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg,
      rgba(13, 13, 13, 0.4) 0%,
      rgba(13, 13, 13, 0.6) 50%,
      var(--color-bg) 100%
    );
  pointer-events: none;
}

.page-hero-content {
  position: relative;
  z-index: 2;
}

/* Light variants for text on splash bg */
.page-header--light h1 {
  color: #FFFFFF;
}

.page-header--light .page-meta {
  color: rgba(255, 255, 255, 0.7);
}

.page-header-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  margin-bottom: var(--space-md);
}

/* Compact variant — thinner padding for breadcrumb-only or shorter headers */
.page-hero-section--compact {
  padding-top: calc(var(--space-xxl) + var(--space-lg));
}

/* Tool hub light variant */
.tool-hub-hero--light h1 {
  color: #FFFFFF;
}

.tool-hub-hero--light p {
  color: rgba(255, 255, 255, 0.7);
}

/* ==========================================================================
   Section 4b: Splash Background Section (reusable)
   For mid-page sections with splash bg + glass cards (e.g., "How It Works").
   ========================================================================== */

.section-splash {
  position: relative;
  overflow: hidden;
}

.section-splash > .section-inner {
  position: relative;
  z-index: 2;
}

.section-splash-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.section-splash-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0.35;
}

.section-splash::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(13, 13, 13, 0.55);
  pointer-events: none;
}

/* Light text for sections on splash bg */
.section-header--light h2 {
  color: #FFFFFF;
}

.section-header--light p {
  color: rgba(255, 255, 255, 0.7);
}

/* Glass-morphism cards for use on splash sections */
.step--glass {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--corner-radius-lg);
  padding: var(--space-xl) var(--space-lg);
}

.step--glass h3 {
  color: #FFFFFF;
}

.step--glass p {
  color: rgba(255, 255, 255, 0.7);
}

/* Steps row (3 columns) */
.steps-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

@media (min-width: 768px) {
  .steps-row {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
  }
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-purple), var(--color-purple-dim));
  color: #FFFFFF;
  font-size: var(--text-heading-medium);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-md);
  box-shadow: 0 4px 16px rgba(155, 122, 227, 0.3);
}

.step h3 {
  font-size: var(--text-heading-medium);
  line-height: var(--text-heading-medium-lh);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin: 0 0 var(--space-xs);
}

.step p {
  font-size: var(--text-body-medium);
  line-height: var(--text-body-medium-lh);
  color: var(--color-text-secondary);
  margin: 0;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   Section 4c: CTA Banner — Splash Variant
   ========================================================================== */

.cta-banner--splash {
  position: relative;
  overflow: hidden;
}

.cta-banner-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.cta-banner-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0.4;
}

.cta-banner--splash::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg,
      var(--color-bg) 0%,
      rgba(13, 13, 13, 0.6) 30%,
      rgba(13, 13, 13, 0.6) 70%,
      var(--color-bg) 100%
    );
  pointer-events: none;
}

.cta-banner--splash .cta-banner-inner {
  position: relative;
  z-index: 2;
}

.cta-banner-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(155, 122, 227, 0.25);
  margin-bottom: var(--space-md);
}

/* ==========================================================================
   Section 4d: 404 Error Page — Splash Variant
   ========================================================================== */

.error-page.page-hero-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-height));
}

.error-page-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-xxl) var(--space-lg);
}

.error-page-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  margin-bottom: var(--space-lg);
}

/* ==========================================================================
   Section 4e: Footer Logo Icon
   ========================================================================== */

.footer-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  vertical-align: middle;
  margin-right: var(--space-xs);
}

/* ==========================================================================
   Section 4f: About Page — Elevated Value Cards
   ========================================================================== */

.about-value-card--elevated {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--corner-radius-lg);
  transition: border-color 0.2s ease;
}

.about-value-card--elevated:hover {
  border-color: rgba(155, 122, 227, 0.2);
}

/* ==========================================================================
   Section 5: Rich Content Base
   Shared typography for long-form content areas. Both .post-content (blog)
   and .legal-content (legal pages) extend this base via their own selectors.
   Applied via .rich-content — the canonical class for prose blocks.
   ========================================================================== */

.rich-content {
  font-size: var(--text-body-large);
  line-height: var(--text-body-large-lh);
  color: var(--color-text-secondary);
}

/* Links */
.rich-content a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: var(--space-xxs);
  transition: color 0.2s ease;
}

.rich-content a:hover {
  color: var(--color-purple);
}

/* Headings */
.rich-content h2 {
  font-size: var(--text-heading-large);
  line-height: var(--text-heading-large-lh);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-top: var(--space-xxl);
  margin-bottom: var(--space-md);
}

.rich-content h3 {
  font-size: var(--text-heading-medium);
  line-height: var(--text-heading-medium-lh);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

.rich-content h4 {
  font-size: var(--text-body-large);
  line-height: var(--text-body-large-lh);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xs);
}

.rich-content h5 {
  font-size: var(--text-body-medium);
  line-height: var(--text-body-medium-lh);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xs);
}

.rich-content h6 {
  font-size: var(--text-body-small);
  line-height: var(--text-body-small-lh);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xs);
}

/* Paragraphs */
.rich-content p {
  margin-bottom: var(--space-md);
}

/* Lists */
.rich-content ul,
.rich-content ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
}

.rich-content ul {
  list-style-type: disc;
}

.rich-content ol {
  list-style-type: decimal;
}

.rich-content li {
  margin-bottom: var(--space-xs);
  line-height: var(--text-body-large-lh);
}

.rich-content li::marker {
  color: var(--color-accent);
}

.rich-content li ul,
.rich-content li ol {
  margin-top: var(--space-xs);
  margin-bottom: var(--space-xs);
}

/* Blockquote */
.rich-content blockquote {
  border-left: var(--space-xxs) solid var(--color-purple);
  padding-left: var(--space-lg);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-lg);
  font-style: italic;
  color: var(--color-text-secondary);
}

.rich-content blockquote p:last-child {
  margin-bottom: 0;
}

/* Code blocks */
.rich-content pre {
  background: var(--color-surface-elevated);
  border-radius: var(--corner-radius-sm);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.rich-content pre code {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: var(--text-body-small);
  line-height: var(--text-body-medium-lh);
  color: var(--color-text-primary);
  background: none;
  padding: 0;
  border-radius: 0;
}

/* Inline code */
.rich-content code {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.9em;
  background: var(--color-surface-elevated);
  color: var(--color-purple);
  padding: var(--space-xxs) var(--space-xs);
  border-radius: var(--corner-radius-sm);
}

/* Tables */
.rich-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-lg);
  font-size: var(--text-body-medium);
  line-height: var(--text-body-medium-lh);
}

.rich-content th {
  text-align: left;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  padding: var(--space-sm) var(--space-md);
  border-bottom: 2px solid var(--color-border);
}

.rich-content td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-secondary);
}

.rich-content tr:nth-child(even) td {
  background: var(--color-surface);
}

/* Images & figures */
.rich-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--corner-radius);
  margin-top: var(--space-md);
  margin-bottom: var(--space-md);
}

.rich-content figure {
  margin: var(--space-lg) 0;
}

.rich-content figure img {
  margin-bottom: var(--space-xs);
}

.rich-content figcaption {
  font-size: var(--text-body-small);
  line-height: var(--text-body-small-lh);
  color: var(--color-text-tertiary);
  text-align: center;
}

/* Horizontal rule */
.rich-content hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-xl) 0;
}

/* Strong / emphasis */
.rich-content strong {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-semibold);
}

/* ==========================================================================
   Section 6: SEO Content Grid
   Used on front page, prompt archive, tools hub, and about page for
   keyword-rich content sections that support on-page SEO.
   ========================================================================== */

.seo-content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.seo-content-block {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--corner-radius);
  padding: var(--space-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.seo-content-block h3 {
  font-size: var(--text-heading-medium);
  line-height: var(--text-heading-medium-lh);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-xs);
}

.seo-content-block p {
  font-size: var(--text-body-medium);
  line-height: var(--text-body-medium-lh);
  color: var(--color-text-secondary);
  margin: 0;
}

.seo-content-bottom {
  max-width: 720px;
}

.seo-content-bottom h3 {
  font-size: var(--text-heading-medium);
  line-height: var(--text-heading-medium-lh);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-sm);
}

.seo-content-bottom p {
  font-size: var(--text-body-medium);
  line-height: var(--text-body-medium-lh);
  color: var(--color-text-secondary);
}

.seo-content-bottom strong {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-semibold);
}

@media (min-width: 768px) {
  .seo-content-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   Section 7: FAQ Accordion (details/summary)
   Used on front page, prompt archive, tools hub, and about page.
   Moved from front-page.css for cross-page reuse.
   ========================================================================== */

details.faq-item {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  overflow: hidden;
  transition: background 0.2s ease;
}

details.faq-item[open] {
  background: rgba(155, 122, 227, 0.04);
}

details.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  font-size: var(--text-body-large);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  cursor: pointer;
  list-style: none;
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.15s ease;
}

details.faq-item summary::-webkit-details-marker {
  display: none;
}

details.faq-item summary::marker {
  display: none;
  content: '';
}

details.faq-item summary:hover {
  background: var(--color-surface-elevated);
}

details.faq-item summary::after {
  content: '+';
  font-size: var(--text-heading-medium);
  font-weight: var(--font-weight-regular);
  color: var(--color-purple);
  flex-shrink: 0;
  margin-left: var(--space-md);
}

details.faq-item[open] summary::after {
  content: '\2212';
}

.faq-answer {
  padding: 0 var(--space-lg) var(--space-lg);
  font-size: var(--text-body-medium);
  line-height: var(--text-body-medium-lh);
  color: var(--color-text-secondary);
}

.faq-answer p {
  margin: 0;
}

.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* Taxonomy description text below page title */
.taxonomy-desc {
  font-size: var(--text-body-medium);
  line-height: var(--text-body-medium-lh);
  color: var(--color-text-secondary);
  margin-top: var(--space-xs);
  max-width: 600px;
}

/* ==========================================================================
   Section 8: Related Resources Box
   Appended at the bottom of single blog posts by the internal-links filter.
   Also used in single-prompt sidebar.
   ========================================================================== */

.related-resources-box {
  margin-top: var(--space-xxl);
  padding: var(--space-lg);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--corner-radius-lg);
}

.related-resources-title {
  font-size: var(--text-heading-medium);
  line-height: var(--text-heading-medium-lh);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-lg);
}

.related-resources-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 640px) {
  .related-resources-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

.related-resources-column {
  min-width: 0;
}

.related-resources-heading {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-body-small);
  line-height: var(--text-body-small-lh);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.related-resources-heading svg {
  color: var(--color-purple);
  flex-shrink: 0;
}

.related-resources-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.related-resources-list li {
  margin: 0;
}

.related-resources-list a {
  display: block;
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--text-body-medium);
  line-height: var(--text-body-medium-lh);
  color: var(--color-text-secondary);
  text-decoration: none;
  border-radius: var(--corner-radius-sm);
  transition: color 0.2s ease, background 0.2s ease;
}

.related-resources-list a:hover {
  color: var(--color-accent);
  background: rgba(89, 217, 117, 0.06);
}

/* Prompt sidebar — related resources list */
.prompt-related-resources-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.prompt-related-resources-list li {
  margin: 0;
}

.prompt-related-resources-list a {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  padding: var(--space-xs) 0;
  font-size: var(--text-body-small);
  line-height: var(--text-body-medium-lh);
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.prompt-related-resources-list a:hover {
  color: var(--color-accent);
}
