/* Ghost-specific styles for LEXpertiseJuris theme */

/* =============================================
   Override Ghost's injected accent color
   to match the site's gold-based design system
   ============================================= */
:root {
  --ghost-accent-color: #c8a237 !important;
}

/* Hide Ghost's default member portal button & search icon */
.gh-head-actions,
.gh-portal-triggerbtn-container {
  display: none !important;
}

/* Reset any Ghost-injected body styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
  color: var(--text) !important;
  line-height: 1.7 !important;
  background: var(--white) !important;
}

/* =============================================
   Ghost content cards (editor blocks)
   ============================================= */
.kg-card {
  margin: 1.5rem 0;
}

.kg-image-card img {
  max-width: 100%;
  border-radius: var(--radius-lg);
}

.kg-image-card figcaption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

.kg-width-wide {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.kg-width-full {
  max-width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
}

/* Ghost gallery */
.kg-gallery-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.kg-gallery-row {
  display: flex;
  gap: 0.75rem;
}

.kg-gallery-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

/* Ghost bookmark card */
.kg-bookmark-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.kg-bookmark-container {
  display: flex;
  text-decoration: none;
  color: inherit;
}

.kg-bookmark-content {
  flex: 1;
  padding: 1.25rem;
}

.kg-bookmark-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.kg-bookmark-description {
  font-size: 0.9rem;
  color: var(--text-light);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kg-bookmark-metadata {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--gray-500);
}

.kg-bookmark-icon {
  width: 16px;
  height: 16px;
}

.kg-bookmark-thumbnail {
  width: 200px;
  flex-shrink: 0;
}

.kg-bookmark-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Ghost callout card */
.kg-callout-card {
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin: 1.5rem 0;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.kg-callout-card-grey {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
}

.kg-callout-card-white {
  background: var(--white);
  border: 1px solid var(--gray-200);
}

.kg-callout-card-blue {
  background: #eff6ff;
  border: 1px solid #93c5fd;
}

.kg-callout-card-green {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
}

.kg-callout-card-yellow {
  background: #fef3c7;
  border: 1px solid #f59e0b;
}

.kg-callout-card-red {
  background: #fef2f2;
  border: 1px solid #fca5a5;
}

.kg-callout-card-pink {
  background: #fdf2f8;
  border: 1px solid #f9a8d4;
}

.kg-callout-card-purple {
  background: #f5f3ff;
  border: 1px solid #c4b5fd;
}

.kg-callout-emoji {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.kg-callout-text {
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Ghost toggle/accordion card */
.kg-toggle-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  margin: 1.5rem 0;
  overflow: hidden;
}

.kg-toggle-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--navy);
  background: var(--gray-50);
}

.kg-toggle-content {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Ghost button card */
.kg-button-card {
  text-align: center;
  margin: 2rem 0;
}

.kg-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.2s ease;
}

.kg-btn-accent {
  background: var(--gold) !important;
  color: var(--navy) !important;
}

.kg-btn-accent:hover {
  background: var(--gold-light) !important;
  color: var(--navy) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(200,162,55,.35);
}

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

/* =============================================
   Ghost content styling overrides
   ============================================= */
.content .kg-card p {
  margin-bottom: 1rem;
}

/* Responsive images in Ghost content */
.content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

/* Ghost header card */
.kg-header-card {
  padding: 4rem 2rem;
  text-align: center;
  border-radius: var(--radius-lg);
  margin: 2rem 0;
}

.kg-header-card h2 {
  border: none;
  margin-top: 0;
  padding-top: 0;
}

/* Table in Ghost content */
.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.content th,
.content td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}

.content th {
  font-weight: 600;
  color: var(--navy);
  background: var(--gray-50);
}

.content tr:hover td {
  background: var(--gray-50);
}

/* =============================================
   Override Ghost's cards.min.css accent colors
   Force gold instead of pink/accent for links
   and interactive elements
   ============================================= */

/* Ghost uses var(--ghost-accent-color) for many elements */
a.gh-powered-by,
.gh-post-upgrade-cta a.gh-btn {
  background: var(--gold) !important;
  color: var(--navy) !important;
}

/* Ghost signup/subscribe forms */
[data-members-form] button,
.gh-portal-btn-main {
  background: var(--gold) !important;
  color: var(--navy) !important;
}

/* Ensure blog card image label (tag name) is uppercase via CSS */
.blog-card__img-label {
  text-transform: uppercase;
}
