/* Custom Scrollbar for a sleek light theme */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.dark-placeholder::placeholder {
    color: #9ca3af;
}

/* Masonry Fallback/Tweaks */
.break-inside-avoid {
    break-inside: avoid;
    page-break-inside: avoid;
}

[x-cloak] {
    display: none !important;
}
#grid-container{
  direction: ltr;          /* fix column flow */
  column-gap: 1.5rem;      /* matches gap-6 */
}

#grid-container > *{
  direction: rtl;          /* keep Persian content RTL */
  margin-bottom: 1.5rem;   /* replaces space-y-6 reliability in columns */
}