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

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

/* Prose styles for news content */
.prose {
    max-width: 65ch;
    color: #374151;
}

.prose h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.prose h2 {
    font-size: 1.875rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.prose h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.prose p {
    margin-bottom: 1rem;
    line-height: 1.75;
}

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

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

.prose ul, .prose ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.25rem;
}

.prose blockquote {
    border-left: 4px solid #e5e7eb;
    padding-left: 1rem;
    font-style: italic;
    margin: 1rem 0;
}

.prose img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
}

.prose pre {
    background-color: #f3f4f6;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.prose code {
    background-color: #f3f4f6;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.prose th, .prose td {
    border: 1px solid #e5e7eb;
    padding: 0.5rem;
    text-align: left;
}

.prose th {
    background-color: #f9fafb;
    font-weight: 600;
}

/* Animation keyframes */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Transitions */
.transition-transform {
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-opacity {
    transition-property: opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Duration utilities */
.duration-300 {
    transition-duration: 300ms;
}

.duration-500 {
    transition-duration: 500ms;
}

.duration-1000 {
    transition-duration: 1000ms;
}

/* Transform utilities */
.rotate-180 {
    transform: rotate(180deg);
}

.scale-100 {
    transform: scale(1);
}

.hover\:scale-105:hover {
    transform: scale(1.05);
}

.hover\:-translate-y-1:hover {
    transform: translateY(-0.25rem);
}

/* Opacity utilities */
.opacity-0 {
    opacity: 0;
}

.opacity-100 {
    opacity: 1;
}

.group:hover .group-hover\:opacity-100 {
    opacity: 1;
}

/* Z-index */
.z-0 {
    z-index: 0;
}

.z-5 {
    z-index: 5;
}

.z-10 {
    z-index: 10;
}

.z-20 {
    z-index: 20;
}

.z-30 {
    z-index: 30;
}

.z-40 {
    z-index: 40;
}

.z-50 {
    z-index: 50;
}

/* Drop shadows */
.drop-shadow {
    filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.1));
}

.drop-shadow-lg {
    filter: drop-shadow(0 10px 8px rgb(0 0 0 / 0.04)) drop-shadow(0 4px 3px rgb(0 0 0 / 0.1));
}

/* Background colors */
.bg-muted {
    background-color: #f3f4f6;
}

.text-muted-foreground {
    color: #6b7280;
}

/* Prose dark mode */
@media (prefers-color-scheme: dark) {
    .dark .prose {
        color: #d1d5db;
    }
    
    .dark .prose a {
        color: #4ade80;
    }
    
    .dark .prose a:hover {
        color: #86efac;
    }
    
    .dark .prose blockquote {
        border-left-color: #374151;
    }
    
    .dark .prose pre,
    .dark .prose code {
        background-color: #1f2937;
    }
    
    .dark .prose th,
    .dark .prose td {
        border-color: #374151;
    }
    
    .dark .prose th {
        background-color: #1f2937;
    }
}

/* Utility classes */
.container {
    width: 100%;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

@media (min-width: 1536px) {
    .container {
        max-width: 1536px;
    }
}

/* Max width utilities */
.max-w-4xl {
    max-width: 56rem;
}

.max-w-6xl {
    max-width: 72rem;
}

.max-w-7xl {
    max-width: 80rem;
}

.max-w-lg {
    max-width: 32rem;
}

.max-w-md {
    max-width: 28rem;
}

.max-w-none {
    max-width: none;
}

/* Width utilities */
.w-4\/5 {
    width: 80%;
}

.w-3\/4 {
    width: 75%;
}

/* Gap utilities */
.gap-24 {
    gap: 6rem;
}

/* Grid utilities */
.grid-cols-8 {
    grid-template-columns: repeat(8, minmax(0, 1fr));
}

.grid-rows-8 {
    grid-template-rows: repeat(8, minmax(0, 1fr));
}

/* Line clamp utilities */
.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;
}

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

/* Smooth transitions */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

.group:hover .group-hover\:scale-110 {
    transform: scale(1.10);
}

.group:hover .group-hover\:translate-x-1 {
    transform: translateX(0.25rem);
}

/* Gradient backgrounds */
.bg-gradient-to-r {
    background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

.from-gray-200 {
    --tw-gradient-from: #e5e7eb;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(229, 231, 235, 0));
}

.to-gray-300 {
    --tw-gradient-to: #d1d5db;
}

/* Backdrop blur */
.backdrop-blur-sm {
    backdrop-filter: blur(4px);
}

/* Shadow utilities */
.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Hide elements with x-cloak */
[x-cloak] {
    display: none !important;
}