/* Blog Page Specific Styles */

/* Blog Hero Section */
.blog-hero {
    padding: 8rem 0 4rem 0;
    background: linear-gradient(135deg, #000000 0%, #111111 100%);
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.blog-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.blog-hero-title {
    font-size: 3.5rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.blog-hero-subtitle {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-weight: 500;
}

.blog-hero-description {
    font-size: 1.1rem;
    color: var(--secondary-color);
    opacity: 0.8;
    line-height: 1.6;
}

/* Blog Main Content */
.blog-main {
    padding: 6rem 0;
    background: var(--background-color);
    min-height: 60vh;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

/* Enhanced Blog Post Cards */
.blog-post-card {
    background: var(--card-background);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.blog-post-content {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    padding: 2.5rem;
    transition: all 0.3s ease;
}

/* Post Actions (Delete Button) */
.post-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

.delete-btn {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    color: #ff6b6b;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    opacity: 0;
    transform: scale(0.8);
}

.blog-post-card:hover .delete-btn {
    opacity: 1;
    transform: scale(1);
}

.delete-btn:hover {
    background: rgba(255, 0, 0, 0.2);
    border-color: rgba(255, 0, 0, 0.5);
    transform: scale(1.1);
}

.delete-btn:active {
    transform: scale(0.95);
}

.blog-post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #ffffff, #b3c2cb, #ffffff);
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.blog-post-card:hover::before {
    opacity: 1;
}

.blog-post-content {
    padding: 2.5rem;
}

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

.post-date {
    color: var(--accent-color);
    font-size: 0.95rem;
    font-weight: 500;
    background: rgba(179, 194, 203, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

.post-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    word-break: keep-all;
}

.post-preview {
    color: var(--secondary-color);
    line-height: 1.7;
    margin-bottom: 2rem;
    opacity: 0.9;
    font-size: 1.05rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    color: var(--accent-color);
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    gap: 0.5rem;
}

.read-more::after {
    content: '→';
    transition: transform 0.3s ease;
}

.blog-post-card:hover .read-more {
    color: var(--primary-color);
}

.blog-post-card:hover .read-more::after {
    transform: translateX(4px);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 6rem 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 2rem;
    opacity: 0.7;
}

.empty-state h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.empty-state p {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    opacity: 0.8;
    line-height: 1.6;
}

/* Write Button */
.write-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border: none;
    color: white;
    padding: 1.2rem 2.5rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.3);
    min-width: 200px;
}

.write-btn::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.6s ease;
}

.write-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

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

.write-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(76, 175, 80, 0.4);
    background: linear-gradient(135deg, #45a049 0%, #4CAF50 100%);
}

.write-btn:hover .write-icon {
    transform: rotate(15deg);
}

.write-btn:active {
    transform: translateY(-1px) scale(1.01);
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: 4rem;
}

.load-more-btn {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--primary-color);
    padding: 1rem 2.5rem;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
}

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

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

.load-more-btn:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: var(--background-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

/* Enhanced Blog Modal */
.blog-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: modalFadeIn 0.4s ease;
}

.blog-modal-content {
    background: var(--card-background);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    max-width: 900px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.4s ease;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.blog-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 2.5rem 2.5rem 1.5rem 2.5rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--card-background) 0%, rgba(18, 18, 18, 0.9) 100%);
}

.blog-modal-header h2 {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    flex: 1;
    margin-right: 1rem;
}

.close-btn {
    background: none;
    border: none;
    color: var(--secondary-color);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.close-btn:hover {
    background: var(--border-color);
    color: var(--primary-color);
    transform: rotate(90deg);
}

.blog-modal-body {
    padding: 2.5rem;
    overflow-y: auto;
    flex: 1;
}

.post-content {
    color: var(--secondary-color);
    line-height: 1.8;
    font-size: 1.1rem;
}

.post-content h1,
.post-content h2,
.post-content h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    margin-top: 2.5rem;
    line-height: 1.3;
}

.post-content h1:first-child,
.post-content h2:first-child,
.post-content h3:first-child {
    margin-top: 0;
}

.post-content h1 {
    font-size: 2.2rem;
    font-weight: 700;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
}

.post-content h2 {
    font-size: 1.7rem;
    font-weight: 600;
}

.post-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
}

.post-content p {
    margin-bottom: 1.5rem;
    word-break: keep-all;
}

.post-content strong {
    color: var(--primary-color);
    font-weight: 600;
}

.post-content em {
    color: var(--accent-color);
    font-style: italic;
}

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

.post-content li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.post-content code {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.95em;
    color: var(--accent-color);
}

.post-content pre {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid var(--border-color);
}

.post-content pre code {
    background: none;
    padding: 0;
    color: var(--secondary-color);
}

.post-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--accent-color);
}

/* Active nav link for blog page */
.nav-link.active {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 0.5rem 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-hero {
        padding: 6rem 0 3rem 0;
    }

    .blog-hero-title {
        font-size: 2.5rem;
    }

    .blog-hero-subtitle {
        font-size: 1.4rem;
    }

    .blog-hero-description {
        font-size: 1rem;
    }

    .blog-main {
        padding: 4rem 0;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 3rem;
    }

    .blog-post-content {
        padding: 2rem;
    }

    .post-title {
        font-size: 1.5rem;
    }

    .blog-modal {
        padding: 1rem;
    }

    .blog-modal-content {
        max-height: 90vh;
    }

    .blog-modal-header {
        padding: 2rem 2rem 1rem 2rem;
    }

    .blog-modal-header h2 {
        font-size: 1.6rem;
    }

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

    .post-content {
        font-size: 1rem;
    }

    .post-content h1 {
        font-size: 1.8rem;
    }

    .post-content h2 {
        font-size: 1.5rem;
    }

    .post-content h3 {
        font-size: 1.3rem;
    }

    /* Empty State - Mobile */
    .empty-state {
        padding: 4rem 1rem;
    }

    .empty-icon {
        font-size: 3rem;
    }

    .empty-state h3 {
        font-size: 1.5rem;
    }

    .empty-state p {
        font-size: 1rem;
    }

    .write-btn {
        min-width: 180px;
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

/* Delete Success Message */
.delete-success-message {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 3000;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.3);
    animation: slideInRight 0.3s ease, fadeOutRight 0.3s ease 2.7s;
    min-width: 300px;
}

.delete-success-content {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.success-icon {
    font-size: 1.2rem;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Smooth scrolling and animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        transform: translateY(60px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}