/* Glassmorphism */
.glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Background Effects */
.noise {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  content: "";
  opacity: .05;
  z-index: 9999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3column%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.mesh-gradient {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: -1;
  background: linear-gradient(-45deg, #fff7ed, #fffafb, #fff7ed, #fafaf9);
  background-size: 400% 400%;
  animation: gradient 15s ease infinite;
}

/* Post Animations */
.post-entry {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.post-entry:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #fed7aa;
  border-radius: 10px;
}

/* Nav Fix */
nav .glass {
  width: fit-content;
  max-width: 95vw;
}

/* Code Blocks - Forced Overrides */
.code-block-wrapper,
.prose pre {
  border-radius: 1rem !important;
  overflow-x: auto !important;
  border: 1px solid rgba(22, 33, 43, 0.2) !important;
  margin: 2rem 0 !important;
  background: #fff !important;
  padding: 1.25rem !important; /* Moved padding here */
  color: initial !important; /* Reset text color to let Highlight.js work */
}

/* Neutralize prose code color overrides */
.prose pre code,
.prose code {
  color: inherit !important;
  background-color: transparent !important;
  font-weight: inherit !important;
}

/* Force links to break to prevent layout expansion */
.prose a {
  overflow-wrap: break-word !important;
  word-break: break-all !important;
}

.code-language-bar {
  background-color: rgba(22, 33, 43, 0.05);
  padding: 0.5rem 1rem;
  text-transform: uppercase;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: #64748b;
  border-bottom: 1px solid rgba(22, 33, 43, 0.1) !important;
}

/* Reset for inner pre if wrapper exists */
.code-block-wrapper pre {
  margin: 0 !important;
  border: none !important;
  padding: 1.25rem !important;
  overflow-x: auto !important;
  border-radius: 0 !important;
  background: transparent !important;
}

/* Tables - Forced Overrides */
.table-responsive {
  overflow-x: auto;
  border-radius: 1rem;
  border: 1px solid rgba(22, 33, 43, 0.2) !important;
  margin: 2rem 0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

table.table,
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  background: white;
  border: 1px solid rgba(22, 33, 43, 0.2) !important;
}

.table th,
.table td,
.prose table th,
.prose table td {
  padding: 1rem !important;
  border-bottom: 1px solid rgba(22, 33, 43, 0.1) !important;
  text-align: left;
  border-right: 1px solid rgba(22, 33, 43, 0.1) !important;
}

.table th:last-child,
.table td:last-child,
.prose table th:last-child,
.prose table td:last-child {
  border-right: none !important;
}

.table th,
.prose table th {
  background-color: rgba(22, 33, 43, 0.05) !important;
  font-weight: 600 !important;
  color: #1e293b !important;
  white-space: nowrap !important;
}

.table tbody tr:last-child td,
.prose table tbody tr:last-child td {
  border-bottom: none !important;
}

/* GMap & Iframes */
.gmap {
  margin: 2rem 0;
  position: relative;
  width: 100% !important;
  max-width: none !important;
  padding-bottom: 56.25%;
  /* 16:9 */
  height: 0;
  overflow: hidden;
  background-color: #fff;
  border-radius: 1rem;
  border: 1px solid rgba(22, 33, 43, 0.1);
}

.gmap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
}

/* Nutrition Shortcode Layout */
.nutrition {
  display: flex !important;
  flex-direction: row;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(22, 33, 43, 0.1);
}

@media (max-width: 768px) {
  .nutrition {
    flex-direction: column;
  }
}

.nutrition:last-child {
  border-bottom: none;
}

/* Image Container */
.nutrition p:first-child {
  flex-shrink: 0;
  margin: 0 !important;
  width: 150px;
}

/* The Image itself */
.nutrition img {
  width: 100%;
  height: auto;
  margin: 0 !important;
  display: block;
}

/* The List */
.nutrition ul {
  flex-grow: 1;
  margin: 0 !important;
}

/* Twitter Blue Hashtag Style (for Ueber page) */
.hashtag {
  display: inline-block;
  padding: 0.375rem 1rem;
  background-color: #1DA1F2;
  color: #ffffff;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: background-color 0.15s ease-in-out;
}

.hashtag:hover {
  background-color: #1a91da;
  color: #ffffff;
  text-decoration: none;
}

/* Shortcodes: Info & Note/Alert */
.info, .alert {
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  margin: 1.5rem 0;
  border-left: 4px solid;
}

/* Info: Blue */
.info {
  background-color: rgba(224, 242, 254, 0.6); /* bg-sky-100/60 */
  border-color: #0ea5e9; /* border-sky-500 */
  color: #0c4a6e; /* text-sky-900 */
}

/* Alert/Note: Amber */
.alert {
  background-color: rgba(254, 243, 199, 0.6); /* bg-amber-100/60 */
  border-color: #f59e0b; /* border-amber-500 */
  color: #78350f; /* text-amber-900 */
}

.info p, .alert p {
  margin: 0.5rem 0;
}
.info p:first-child, .alert p:first-child {
  margin-top: 0;
}
.info p:last-child, .alert p:last-child {
  margin-bottom: 0;
}

/* Animation Utilities */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

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