/* blog.css - Styles for blog page */
/* Note: This contains the exact same styles from the <style> tag in your HTML */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.7;
    color: #2c3e50;
    background: #f8f9fa;
    padding-top: 80px; /* For fixed navbar */
}

/* Header Navigation */
.main-navbar {
    background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 1030;
}

.main-navbar.scrolled {
    background: white;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.navbar-brand img {
    height: 50px;
    transition: all 0.3s ease;
}

.nav-link {
    color: #2c3e50 !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #ff6b35 !important;
}

.nav-link.active {
    color: #ff6b35 !important;
    font-weight: 600;
}

.btn-nav-cta {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c61 100%);
    color: white !important;
    border: none;
    padding: 0.5rem 1.5rem !important;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #ff6b35;
    color: white;
    padding: 8px;
    z-index: 9999;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}

/* Blog Header */
.blog-header {
    background: #ffffff;
    padding: 5rem 1.5rem 4rem;
    text-align: center;
    margin-bottom: 3rem;
    border-bottom: 1px solid #e5e7eb;
}

.blog-header h1 {
    font-size: 3rem;
    margin-bottom: 1.25rem;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.03em;
}

.blog-header p {
    font-size: 1.25rem;
    max-width: 720px;
    margin: 0 auto;
    color: #6b7280;
    line-height: 1.8;
}

/* Main Container */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: grid;
    gap: 3rem;
}

/* Blog Post */
.blog-post {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
}

.blog-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border-color: #ff6b35;
}

.post-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-post:hover .post-image {
    transform: scale(1.05);
}

.post-content {
    padding: 2.5rem;
    flex: 1;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.post-category {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c61 100%);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.post-date {
    color: #6c757d;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-title {
    font-size: 2.2rem;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    font-weight: 700;
}

.post-body {
    color: #495057;
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-body h2 {
    color: #1a73e8;
    margin: 2.5rem 0 1.5rem;
    font-size: 1.8rem;
    font-weight: 700;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.post-body h3 {
    color: #2c3e50;
    margin: 2rem 0 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.post-body p {
    margin-bottom: 1.5rem;
}

.post-body ul, .post-body ol {
    margin: 1.5rem 0 2rem 2rem;
}

.post-body li {
    margin-bottom: 0.8rem;
    position: relative;
}

.post-body ul li::before {
    content: '•';
    color: #ff6b35;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

.post-body strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Reactions */
.reactions {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 2.5rem;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    flex-wrap: wrap;
    align-items: center;
}

.reaction-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border: 2px solid #dee2e6;
    border-radius: 30px;
    background: white;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #495057;
    transition: all 0.3s ease;
    min-width: 100px;
    justify-content: center;
}

.reaction-btn:hover {
    border-color: #1a73e8;
    background: #e8f0fe;
    color: #1a73e8;
    transform: translateY(-2px);
}

.reaction-btn.active {
    border-color: #ff6b35;
    background: #fff5f2;
    color: #ff6b35;
}

.reaction-count {
    font-weight: 600;
    margin-left: 0.25rem;
}

/* Share Modal */
.share-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.share-modal.active {
    display: flex;
    opacity: 1;
}

.share-content {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.share-modal.active .share-content {
    transform: translateY(0);
}

.share-content h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
}

.share-options {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.share-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    font-size: 1rem;
    color: #495057;
}

.share-option:hover {
    border-color: #1a73e8;
    background: #e8f0fe;
    color: #1a73e8;
    transform: translateX(5px);
}

.share-option i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.close-modal {
    width: 100%;
    padding: 1rem;
    background: #f8f9fa;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: #e9ecef;
    color: #2c3e50;
}

/* Comments Section */
.comments-section {
    padding: 2.5rem;
    border-top: 1px solid #e9ecef;
    background: white;
}

.comments-section h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 2.5rem;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
}

.comment-form input,
.comment-form textarea {
    padding: 1rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.comment-form button {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.comment-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26, 115, 232, 0.3);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comment {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #ff6b35;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comment-author {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comment-author::before {
    content: '👤';
}

.comment-date {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comment-date::before {
    content: '📅';
}

.comment p {
    color: #495057;
    line-height: 1.6;
}

/* Admin Controls */
.admin-controls {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    background: #e8f0fe;
    border-top: 1px solid #e9ecef;
}

.admin-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-edit {
    background: #4CAF50;
    color: white;
}

.btn-edit:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.btn-delete {
    background: #f44336;
    color: white;
}

.btn-delete:hover {
    background: #d32f2f;
    transform: translateY(-2px);
}

.btn-publish {
    background: #2196F3;
    color: white;
}

.btn-publish:hover {
    background: #0b7dda;
    transform: translateY(-2px);
}

/* Create/Edit Form */
.blog-form-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.blog-form-container h2 {
    margin-bottom: 2rem;
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 600;
}

.blog-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.8rem 1rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.form-group textarea {
    min-height: 200px;
    resize: vertical;
}

#content-editor {
    min-height: 400px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-save {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.btn-cancel {
    background: #f8f9fa;
    color: #495057;
    padding: 0.8rem 2rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

/* Login Form */
.login-container {
    max-width: 400px;
    margin: 5rem auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.login-container h2 {
    margin-bottom: 2rem;
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
}

/* Admin Dashboard */
.admin-dashboard {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #ff6b35;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.blog-card-excerpt {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    color: #6c757d;
    font-size: 0.85rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .blog-container {
        max-width: 960px;
    }
}

@media (max-width: 992px) {
    .blog-header h1 {
        font-size: 2.5rem;
    }
    
    .post-title {
        font-size: 2rem;
    }
    
    .post-content {
        padding: 2rem;
    }
    
    .reactions {
        padding: 1.5rem 2rem;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    .blog-header {
        padding: 4rem 1.5rem;
    }
    
    .blog-header h1 {
        font-size: 2rem;
    }
    
    .blog-header p {
        font-size: 1.1rem;
    }
    
    .post-title {
        font-size: 1.8rem;
    }
    
    .post-image {
        height: 250px;
    }
    
    .post-content {
        padding: 1.5rem;
    }
    
    .reactions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.8rem;
    }
    
    .reaction-btn {
        width: 100%;
        justify-content: center;
    }
    
    .comments-section {
        padding: 1.5rem;
    }
    
    .comment-form {
        padding: 1rem;
    }
    
    .blog-form-container {
        padding: 1.5rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .blog-header {
        padding: 3rem 1rem;
    }
    
    .blog-header h1 {
        font-size: 1.8rem;
    }
    
    .post-title {
        font-size: 1.6rem;
    }
    
    .post-body {
        font-size: 1rem;
    }
    
    .post-body h2 {
        font-size: 1.5rem;
    }
    
    .post-body h3 {
        font-size: 1.3rem;
    }
    
    .share-content {
        padding: 1.5rem;
        width: 95%;
    }
    
    .share-options {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    .main-navbar,
    .reactions,
    .comments-section,
    .footer,
    .back-to-top,
    .admin-controls {
        display: none !important;
    }
    
    body {
        padding-top: 0;
        background: white;
        color: black;
    }
    
    .blog-post {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    .post-content {
        padding: 1rem;
    }
    
    .post-title {
        font-size: 1.5rem;
    }
}