/* =========================================================
   DISPATCHES PAGE STYLES
   Personality: Playful, light, fun - soft purple, warm tones
   ========================================================= */

.page-dispatches,
.page-dispatch {
  --accent: var(--purple-soft);
}

.page-dispatches main,
.page-dispatch main {
  background: var(--bg-dark);
}

/* =========================================================
   PAGE HEADER
   ========================================================= */
.page-dispatches .page-header h1,
.page-dispatch .page-header h1 {
  font-weight: 600;
}

.page-dispatches .page-intro {
  font-style: italic;
}

/* =========================================================
   DISPATCH LIST
   ========================================================= */
.dispatch-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0 1.5rem 3rem;
  max-width: 700px;
  margin: 0 auto;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 3rem 1rem;
}

/* =========================================================
   DISPATCH CARDS
   ========================================================= */
.dispatch-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.dispatch-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(191, 0, 255, 0.15);
  border-color: rgba(191, 0, 255, 0.2);
}

html.light .dispatch-card {
  background: #fff;
  border-color: #e8e8e8;
}

html.light .dispatch-card:hover {
  box-shadow: 0 8px 30px rgba(122, 0, 204, 0.1);
}

.dispatch-card-link {
  display: block;
  padding: 1.5rem;
  color: var(--text-light);
}

.dispatch-card-link:hover {
  text-decoration: none;
}

.dispatch-date {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.dispatch-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}

.dispatch-card:hover .dispatch-title {
  color: var(--accent);
}

.dispatch-excerpt {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

/* Tags */
.dispatch-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  background: var(--accent);
  color: #1a1a1a;
  border-radius: 20px;
  transition: transform 0.2s;
}

.tag:hover {
  transform: scale(1.05);
}

html.light .tag {
  background: rgba(122, 0, 204, 0.15);
  color: var(--purple-dark);
}

/* =========================================================
   SUBSCRIBE SECTION
   ========================================================= */
.subscribe-section {
  padding: var(--section-padding);
  text-align: center;
  background: var(--bg-secondary);
  border-radius: 24px;
  max-width: 600px;
  margin: 0 auto 4rem;
}

.subscribe-section h2 {
  margin-bottom: 0.5rem;
}

.subscribe-section > p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.subscribe-form {
  display: flex;
  gap: 0.5rem;
  max-width: 400px;
  margin: 0 auto;
}

.subscribe-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  background: var(--bg-dark);
  color: var(--text-light);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
}

.subscribe-form input:focus {
  outline: none;
  border-color: var(--accent);
}

html.light .subscribe-form input {
  background: #fff;
  border-color: #ccc;
}

.subscribe-form button {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  background: var(--accent);
  color: #1a1a1a;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.subscribe-form button:hover {
  background: var(--purple-primary);
  color: #fff;
  transform: scale(1.02);
}

.subscribe-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1rem;
  margin-bottom: 0;
}

.subscribe-note a {
  color: var(--text-muted);
  text-decoration: underline;
}

/* =========================================================
   SINGLE DISPATCH PAGE
   ========================================================= */
.dispatch-single {
  padding: 2rem 1.5rem 4rem;
}

.dispatch-article {
  max-width: 700px;
  margin: 0 auto;
}

.dispatch-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

html.light .dispatch-header {
  border-color: #e0e0e0;
}

.dispatch-header .dispatch-date {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.dispatch-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
}

.dispatch-header .dispatch-tags {
  justify-content: center;
}

/* Dispatch content */
.dispatch-content {
  font-size: 1.1rem;
  line-height: 1.7;
}

.dispatch-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.dispatch-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.dispatch-content p {
  margin-bottom: 1.25rem;
}

.dispatch-content ul,
.dispatch-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.dispatch-content li {
  margin-bottom: 0.5rem;
}

.dispatch-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

html.light .dispatch-content blockquote {
  background: rgba(122, 0, 204, 0.05);
}

.dispatch-content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.2em 0.4em;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

html.light .dispatch-content code {
  background: rgba(0, 0, 0, 0.05);
}

.dispatch-content pre {
  margin: 1.5rem 0;
  padding: 1rem;
  background: #0a0a0a;
  border-radius: 8px;
  overflow-x: auto;
}

html.light .dispatch-content pre {
  background: #f5f5f5;
}

.dispatch-content pre code {
  background: none;
  padding: 0;
}

/* Footer link */
.dispatch-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

html.light .dispatch-footer {
  border-color: #e0e0e0;
}

.back-link {
  font-weight: 500;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 600px) {
  .subscribe-form {
    flex-direction: column;
  }

  .subscribe-form button {
    width: 100%;
  }

  .dispatch-content {
    font-size: 1rem;
  }
}
