/* Blog Page Styles */

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 140px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../img/pattern-dots.svg') repeat;
    opacity: 0.1;
    animation: float 30s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.page-header p {
    font-size: 1.35rem;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
    font-weight: 300;
}

.admin-actions {
    margin-top: 2.5rem;
}

.btn-admin {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-size: 1.05rem;
}

.btn-admin:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Blog Content */
.blog-content {
    padding: 100px 0;
    background: linear-gradient(to bottom, #f8fafc 0%, #ffffff 100%);
}

.blog-grid {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-bottom: 4rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.blog-post-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.blog-post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.blog-post-card:hover::before {
    transform: scaleX(1);
}

.blog-post-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.1);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
}

.post-admin-actions {
    display: flex;
    gap: 8px;
    position: absolute;
    top: 0;
    right: 0;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e2e8f0;
    color: #64748b;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.btn-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-edit:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.btn-delete:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.post-category {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.post-date {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
}

.post-title {
    font-size: 1.65rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
    line-height: 1.35;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.01em;
    transition: color 0.3s ease;
}

.blog-post-card:hover .post-title {
    color: #667eea;
}

.post-excerpt {
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.read-time {
    color: #94a3b8;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    color: #475569;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.tag:hover {
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    border-color: #cbd5e1;
}

.post-actions {
    text-align: right;
}

.btn-read-more {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.btn-read-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5568d3, #6a3f8f);
}

.btn-read-more i {
    transition: transform 0.3s ease;
}

.btn-read-more:hover i {
    transform: translateX(4px);
}

/* No Posts State */
.no-posts {
    text-align: center;
    padding: 6rem 2rem;
    color: #64748b;
    grid-column: 1 / -1;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.no-posts i {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    color: #cbd5e1;
    opacity: 0.5;
}

.no-posts h3 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: #475569;
    font-family: 'Space Grotesk', sans-serif;
}

.no-posts p {
    font-size: 1.1rem;
}

/* Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 3rem;
}

.btn-pagination {
    background: white;
    border: 2px solid #e2e8f0;
    color: #475569;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-pagination:hover:not(:disabled) {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

.btn-pagination:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    color: #64748b;
    font-weight: 500;
}

/* Post Modal */
.post-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 2rem;
}

.post-modal.show {
    opacity: 1;
    visibility: visible;
}

.post-modal .modal-content {
    background: white;
    border-radius: 16px;
    max-width: 1400px;
    width: 95%;
    max-height: 95vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(50px);
    transition: transform 0.3s ease;
}

.post-modal.show .modal-content {
    transform: translateY(0);
}

.post-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.post-meta-info {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f1f5f9;
    color: #475569;
}

.post-modal .modal-body {
    padding: 2rem;
}

.post-modal .post-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.post-modal .post-content {
    line-height: 1.8;
    color: #374151;
}

.post-modal .post-content h1,
.post-modal .post-content h2,
.post-modal .post-content h3 {
    color: #1e293b;
    margin: 2rem 0 1rem;
}

.post-modal .post-content p {
    margin-bottom: 1.5rem;
}

.post-modal .post-content ul,
.post-modal .post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2.5rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .blog-post-card {
        padding: 1.5rem;
    }
    
    .post-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .blog-pagination {
        flex-direction: column;
        gap: 1rem;
    }
    
    .post-modal {
        padding: 1rem;
    }
    
    .post-modal .modal-header,
    .post-modal .modal-body {
        padding: 1.5rem;
    }
    
    .post-modal .post-title {
        font-size: 2rem;
    }
}

/* Notification System */
.blog-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    border-left: 4px solid #667eea;
    min-width: 300px;
}

.blog-notification.show {
    transform: translateX(0);
}

.blog-notification.success {
    border-left-color: #10b981;
}

.blog-notification.success i {
    color: #10b981;
}

.blog-notification i {
    font-size: 1.25rem;
    color: #667eea;
}

.blog-notification span {
    color: #1e293b;
    font-weight: 500;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .blog-notification {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}
