.prose {
    color: #374151;
    line-height: 1.75;
}

.prose h1, .prose h2, .prose h3, .prose h4 {
    color: #111827;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.prose h1 { font-size: 2.25rem; }
.prose h2 { font-size: 1.875rem; }
.prose h3 { font-size: 1.5rem; }
.prose h4 { font-size: 1.25rem; }

.prose p {
    margin-bottom: 1.25rem;
}

.prose ul, .prose ol {
    margin: 1.25rem 0;
    padding-left: 1.625rem;
}

.prose li {
    margin: 0.5rem 0;
}

.prose img {
    border-radius: 0.75rem;
    margin: 2rem auto;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.prose blockquote {
    border-left: 4px solid #3B82F6;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    background: #F8FAFC;
    padding: 1rem 1rem 1rem 2rem;
    border-radius: 0.5rem;
}

.prose a {
    color: #3B82F6;
    text-decoration: underline;
}

.prose a:hover {
    color: #2563EB;
}

.prose code {
    background: #F1F5F9;
    padding: 0.2rem 0.4rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.prose pre {
    background: #1F2937;
    color: #F9FAFB;
    padding: 1rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

/* PhotoSwipe custom styles */
.pswp__custom-caption {
    background: rgba(0, 0, 0, 0.7);
    font-size: 16px;
    color: #fff;
    width: 100%;
    max-width: 400px;
    padding: 20px;
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    border-radius: 12px;
    text-align: center;
}

.pswp__custom-caption .pswp-caption-content {
    color: #fff;
}

@media print {
    .prose {
        max-width: none;
    }

    header, footer, button, #article-gallery {
        display: none !important;
    }
}

/* Gallery Container */
.gallery-container {
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Navigation Arrows */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    color: #374151;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gallery-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.gallery-nav-left {
    left: -20px;
}

.gallery-nav-right {
    right: -20px;
}

/* Gallery */
.gallery {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 20px 0 15px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #667eea #f1f1f1;
}

/* Hide scrollbar for webkit browsers */
.gallery::-webkit-scrollbar {
    height: 6px;
}

.gallery::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.gallery::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
}

.gallery::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5568d3, #6b4091);
}

.gallery-link {
    flex: 0 0 auto;
    text-decoration: none;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    width: 120px;  /* 50% of original 240px */
    height: 80px;  /* 50% of original 160px */
}

.gallery-item:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Overlay */
.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 8px 6px 6px;
    font-size: 0.6rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.pswp-gallery {
    cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gallery-item {
        width: 100px;
        height: 67px;
    }

    .gallery {
        gap: 8px;
    }

    .gallery-nav {
        width: 40px;
        height: 40px;
    }

    .gallery-nav-left {
        left: -15px;
    }

    .gallery-nav-right {
        right: -15px;
    }
}

@media (max-width: 480px) {
    .gallery-nav {
        width: 36px;
        height: 36px;
    }

    .gallery-nav svg {
        width: 20px;
        height: 20px;
    }
}