/* Custom styles for KUREBA article page */

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

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Article content animations */
.article-content {
    animation: fadeInUp 0.6s ease-out;
}

.sidebar-content {
    animation: slideInRight 0.6s ease-out 0.2s both;
}

/* Enhanced typography */
.prose h2 {
    border-bottom: 2px solid #000;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.prose h3 {
    position: relative;
    padding-left: 1rem;
}

.prose h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 4px;
    height: 1.2rem;
    background-color: #000;
}

/* Custom hover effects */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Sidebar sticky positioning enhancement */
@media (min-width: 1024px) {
    .sidebar-sticky {
        position: sticky;
        top: 2rem;
        max-height: calc(100vh - 4rem);
        overflow-y: auto;
    }
}

/* Custom button styles */
.btn-custom-outline {
    border: 2px solid #000;
    color: #000;
    background: transparent;
    transition: all 0.3s ease;
}

.btn-custom-outline:hover {
    background: #000;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Article meta information styling */
.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Enhanced card styling */
.card-enhanced {
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.card-enhanced:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Social share buttons */
.social-share {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.social-share .btn {
    transition: all 0.3s ease;
}

.social-share .btn:hover {
    transform: translateY(-2px);
}

/* Breadcrumb styling */
.breadcrumbs ul li:not(:last-child)::after {
    content: '>';
    margin: 0 0.5rem;
    color: #9ca3af;
}

/* Tag styling */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-list .badge {
    transition: all 0.2s ease;
}

.tag-list .badge:hover {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

/* CTA section styling */
.cta-section {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

/* Footer enhancements */
.footer-links a {
    transition: color 0.2s ease;
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: currentColor;
    transition: width 0.3s ease;
}

.footer-links a:hover::after {
    width: 100%;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .prose {
        font-size: 0.9rem;
    }
    
    .prose h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    .prose h2 {
        font-size: 1.5rem;
    }
    
    .article-meta {
        font-size: 0.8rem;
    }
    
    .social-share {
        justify-content: center;
    }
}

/* Print styles */
@media print {
    .navbar,
    .sidebar,
    .cta-section,
    footer,
    .social-share,
    .breadcrumbs {
        display: none !important;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    .prose {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .prose h1,
    .prose h2,
    .prose h3 {
        page-break-after: avoid;
    }
    
    .prose p {
        orphans: 3;
        widows: 3;
    }
}

/* Accessibility enhancements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus styles for better accessibility */
.btn:focus,
a:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }
    
    .btn-outline {
        border-width: 2px;
    }
}

/* Loading states */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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