/* ==========================================================================
   Signara Theme - Minimal Custom CSS (Tailwind-Based)
   ========================================================================== */

/* Prevent horizontal scroll globally */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* CoinGecko Marquee Widget Styling - FIXED OVERFLOW & COLORS */
gecko-coin-price-marquee-widget {
  width: 100%;
  max-width: 100%;
  display: block;
  min-height: 50px;
  font-family: 'Inter', system-ui, sans-serif !important;
  overflow: hidden;
  filter: none !important;
}

/* Force text color in light mode */
html:not(.dark) gecko-coin-price-marquee-widget {
  filter: invert(1) hue-rotate(180deg) !important;
}

/* Normal in dark mode */
html.dark gecko-coin-price-marquee-widget {
  filter: none !important;
}

.glow-white {
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.9),
    0 0 12px rgba(255, 255, 255, 0.55),
    0 0 18px rgba(255, 255, 255, 0.4);
}

/* Override CoinGecko widget to match Signara design */
gecko-coin-price-marquee-widget * {
  font-family: 'Inter', system-ui, sans-serif !important;
  max-width: 100% !important;
}

/* Style the widget container */
gecko-coin-price-marquee-widget::part(container) {
  background: transparent !important;
  border: none !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

/* Prevent horizontal scroll */
gecko-coin-price-marquee-widget > * {
  max-width: 100% !important;
  overflow: hidden !important;
}

/* Mobile responsiveness for CoinGecko widget */
@media (max-width: 640px) {
  gecko-coin-price-marquee-widget {
    min-height: 40px;
  }
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* ==========================================================================
   Post Content Enhancements
   ========================================================================== */

.post-content {
  line-height: 1.85;
  letter-spacing: 0.01em;
}

.post-content > :first-child {
  margin-top: 0;
}

.post-content p {
  margin-bottom: 1.6em;
}

.post-content ul,
.post-content ol {
  margin-bottom: 1.6em;
  padding-left: 1.5em;
}

.post-content li {
  margin-top: 0.6em;
  line-height: 1.8;
}

.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5 {
  margin-top: 3em;
  margin-bottom: 1.25em;
  line-height: 1.35;
  scroll-margin-top: 120px;
}

.post-content h2 {
  font-size: clamp(1.85rem, 2.5vw, 2.45rem);
}

.post-content h3 {
  font-size: clamp(1.5rem, 1.8vw, 1.9rem);
}

.post-content blockquote {
  margin: 2.5em 0;
  padding: 1.75em 2.2em;
  background: rgba(61, 217, 189, 0.06);
  border-radius: 1.5rem;
  border-left: 4px solid rgba(32, 197, 168, 0.8);
  color: #e4e4e7;
}

.post-content blockquote p {
  margin: 0;
  font-size: 1.05em;
  line-height: 1.8;
}

.post-content code {
  background-color: rgba(24, 24, 27, 0.85);
  border: 1px solid rgba(39, 39, 42, 0.8);
  border-radius: 0.6rem;
  padding: 0.25em 0.6em;
  font-size: 0.95em;
}

.post-content pre {
  border-radius: 1.25rem;
  border: 1px solid rgba(63, 63, 70, 0.8);
  padding: 1.75rem 2rem;
  margin: 2.5em 0;
  background: radial-gradient(circle at top left, rgba(61, 217, 189, 0.12), rgba(9, 9, 11, 0.92));
}

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

.post-content hr {
  border: none;
  border-top: 1px solid rgba(63, 63, 70, 0.8);
  margin: 3em auto;
  width: 70%;
}

.post-content > :where(img, figure):not(.kg-width-wide):not(.kg-width-full) {
  margin: 2.5em auto;
}

.post-content figure img,
.post-content > img {
  border-radius: 1.5rem;
  border: 1px solid rgba(39, 39, 42, 0.9);
  box-shadow: 0 30px 60px -35px rgba(32, 197, 168, 0.45);
}

.post-content figcaption {
  margin-top: 0.85em;
  font-size: 0.9em;
  color: #a1a1aa;
  text-align: center;
}

.post-content table {
  width: 100%;
  margin: 2.5em 0;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 1.25rem;
  border: 1px solid rgba(63, 63, 70, 0.6);
  background-color: rgba(24, 24, 27, 0.8);
}

.post-content table th,
.post-content table td {
  padding: 1em 1.5em;
  border-bottom: 1px solid rgba(63, 63, 70, 0.6);
}

.post-content table th {
  background: rgba(39, 39, 42, 0.9);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

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

.post-content a {
  position: relative;
  transition: color 0.2s ease;
}

.post-content a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.15em;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(32, 197, 168, 0.8), rgba(61, 217, 189, 0.6));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.post-content a:hover::after {
  transform: scaleX(1);
}

.post-content .kg-card {
  margin: 3em 0;
}

.post-content .kg-gallery-card .kg-gallery-row {
  gap: 1.25rem;
}

.post-content .kg-gallery-card .kg-gallery-image img {
  border-radius: 1.25rem;
}

/* ==========================================================================
   Koenig Editor Width Helpers
   ========================================================================== */

.kg-width-wide {
  max-width: min(1200px, 90vw);
  margin: 0 auto;
}

.kg-width-wide img {
  width: 100%;
  height: auto;
}

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

.kg-width-full img {
  width: 100%;
  height: auto;
}

/* ==========================================================================
   Ghost Pagination Styling
   ========================================================================== */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 4rem;
  padding: 2rem 0;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  padding: 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  background-color: #18181b;
  border: 1px solid #27272a;
  border-radius: 0.75rem;
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.pagination a:hover {
  background-color: #20C5A8;
  border-color: #20C5A8;
  color: #000000;
  transform: translateY(-2px);
}

.pagination .page-number.current {
  background-color: #20C5A8;
  border-color: #20C5A8;
  color: #000000;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  body {
    background: white !important;
    color: black !important;
  }

  .site-header,
  .site-footer,
  .pagination,
  .back-to-top,
  gecko-coin-price-marquee-widget {
    display: none !important;
  }
}
