/* Blog Page Styles */
.prose {
    max-width: none;
    line-height: 1.75;
    color: #374151;
}

.prose h1, .prose h2, .prose h3, .prose h4 {
    color: #111827;
    font-weight: 600;
    line-height: 1.25;
}

.prose h1 { font-size: 2.25rem; margin-bottom: 1rem; }
.prose h2 { font-size: 1.875rem; margin-bottom: 0.75rem; }
.prose h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.prose h4 { font-size: 1.25rem; margin-bottom: 0.5rem; }

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

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

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

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

.prose code {
    background-color: #F3F4F6;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    color: #DC2626;
}

.prose pre {
    background-color: #1F2937;
    color: #F9FAFB;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.prose pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
}

/* Blog card hover effects */
.bg-white {
    transition: all 0.3s ease;
}

.bg-white:hover {
    transform: translateY(-2px);
}

/* Image hover effects */
.object-contain {
    transition: transform 0.3s ease;
}

.object-contain:hover {
    transform: scale(1.05);
}

/* Blog Section Styles */
.blog-section {
  padding: 4rem 2rem;
  text-align: center;
}

.blog-container {
  max-width: 1200px;
  margin: 0 auto;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* Blog Card Styles */
.blog-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
  border-color: rgba(255, 215, 0, 0.5);
}

.blog-card-header {
  padding: 1.5rem;
  background: rgba(255, 215, 0, 0.1);
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.blog-card-header h2 {
  color: #FFD700;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.5);
}

.blog-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: #DDDCDC;
}

.blog-author {
  color: #FFD700;
  font-weight: 600;
}

.blog-date {
  color: #999;
}

.blog-card-content {
  padding: 1.5rem;
}

.blog-card-content p {
  color: #EDEDED;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.blog-images {
  padding: 0 1.5rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.5rem;
}

.blog-images img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 215, 0, 0.2);
  background: rgba(0, 0, 0, 0.1);
}

.blog-card-footer {
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 215, 0, 0.1);
}

.read-more-btn {
  background: linear-gradient(45deg, #FFD700, #FFA500);
  color: #1C1C1C;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.read-more-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

/* Enhanced Blog Card Styling */
.blog-card {
  position: relative;
  overflow: hidden;
}

.blog-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #FFD700, #FFA500, #FFD700);
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

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

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(255, 215, 0, 0.4);
  border-color: rgba(255, 215, 0, 0.7);
}

.blog-card-header {
  position: relative;
}

.blog-card-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1.5rem;
  right: 1.5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.3), transparent);
}

.post-excerpt {
  color: #E5E5E5;
  line-height: 1.6;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.blog-images {
  margin: 1rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
}

.blog-images img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 215, 0, 0.2);
  transition: all 0.3s ease;
}

.blog-images img:hover {
  transform: scale(1.05);
  border-color: rgba(255, 215, 0, 0.5);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.blog-card-footer {
  position: relative;
  overflow: hidden;
}

.blog-card-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.2), transparent);
}

/* No Posts Message */
.no-posts {
  text-align: center;
  padding: 4rem 2rem;
  color: #999;
}

.no-posts i {
  font-size: 4rem;
  color: #666;
  margin-bottom: 1rem;
}

.no-posts h3 {
  color: #FFD700;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.5);
}

.no-posts p {
  color: #999;
  font-size: 1rem;
}

.no-posts.error i {
  color: #ff4444;
}

.no-posts.error h3 {
  color: #ff4444;
}

/* Blog Hero Image */
.blog-hero {
  background: url('../images/blog-hero.png') center/cover no-repeat;
  min-height: 60vh;
}

/* Modal styles */
.fixed {
    z-index: 50;
}

.max-h-screen {
    max-height: 90vh;
}

.overflow-y-auto {
    scrollbar-width: thin;
    scrollbar-color: #CBD5E0 #F7FAFC;
}

.overflow-y-auto::-webkit-scrollbar {
    width: 6px;
}

.overflow-y-auto::-webkit-scrollbar-track {
    background: #F7FAFC;
}

.overflow-y-auto::-webkit-scrollbar-thumb {
    background-color: #CBD5E0;
    border-radius: 3px;
}

/* Responsive typography */
@media (max-width: 640px) {
    .prose h1 { font-size: 1.875rem; }
    .prose h2 { font-size: 1.5rem; }
    .prose h3 { font-size: 1.25rem; }
    .prose h4 { font-size: 1.125rem; }
}

/* Gradient background for cards without images */
.bg-gradient-to-br {
    background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
}

