/* Custom styles for the blog */

/* Smooth transitions */
.transition {
    transition: all 0.3s ease;
}

/* Blog post card styling */
.post-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(248, 187, 208, 0.2);
    height: 100%;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(236, 72, 153, 0.1), 0 10px 10px -5px rgba(236, 72, 153, 0.04);
    border-color: rgba(248, 187, 208, 0.5);
}

.post-image-container {
    overflow: hidden;
    border-radius: 0.5rem;
    height: 220px;
}

.post-image {
    transition: transform 0.8s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card:hover .post-image {
    transform: scale(1.08);
}

/* Featured post styling */
.featured-post {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 30px -5px rgba(236, 72, 153, 0.1), 0 10px 15px -5px rgba(236, 72, 153, 0.1);
}

.featured-post:before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 100%);
    z-index: 1;
}

.featured-post .post-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    z-index: 2;
    color: white;
}

.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: rgba(244, 143, 177, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: bold;
    z-index: 2;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(8px);
}

/* Admin table styling */
.action-button {
    transition: all 0.2s ease;
}

.action-button:hover {
    transform: scale(1.1);
}

/* Modal animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

#login-modal, #post-detail-modal, #post-editor-modal, #delete-modal {
    animation: fadeIn 0.3s ease;
}

#login-modal > div, 
#post-detail-modal > div, 
#post-editor-modal > div,
#delete-modal > div {
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Prose styling for blog content */
.prose {
    max-width: 65ch;
    color: #374151;
    line-height: 1.75;
}

.prose h1, .prose h2, .prose h3, .prose h4 {
    color: #EC4899;
    font-weight: 600;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
}

.prose p {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
}

.prose a {
    color: #EC4899;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.prose a:hover {
    color: #DB2777;
}

.prose ul, .prose ol {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    padding-left: 1.5em;
}

.prose ul li, .prose ol li {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.prose blockquote {
    border-left: 4px solid #F8BBD0;
    padding-left: 1.25em;
    padding-top: 0.5em;
    padding-bottom: 0.5em;
    background-color: rgba(248, 187, 208, 0.1);
    color: #6B7280;
    font-style: italic;
    margin-top: 1.5em;
    margin-bottom: 1.5em;
    border-radius: 0 0.375rem 0.375rem 0;
}

.prose img {
    border-radius: 0.5rem;
    margin: 2rem auto;
    display: block;
    max-width: 100%;
    height: auto;
    max-height: 500px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Loading animation */
@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 0.8; }
    100% { opacity: 0.5; }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background-color: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background-color: #F8BBD0;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #EC4899;
}

/* Glassmorphism effects */
.glass-effect {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(90deg, #EC4899, #F472B6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Modern buttons */
.btn-modern {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn-modern:hover::before {
    transform: translateX(100%);
}

/* Custom animation for the blog */
@keyframes floatUp {
    0% { transform: translateY(20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.animate-float-up {
    animation: floatUp 0.8s forwards;
}

.animate-delay-100 { animation-delay: 0.1s; }
.animate-delay-200 { animation-delay: 0.2s; }
.animate-delay-300 { animation-delay: 0.3s; }
.animate-delay-400 { animation-delay: 0.4s; }
.animate-delay-500 { animation-delay: 0.5s; }

/* Blog post badges */
.post-date-badge {
    display: inline-flex;
    align-items: center;
    background-color: rgba(248, 187, 208, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    color: #DB2777;
}

.post-date-badge i {
    margin-right: 0.25rem;
}

/* Decorative elements */
.decorative-dots {
    position: absolute;
    width: 150px;
    height: 150px;
    background-image: radial-gradient(#F8BBD0 2px, transparent 2px);
    background-size: 15px 15px;
    opacity: 0.3;
    z-index: -1;
}

/* Custom input styles */
.custom-input {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid transparent;
    background-color: #F9FAFB;
}

.custom-input:focus {
    border-color: #F472B6;
    box-shadow: 0 0 0 3px rgba(244, 114, 182, 0.2);
    background-color: white;
}

/* Footer styling */
.footer-link {
    transition: color 0.2s ease;
    color: #6B7280;
}

.footer-link:hover {
    color: #EC4899;
}

/* Hero section special styling */
.hero-text-shadow {
    text-shadow: 0 2px 10px rgba(236, 72, 153, 0.2);
}

/* Admin dashboard improvements */
.stats-card {
    border-left: 4px solid #EC4899;
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Post detail page styles */
.post-detail-header {
    position: relative;
    margin-bottom: 3rem;
}

.post-detail-image {
    height: 400px;
    width: 100%;
    object-fit: cover;
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Add this new style for the main post image */
#post-image {
    max-height: 450px;
    width: 100%;
    object-fit: cover;
}

/* Enhance the prose styling for blog content */
.prose h1 {
    font-size: 2.25rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #EC4899;
    font-weight: 700;
}

.prose h2 {
    font-size: 1.875rem;
    margin-top: 1.75rem;
    margin-bottom: 0.875rem;
    color: #EC4899;
    font-weight: 600;
}

.prose h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #EC4899;
    font-weight: 600;
}

.prose p {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    line-height: 1.8;
    color: #4B5563;
}

.prose img {
    border-radius: 0.5rem;
    margin: 2rem auto;
    display: block;
    max-width: 100%;
    height: auto;
    max-height: 500px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Line clamp for post excerpts */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Add loading animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
