/**
 * Launchmind Blog - Laravel CSS Styles
 * Version: 2.6.0
 *
 * Self-contained styles — no Tailwind or external CSS framework required.
 * Matches WordPress plugin styling for consistent look across platforms.
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */

:root {
  --lm-primary: #8f673c;
  --lm-primary-hover: #a8814f;
  --lm-text: #1f2937;
  --lm-text-light: #6b7280;
  --lm-bg: #ffffff;
  --lm-bg-secondary: #f9fafb;
  --lm-border: #e5e7eb;
  --lm-radius: 0.5rem;
  --lm-shadow:
    0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --lm-shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);

  /* 
        --color-primary: #2d162d;
    --color-primary_light: #442e42;
    --color-secondary: #8f673c;
    --color-secondary_medium: #a8814f;
    --color-secondary_light: #e9e0d6; */
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .lm-theme-auto {
    --lm-text: #f9fafb;
    --lm-text-light: #9ca3af;
    --lm-bg: #111827;
    --lm-bg-secondary: #1f2937;
    --lm-border: #374151;
  }
}

.lm-dark {
  --lm-text: #f9fafb;
  --lm-text-light: #9ca3af;
  --lm-bg: #111827;
  --lm-bg-secondary: #1f2937;
  --lm-border: #374151;
}

/* ==========================================================================
   Blog Wrapper & Container (no Tailwind needed)
   ========================================================================== */

.launchmind-blog-wrapper {
  box-sizing: border-box;
  width: 100%;
}

.launchmind-blog-container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 2rem 1rem;
}

.launchmind-blog-container--narrow {
  max-width: 800px;
}

.launchmind-blog-heading {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--lm-text);
  margin: 0 0 2rem;
}

/* ==========================================================================
   Blog Intro
   ========================================================================== */

.launchmind-blog-intro {
  max-width: 800px;
  margin: 0 auto 2rem;
  padding: 1.5rem;
  background: var(--lm-bg-secondary);
  border-radius: var(--lm-radius);
  text-align: center;
}

.launchmind-blog-intro p {
  margin: 0;
  color: var(--lm-text);
  line-height: 1.75;
}

.launchmind-site-name {
  color: var(--lm-primary);
}

/* ==========================================================================
   Blog List Grid
   ========================================================================== */

.launchmind-blog-list {
  display: grid;
  gap: 1.5rem;
}

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

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

@media (max-width: 768px) {
  .launchmind-columns-3,
  .launchmind-columns-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .launchmind-columns-2,
  .launchmind-columns-3,
  .launchmind-columns-4 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Post Card
   ========================================================================== */

.launchmind-post-card {
  background: var(--lm-bg);
  border-radius: var(--lm-radius);
  box-shadow: var(--lm-shadow);
  overflow: hidden;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.launchmind-post-card:hover {
  box-shadow: var(--lm-shadow-lg);
  transform: translateY(-2px);
}

.launchmind-post-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.launchmind-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.launchmind-post-card:hover .launchmind-post-image img {
  transform: scale(1.05);
}

.launchmind-post-content {
  padding: 1.25rem;
}

.launchmind-post-card .launchmind-post-title {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
}

.launchmind-post-card .launchmind-post-title a {
  color: var(--lm-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.launchmind-post-card .launchmind-post-title a:hover {
  color: var(--lm-primary);
}

.launchmind-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  color: var(--lm-text-light);
}

.launchmind-post-excerpt {
  color: var(--lm-text-light);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.launchmind-read-more {
  display: inline-block;
  color: var(--lm-primary);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.launchmind-read-more:hover {
  color: var(--lm-primary-hover);
  text-decoration: underline;
}

/* ==========================================================================
   Tags
   ========================================================================== */

.launchmind-post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.launchmind-tags-label {
  font-weight: 500;
  color: var(--lm-text);
  margin-right: 0.25rem;
}

.launchmind-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--lm-bg-secondary);
  color: var(--lm-text-light);
  font-size: 0.8125rem;
  border-radius: 9999px;
}

/* ==========================================================================
   Single Post
   ========================================================================== */

.launchmind-post-single {
  max-width: 800px;
  margin: 0 auto;
}

.launchmind-post-featured-image {
  margin-bottom: 2rem;
  border-radius: var(--lm-radius);
  overflow: hidden;
}

.launchmind-post-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

.launchmind-post-single .launchmind-post-title {
  margin: 0 0 1rem;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--lm-text);
}

.launchmind-post-single .launchmind-post-meta {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--lm-border);
}

/* ==========================================================================
   Post Body (Article Content)
   ========================================================================== */

.launchmind-post-body {
  color: var(--lm-text);
  font-size: 1.0625rem;
  line-height: 1.8;
}

.launchmind-post-body h2 {
  margin: 2rem 0 1rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--lm-text);
}

