/**
 * Patchsee Blog Stylesheet
 * Custom styles for the modern blog section
 */

:root {
  --blog-primary: #000000; /* Black */
  --blog-secondary: #3b82f6; /* Blue 500 */
  --blog-accent: #f59e0b; /* Amber 500 */
  --blog-bg: #f8fafc;
  --blog-text: #1e293b;
  --blog-muted: #64748b;
  --blog-border: #e2e8f0;
}

html {
  scroll-behavior: smooth;
}

.blog-section {
  font-family: "robotoregular", Arial, Helvetica, sans-serif;
  color: var(--blog-text);
  line-height: 1.6;
}

/* Sidebar Styling */
.blog-sidebar .widget {
  background: white;
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
  margin-bottom: 2rem;
  border: 1px solid var(--blog-border);
}

.blog-sidebar .widget-title {
  font-weight: 800;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
  color: var(--blog-primary);
  border-bottom: 2px solid var(--blog-border);
  padding-bottom: 0.5rem;
}

/* Article Cards */
.blog-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  border: 1px solid var(--blog-border);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.blog-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

/* Tag Cloud */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-item {
  background: #f1f5f9;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--blog-muted);
  transition: all 0.2s;
}

.tag-item:hover {
  background: var(--blog-primary);
  color: white;
}

/* Pagination */
.blog-pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.pagination-link {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  border: 1px solid var(--blog-border);
  font-weight: 600;
  transition: all 0.2s;
}

.pagination-link.active {
  background: var(--blog-primary);
  color: white;
  border-color: var(--blog-primary);
}

/* Single Article Content Styling */
.article-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #334155;
  font-family: "robotoregular", Arial, Helvetica, sans-serif;
}

/* Container spacing */
.article-content {
  padding-top: 1.75rem !important;
}

.article-content p,
.article-content p span {
  margin-bottom: 1.5rem !important;
  line-height: 1.7;
  font-family: "robotoregular", Arial, Helvetica, sans-serif !important;
  letter-spacing: 0;
}

/* Headers Hierarchy - Premium Style */
.article-content h2 {
  font-family: "robotoregular", Arial, Helvetica, sans-serif;
  font-size: 1.6rem;
  font-weight: 400;
  margin-top: 2.5rem !important;
  margin-bottom: 1.25rem !important;
  color: #1e293b;
  line-height: 1.2;
  padding: 1rem 1.25rem;
  background: linear-gradient(90deg, #fff5f5 0%, #ffffff 100%);
  border-left: 4px solid #e4291e;
  border-radius: 0 0.625rem 0.625rem 0;
  scroll-margin-top: 7rem;
}

.article-content h2 span {
  display: block;
  font-family: "robotoregular", Arial, Helvetica, sans-serif !important;
  font-size: inherit !important;
  line-height: inherit;
}

.article-content h2 > span:first-child {
  color: #1e293b;
  font-weight: 400;
}

.article-content h2 > span:last-child:not(:first-child) {
  color: #e4291e;
  font-weight: 700;
}

.article-content h2 br {
  display: none;
}

.article-content h3 {
  font-family: "robotobold", Arial, Helvetica, sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  margin-top: 2.5rem !important;
  margin-bottom: 1.25rem !important;
  color: #1e293b;
  position: relative;
  padding-bottom: 0.5rem;
  scroll-margin-top: 7rem;
}

.article-content h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--blog-primary);
  border-radius: 3px;
}

.article-content h4 {
  font-family: "robotobold", Arial, Helvetica, sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Images */
.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 1.25rem;
  margin: 2rem auto;
  display: block;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

/* Lists - Styled Bullets */
.article-content ul,
.article-content ol {
  margin-bottom: 1.75rem;
  padding-left: 0;
}

.article-content li {
  margin-bottom: 0.75rem;
  position: relative;
  font-family: "robotoregular", Arial, Helvetica, sans-serif !important;
  line-height: 1.7;
}

.article-content ul {
  list-style: none;
}
.article-content ul li {
  padding-left: 1.5rem;
}

.article-content ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.55rem;
  height: 0.55rem;
  background: #e4291e;
  border-radius: 999px;
}

.article-content ol {
  list-style-position: outside;
  padding-left: 1.35rem;
}

