/* ============================================================
   BIOVERTMEDIA — Custom Styles
   ============================================================ */

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

/* Alpine.js cloak */
[x-cloak] {
    display: none !important;
}

/* 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;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #374151;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ============================================================
   TinyMCE Content Styling
   ============================================================ */

.tinymce-content {
    /* Ensure proper typography */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.7;
    color: inherit;
}

.tinymce-content h1,
.tinymce-content h2,
.tinymce-content h3,
.tinymce-content h4,
.tinymce-content h5,
.tinymce-content h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-top: 2em;
    margin-bottom: 1em;
    color: inherit;
}

.tinymce-content h1 { font-size: 2.25em; }
.tinymce-content h2 { font-size: 1.875em; }
.tinymce-content h3 { font-size: 1.5em; }
.tinymce-content h4 { font-size: 1.25em; }
.tinymce-content h5 { font-size: 1.125em; }
.tinymce-content h6 { font-size: 1em; }

.tinymce-content p {
    margin-bottom: 1.25em;
    color: inherit;
}

.tinymce-content ul,
.tinymce-content ol {
    margin-bottom: 1.25em;
    padding-left: 2em;
}

.tinymce-content li {
    margin-bottom: 0.5em;
    color: inherit;
}

.tinymce-content blockquote {
    margin: 1.5em 0;
    padding: 1em 1.5em;
    border-left: 4px solid #3d9b40;
    background-color: rgba(61, 155, 64, 0.1);
    font-style: italic;
    color: inherit;
}

.dark .tinymce-content blockquote {
    background-color: rgba(61, 155, 64, 0.2);
}

.tinymce-content code {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: "Courier New", monospace;
    font-size: 0.9em;
}

.dark .tinymce-content code {
    background-color: rgba(255, 255, 255, 0.1);
}

.tinymce-content pre {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 1em;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1.5em 0;
}

.dark .tinymce-content pre {
    background-color: rgba(255, 255, 255, 0.05);
}

.tinymce-content pre code {
    background-color: transparent;
    padding: 0;
}

.tinymce-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}

.tinymce-content th,
.tinymce-content td {
    border: 1px solid #e5e7eb;
    padding: 0.75em;
    text-align: left;
}

.dark .tinymce-content th,
.dark .tinymce-content td {
    border-color: #374151;
}

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

.dark .tinymce-content th {
    background-color: #1f2937;
}

.tinymce-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5em 0;
}

.tinymce-content a {
    color: #3d9b40;
    text-decoration: underline;
}

.tinymce-content a:hover {
    color: #2d7e30;
}

.dark .tinymce-content a {
    color: #5cb85c;
}

.dark .tinymce-content a:hover {
    color: #8cd07c;
}

.tinymce-content hr {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 2em 0;
}

.dark .tinymce-content hr {
    border-top-color: #374151;
}
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

/* Audio player styling */
audio {
    width: 100%;
    border-radius: 12px;
}

audio::-webkit-media-controls-panel {
    background: #f8fafc;
}

.dark audio::-webkit-media-controls-panel {
    background: #1e293b;
}

/* Prose content (article body) */
.prose {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #374151;
}

.dark .prose {
    color: #d1d5db;
}

.prose h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.dark .prose h2 {
    color: #f9fafb;
}

.prose h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.dark .prose h3 {
    color: #f3f4f6;
}

.prose p {
    margin-bottom: 1.25rem;
}

.prose a {
    color: #16a34a;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.prose a:hover {
    color: #15803d;
}

.prose img {
    border-radius: 12px;
    margin: 1.5rem 0;
}

.prose blockquote {
    border-left: 4px solid #16a34a;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #6b7280;
}

.dark .prose blockquote {
    color: #9ca3af;
}

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

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

.prose ul li {
    list-style-type: disc;
}

.prose ol li {
    list-style-type: decimal;
}

/* Hero gradient animation */
@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

/* Fade-in animation */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fade-in-up 0.6s ease-out forwards;
}

/* Stat counter animation */
@keyframes count-up {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

.animate-count {
    animation: count-up 0.5s ease-out forwards;
}

/* Admin sidebar */
.admin-sidebar {
    scrollbar-width: thin;
    scrollbar-color: #374151 transparent;
}
