/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #3e2217;
    --primary-dark-color: #2a1810;
    --text-light-color: #ffffff;
    --text-dark-color: #333;
    --background-light-color: #f9f9f9;
    --background-color: #f4f4f4;
    --border-color: #ddd;
    --success-color: #4CAF50;
    --danger-color: #f44336;
    --info-color: #2196F3;
    --font-family: 'Poppins', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

/* General Main Content Styles */
main {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: calc(100vh - 60px);
    padding: 2rem 1rem;
}

/* Auth Page Specific Styles */

/* Discover EchoWithin Features Strip (compact, icon-free) */
.auth-features-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1.25rem;
    order: -1;
}

.auth-features-tag {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    background: linear-gradient(135deg, #fdfaf8, #f5ede7);
    border: 1px solid rgba(62, 34, 23, 0.12);
    border-radius: 20px;
    font-size: 0.78rem;
    color: #5a3828;
    font-weight: 500;
    white-space: nowrap;
}

.auth-page-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.auth-container {
    width: 100%;
    max-width: 500px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 0 auto;
}

.auth-tabs {
    background-color: var(--primary-color);
    display: flex;
    border-bottom: 3px solid var(--primary-dark-color);
}

.auth-tabs-wrapper {
    display: flex;
    width: 100%;
}

.auth-tabs .tab-button {
    flex: 1;
    padding: 1rem;
    background-color: var(--primary-color);
    border: none;
    color: var(--text-light-color);
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border-bottom: 3px solid transparent;
}

.auth-tabs .tab-button:hover {
    background-color: rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.auth-tabs .tab-button:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: -2px;
}

.auth-tabs .tab-button.active {
    background-color: white;
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    font-weight: bold;
}

.auth-forms {
    padding: 2rem;
}

.auth-form {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.auth-form.active {
    display: flex;
}

.form-title {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.inputs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.password-input-container {
    position: relative;
    width: 100%;
}

.password-toggle-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #777;
}

.form-input {
    width: 100%;
    height: 45px;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background-color: var(--background-light-color);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(62, 34, 23, 0.3);
}

.form-button {
    width: 100%;
    height: 45px;
    background-color: var(--primary-color);
    color: var(--text-light-color);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.form-button:hover {
    background-color: var(--primary-dark-color);
    transform: translateY(-2px);
}

.form-footer {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: underline;
}

.form-footer a:hover {
    color: var(--primary-dark-color);
}

.google-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 4px;
    color: #3c4043;
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    height: 40px;
    min-width: 200px;
    padding: 0 24px;
    text-decoration: none;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.google-button:hover {
    background: #f8f9fa;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.google-button:active {
    background: #f1f3f4;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.google-button svg {
    flex-shrink: 0;
}

/* Separator for 'or' text */
.form-separator {
    display: flex;
    align-items: center;
    text-align: center;
    color: #aaa;
    width: 100%;
    margin: 0.5rem 0;
    /* Adjust spacing */
}

.form-separator::before,
.form-separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ddd;
}

.form-separator span {
    padding: 0 10px;
}

/* Remember Me & Forgot Password section */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
}

/* General Body Styles */
body {
    background-color: var(--background-color);
    color: var(--text-dark-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Container Styles */
.container {
    flex: 1;
    padding: 2rem;
    /* Add padding for content */
}

/* Flashed Messages Container */
.flash-messages {
    padding: 1rem;
    list-style: none;
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1000;
}

/* Alert Styles */
.alert {
    padding: 15px;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 4px;
    color: #fff;
}

.alert-danger {
    background-color: var(--danger-color);
}

/* Red */
.alert-success {
    background-color: var(--success-color);
}

/* Green */
.alert-info {
    background-color: var(--info-color);
}

/* Blue */

/* Navbar Styles */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--primary-color);
    padding: 0.8rem 1rem;
    color: var(--text-light-color);
    position: relative;
}

.navbar a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 0.4rem;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo {
    height: 40px;
    width: auto;
}

/* Group brand + socials so icons can sit beside the title on mobile */
.nav-left {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-socials {
    display: flex;
    /* show on desktop next to brand */
    gap: 0.5rem;
    margin-left: 0;
    /* sit immediately after brand on desktop */
}

.nav-socials a {
    color: white;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
}

/* Default desktop navigation styles */
.nav-links {
    display: flex;
    gap: 0.4rem;
}

.nav-links a:hover {
    text-decoration: underline;
}

/* Overlay for sidebar */
/* Sidebar overlay is no longer needed */

/* Blog Page Styles */
.blog-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.blog-header {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.blog-header h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.create-post-section,
.posts-section {
    margin-bottom: 2rem;
}

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

.post-form .form-input {
    width: 100%;
}

.post-item {
    background-color: #f9f9f9;
    padding: 0.65rem 0.85rem;
    border-radius: 6px;
    margin-bottom: 0.35rem;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

/* Header layout: title + views badge aligned horizontally */
.post-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.post-title {
    flex: 1 1 auto;
    min-width: 0;
    /* allow truncation inside flex */
    margin: 0;
}

.post-title a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary-dark-color);
}

.post-views {
    flex: 0 0 auto;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    color: #555;
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
}

.post-meta {
    font-size: 0.85rem;
    color: #777;
    margin-top: 0.5rem;
}

.post-meta a {
    text-decoration: underline;
    text-decoration-color: rgba(62, 34, 23, 0.3);
    text-underline-offset: 2px;
    color: var(--primary-color);
    transition: text-decoration-color 0.2s;
}

.post-meta a:hover {
    text-decoration-color: var(--primary-color);
}

.post-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Base button styling for links and buttons */
.btn {
    padding: 0.35rem 0.75rem;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    text-align: center;
    display: inline-block;
    /* Important for <a> tags */
    transition: background-color 0.3s;
    white-space: nowrap;
}

.edit-btn {
    background-color: var(--success-color);
    color: var(--text-light-color);
}

.edit-btn:hover {
    background-color: #45a049;
}

.delete-btn {
    background-color: var(--danger-color);
    color: var(--text-light-color);
}

.delete-btn:hover {
    background-color: #da190b;
}

.comment-btn {
    background-color: var(--primary-color);
    color: var(--text-light-color);
}

.comment-btn:hover {
    background-color: #2a1810;
}

/* Like Button Styles */
.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.75rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #71767b;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.like-btn:hover:not(:disabled) {
    background-color: #fff0f5;
    border-color: #f91880;
    color: #f91880;
}

.like-btn.liked {
    background-color: #fff0f5;
    border-color: #f91880;
    color: #f91880;
}

.like-btn.liked i,
.reaction-btn.reacted .fa-heart {
    color: #f91880 !important;
}

.like-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.like-btn i {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.like-btn:hover:not(:disabled) i {
    transform: scale(1.1);
}

.like-btn .likes-count {
    font-weight: 500;
}

.add-comment-btn {
    background-color: var(--info-color);
    color: var(--text-light-color);
    margin-top: 1rem;
}

.add-comment-btn:hover {
    background-color: #1e88e5;
}

.admin-actions {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Reaction Styles - Refined for Icons */
.reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: transparent;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #71767b;
}

.reaction-btn:hover:not(:disabled) {
    background-color: rgba(249, 24, 128, 0.1);
    border-color: #f91880;
    color: #f91880;
}

.reaction-btn.reacted {
    border-color: #f91880;
    color: #f91880;
}

.reaction-icon i {
    font-size: 1.1rem;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reaction-btn:active .reaction-icon i {
    transform: scale(1.4);
}

.reaction-menu {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    background: white;
    border-radius: 30px;
    padding: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    z-index: 100;
    gap: 0.5rem;
    margin-bottom: 8px;
}

.reaction-container:hover .reaction-menu {
    display: flex;
}

.reaction-option {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    transition: transform 0.2s;
    padding: 0.2rem;
}

.reaction-option:hover {
    transform: scale(1.3);
}

.reaction-option i.fa-heart {
    color: #f91880;
}

.comment-form-container {
    margin-bottom: 1.5rem;
}

.comment-form-container textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    resize: vertical;
    font-family: inherit;
    margin-bottom: 0.5rem;
}

.comment-stance {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.comment-stance label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
}

.comment-form-container button {
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: var(--text-light-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.comment-form-container button:hover {
    background-color: var(--primary-dark-color);
}

.debate-container {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.debate-side {
    flex: 1;
    padding: 1rem;
    border-radius: 6px;
    background-color: var(--text-light-color);
    border: 1px solid var(--border-color);
}

.agree-side {
    border-left: 4px solid var(--success-color);
}

.disagree-side {
    border-left: 4px solid var(--danger-color);
}

.debate-side h4 {
    margin-bottom: 1rem;
    color: var(--text-dark-color);
}

.comment {
    background-color: var(--background-color);
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--border-color);
}

.comment p {
    margin-bottom: 0.25rem;
}

.comment small {
    color: #777;
    font-size: 0.8rem;
}

.no-comments {
    color: #999;
    font-style: italic;
}

.pagination-nav {
    margin-top: 2rem;
    text-align: center;
    padding: 1rem 0;
}

.pagination {
    display: inline-flex;
    list-style: none;
    padding: 0;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.page-item {
    margin: 0.15rem;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0.5rem 0.85rem;
    background-color: var(--primary-color);
    color: var(--text-light-color);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.25s ease;
    font-weight: 500;
    font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
}

.page-link:hover {
    background-color: var(--primary-dark-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.page-link:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.page-item.active .page-link {
    background-color: var(--primary-dark-color);
    border-color: var(--text-light-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    font-weight: 600;
}

.page-item.disabled .page-link {
    background-color: #f5f5f5;
    cursor: default;
    box-shadow: none;
    border: 1px solid #ccc;
}

/* Ensure pagination link text is always readable (white on primary color),
   and use a darker text for disabled state for contrast */
.pagination .page-link,
.pagination .page-link * {
    color: var(--text-light-color) !important;
}

.page-item.disabled .page-link {
    background-color: #f5f5f5;
    cursor: default;
    color: #333 !important;
    /* dark text for better visibility */
    font-weight: 600;
}

.page-item.disabled .page-link:hover {
    background-color: #f5f5f5;
    transform: none;
    box-shadow: none;
}

/* --- Image Styling for Blog Posts --- */

.post-image-container {
    width: 100%;
    margin: 1rem 0;
    /* Adds some space above and below the image */
    overflow: hidden;
    /* Ensures any strange image overflow is clipped */
    border-radius: 8px;
    /* Gives the image container soft, rounded corners */
}

.post-image {
    width: 100%;
    /* Makes the image fill its container horizontally */
    height: auto;
    /* Maintains the image's aspect ratio */
    max-height: 500px;
    /* Prevents very tall images from taking up too much space */
    object-fit: cover;
    /* Ensures the image covers the area, cropping if necessary, without distortion */
    display: block;
    /* Removes any extra space below the image */
    border: 1px solid #eee;
    /* Adds a subtle border */
}

.post-image-container.processing {
    position: relative;
    background-color: #f0f0f0;
    /* Light grey background */
}

.post-image-container.processing::after {
    content: 'Image is processing...';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    font-style: italic;
}

/* Gallery styles for multiple images */
.post-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
}

.post-gallery-item {
    overflow: hidden;
    border-radius: 8px;
}

.gallery-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}

.gallery-thumb:hover {
    transform: scale(1.03);
}

/* Lightbox modal */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1200;
}

.lightbox-modal img {
    max-width: 95%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    color: #fff;
    font-size: 1.6rem;
    background: transparent;
    border: none;
    cursor: pointer;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 2.2rem;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    width: 48px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 6px;
}

.lightbox-prev {
    left: 16px;
}

.lightbox-next {
    right: 16px;
}

.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.5);
}

.edit-post-image-preview {
    max-width: 250px;
    height: auto;
    display: block;
    margin-bottom: 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.nsfw-placeholder {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 3rem 1rem;
    border-radius: 8px;
    font-style: italic;
}

/* Post Content Styling - consistent across blog and view post pages */
.post-content,
.post-content-wrapper,
.post-content-rendered,
.post-content-truncated {
    margin-top: 1rem;
    line-height: 1.7;
    color: var(--text-dark-color);
    font-size: 0.95rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.post-content p,
.post-content-wrapper p,
.post-content-rendered p,
.post-content-truncated p {
    margin-bottom: 0.75rem;
}

.post-content-full p {
    margin-bottom: 0.5rem;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6,
.post-content-wrapper h1,
.post-content-wrapper h2,
.post-content-wrapper h3,
.post-content-wrapper h4,
.post-content-wrapper h5,
.post-content-wrapper h6,
.post-content-rendered h1,
.post-content-rendered h2,
.post-content-rendered h3,
.post-content-rendered h4,
.post-content-rendered h5,
.post-content-rendered h6 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--primary-dark-color);
}

.post-content blockquote,
.post-content-wrapper blockquote,
.post-content-rendered blockquote,
.post-content-truncated blockquote,
.post-content-full blockquote {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    border-left: 4px solid var(--primary-color);
    background-color: var(--background-light-color);
    font-style: italic;
    color: #555;
}

.post-content pre,
.post-content-wrapper pre,
.post-content-rendered pre,
.post-content-truncated pre,
.post-content-full pre {
    margin: 1rem 0;
    padding: 1rem;
    background-color: #f5f5f5;
    border-radius: 6px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
}

.post-content code,
.post-content-wrapper code,
.post-content-rendered code,
.post-content-truncated code,
.post-content-full code {
    background-color: #f0f0f0;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

.post-content pre code,
.post-content-wrapper pre code,
.post-content-rendered pre code,
.post-content-truncated pre code,
.post-content-full pre code {
    background-color: transparent;
    padding: 0;
}

.post-content a,
.post-content-wrapper a,
.post-content-rendered a,
.post-content-truncated a,
.post-content-full a {
    color: var(--primary-color);
    text-decoration: underline;
}

.post-content a:hover,
.post-content-wrapper a:hover,
.post-content-rendered a:hover,
.post-content-truncated a:hover,
.post-content-full a:hover {
    color: var(--primary-dark-color);
}

.post-content img,
.post-content-wrapper img,
.post-content-rendered img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 0.75rem 0;
}

.post-content hr,
.post-content-wrapper hr,
.post-content-rendered hr {
    margin: 1.5rem 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

.post-content-full {
    display: none;
    /* Hidden by default */
    line-height: 1.6;
}

/* Proper indentation for numbered and bullet lists in post content */
.post-content ol,
.post-content ul,
.post-content-rendered ol,
.post-content-rendered ul,
.post-content-truncated ol,
.post-content-truncated ul,
.post-content-full ol,
.post-content-full ul {
    padding-left: 2rem;
    margin: 0.5rem 0;
}

.post-content li,
.post-content-rendered li,
.post-content-truncated li,
.post-content-full li {
    margin-bottom: 0.25rem;
}

/* Disabled state for comment/reply buttons */
#comment-submit:disabled,
.reply-form button[type="submit"]:disabled,
.reply-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Read More Link Styling */
.read-more-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s;
}

/* Community Stats Section */
.community-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-top: 4px solid var(--primary-color);
    text-align: center;
}

.stat-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-dark-color);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.stat-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 0.5rem;
}

.stat-subtext {
    font-size: 0.9rem;
    color: #777;
}

.trending-card {
    text-align: left;
    grid-column: 1 / -1;
    /* Make this card span the full width */
}

.trending-list {
    list-style: none;
    padding: 0;
}

.trending-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.trending-list li:last-child {
    border-bottom: none;
}

/* Social Media Section on About Page */
.social-media-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.social-media-section h4 {
    margin-bottom: 1rem;
    color: var(--primary-dark-color);
}

.social-links {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.social-links a {
    font-size: 1.8rem;
    /* Increase size for icons */
    color: var(--primary-dark-color);
    text-decoration: none;
    /* Remove underline */
    transition: color 0.3s, transform 0.3s;
}

/* Footer Styles */
.footer {
    background-color: var(--primary-color);
    color: var(--text-light-color);
    text-align: center;
    padding: 1rem 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-socials {
    display: flex;
    gap: 1.5rem;
}

.footer-socials a:hover {
    text-decoration: none;
    /* Remove underline on hover */
    opacity: 0.8;
}

.social-links a:hover {
    text-decoration: none;
    color: var(--primary-color);
    transform: scale(1.1);
}

.about-content {
    /* Styles for the content inside the about page container */
    line-height: 1.7;
}

/* --- New Profile Page Styles --- */
.profile-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    max-width: 1100px;
    margin: 2rem auto;
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.profile-sidebar {
    text-align: center;
    border-right: 1px solid var(--border-color);
    padding-right: 2rem;
}

.profile-picture {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    margin-bottom: 1rem;
}

.profile-username {
    font-size: 1.8rem;
    color: var(--primary-dark-color);
    margin-bottom: 0.5rem;
}

.profile-bio {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 1.5rem;
}

.profile-meta {
    text-align: center;
    font-size: 0.9rem;
    color: #777;
}

.profile-meta-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.profile-meta-item i {
    color: var(--primary-color);
}

.profile-user-search {
    margin-top: 1.5rem;
    text-align: left;
}

.profile-user-search-form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.profile-user-search-label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #666;
}

.profile-user-search-row {
    display: flex;
    gap: 0.5rem;
}

.profile-user-search-row--autocomplete {
    position: relative;
}

.profile-user-search-input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 0.9rem;
    font-size: 0.95rem;
}

.profile-user-search-button {
    white-space: nowrap;
    padding: 0.75rem 1rem;
}

.profile-user-search-suggestions {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    z-index: 20;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.profile-user-search-suggestion {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 0.9rem;
    background: #fff;
    border: 0;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
    cursor: pointer;
}

.profile-user-search-suggestion-avatar-wrap {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 50%;
    overflow: hidden;
    background: #eceff3;
}

.profile-user-search-suggestion:last-child {
    border-bottom: none;
}

.profile-user-search-suggestion:hover,
.profile-user-search-suggestion.is-active {
    background: #f7f8fa;
}

.profile-user-search-suggestion-avatar {
    width: 32px;
    height: 32px;
    max-width: 32px;
    max-height: 32px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.profile-user-search-suggestion-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.profile-user-search-suggestion-text strong {
    color: var(--primary-dark-color);
}

.profile-user-search-suggestion-text span {
    font-size: 0.82rem;
    color: #666;
    line-height: 1.3;
}

.profile-user-search-suggestions-empty {
    padding: 0.75rem 0.9rem;
    color: #666;
    font-size: 0.9rem;
}

.profile-user-search-hint,
.profile-user-search-empty {
    margin-top: 0.75rem;
    font-size: 0.92rem;
    color: #666;
}

.profile-user-search-results {
    margin-top: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    background: #fafafa;
}

.profile-user-search-results-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0.9rem;
    background: #f3f4f6;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
}

.profile-user-search-results-list {
    display: flex;
    flex-direction: column;
}

.profile-user-search-result {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 0.9rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #ececec;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.profile-user-search-result:last-child {
    border-bottom: none;
}

.profile-user-search-result:hover {
    background: #ffffff;
    transform: translateX(2px);
}

.profile-user-search-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.profile-user-search-result-body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.profile-user-search-result-body strong {
    color: var(--primary-dark-color);
}

.profile-user-search-result-body span {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.35;
}

.profile-main-content .section-title {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}


/* Profile Page Styles */
.profile-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.profile-header h1 {
    color: var(--primary-color);
}

.profile-meta {
    text-align: center;
    font-size: 0.9rem;
    color: #777;
}

.profile-details {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.profile-detail-item {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.detail-value {
    color: #555;
}

.post-item-simple {
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.post-item-simple:last-child {
    border-bottom: none;
}

/* Responsive adjustments for new profile page */
@media (max-width: 768px) {
    .profile-container {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1rem;
    }

    .profile-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding-right: 0;
        padding-bottom: 1.5rem;
    }

    .profile-user-search-row {
        flex-direction: column;
    }

    .profile-user-search-button {
        width: 100%;
    }
}


/* --- Video Styling for Blog Posts --- */

.post-video,
.edit-post-video-preview {
    width: 100%;
    /* Makes the video fill its container horizontally */
    max-height: 500px;
    /* Limits the maximum height of the video */
    height: auto;
    /* Maintains aspect ratio */
    object-fit: contain;
    /* Ensures the whole video is visible, letterboxing if necessary */
    display: block;
    /* Removes any extra space below the video */
    background-color: #000;
    /* Adds a black background for any letterboxing */
    border-radius: 8px;
    /* Matches the style of the image container */
    border: 1px solid #eee;
    /* Adds a subtle border */
}

/* Contact Form on About Page */
.contact-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

/* Responsive Styles */

/* Tablet Styles (max-width: 768px) */
@media (max-width: 768px) {

    /* Login Form Responsive Styles */
    .auth-container {
        width: 90vw;
    }

    .auth-forms {
        padding: 1.5rem;
    }

    .navbar {
        flex-direction: column;
        padding: 0.6rem 0.5rem;
        align-items: stretch;
        gap: 0.4rem;
    }

    /* Keep nav-left left-aligned on mobile */
    .nav-left {
        width: 100%;
        justify-content: flex-start;
    }

    /* Display nav links directly in the navbar on mobile - CENTERED */
    .nav-links {
        display: flex;
        flex-direction: row;
        gap: 0.5rem;
        justify-content: center;
        width: 100%;
        white-space: nowrap;
        flex-wrap: nowrap;
    }

    .nav-links a {
        white-space: nowrap;
        flex-shrink: 0;
        font-size: 0.85rem;
        padding: 0.4rem 0.35rem;
    }

    /* Hide Logout from nav-links on mobile — it moves to top row */
    .nav-logout-desktop {
        display: none !important;
    }

    /* Show the mobile Logout in the brand row */
    .nav-logout-mobile {
        display: inline-block !important;
    }

    /* Keep social icons next to brand */
    .nav-socials {
        margin-left: 0.5rem;
    }

    .container {
        padding: 1.5rem;
        /* Reduce padding for tablets */
    }

    /* Add padding to the main content area of the search results page */
    .search-results-page-container {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Add padding to the main content area of the admin dashboard */
    .admin-dashboard-page-container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .blog-container {
        width: 100%;
        padding: 0.5rem;
        margin: 0.5rem 0;
    }

    .blog-header h1 {
        font-size: 1.8rem;
    }

    .post-item {
        padding: 0.8rem;
        margin-bottom: 0.75rem;
    }

    .debate-container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .debate-side {
        padding: 0.75rem;
    }

    .action-cards {
        flex-direction: column;
        gap: 1rem;
    }

    .card {
        padding: 1rem;
    }

    .form-input {
        width: 100%;
    }

    .form-button {
        width: 100%;
    }

    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.35rem;
    }

    .page-item {
        margin: 0.1rem;
    }

    .page-link {
        min-width: 36px;
        height: 36px;
        padding: 0.4rem 0.7rem;
        font-size: 0.85rem;
        border-radius: 6px;
    }
}

/* --- Tabbed Interface for Blog --- */
.tab-container {
    width: 100%;
    margin-top: 2rem;
}

.tab-buttons {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
}

.tab-buttons::-webkit-scrollbar {
    display: none;
}

.tab-buttons .tab-button {
    flex: 1;
    padding: 0.5rem 1.25rem;
    cursor: pointer;
    background-color: transparent;
    border: none;
    font-size: 1.1rem;
    color: #777;
    position: relative;
    top: 2px;
    /* Aligns bottom border with container's border */
    border-bottom: 2px solid transparent;
    transition: color 0.3s, border-color 0.3s;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    justify-content: center;
}

.tab-buttons .tab-button:hover {
    color: var(--primary-dark-color);
}

.tab-buttons .tab-button.active {
    color: var(--primary-color);
    font-weight: 600;
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
    /* Hide all tab content by default */
}

.tab-content.active {
    display: block;
    /* Show only the active tab's content */
}

/* --- Tab Badge for Unread Notifications --- */
.tab-badge {
    background-color: #e53e3e;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 0;
    vertical-align: middle;
    min-width: 18px;
    text-align: center;
}

/* --- Unread Comments Indicator --- */
.post-wrapper {
    position: relative;
}

.post-wrapper.has-unread-comments {
    border-left: 3px solid #e53e3e;
}

.unread-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: #e53e3e;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 10;
}

/* Mobile Styles (max-width: 480px) */
@media (max-width: 480px) {
    body {
        background-attachment: scroll;
    }

    .auth-container {
        width: 95vw;
        margin: 1rem auto;
    }

    .navbar {
        padding: 0.4rem 0.3rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.3rem;
    }

    .nav-links {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.25rem;
        width: 100%;
        justify-content: center;
    }

    .nav-links a {
        font-size: 0.8rem;
        padding: 0.3rem 0.3rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Tab responsiveness on very small screens */
    .tab-buttons .tab-button {
        padding: 0.4rem 0.7rem;
        font-size: 0.95rem;
        flex-shrink: 0;
    }

    .nav-brand {
        font-size: 1.1rem;
        /* Slightly smaller brand on very small screens */
    }

    .nav-logo {
        height: 32px;
        /* Smaller logo on small screens */
    }

    /* Keep brand and socials left-aligned on small screens */
    .nav-left {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        /* Left-align the brand and socials */
        gap: 0.5rem;
    }

    /* Keep socials next to brand */
    .nav-socials {
        display: flex;
        gap: 0.6rem;
        align-items: center;
        margin-left: 0.5rem;
    }

    .nav-socials a {
        font-size: 1.05rem;
        color: white;
    }

    .container {
        padding: 0.5rem;
        /* Consistent padding */
        min-height: 80vh;
        /* Ensure container stretches to cover better part of the screen on mobile */
    }

    .blog-container {
        width: 100%;
        padding: 0.5rem;
        margin: 0.25rem 0;
    }

    .blog-header h1 {
        font-size: 1.5rem;
    }

    .blog-header h4 {
        font-size: 0.9rem;
    }

    .post-item {
        padding: 0.6rem;
        margin-bottom: 0.6rem;
        border-radius: 4px;
        /* slightly reduced radius for edge alignment */
        border-left-width: 3px;
        /* keep accent but slightly smaller */
    }

    .post-meta {
        font-size: 0.8rem;
    }

    .post-actions {
        flex-direction: row;
        /* Keep buttons horizontal */
        flex-wrap: wrap;
        /* Allow buttons to wrap if space is limited */
        align-items: center;
        /* Vertically align items if they wrap */
    }

    /* Adjust admin buttons on blog posts for smaller screens */
    .admin-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .admin-actions .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        text-align: center;
        white-space: nowrap;
    }

    .social-links {
        justify-content: center;
        /* Center the social icons on mobile */
        gap: 2rem;
        /* Add more space between icons */
    }

    .debate-side {
        padding: 0.5rem;
    }

    .comment {
        padding: 0.45rem;
    }

    .action-cards {
        gap: 0.5rem;
    }

    .card h3 {
        font-size: 1.1rem;
    }

    .card p {
        font-size: 0.9rem;
    }

    .form-input {
        height: 35px;
        padding: 8px 15px;
    }

    .form-button {
        height: 35px;
        font-size: 0.9rem;
    }

    /* Allow textareas to have a flexible height on mobile */
    textarea.form-input {
        height: auto;
    }

    .stat-number {
        font-size: 2rem;
        /* Reduce font size for mobile */
    }

    .footer {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .footer-content {
        flex-direction: column;
        justify-content: center;
        gap: 0.5rem;
    }

    .flash-messages {
        padding: 0.5rem;
        top: 5px;
        right: 5px;
    }

    .alert {
        padding: 10px;
        font-size: 0.9rem;
    }
}

/* Compact comment action buttons to match post button colors and conserve space */
.comment-actions button,
.comment-form-container button,
.reply-form button,
.edit-form button,
.comment-actions .action-link {
    /* Also target action links for consistency */
    padding: 4px 8px;
    font-size: 0.75rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

.comment-actions .reply-btn,
.comment-actions .edit-btn,
.comment-actions .delete-comment,
.comment-actions .toggle-replies,
.comment-actions .action-link {
    background: none;
    color: #007bff;
    text-decoration: none;
}

.comment-actions .reply-btn:hover,
.comment-actions .edit-btn:hover,
.comment-actions .delete-comment:hover,
.comment-actions .toggle-replies:hover,
.comment-actions .action-link:hover {
    background: none;
    color: #0056b3;
    text-decoration: underline;
}

/* Ensure comment action buttons are small on very small screens */
@media (max-width: 480px) {
    .comment-actions button {
        padding: 3px 6px;
        font-size: 0.72rem;
    }
}

/* --- Related Posts Section --- */
.related-posts-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.related-posts-section h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-dark-color);
    text-align: center;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.related-post-card {
    background-color: #f9f9f9;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    border-left: 3px solid var(--primary-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.related-post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

/* --- Share Button Styles --- */
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 1rem;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.share-btn:hover {
    color: var(--primary-color);
    background-color: rgba(62, 34, 23, 0.08);
}

.share-btn i {
    font-size: 1.1rem;
}

.share-count {
    font-size: 0.9rem;
}

/* --- Share Modal Styles --- */
.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.share-modal-content {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.share-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #888;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.share-modal-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.share-modal-content h3 {
    margin: 0 0 8px 0;
    color: var(--primary-dark-color);
    font-size: 1.4rem;
}

.share-modal-title {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.4;
}

.share-platforms {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.share-platform-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    border-radius: 10px;
    text-decoration: none;
    color: white;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    gap: 6px;
}

.share-platform-btn i {
    font-size: 1.4rem;
}

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

.share-platform-btn.twitter {
    background: linear-gradient(135deg, #1da1f2, #0d8bd9);
}

.share-platform-btn.facebook {
    background: linear-gradient(135deg, #4267b2, #365899);
}

.share-platform-btn.linkedin {
    background: linear-gradient(135deg, #0077b5, #005885);
}

.share-platform-btn.whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

.share-platform-btn.telegram {
    background: linear-gradient(135deg, #0088cc, #006daa);
}

.share-platform-btn.reddit {
    background: linear-gradient(135deg, #ff4500, #cc3700);
}

.share-platform-btn.email {
    background: linear-gradient(135deg, #666, #444);
}

.share-copy-section {
    border-top: 1px solid #eee;
    padding-top: 16px;
}

.share-copy-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
    font-size: 0.9rem;
}

.share-copy-input-group {
    display: flex;
    gap: 8px;
}

.share-copy-input-group input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    background: #f9f9f9;
    color: #333;
}

.share-copy-input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.share-copy-btn {
    padding: 10px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-copy-btn:hover {
    background: var(--primary-dark-color);
}

@media (max-width: 480px) {
    .share-platforms {
        grid-template-columns: repeat(3, 1fr);
    }

    .share-modal-content {
        padding: 20px;
    }

    .share-platform-btn {
        padding: 10px 6px;
    }

    .share-platform-btn span {
        font-size: 0.65rem;
    }
}

/* Mobile spacing fixes */
@media (max-width: 768px) {
    .container {
        padding: 0.5rem 0;
    }

    .blog-container {
        margin: 0;
        padding: 0.5rem 0;
        border-radius: 0;
    }

    .blog-header {
        margin-bottom: 0.75rem;
        padding: 0 0.5rem 0.5rem;
    }

    .pagination-nav {
        margin-top: 0.75rem;
        padding: 0.5rem 0;
    }

    .post-item {
        margin-bottom: 0.25rem;
        padding: 0.5rem 0.65rem;
        border-radius: 0;
    }

    .posts-section {
        padding: 0;
        margin: 0;
    }

    .content-wrapper {
        padding: 0.5rem 0.5rem !important;
    }

    /* Reduce bottom margin before footer */
    section:last-child,
    .posts-section:last-child,
    .tab-content:last-child {
        margin-bottom: 0.5rem;
    }
}

/* =====================================================
   Post Badges (NEW, HOT, TRENDING)
   ===================================================== */

.post-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.post-badges {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.badge-new {
    background: linear-gradient(135deg, #795548 0%, #3e2217 100%);
    color: white;
    animation: pulse-glow 2s ease-in-out infinite;
}

.badge-hot {
    background: linear-gradient(135deg, #8d6e63 0%, #d84315 100%);
    color: white;
}

.badge-trending {
    background: linear-gradient(135deg, #a1887f 0%, #ff6f00 100%);
    color: white;
}

.badge-pinned {
    background: linear-gradient(135deg, #ffca28 0%, #ff6f00 100%);
    color: #3e2217;
    border: 1px solid #ff6f00;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(102, 126, 234, 0.5);
    }

    50% {
        box-shadow: 0 0 15px rgba(102, 126, 234, 0.8);
    }
}

/* Mobile responsive badges */
@media (max-width: 480px) {
    .post-title-row {
        flex-wrap: wrap;
    }

    .post-badges {
        order: -1;
        width: 100%;
        margin-bottom: 0.25rem;
    }

    .badge {
        font-size: 0.65rem;
        padding: 0.1rem 0.4rem;
    }
}

/* Relative time styling */
.relative-time {
    color: #888;
}

/* Admin Pages Layout */
.admin-page-container {
    padding: 2rem 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .admin-page-container {
        padding: 1.5rem 1rem;
    }
}