/* ============================================
   BLOG STYLES - MyRealVet Dieta
   Design professionale e moderno per il blog
   ============================================ */

/* Container principale blog */
.blog-container {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 3rem 1.5rem;
}

.site-main {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Header del blog */
.blog-header {
  margin-bottom: 3rem;
}

.blog-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.blog-header p {
  font-size: 1.125rem;
  color: #6b7280;
}

.blog-index-menu {
  position: relative;
  margin-bottom: 2.5rem;
  display: inline-flex;
  flex-direction: column;
  gap: 0.75rem;
}

.blog-index-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid #d1d5db;
  background: white;
  color: #1f2937;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.blog-index-toggle:hover,
.blog-index-toggle:focus-visible {
  border-color: #10b981;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.15);
  outline: none;
}

.blog-index-label {
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.blog-index-icon {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.blog-index-icon span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: transform 0.2s ease;
}

.blog-index-menu.is-open .blog-index-icon span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.blog-index-menu.is-open .blog-index-icon span:nth-child(2) {
  opacity: 0;
}

.blog-index-menu.is-open .blog-index-icon span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.blog-index-dropdown {
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 0;
  min-width: 260px;
  max-height: 360px;
  overflow-y: auto;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 0.75rem;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.18);
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 15;
}

.blog-index-menu.is-open .blog-index-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.blog-index-nav {
  display: block;
  background: white;
  border-radius: 0.5rem;
}

.blog-index-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.blog-index-list a {
  display: block;
  color: #1f2937;
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.4;
  padding: 0.5rem 0.75rem;
  transition: background 0.18s, color 0.18s;
}

.blog-index-list a:hover,
.blog-index-list a:focus-visible {
  background: #ecfdf5;
  color: #047857;
  outline: none;
}

.blog-index-list li + li {
  border-top: 1px solid #e5e7eb;
}

@media (max-width: 768px) {
  .blog-index-menu {
    width: 100%;
  }

  .blog-index-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .blog-index-dropdown {
    position: static;
    max-height: none;
    width: 100%;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    box-shadow: none;
    border-radius: 0.75rem;
    margin-top: 0;
    display: none;
  }

  .blog-index-menu.is-open .blog-index-dropdown {
    display: block;
  }

  .blog-index-nav {
    border-radius: 0.75rem;
  }
}

/* Admin Panel */
.blog-admin-panel {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.blog-admin-panel h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e3a8a;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.blog-admin-panel p {
  font-size: 0.875rem;
  color: #1e40af;
}

.blog-admin-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1.25rem;
  background: #2563eb;
  color: white;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s;
  text-decoration: none;
}

.blog-admin-btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

/* Grid articoli */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

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

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

/* Card articolo */
.blog-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.3s;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  border-color: #10b981;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.blog-card-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f3f4f6;
}

.blog-card-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-cover img {
  transform: scale(1.03);
}

.blog-card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Badge */
.blog-badge {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
}

/* Titolo articolo */
.blog-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}

.blog-card:hover .blog-card-title {
  color: #10b981;
}

.blog-card-excerpt {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Meta info */
.blog-card-meta {
  display: flex;
  align-items: center;
  font-size: 0.75rem;
  color: #9ca3af;
  padding-top: 1rem;
  border-top: 1px solid #f3f4f6;
  margin-top: auto;
}

.blog-avatar {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 500;
  font-size: 0.75rem;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.blog-meta-separator {
  margin: 0 0.5rem;
  color: #d1d5db;
}

/* Empty state */
.blog-empty {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 4rem 2rem;
  text-align: center;
}

.blog-empty-icon {
  width: 4rem;
  height: 4rem;
  background: #f3f4f6;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.blog-empty-icon span {
  font-size: 2rem;
}

.blog-empty h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.5rem;
}

.blog-empty p {
  color: #6b7280;
}

/* ============================================
   SINGOLO ARTICOLO
   ============================================ */

.article-container {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 2rem 1.5rem;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  font-size: 0.875rem;
  color: #4b5563;
  margin-bottom: 2rem;
}

.breadcrumb a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: #059669;
}

.breadcrumb span {
  color: #1f2937;
  font-weight: 500;
}

.breadcrumb-sep {
  margin: 0 0.5rem;
  color: #9ca3af;
}

/* Preview badge */
.article-preview-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #fcd34d;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #92400e;
  margin-bottom: 1.5rem;
}

.article-preview-badge span {
  margin-right: 0.5rem;
}

/* Header articolo */
.article-header {
  background: linear-gradient(135deg, #f0fdf4 0%, #dbeafe 100%);
  padding: 2.5rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  margin-bottom: 2.5rem;
}

.article-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
  margin-bottom: 1.5rem;
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.article-author {
  display: flex;
  align-items: center;
}

.article-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 1.125rem;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.article-author-info h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.125rem;
}

.article-author-info p {
  font-size: 0.75rem;
  color: #6b7280;
}

.article-stats {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: #6b7280;
}