.launchmind-post-body h3 {
  margin: 1.5rem 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--lm-text);
}

.launchmind-post-body p {
  margin-bottom: 1rem;
}

.launchmind-post-body ul,
.launchmind-post-body ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.launchmind-post-body li {
  margin-bottom: 0.5rem;
}

.launchmind-post-body a {
  color: var(--lm-primary);
  text-decoration: underline;
}

.launchmind-post-body a:hover {
  color: var(--lm-primary-hover);
}

.launchmind-post-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--lm-radius);
  margin: 1.5rem 0;
}

.launchmind-post-body blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid var(--lm-primary);
  background: var(--lm-bg-secondary);
  font-style: italic;
  color: var(--lm-text-light);
}

.launchmind-post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.launchmind-post-body th,
.launchmind-post-body td {
  padding: 0.75rem;
  border: 1px solid var(--lm-border);
  text-align: left;
}

.launchmind-post-body th {
  background: var(--lm-bg-secondary);
  font-weight: 600;
}

.launchmind-post-body code {
  background: var(--lm-bg-secondary);
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
}

.launchmind-post-body pre {
  background: var(--lm-bg-secondary);
  padding: 1rem;
  border-radius: var(--lm-radius);
  overflow-x: auto;
  margin: 1.5rem 0;
}

.launchmind-post-body pre code {
  background: transparent;
  padding: 0;
}

/* ==========================================================================
   Language Switcher
   ========================================================================== */

.launchmind-language-switcher-inline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--lm-bg-secondary);
  border-radius: var(--lm-radius);
}

.launchmind-language-label {
  font-size: 0.875rem;
  color: var(--lm-text-light);
  font-weight: 500;
}

.launchmind-language-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.launchmind-language-button {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  background: var(--lm-bg);
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius);
  font-size: 0.875rem;
  color: var(--lm-text);
  text-decoration: none;
  transition: all 0.2s ease;
}

.launchmind-language-button:hover {
  border-color: var(--lm-primary);
  color: var(--lm-primary);
}

.launchmind-language-button.launchmind-language-active {
  background: var(--lm-primary);
  border-color: var(--lm-primary);
  color: white;
}

.launchmind-language-flag {
  font-size: 1rem;
}

.launchmind-language-check {
  font-size: 0.75rem;
}

/* ==========================================================================
   Back Link
   ========================================================================== */

.launchmind-back-link-wrapper {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--lm-border);
  text-align: center;
}

.launchmind-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--lm-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.launchmind-back-link:hover {
  color: var(--lm-primary-hover);
}

/* ==========================================================================
   Error & Empty States
   ========================================================================== */

.launchmind-error {
  padding: 1.5rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--lm-radius);
  color: #dc2626;
  text-align: center;
}

.launchmind-error-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: #dc2626;
}

.launchmind-empty {
  padding: 3rem 1.5rem;
  background: var(--lm-bg-secondary);
  border-radius: var(--lm-radius);
  color: var(--lm-text-light);
  text-align: center;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.launchmind-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.launchmind-pagination a,
.launchmind-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: var(--lm-radius);
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.launchmind-pagination a {
  background: var(--lm-bg-secondary);
  color: var(--lm-text);
}

.launchmind-pagination a:hover {
  background: var(--lm-primary);
  color: white;
}

.launchmind-pagination .active {
  background: var(--lm-primary);
  color: white;
}

.launchmind-pagination .disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
