/* Blog Page Styles */
.blog-page {
    padding-top: 76px;
    background-color: #f8f9fa;
}

input, textarea{
    caret-color: #3498db; /* Custom caret color */
}

/* Blog Header */
.blog-header {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    padding: 60px 0;
    margin-bottom: 0; /* Changed from 30px to 0 to eliminate gap before info banner */
    color: white;
}

.blog-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.blog-header .lead {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Info Banner Styles */
.info-banner {
    background-color: #f1f9ff;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.info-banner .alert {
    margin-bottom: 0;
    padding: 1rem;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.info-banner .alert:hover {
    background-color: #ffffff;
}

.info-banner h5 {
    color: #3498db;
    font-weight: 600;
}

.info-banner p {
    font-size: 0.95rem;
    color: #6c757d;
}

.info-banner .fa-info-circle {
    color: #3498db;
}

.info-banner-close {
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.info-banner-close:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .info-banner .alert {
        padding: 0.75rem;
    }
    
    .info-banner h5 {
        font-size: 1rem;
    }
    
    .info-banner p {
        font-size: 0.875rem;
    }
}

/* Blog Writer Mode Styles */
.writer-mode-toolbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #2c3e50;
    color: white;
    padding: 10px 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.writer-mode-status .badge {
    font-size: 0.9rem;
    padding: 0.5em 0.8em;
}

.writer-mode-actions button {
    transition: all 0.2s ease;
}

/* Edit Mode Styles */
.edit-mode .blog-card {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.edit-mode .blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.edit-mode .blog-card .card {
    border: 2px dashed transparent;
    transition: all 0.3s ease;
}

.edit-mode .blog-card:hover .card {
    border-color: #3498db;
}

.post-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.edit-mode .blog-card:hover .post-actions {
    opacity: 1;
}

.post-actions button {
    background-color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: all 0.2s ease;
}

.post-actions button:hover {
    transform: scale(1.1);
}

/* Blog Post Form Styles */
#newPostForm textarea, #editPostForm textarea {
    resize: vertical;
}

#postContent, #editPostContent {
    min-height: 300px;
    font-family: monospace;
}

/* Search and Categories */
.search-container {
    position: relative;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.category-select {
    height: 100%;
    border-radius: 5px;
    border: 1px solid #ced4da;
    border-radius: 25px;
    padding: 10px 20px;
    border-color: #dee2e6;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-select:hover, .category-select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

#postsCount {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Blog Cards */
.blog-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transition: all 0.3s ease-in-out;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.blog-card.filtered-out {
    opacity: 0;
    transform: scale(0.8);
}

.blog-card .card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
}

.blog-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #6c757d;
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
    line-height: 1.4;
}

.card-text {
    color: #495057;
    font-size: 0.95rem;
    line-height: 1.6;
}

.card-footer {
    background: none;
    border-top: 1px solid #eee;
    padding: 15px;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.share-buttons {
    display: flex;
    gap: 10px;
    
}

/* Featured Posts */
.featured .card {
    border: 1px solid #e9ecef;
}

/* Newsletter Section */
.newsletter {
    padding: 60px 0;
    margin-top: 40px;
    background-color: #f8f9fa;
}

.newsletter h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.newsletter-form {
    max-width: 500px;
    margin: 20px auto 0;
}

/* Blog Post Page Styles */
.blog-post-container {
    margin-top: 80px;
}

.blog-post-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 1.5rem;
}

.blog-post-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.blog-post-meta {
    color: #6c757d;
    font-size: 0.9rem;
}

.blog-post-meta i {
    margin-right: 5px;
}

.blog-post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #2c3e50;
}

.blog-post-content p {
    margin-bottom: 1.5rem;
}

.blog-post-image {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.blog-post-tags .badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    margin-right: 0.5rem;
    text-decoration: none;
}

.blog-post-share .share-buttons {
    margin-top: 1rem;
}

.blog-post-author {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
}

.blog-post-author img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
}

