/* Public Blog Styles */

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

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

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

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

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

/* Blog post animations */
.blog-post {
    transition: all 0.3s ease;
}

.blog-post:hover {
    transform: translateY(-2px);
}

/* Material card animations */
.material-card {
    transition: all 0.3s ease;
}

.material-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Image hover effects */
.image-hover {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.image-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.image-hover:hover::before {
    opacity: 1;
}

/* Button animations */
.btn-animate {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn-animate::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-animate:hover::before {
    left: 100%;
}

/* Typography improvements */
.prose {
    line-height: 1.7;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
    color: #1f2937;
    font-weight: 600;
}

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

.prose a {
    color: #16a34a;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.prose a:hover {
    border-bottom-color: #16a34a;
}

/* Model viewer customizations */
model-viewer {
    --poster-color: #f3f4f6;
    --progress-bar-color: #16a34a;
    --progress-mask: #ffffff;
}

/* Map customizations */
.leaflet-container {
    border-radius: 0.5rem;
}

/* Loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Responsive improvements */
@media (max-width: 768px) {
    .prose {
        font-size: 0.95rem;
    }

    .prose h1 {
        font-size: 1.875rem;
    }

    .prose h2 {
        font-size: 1.5rem;
    }

    .prose h3 {
        font-size: 1.25rem;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .dark-mode {
        background-color: #1f2937;
        color: #f9fafb;
    }

    .dark-mode .bg-white {
        background-color: #374151;
    }

    .dark-mode .text-gray-900 {
        color: #f9fafb;
    }

    .dark-mode .text-gray-700 {
        color: #d1d5db;
    }

    .dark-mode .text-gray-600 {
        color: #9ca3af;
    }

    .dark-mode .border-gray-200 {
        border-color: #4b5563;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    .print-break {
        page-break-before: always;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        page-break-after: avoid;
    }
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles */
.focus-visible:focus {
    outline: 2px solid #16a34a;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary {
        background-color: #000000;
        color: #ffffff;
        border: 2px solid #000000;
    }

    .btn-primary:hover {
        background-color: #ffffff;
        color: #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}