.article-content ol li::marker {
  color: var(--blog-primary);
  font-weight: 800;
}

/* Blockquotes - Modern Quote */
.article-content blockquote {
  margin: 2rem 0;
  padding: 2rem 2.5rem;
  border-left: none;
  background: #f8fafc;
  border-radius: 1rem;
  font-style: italic;
  color: #475569;
  position: relative;
  border: 1px solid #f1f5f9;
}

.article-content blockquote::before {
  content: "“";
  position: absolute;
  top: -0.5rem;
  left: 1rem;
  font-size: 5rem;
  color: var(--blog-primary);
  opacity: 0.15;
  font-family: serif;
  line-height: 1;
}

/* Code Blocks */
.article-content pre {
  background: #0f172a;
  color: #f8fafc;
  padding: 2rem;
  border-radius: 1rem;
  overflow-x: auto;
  font-family:
    "ui-monospace", "SFMono-Regular", "Menlo", "Monaco", "Consolas", monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 2rem 0;
  border: 1px solid #1e293b;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.article-content code {
  background: #fff1f1;
  padding: 0.2rem 0.5rem;
  border-radius: 0.375rem;
  font-family: inherit;
  font-size: 0.9em;
  color: var(--blog-primary);
  border: 1px solid #ffe1e1;
}

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

/* Tables - Modern Look */
.article-content table {
  width: 100%;
  margin: 2rem 0;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
  font-family: "robotoregular", Arial, Helvetica, sans-serif !important;
}

.article-content th {
  background: #f8fafc;
  padding: 1rem 1.25rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
  color: #64748b;
  border-bottom: 2px solid #e2e8f0;
}

.article-content td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  color: #475569;
  font-family: "robotoregular", Arial, Helvetica, sans-serif !important;
}

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

.article-content tr:nth-child(even) {
  background: #fcfcfc;
}

/* Links */
.article-content a {
  color: var(--blog-primary);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: all 0.2s;
  font-family: "robotoregular", Arial, Helvetica, sans-serif !important;
}

.article-content a:hover {
  border-bottom-color: var(--blog-primary);
}

.blog-wide-container {
  max-width: 90% !important;
}

/* Article contextual menu */
.blog-context-menu {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  box-shadow: 0 14px 35px -24px rgba(15, 23, 42, 0.55);
  margin-bottom: 1.5rem;
  padding: 1.15rem;
}

.blog-context-menu-desktop {
  position: sticky;
  top: 1.5rem;
  z-index: 20;
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
}

.blog-context-menu-mobile {
  margin-top: 1.5rem;
  margin-bottom: 0;
}

.blog-context-title {
  color: #0f172a;
  font-family: "robotobold", Arial, Helvetica, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  margin: 0 0 0.9rem 0;
  text-transform: uppercase;
}

.blog-context-links {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.blog-context-links a {
  align-items: flex-start;
  border: 0;
  border-radius: 0.55rem;
  color: #475569;
  display: grid;
  font-family: "robotoregular", Arial, Helvetica, sans-serif;
  font-size: 0.92rem;
  gap: 0.25rem;
  grid-template-columns: 0.9rem minmax(0, 1fr);
  line-height: 1.35;
  padding: 0.15rem 0.75rem;
  text-decoration: none;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.blog-context-links a::before {
  background: #e4291e;
  border-radius: 999px;
  content: "";
  height: 0.35rem;
  margin-top: 0.42rem;
  width: 0.35rem;
}

.blog-context-links a:hover,
.blog-context-links a:focus {
  background: #fff5f5;
  color: #0f172a;
  outline: none;
  transform: translateX(0.2rem);
}

@media (max-width: 1023px) {
  .blog-context-menu {
    padding: 1rem;
  }

  .blog-context-links {
    flex-direction: row;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.15rem;
  }

  .blog-context-links a {
    background: #f8fafc;
    flex: 0 0 82%;
    grid-template-columns: 0.8rem minmax(0, 1fr);
    max-width: 22rem;
  }

  .blog-context-links a:hover,
  .blog-context-links a:focus {
    transform: none;
  }

  .article-content {
    padding-top: 1.5rem !important;
  }

  .article-content h2 {
    font-size: 1.35rem;
    padding: 0.9rem 1rem;
  }
}