.blog-related-posts .card {
    transition: transform 0.3s ease;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.blog-related-posts .card:hover {
    transform: translateY(-5px);
}

.blog-comments {
    margin-top: 3rem;
}

.comment {
    border-bottom: 1px solid #eee;
    padding: 1.5rem 0;
}

.comment:last-child {
    border-bottom: none;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.comment-date {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Blog Post Page Specific Styles */
.blog-post-page {
    font-size: 18px;
    line-height: 1.8;
    color: #2c3e50;
}

.progress-container {
    position: fixed;
    top: 0;
    z-index: 1000;
    width: 100%;
    height: 4px;
    background: transparent;
}

.progress-bar {
    height: 4px;
    background: #3498db;
    width: 0%;
}

.blog-post-header {
    margin-bottom: 2rem;
}

.blog-post-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.blog-post-meta {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.blog-post-meta i {
    margin-right: 5px;
}

.quick-share {
    margin-top: 1rem;
}

.blog-post-image {
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
}

.blog-post-image img {
    width: 100%;
    height: auto;
}

.table-of-contents {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.table-of-contents nav {
    margin-top: 1rem;
}

.table-of-contents a {
    color: #2c3e50;
    text-decoration: none;
    display: block;
    padding: 0.25rem 0;
}

.blog-post-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.blog-post-content h2 {
    font-size: 1.8rem;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.blog-post-content h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.blog-post-content p {
    margin-bottom: 1.5rem;
}

.blog-post-content blockquote {
    border-left: 4px solid #3498db;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #34495e;
}

.info-box {
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

.blog-post-tags {
    margin: 2rem 0;
}

.blog-post-tags .badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    margin-right: 0.5rem;
    background-color: #f8f9fa;
    color: #2c3e50;
    text-decoration: none;
}

.blog-post-author {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.blog-post-author img {
    width: 100px;
    height: 100px;
    object-fit: cover;
}

.author-social a {
    color: #6c757d;
    text-decoration: none;
    font-size: 1.2rem;
}

.share-section {
    margin: 2rem 0;
    padding: 2rem 0;
    border-top: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
}

.related-posts .card {
    transition: transform 0.3s ease;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.related-posts .card:hover {
    transform: translateY(-5px);
}

.comments-section {
    margin: 3rem 0;
}

.blog-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.categories-list {
    list-style: none;
    padding: 0;
}

.categories-list li {
    margin-bottom: 0.5rem;
}

.categories-list a {
    color: #2c3e50;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tags-cloud a {
    background: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    color: #2c3e50;
    text-decoration: none;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .blog-header {
        padding: 40px 0;
    }

    .blog-header h1 {
        font-size: 2rem;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .search-categories .row {
        flex-direction: column;
    }

    .category-select {
        margin-top: 10px;
    }

    .blog-post-title {
        font-size: 2rem;
    }
    
    .blog-post-content {
        font-size: 1rem;
    }
    
    .table-of-contents {
        display: none;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.blog-card {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Share Modal Styles */
.share-buttons-container .btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border-width: 2px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.share-buttons-container .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.share-buttons-container .btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Platform specific button hover states */
.share-btn[data-platform="whatsapp"]:hover {
    background-color: #25D366;
    color: white;
    border-color: #25D366;
}

.share-btn[data-platform="facebook"]:hover {
    background-color: #1877F2;
    color: white;
    border-color: #1877F2;
}

.share-btn[data-platform="twitter"]:hover {
    background-color: #1DA1F2;
    color: white;
    border-color: #1DA1F2;
}

.share-btn[data-platform="gmail"]:hover {
    background-color: #EA4335;
    color: white;
    border-color: #EA4335;
}

.share-btn[data-platform="linkedin"]:hover {
    background-color: #0A66C2;
    color: white;
    border-color: #0A66C2;
}

.share-btn[data-platform="instagram"]:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: white;
    border-color: #cc2366;
}

/* Share URL input styles */
.share-url-container {
    position: relative;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-radius: 6px;
    overflow: hidden;
}

#shareUrlInput {
    background-color: #f8f9fa;
    font-size: 0.9rem;
    border-color: #e9ecef;
    padding-right: 45px;
}

#copyShareUrl {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-color: #e9ecef;
    color: #495057;
    transition: all 0.2s ease;
}

#copyShareUrl:hover {
    background-color: #e9ecef;
    color: #212529;
}

#copyShareUrl:focus {
    box-shadow: none;
}

.copy-tooltip {
    position: absolute;
    top: -35px;
    right: 10px;
    background-color: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(5px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.16);
    z-index: 1;
}

.copy-tooltip:after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 15px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #333;
}

.copy-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

/* Share button animation */
.share-btn-ripple {
    position: absolute;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Share post title in modal */
.share-post-title {
    font-size: 1.1rem;
    color: #333;
    max-width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

/* Share notification toast */
.share-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #fff;
    color: #333;
    padding: 0;
    border-radius: 8px;
    z-index: 1100;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    max-width: 300px;
    width: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.share-toast-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #3498db;
    color: white;
    font-size: 1.25rem;
}

.share-toast-icon .fa-whatsapp {
    background-color: #25D366;
}

.share-toast-icon .fa-facebook {
    background-color: #1877F2;
}

.share-toast-icon .fa-twitter {
    background-color: #1DA1F2;
}

.share-toast-icon .fa-envelope {
    background-color: #EA4335;
}

.share-toast-icon .fa-linkedin {
    background-color: #0A66C2;
}

.share-toast-icon .fa-instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.share-toast-content {
    padding: 10px 15px;
    flex-grow: 1;
}

.share-toast-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 3px;
}

.share-toast-message {
    font-size: 0.85rem;
    color: #6c757d;
}

.share-toast-close {
    background: none;
    border: none;
    color: #aaa;
    padding: 0 10px;
    cursor: pointer;
    font-size: 0.85rem;
    align-self: flex-start;
    margin-top: 10px;
    margin-right: 5px;
    transition: color 0.2s ease;
}

.share-toast-close:hover {
    color: #333;
}

.share-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Modal enhancements */
#shareModal .modal-content {
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

#shareModal .modal-header {
    border-bottom-color: #f0f0f0;
    padding: 1rem 1.5rem;
}

#shareModal .modal-body {
    padding: 1.5rem;
}

#shareModal .modal-footer {
    border-top-color: #f0f0f0;
    padding: 1rem 1.5rem;
}

/* Responsive styles for share modal */
@media (max-width: 576px) {
    .share-buttons-container .btn {
        font-size: 0.85rem;
    }
    
    .share-toast {
        max-width: 90%;
        left: 5%;
        right: 5%;
    }
}