.article-stat-sep {
  margin: 0 0.5rem;
}

/* Contenuto articolo */
.article-content {
  background: white;
  padding: 2.5rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  margin-bottom: 2.5rem;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: #374151;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.article-content h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: #111827;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e5e7eb;
}

.article-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.article-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.article-content h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.article-content p {
  margin-bottom: 1rem;
}

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

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

.article-content strong {
  font-weight: 600;
  color: #111827;
}

.article-content a {
  color: #10b981;
  text-decoration: underline;
}

.article-content a:hover {
  color: #059669;
}

.article-content em {
  font-style: italic;
}

.article-content blockquote {
  border-left: 4px solid #10b981;
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #6b7280;
  background: #f9fafb;
  padding: 1rem 1.5rem;
  border-radius: 0.25rem;
}

.article-content pre {
  background: #1f2937;
  color: #f9fafb;
  padding: 1.25rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  font-family: "Courier New", Monaco, monospace;
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 1.5rem 0;
}

.article-content code {
  background: #f3f4f6;
  color: #ef4444;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-family: "Courier New", Monaco, monospace;
  font-size: 0.9em;
}

.article-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.article-content table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  margin: 1.5rem 0;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
}

.article-content table th {
  background: #f9fafb;
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #111827;
  border-bottom: 2px solid #e5e7eb;
}

.article-content table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.article-content table tr:last-child td {
  border-bottom: none;
}

.article-content table tr:hover {
  background: #f9fafb;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1.5rem 0;
}

.article-content hr {
  border: none;
  border-top: 2px solid #e5e7eb;
  margin: 2rem 0;
}

/* CTA Footer */
.article-cta {
  background: linear-gradient(135deg, #f0fdf4 0%, #dbeafe 100%);
  padding: 2.5rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  text-align: center;
  margin-bottom: 2rem;
}

.article-cta h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.75rem;
}

.article-cta p {
  font-size: 1rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.article-cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.article-cta-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s;
}

.article-cta-btn-primary {
  background: #10b981;
  color: white;
}

.article-cta-btn-primary:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2);
}

.article-cta-btn-secondary {
  background: white;
  color: #111827;
  border: 1px solid #d1d5db;
}

.article-cta-btn-secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

/* Admin controls */
.article-admin {
  background: #f9fafb;
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  margin-bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.article-admin a {
  color: #1697c7;
  font-weight: 600;
  text-decoration: none;
}

.article-admin a:hover {
  color: #0f7aa2;
}

.article-back {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1.25rem;
  background: white;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.2s;
}

.article-back:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.article-divider {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 2.5rem 0;
}

/* ============================================
   DASHBOARD ADMIN
   ============================================ */

.admin-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}

.admin-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.admin-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.25rem;
}

.admin-header p {
  font-size: 1rem;
  color: #6b7280;
}

.admin-new-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: #10b981;
  color: white;
  border-radius: 0.5rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.admin-new-btn:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2);
}

.admin-new-btn span {
  font-size: 1.25rem;
  margin-right: 0.5rem;
}

.admin-guide-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  background: #1e40af;
  color: white;
  border: 1px solid #1d4ed8;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.admin-guide-btn span {
  margin-right: 0.5rem;
  font-size: 1.1rem;
}

.admin-guide-btn:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(29, 78, 216, 0.2);
}

/* Stats cards */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.admin-stat-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: all 0.2s;
}

.admin-stat-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.admin-stat-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.admin-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.admin-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
}

.admin-stat-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-stat-icon span {
  font-size: 1.5rem;
}

/* Table */
.admin-table-container {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  overflow: hidden;
}

.admin-table-header {
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  padding: 1rem 1.5rem;
}

.admin-table-header h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table thead {
  background: #f9fafb;
}

.admin-table th {
  padding: 0.75rem 1.5rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-table tbody tr {
  border-top: 1px solid #f3f4f6;
  transition: background 0.2s;
}

.admin-table tbody tr:hover {
  background: #f9fafb;
}

.admin-table td {
  padding: 1rem 1.5rem;
  font-size: 0.875rem;
}

.admin-table-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.admin-table-actions {
  display: inline-flex;
  gap: 0.5rem;
}

.admin-action-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.admin-guide-wrapper {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 2rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.admin-guide-content h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1rem;
}

.admin-guide-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.admin-guide-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.admin-guide-content p {
  color: #4b5563;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.admin-guide-content ul,
.admin-guide-content ol {
  margin: 1rem 0 1rem 1.25rem;
  color: #4b5563;
}

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

.admin-guide-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  border: 1px solid #e5e7eb;
}

.admin-guide-content table th,
.admin-guide-content table td {
  border: 1px solid #e5e7eb;
  padding: 0.75rem 1rem;
  text-align: left;
}

.admin-guide-content blockquote {
  border-left: 4px solid #10b981;
  background: #f9fafb;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  color: #4b5563;
  font-style: italic;
}

/* Footer */
.admin-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-footer a {
  font-size: 0.875rem;
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s;
}

.admin-footer a:hover {
  color: #111827;
}

.admin-footer p {
  font-size: 0.75rem;
  color: #9ca3af;
}

/* ============================================
   EDITOR
   ============================================ */

.editor-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.editor-form {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 2rem;
}

.editor-form-group {
  margin-bottom: 1.5rem;
}

.editor-form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

.editor-cover-preview {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  margin-top: 1rem;
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #f9fafb;
}

.editor-cover-thumb {
  width: 200px;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #e5e7eb;
  flex-shrink: 0;
}

.editor-cover-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editor-cover-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 0.875rem;
  color: #374151;
}

