/* Custom scrollbar styles */
::-webkit-scrollbar {
    width: 12px;  /* Width of the scrollbar */
    height: 12px; /* Height of the scrollbar (for horizontal scrollbar) */
}

/* Track (background of the scrollbar) */
::-webkit-scrollbar-track {
    background: #f1f1f1;  /* Light background color for the track */
    border-radius: 10px;
}

/* Handle (the draggable part of the scrollbar) */
::-webkit-scrollbar-thumb {
    background: #888;  /* Color of the scrollbar thumb */
    border-radius: 10px;
    transition: background 0.3s ease;
}

/* Handle on hover (when the user hovers over the scrollbar thumb) */
::-webkit-scrollbar-thumb:hover {
    background: #555;  /* Darker color when hovered */
}

/* For horizontal scrollbar (optional, if you want to style horizontal scrolling as well) */
::-webkit-scrollbar-horizontal {
    height: 12px;
}

/* For vertical scrollbar (optional, if you want to style vertical scrolling as well) */
::-webkit-scrollbar-vertical {
    width: 12px;
}

/* Project page styles */
[x-cloak] { 
    display: none !important; 
}

.modal-backdrop {
    backdrop-filter: blur(5px);
    background-color: rgba(0, 0, 0, 0.5);
}

.project-card {
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-content {
    animation: modalFadeIn 0.3s ease-out forwards;
    will-change: transform, opacity;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Filter button styles */
.filter-btn {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.filter-btn-active {
    background-color: #1a365d;
    color: white;
}

.filter-btn-inactive {
    background-color: #f3f4f6;
    color: #374151;
}

.filter-btn-inactive:hover {
    background-color: #e5e7eb;
}

/* Lazy loading */
.lazy-image {
    opacity: 0;
    transition: opacity 0.5s;
}

.lazy-image.loaded {
    opacity: 1;
}

/* Responsive filter buttons */
@media (max-width: 640px) {
    .filter-buttons-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

:focus-visible {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}