/* Loading state */
.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Blog page navigation styling */
body.blog-page .nav-bar-a a[href="blog.html"],
body.blog-page .nav-bar-a .home-button[href="blog.html"] {
    color: gold !important;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.8) !important;
}

/* Post Modal Styles */
.post-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.post-modal:not(.hidden) {
    display: flex !important;
}

.hidden {
    display: none !important;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
    margin: 0;
    color: #111827;
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.25;
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.close-modal:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.modal-body {
    padding: 16px 32px 32px;
}

.modal-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    color: #6b7280;
    font-size: 0.875rem;
}

.modal-meta span {
    display: flex;
    align-items: center;
}

.modal-body p {
    color: #374151 !important;
    line-height: 1.75;
    font-size: 1rem;
}

.modal-body * {
    max-width: 100%;
}

.modal-body div {
    margin-bottom: 1rem;
}

.modal-body #modalContent {
    line-height: 1.6;
}

.modal-body #modalContent p {
    margin-bottom: 1rem;
}

.modal-body #modalContent div {
    margin-bottom: 1rem;
}

.modal-content #modalContent {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.modal-content #modalContent p {
    margin-bottom: 1rem;
}

.modal-content #modalContent div {
    margin-bottom: 1rem;
}

/* Fix images in modal content */
.modal-content #modalContent img,
.modal-body img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 1rem auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-body ul,
.modal-body ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.modal-body li {
    margin-bottom: 0.5rem;
}

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

.modal-images {
    margin-top: 24px;
}

.modal-images img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.modal-images img:last-child {
    margin-bottom: 0;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .post-modal {
        padding: 10px;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 20px 24px 12px;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .modal-body {
        padding: 12px 24px 24px;
    }
    
    .modal-meta {
        flex-direction: column;
        gap: 8px;
    }
}

/* List styling for blog content */
.modal-body ul,
.modal-body ol {
    color: #374151 !important;
    margin: 16px 0;
    padding-left: 24px;
}

.modal-body li {
    color: #374151 !important;
    margin: 8px 0;
    line-height: 1.5;
}

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

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

/* Blog card list styling */
.blog-card-content ul,
.blog-card-content ol {
    margin: 12px 0;
    padding-left: 20px;
}

.blog-card-content li {
    margin: 4px 0;
    line-height: 1.4;
}

.blog-card-content ul li {
    list-style-type: disc;
}

.blog-card-content ol li {
    list-style-type: decimal;
}

/* Rich text editor list styling */
#editContentEditor ul,
#editContentEditor ol,
#createContentEditor ul,
#createContentEditor ol {
    margin: 16px 0 !important;
    padding-left: 24px !important;
}

#editContentEditor li,
#createContentEditor li {
    margin: 8px 0 !important;
    line-height: 1.5 !important;
}

#editContentEditor ul li,
#createContentEditor ul li {
    list-style-type: disc !important;
}

#editContentEditor ol li,
#createContentEditor ol li {
    list-style-type: decimal !important;
}

/* Force list styling for any list in contenteditable */
[contenteditable] ul {
    list-style-type: disc !important;
    padding-left: 24px !important;
    margin: 16px 0 !important;
    display: block !important;
}

[contenteditable] ol {
    list-style-type: decimal !important;
    padding-left: 24px !important;
    margin: 16px 0 !important;
    display: block !important;
}

[contenteditable] li {
    margin: 8px 0 !important;
    line-height: 1.5 !important;
    display: list-item !important;
}

/* Super specific rules for the editors */
div#editContentEditor ul {
    list-style-type: disc !important;
    padding-left: 24px !important;
    margin: 16px 0 !important;
    display: block !important;
}

div#editContentEditor ol {
    list-style-type: decimal !important;
    padding-left: 24px !important;
    margin: 16px 0 !important;
    display: block !important;
}

div#editContentEditor li {
    margin: 8px 0 !important;
    line-height: 1.5 !important;
    display: list-item !important;
}

div#createContentEditor ul {
    list-style-type: disc !important;
    padding-left: 24px !important;
    margin: 16px 0 !important;
    display: block !important;
}

div#createContentEditor ol {
    list-style-type: decimal !important;
    padding-left: 24px !important;
    margin: 16px 0 !important;
    display: block !important;
}

div#createContentEditor li {
    margin: 8px 0 !important;
    line-height: 1.5 !important;
    display: list-item !important;
}

.modal-images {
    margin-top: 24px;
}

.modal-images img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.modal-images img:last-child {
    margin-bottom: 0;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .post-modal {
        padding: 10px;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 20px 24px 12px;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .modal-body {
        padding: 12px 24px 24px;
    }
    
    .modal-meta {
        flex-direction: column;
        gap: 8px;
    }
}
