/* ======================================================================
   Dhaka Run - Custom Styles
   Supplements Tailwind CSS with app-specific utilities and overrides.
   ====================================================================== */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Line clamp utility (used in post cards) */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Image placeholder shimmer effect only before image loads */
img[loading="lazy"]:not([src]),
img[loading="lazy"][src=""] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Focus ring for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #ff6b35;
    outline-offset: 2px;
}

/* Prose-style content for post descriptions */
.prose p {
    margin-bottom: 1em;
}

.prose a {
    color: #ff6b35;
    text-decoration: underline;
}

.prose a:hover {
    color: #e55b25;
}