.editor-cover-link {
  font-size: 0.875rem;
  color: #10b981;
  text-decoration: none;
}

.editor-cover-link:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .editor-cover-preview {
    flex-direction: column;
  }

  .editor-cover-thumb {
    width: 100%;
  }
}

.editor-form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  color: #111827;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.editor-form-input:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.editor-form-input-lg {
  font-size: 1.125rem;
  padding: 0.875rem 1rem;
}

.editor-slug-preview {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.editor-warning {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #92400e;
  margin-top: 0.5rem;
}

.editor-options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

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

.editor-radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.editor-radio-option {
  display: flex;
  align-items: flex-start;
  padding: 0.875rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.editor-radio-option:hover {
  background: #f9fafb;
  border-color: #10b981;
}

.editor-radio-option input[type="radio"] {
  margin-top: 0.25rem;
  margin-right: 0.75rem;
}

.editor-radio-option input[type="radio"]:checked ~ .editor-radio-label {
  color: #10b981;
}

.editor-radio-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.editor-radio-desc {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.editor-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
  flex-wrap: wrap;
}

.editor-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.editor-btn span {
  margin-right: 0.5rem;
}

.editor-btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.editor-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2);
}

.editor-btn-secondary {
  background: white;
  color: #374151;
  border: 1px solid #d1d5db;
}

.editor-btn-secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

/* Responsive */
@media (max-width: 768px) {
  .blog-container {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 1.5rem 0;
  }

  .site-main {
    padding: 0;
  }

  .article-container {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0 0.5rem;
  }

  .admin-container,
  .editor-container {
    padding: 1.5rem 1rem;
  }

  .article-container {
    padding: 0.5rem;
  }

  .blog-header h1,
  .admin-header h1 {
    font-size: 2rem;
  }

  .article-header h1 {
    font-size: 1.75rem;
  }

  .article-content {
    padding: 0.75rem 0.5rem;
    font-size: 1rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin-bottom: 0.5rem;
  }

  .article-content table {
    min-width: 500px;
    font-size: 0.875rem;
  }

  .article-content table th,
  .article-content table td {
    padding: 0.625rem 0.75rem;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}
/* TOC – Indice */
.toc-container {
  background: #f3f4f6; /* light neutral grey for both desktop and mobile */
  border: 1px solid #e5e7eb;
  padding: 16px;
  margin: 0 0 24px 0;
  border-radius: 8px;
  /* Desktop placement: aside to the right */
  float: right;
  width: 260px;
  margin-left: 20px;
}

/* inner wrapper used for sticky behaviour on desktop */
.toc-inner {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toc-heading {
  margin: 0;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1f2937;
}

.toc-container a {
  color: #0b1220;
  text-decoration: none;
  font-size: 0.95rem;
}

.toc-container a:hover {
  text-decoration: underline;
}

/* Responsive: nascondi TOC sui dispositivi stretti per evitare sovrapposizioni */
@media (max-width: 768px) {
  /* Mostra il TOC anche su mobile: full-width sopra l'articolo, rimuovi float/sticky */
  .toc-container {
    display: block;
    float: none !important;
    width: 100% !important;
    margin: 0 0 16px 0;
    padding: 12px;
    border-radius: 6px;
    background: #f3f4f6;
  }

  /* L'inner div usato per sticky su desktop non deve essere sticky su mobile */
  .toc-container > div,
  .toc-inner {
    position: static !important;
    top: auto !important;
  }

  /* assicurati che article-content usi piena larghezza su mobile */
  .article-content {
    padding: 1rem;
  }
}
.nav-toc {
  max-height: 400px;
  overflow-y: auto;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 12px;
  display: block !important;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding-left: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toc-item {
  margin: 0;
}

.toc-item-sub {
  margin-left: 0.75rem;
}

.toc-link {
  color: #0b1220;
  text-decoration: none;
  font-size: 0.95rem;
}

.toc-link:hover {
  text-decoration: underline;
}

.article-subtitle {
  color: #4b5563;
  font-size: 1.1rem;
  margin-top: -10px;
  margin-bottom: 20px;
}

.article-date {
  color: #000000;
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.article-cover {
  width: min(100%, 960px);
  margin: 0 auto 30px;
  border-radius: 12px;
  overflow: hidden;
}

.article-cover img {
  display: block;
  width: 100%;
  height: auto;
}
