/* ===== ARTIKEL DETAIL PAGE STYLES ===== */


/* Smooth Fade In Animation */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.article-content {
    animation: fadeInUp 0.6s ease-out;
}

.sidebar-sticky {
    position: sticky;
    top: 100px;
}


/* Enhanced Prose Styling */

.prose-article {
    color: #374151;
    line-height: 1.8;
}

.prose-article p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.8;
    color: #374151;
}

.prose-article h2 {
    color: #1e3a8a;
    font-size: 2rem;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #3b82f6;
}

.prose-article h3 {
    color: #1e40af;
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.prose-article h4 {
    color: #1e40af;
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.prose-article strong,
.prose-article b {
    color: #1e3a8a;
    font-weight: 700;
}

.prose-article a {
    color: #3b82f6;
    text-decoration: underline;
}

.prose-article blockquote {
    border-left: 4px solid #3b82f6;
    background: #eff6ff;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0.5rem;
    font-style: italic;
    color: #1e40af;
}

.prose-article img {
    border-radius: 1rem;
    margin: 2.5rem 0;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.2);
    width: 100%;
    height: auto;
}

.prose-article ul,
.prose-article ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.prose-article ul li,
.prose-article ol li {
    margin: 0.75rem 0;
    line-height: 1.8;
}

.prose-article ul li::marker {
    color: #3b82f6;
}

.prose-article ol li::marker {
    color: #3b82f6;
    font-weight: 700;
}

.prose-article table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.prose-article th {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.95rem;
}

.prose-article td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.prose-article code {
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.9em;
    color: #dc2626;
    font-family: 'Courier New', monospace;
}

.prose-article pre {
    background: #1f2937;
    color: #f3f4f6;
    padding: 1.5rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 2rem 0;
}

.prose-article pre code {
    background: transparent;
    color: #f3f4f6;
    padding: 0;
}


/* Share Button Styles */

.share-btn {
    position: relative;
    overflow: hidden;
}

.share-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
}


/* Responsive Share Buttons */

@media (max-width: 768px) {
    .share-btn {
        padding: 0.875rem 1.25rem !important;
        font-size: 0.95rem;
    }
    .share-btn i {
        font-size: 0.95rem;
    }
    .share-btn span {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .share-btn {
        padding: 0.75rem 1rem !important;
        font-size: 0.85rem;
        gap: 0.5rem !important;
    }
    .share-btn i {
        font-size: 0.85rem;
    }
    .share-btn span {
        font-size: 0.8rem;
    }
}


/* Card Animations */

.sidebar-card {
    will-change: transform, box-shadow;
}

.related-article-card {
    will-change: transform, box-shadow, border-color;
}

.article-card-thumbnail {
    overflow: hidden;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.article-card-thumbnail img {}

.share-button {
    will-change: transform, box-shadow;
}

.share-button:active {
    transform: translateY(-2px);
}


/* Featured Image Zoom Effect */

.featured-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.2);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.featured-image-container img {
    width: 100%;
    height: auto;
    display: block;
}


/* Reading Progress Bar */

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.5);
}


/* Animation Delays */

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}


/* Smooth Scroll */

html {
    scroll-behavior: smooth;
}


/* Custom Scrollbar */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3b82f6, #8b5cf6);
    border-radius: 10px;
}


/* Related Article Card */

.related-article-card {
    border-left: 4px solid transparent;
}


/* Back to Top Button */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}


/* Prose Styles */

.prose {
    --tw-prose-body: rgb(55, 65, 81);
    --tw-prose-headings: rgb(30, 58, 138);
    --tw-prose-lead: rgb(75, 85, 99);
    --tw-prose-links: rgb(59, 130, 246);
    --tw-prose-bold: rgb(30, 58, 138);
    --tw-prose-counters: rgb(107, 114, 128);
    --tw-prose-bullets: rgb(209, 213, 219);
    --tw-prose-hr: rgb(229, 231, 235);
    --tw-prose-quotes: rgb(107, 114, 128);
    --tw-prose-quote-borders: rgb(229, 231, 235);
    --tw-prose-captions: rgb(107, 114, 128);
    --tw-prose-code: rgb(30, 58, 138);
    --tw-prose-pre-code: rgb(243, 244, 246);
    --tw-prose-pre-bg: rgb(17, 24, 39);
    --tw-prose-th-borders: rgb(209, 213, 219);
    --tw-prose-td-borders: rgb(229, 231, 235);
}

.prose p {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
}

.prose h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 2.25rem;
}

.prose h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.prose strong {
    color: rgb(30, 58, 138);
    font-weight: 600;
}

.prose a {
    color: rgb(59, 130, 246);
    text-decoration: underline;
}

.prose blockquote {
    border-left-width: 4px;
    border-color: rgb(59, 130, 246);
    padding-left: 1rem;
    font-style: italic;
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
}

.prose img {
    margin-top: 2rem;
    margin-bottom: 2rem;
    border-radius: 0.5rem;
}

.prose ul,
.prose ol {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    padding-left: 1.625rem;
}

.prose li {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.prose table {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    width: 100%;
    border-collapse: collapse;
}

.prose th {
    background-color: rgb(243, 244, 246);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid rgb(209, 213, 219);
}

.prose td {
    padding: 0.75rem;
    border-bottom: 1px solid rgb(229, 231, 235);
}


/* Shadow Utilities (Add at end of file before Responsive section) */

.shadow-3xl {
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.3);
}

.shadow-4xl {
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.4);
}


/* Responsive */

@media (max-width: 1024px) {
    .sidebar-sticky {
        position: relative;
        top: 0;
    }
    .featured-image-container img {
        max-height: 350px;
    }
}

@media (max-width: 768px) {
    .article-content {
        animation-delay: 0.1s;
    }
    .prose-article p {
        font-size: 1rem;
        margin-bottom: 1.25rem;
    }
    .prose-article h2 {
        font-size: 1.5rem;
        margin-top: 2rem;
        margin-bottom: 1rem;
    }
    .prose-article h3 {
        font-size: 1.25rem;
        margin-top: 1.5rem;
        margin-bottom: 0.75rem;
    }
    .share-btn {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
    .sidebar-card {
        border-radius: 1.5rem;
    }
    .back-to-top {
        width: 45px;
        height: 45px;
    }
}


/* ===== SMOOTH TRANSITIONS & UTILITY CLASSES ===== */

html {
    scroll-behavior: smooth;
}


/* Smooth transition utilities removed */


/* Button transitions removed */


/* Link transitions removed */


/* Form transitions removed */

input:focus,
textarea:focus,
select:focus {
    outline: none;
}


/* Smooth opacity transitions */

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}


/* Tags Section Styling */

.tags-section {
    animation: fadeInUp 0.5s ease-out;
}

.tag-badge {
    position: relative;
    overflow: hidden;
    will-change: transform, box-shadow;
}

.tag-badge::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
}


/* Reduce animations on mobile */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* Touch device optimizations */

@media (hover: none) and (pointer: coarse) {
    button:active {
        opacity: 0.9;
    }
}

@media (max-width: 480px) {
    .prose-article {
        font-size: 0.95rem;
    }
    .prose-article h1 {
        font-size: 1.75rem;
    }
    .prose-article h2 {
        font-size: 1.25rem;
        margin-top: 1.5rem;
    }
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}
