/* Blog Styles */

/* Teal navbar for blog pages */
.navbar-teal,
.navbar-teal.scrolled {
    background: #7ba098 !important;
    box-shadow: none !important;
}

.navbar-teal .nav-logo h2,
.navbar-teal.scrolled .nav-logo h2,
.navbar-teal .nav-link,
.navbar-teal.scrolled .nav-link {
    color: white !important;
}

/* Scroll progress bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: #2980b9;
    z-index: 9999;
    transition: width 0.1s linear;
}

/* Search + filter bar */
.blog-search-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border: 1px solid #dde3ea;
    border-radius: 10px;
    padding: 0.65rem 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.blog-search-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 180px;
    color: #aab;
}

.blog-search-input-wrap input {
    border: none;
    outline: none;
    font-size: 0.95rem;
    color: #2c3e50;
    width: 100%;
    background: transparent;
}

.blog-search-filters {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.blog-search-filters label {
    font-size: 0.85rem;
    color: #5a6c7d;
    white-space: nowrap;
}

.blog-search-filters select {
    border: 1px solid #dde3ea;
    border-radius: 6px;
    padding: 0.3rem 0.6rem;
    font-size: 0.85rem;
    color: #2c3e50;
    background: #fff;
    cursor: pointer;
}

/* Horizontal post list */
.blog-posts-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.blog-post-card {
    display: flex;
    gap: 0;
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.blog-post-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.09);
    transform: translateY(-2px);
}

.blog-post-image {
    width: 280px;
    flex-shrink: 0;
}

.blog-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-post-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Category label */
.card-category {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #2980b9;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.category-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2980b9;
    flex-shrink: 0;
}

.blog-post-title-link {
    text-decoration: none;
    color: inherit;
}

.blog-post-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.blog-post-title-link:hover .blog-post-title {
    color: #2980b9;
}

.blog-post-excerpt {
    color: #5a6c7d;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    flex: 1;
}

.blog-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

/* Card footer: author + read more */
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    gap: 1rem;
    flex-wrap: wrap;
}

.card-author-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.card-author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #2980b9;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.card-author-info {
    display: flex;
    flex-direction: column;
}

.card-author-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2c3e50;
}

.card-author-sub {
    font-size: 0.78rem;
    color: #7f8c8d;
}

.card-read-more {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2980b9;
    text-decoration: none;
    white-space: nowrap;
}

.card-read-more:hover {
    text-decoration: underline;
}

.meta-dot {
    color: #bdc3c7;
}

.blog-tag-category {
    background-color: #2980b9;
    color: #fff;
    font-weight: 600;
}

@media (max-width: 640px) {
    .blog-post-card { flex-direction: column; }
    .blog-post-image { width: 100%; height: 200px; }
    .blog-search-bar { flex-direction: column; align-items: stretch; }
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    color: #2980b9;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Post author block */
.post-author-block {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border-radius: 10px;
    flex-wrap: wrap;
}

.post-author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #2980b9;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.post-author-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex: 1;
}

.post-author-name {
    font-weight: 700;
    color: #2c3e50;
    font-size: 0.95rem;
}

.post-author-role {
    font-size: 0.8rem;
    color: #7f8c8d;
}

.post-meta-right {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-left: auto;
}


.blog-hero {
    background: #fff;
    padding: 120px 0 40px;
    text-align: center;
}

.blog-hero h1 {
    font-family: 'Manrope', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.blog-hero p {
    font-size: 1.2rem;
    color: #5a6c7d;
    max-width: 600px;
    margin: 0 auto;
}

.blog-posts {
    padding: 80px 0;
    background-color: #fff;
}


.blog-tag {
    background-color: #e8f4fd;
    color: #2980b9;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.editor-toolbar {
    display: flex;
    gap: 0.3rem;
    align-items: center;
    background: #f5f7fa;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    padding: 0.4rem 0.6rem;
}

.editor-toolbar button {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 0.25rem 0.6rem;
    font-size: 0.85rem;
    cursor: pointer;
    color: #2c3e50;
    min-width: 32px;
    transition: background 0.15s;
}

.editor-toolbar button:hover {
    background: #e8f4fd;
    border-color: #2980b9;
}

.toolbar-divider {
    width: 1px;
    height: 20px;
    background: #ddd;
    margin: 0 0.2rem;
}

.admin-form #post-content {
    border-radius: 0 0 8px 8px;
    border-top: none;
    min-height: 200px;
}

.slug-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.slug-field label {
    font-size: 0.85rem;
    color: #5a6c7d;
}

.slug-field label span {
    font-weight: 600;
    color: #2980b9;
}

.admin-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.edit-post-btn,
.delete-post-btn {
    margin-top: 0.75rem;
    padding: 0.3rem 0.9rem;
    background: transparent;
    color: #e74c3c;
    border: 1px solid #e74c3c;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.delete-post-btn:hover {
    background: #e74c3c;
    color: #fff;
}

.edit-post-btn {
    color: #2980b9;
    border-color: #2980b9;
}

.edit-post-btn:hover {
    background: #2980b9;
    color: #fff;
}

.loading, .no-posts {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
}

/* Blog Post Detail Page */
.blog-post-detail {
    padding-top: 100px;
    padding-bottom: 80px;
    background-color: #fff;
}

/* Featured image — contained to content width with rounded corners */
.blog-post-featured-image {
    max-width: 840px;
    margin: 0 auto 2.5rem;
    padding: 0 2rem;
    border-radius: 12px;
    overflow: hidden;
}

.blog-post-featured-image img {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    display: block;
    border-radius: 12px;
    box-shadow: none;
    margin: 0;
}

.blog-post-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.blog-post-header h1 {
    font-family: 'Manrope', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.blog-post-header .blog-post-meta {
    justify-content: center;
    font-size: 1rem;
}

.blog-post-body {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    color: #2c3e50;
}

.blog-post-body img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.blog-post-body h2 {
    font-family: 'Manrope', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 2.5rem 0 1rem;
}

.blog-post-body h3 {
    font-family: 'Manrope', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 2rem 0 0.8rem;
}

.blog-post-body p {
    margin-bottom: 1.5rem;
}

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

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

/* Admin Panel */
.admin-access {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.admin-button {
    background: #2c3e50;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.admin-button:hover {
    background: #34495e;
}

.admin-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: 2000;
}

.admin-modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-form input, .admin-form textarea, .admin-form select {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

.admin-form textarea {
    min-height: 200px;
    resize: vertical;
}

.admin-form button {
    background: #2c3e50;
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.admin-form button:hover {
    background: #34495e;
}

.admin-form .cancel-btn {
    background: #95a5a6;
}

.admin-form .cancel-btn:hover {
    background: #7f8c8d;
}

.image-upload-area {
    border: 2px dashed #ddd;
    border-radius: 6px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.image-upload-area:hover {
    border-color: #2c3e50;
}

.image-upload-area.dragover {
    border-color: #2c3e50;
    background-color: #f8f9fa;
}

.uploaded-images {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.uploaded-image {
    position: relative;
    width: 100px;
    height: 100px;
}

.uploaded-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2.2rem;
    }
    
    .blog-posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .blog-post-header h1 {
        font-size: 2rem;
    }
    
    .admin-modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }
}