/*
Theme Name: Social Feed Blog
Theme URI: https://github.com/yourusername/social-feed-blog
Author: Your Name
Author URI: https://yourwebsite.com
Description: A beautiful social media inspired blog theme with modern design and interactive features.
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: social-feed-blog
Tags: blog, social-media, custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   RESET AND BASE STYLES
   ========================================================================== */

* {
    box-sizing: border-box;
}

html {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: #1f2937;
}

body {
    margin: 0;
    padding: 0;
    background-color: #f3e9fb;
    font-size: 16px;
    line-height: 1.6;
}

/* ==========================================================================
   ADMIN BAR FIXES - CRITICAL
   ========================================================================== */

/* Default state - no admin bar */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #661da8;
    border-bottom: 1px solid #501683;
    z-index: 999;
    height: 64px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.site-main {
    padding-top: 64px;
    min-height: 100vh;
}

/* When admin bar is present */
body.admin-bar .site-header {
    top: 32px;
}

body.admin-bar .site-main {
    padding-top: 96px; /* 64px header + 32px admin bar */
}

/* Mobile admin bar adjustments */
@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
    
    body.admin-bar .site-main {
        padding-top: 110px; /* 64px header + 46px admin bar */
    }
}

/* Ensure admin bar doesn't interfere with our layout */
#wpadminbar {
    z-index: 99999 !important;
}

/* ==========================================================================
   HEADER LAYOUT - FULLY RESPONSIVE WITH COMPACT MOBILE
   ========================================================================== */

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    min-width: 0; /* Allow flex shrinking */
}

.site-branding {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.site-title {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.site-title:hover {
    opacity: 0.8;
}

.header-search {
    flex: 1;
    max-width: 400px;
}

.search-form {
    position: relative;
    width: 100%;
}

.search-field {
    width: 100%;
    background: #501683;
    color: white;
    border: 1px solid #661da8;
    border-radius: 24px;
    padding: 10px 16px 10px 44px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.search-field:focus {
    outline: none;
    border-color: #f3e9fb;
    box-shadow: 0 0 0 3px rgba(243, 233, 251, 0.3);
    background: #661da8;
}

.search-field::placeholder {
    color: #d8b4fe;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #d8b4fe;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.login-button,
.logout-button {
    background: #501683;
    color: white;
    border: 1px solid #661da8;
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.login-button:hover,
.logout-button:hover {
    background: white;
    color: #661da8;
    transform: translateY(-1px);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-name {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

/* ==========================================================================
   MAIN CONTENT LAYOUT - OPTIMIZED SPACING
   ========================================================================== */

.content-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.main-content {
    width: 100%;
}

/* ==========================================================================
   POST EDITOR - RESPONSIVE WITH SMART CATEGORY DROPDOWN
   ========================================================================== */

.post-editor {
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
    overflow: visible;
    border: 1px solid #f3f4f6;
    position: relative;
    z-index: 1;
}

.post-editor-content {
    padding: 1.5rem;
}

.post-editor textarea {
    width: 100%;
    min-height: 100px;
    border: none;
    resize: none;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.6;
    outline: none;
    color: #1f2937;
    overflow: hidden; /* Hide scrollbar for auto-expansion */
}

.post-editor textarea::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.post-editor-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-top: 1px solid #f3f4f6;
    background: #fafbfc;
    position: relative;
    z-index: 2;
    overflow: visible;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.post-editor-tools {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    position: relative;
    z-index: 3;
    flex-wrap: wrap;
}

/* HIDDEN FILE INPUT - COMPLETELY INVISIBLE */
.image-upload-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    overflow: hidden;
    z-index: -1;
}

/* BEAUTIFUL UPLOAD ICON BUTTON */
.image-upload-button {
    background: none;
    border: none;
    color: #6b7280;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    position: relative;
    flex-shrink: 0;
}

.image-upload-button:hover {
    background: #f3f4f6;
    color: #661da8;
    transform: scale(1.05);
}

.image-upload-button:active {
    transform: scale(0.95);
}

.image-upload-button svg {
    width: 20px;
    height: 20px;
}

/* CATEGORY DROPDOWN - SMART POSITIONING */
.category-dropdown-container {
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

/* ACTIVE STATE: High z-index only when dropdown is open */
.category-dropdown-container.active {
    z-index: 99999;
}

.category-dropdown-trigger {
    background: none;
    border: none;
    color: #6b7280;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    height: 40px;
    position: relative;
    z-index: 1;
    white-space: nowrap;
    min-width: 100px;
}

.category-dropdown-trigger:hover {
    background: #f3f4f6;
    color: #661da8;
}

.category-dropdown-arrow {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.category-dropdown-trigger:hover .category-dropdown-arrow {
    transform: rotate(180deg);
}

.category-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    z-index: 99999;
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    margin-top: 4px;
}

.category-dropdown-menu.hidden {
    display: none !important;
}

.category-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px;
    border-bottom: 1px solid #f9fafb;
}

.category-dropdown-item:last-child {
    border-bottom: none;
}

.category-dropdown-item:hover {
    background: #f3e9fb;
    color: #661da8;
}

.category-dropdown-item:first-child {
    border-radius: 12px 12px 0 0;
}

.category-dropdown-item:last-child {
    border-radius: 0 0 12px 12px;
}

.category-dropdown-item small {
    color: #9ca3af;
    font-size: 12px;
}

.category-dropdown-item:hover small {
    color: #a855f7;
}

.image-preview-container {
    margin-top: 1rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.image-preview {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    background: #f9fafb;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: background-color 0.2s;
}

.image-preview-remove:hover {
    background: rgba(239, 68, 68, 0.8);
}

.post-button {
    background: #661da8;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0 2px 4px rgba(102, 29, 168, 0.2);
    flex-shrink: 0;
    white-space: nowrap;
}

.post-button:hover {
    background: #501683;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 29, 168, 0.3);
}

.post-button:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.post-button.loading {
    color: transparent;
}

.post-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ==========================================================================
   POST CARDS WITH OPTIMIZED SPACING
   ========================================================================== */

.posts-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.post-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.2s ease;
    border: 1px solid #f3f4f6;
}

.post-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem 0;
}

.post-author-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.post-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f3f4f6;
}

.post-author-details h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.post-author-link {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s;
}

.post-author-link:hover {
    color: #661da8;
}

.post-date {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
    font-weight: 400;
}

.post-menu-container {
    position: relative;
}

.post-menu-trigger {
    background: none;
    border: none;
    color: #9ca3af;
    padding: 6px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-menu-trigger:hover {
    background: #f3f4f6;
    color: #6b7280;
}

.post-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 10;
    min-width: 180px;
    overflow: hidden;
    border: 1px solid #f3f4f6;
}

.post-menu.hidden {
    display: none;
}

.post-menu-item {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    text-align: left;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.post-menu-item:hover {
    background: #f9fafb;
    color: #661da8;
}

.delete-post-btn:hover {
    background: #fef2f2;
    color: #dc2626;
}

.post-content {
    padding: 0.75rem 1.5rem;
}

/* HIDE POST TITLE - ONLY SHOW CONTENT */
.post-title {
    display: none !important;
}

.post-excerpt {
    margin: 0;
    color: #4b5563;
    line-height: 1.6;
    font-size: 15px;
}

/* Image Carousel - FIXED FOR FULL IMAGE DISPLAY */
.post-image-container {
    position: relative;
    width: 100%;
}

.post-image-carousel {
    position: relative;
    overflow: hidden;
    background: #f9fafb;
}

.post-image-slides {
    display: flex;
    transition: transform 0.3s ease;
}

.post-image-slide {
    flex: 0 0 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    max-height: 600px;
}

.post-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 600px;
    object-fit: contain; /* FIXED: Show full image instead of cropping */
    display: block;
    background: #f9fafb;
}

.post-image.loading {
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    min-height: 200px;
}

.post-image.error {
    background: #fef2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
    min-height: 200px;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
}

.carousel-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav.prev {
    left: 12px;
}

.carousel-nav.next {
    right: 12px;
}

.carousel-indicators {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.carousel-indicator.active {
    background: white;
    transform: scale(1.2);
}

/* ==========================================================================
   POST ACTIONS - OPTIMIZED SPACING
   ========================================================================== */

.post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    border-top: 1px solid #f3f4f6;
}

.post-actions-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.action-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    padding: 6px 12px;
    border-radius: 20px;
}

.action-button:hover {
    background: #f3e9fb;
    color: #661da8;
}

.action-button.loading {
    pointer-events: none;
    opacity: 0.6;
}

.action-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border: 1px solid transparent;
    border-top: 1px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.action-button svg {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   INFINITE SCROLL LOADING
   ========================================================================== */

.loading-posts {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.loading-posts.hidden {
    display: none;
}

.loading-posts .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #661da8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.no-more-posts {
    text-align: center;
    padding: 1.5rem;
    color: #9ca3af;
    font-size: 14px;
    margin-top: 1.5rem;
}

/* ==========================================================================
   SINGLE POST SPACING
   ========================================================================== */

.comments-section-wrapper {
    margin-top: 1.5rem;
}

/* ==========================================================================
   MODERN COMMENT SYSTEM WITH OPTIMIZED SPACING
   ========================================================================== */

.comments-area {
    border-top: 1px solid #f3f4f6;
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid #f3f4f6;
    overflow: hidden;
}

/* Comment Editor - Modern Design with Auto-Expansion */
.comment-editor {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.comment-editor-form {
    position: relative;
}

.comment-editor-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
    background: #f9fafb;
    resize: none;
    min-height: 44px;
    max-height: 120px;
    font-family: inherit;
    line-height: 1.4;
    overflow: hidden; /* Hide scrollbar for auto-expansion */
}

.comment-editor-input:focus {
    border-color: #661da8;
    box-shadow: 0 0 0 3px rgba(102, 29, 168, 0.1);
    background: white;
}

.comment-editor-input::placeholder {
    color: #9ca3af;
}

/* HIDDEN POST BUTTON - COMPLETELY INVISIBLE */
.comment-submit-button {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

/* Enter to submit hint */
.comment-editor::after {
    content: "Press Enter to post";
    position: absolute;
    bottom: 0.5rem;
    right: 1rem;
    font-size: 11px;
    color: #9ca3af;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.comment-editor-input:focus + .comment-submit-button + ::after,
.comment-editor.focused::after {
    opacity: 1;
}

/* Comments List - OPTIMIZED SPACING */
.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f9fafb;
}

.comment:last-child {
    border-bottom: none;
}

.comment-body {
    display: flex;
    gap: 0.75rem;
}

.comment-meta .avatar,
.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #f3f4f6;
}

.comment-content-wrapper {
    flex: 1;
    min-width: 0;
}

.comment-bubble {
    background: #f9fafb;
    border-radius: 16px;
    padding: 12px 16px;
    margin-bottom: 6px;
    border: 1px solid #f3f4f6;
}

.comment-author {
    margin: 0 0 4px 0;
    font-size: 13px;
    font-weight: 600;
}

.comment-author a,
.comment-author .fn {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s;
}

.comment-author a:hover,
.comment-author .fn:hover {
    color: #661da8;
}

.comment-text,
.comment-content {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: #374151;
}

.comment-metadata {
    margin: 0;
    font-size: 12px;
    color: #9ca3af;
    padding-left: 16px;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.comment-metadata a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s;
}

.comment-metadata a:hover {
    color: #6b7280;
}

.comment-reply-button {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 12px;
    cursor: pointer;
    transition: color 0.2s;
    padding: 2px 6px;
    border-radius: 12px;
}

.comment-reply-button:hover {
    color: #661da8;
    background: #f3f4f6;
}

/* Comment Reply Form with Auto-Expansion */
.comment-reply-form {
    margin-top: 0.75rem;
    padding-left: 16px;
}

.comment-reply-form.hidden {
    display: none;
}

.reply-form {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.reply-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    font-size: 13px;
    outline: none;
    transition: all 0.2s ease;
    background: #f9fafb;
    resize: none;
    min-height: 32px;
    max-height: 80px;
    font-family: inherit;
    line-height: 1.3;
    overflow: hidden; /* Hide scrollbar for auto-expansion */
}

.reply-input:focus {
    border-color: #661da8;
    box-shadow: 0 0 0 2px rgba(102, 29, 168, 0.1);
    background: white;
}

.reply-submit-button {
    background: #661da8;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.reply-submit-button:hover {
    background: #501683;
}

/* Nested Comments */
.children {
    margin-left: 2.5rem;
    list-style: none;
    padding: 0;
    margin-top: 0.75rem;
}

/* Load More Comments - ENHANCED WITH PROPER STATES */
.load-more-comments {
    padding: 1rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid #f9fafb;
    background: #fafbfc;
}

.load-more-comments-btn {
    background: none;
    border: none;
    color: #661da8;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.2s;
    position: relative;
}

.load-more-comments-btn:hover {
    background: #f3e9fb;
}

.load-more-comments-btn.loading {
    opacity: 0.6;
    pointer-events: none;
    color: transparent;
}

.load-more-comments-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid #661da8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Empty Comments State */
.comments-empty-state {
    padding: 2rem;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
    background: #fafbfc;
}

.comment-count-display {
    padding: 1rem 1.5rem;
    font-size: 13px;
    color: #6b7280;
    text-align: center;
    border-bottom: 1px solid #f9fafb;
    background: #fafbfc;
}

.comment-count-display a {
    color: #661da8;
    text-decoration: none;
    font-weight: 500;
}

.comment-count-display a:hover {
    text-decoration: underline;
}

/* WordPress Default Comment Styles Override */
.comments-title {
    display: none;
}

.comment-form {
    display: none;
}

.comment-navigation {
    display: none;
}

.no-comments {
    display: none;
}

/* ==========================================================================
   MODAL STYLES - PURPLE THEME
   ========================================================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid #f3f4f6;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 2rem 0;
}

.modal-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #661da8;
}

.modal-close {
    background: #f3f4f6;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #e5e7eb;
    color: #374151;
}

.modal-form {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.2s;
    background: #f9fafb;
}

.form-input:focus {
    outline: none;
    border-color: #661da8;
    box-shadow: 0 0 0 3px rgba(102, 29, 168, 0.1);
    background: white;
}

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

.form-submit {
    background: #661da8;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(102, 29, 168, 0.2);
}

.form-submit:hover {
    background: #501683;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 29, 168, 0.3);
}

.form-link {
    color: #661da8;
    text-decoration: none;
    font-size: 14px;
    text-align: center;
    font-weight: 500;
}

.form-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   FOOTER - WORDPRESS MENU SUPPORT
   ========================================================================== */

.site-footer {
    text-align: center;
    padding: 2.5rem 1rem 2rem;
    color: #6b7280;
    font-size: 13px;
    margin-top: 3rem;
    background: white;
    border-top: 1px solid #f3f4f6;
}

/* WordPress Footer Menu Support - NO LIST DOTS */
.footer-menu {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-menu ul {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 0;
    padding: 0;
    list-style: none; /* CRITICAL: Remove list dots */
    flex-wrap: wrap;
}

.footer-menu li {
    margin: 0;
    padding: 0;
    list-style: none; /* CRITICAL: Remove list dots */
}

.footer-menu a {
    color: #6b7280;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s;
    padding: 4px 8px;
    border-radius: 8px;
    display: block;
}

.footer-menu a:hover {
    color: #661da8;
    background: #f3e9fb;
}

/* ==========================================================================
   PAGINATION - PURPLE THEME
   ========================================================================== */

.pagination {
    margin-top: 2.5rem;
    text-align: center;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.page-numbers li {
    margin: 0;
}

.page-numbers a,
.page-numbers span {
    display: inline-block;
    padding: 10px 14px;
    background: white;
    color: #6b7280;
    text-decoration: none;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
    font-weight: 500;
    min-width: 44px;
    text-align: center;
}

.page-numbers a:hover {
    background: #661da8;
    color: white;
    border-color: #661da8;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(102, 29, 168, 0.2);
}

.page-numbers .current {
    background: #661da8;
    color: white;
    border-color: #661da8;
    box-shadow: 0 2px 4px rgba(102, 29, 168, 0.2);
}

/* ==========================================================================
   SINGLE POST PAGE SPECIFIC STYLES
   ========================================================================== */

/* HIDE TITLE ON SINGLE POST TOO FOR CONSISTENCY */
.single .post-title {
    display: none !important;
}

/* Full content on single post */
.post-full-content {
    margin: 0;
    color: #4b5563;
    line-height: 1.6;
    font-size: 16px;
}

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

.post-full-content h1,
.post-full-content h2,
.post-full-content h3,
.post-full-content h4,
.post-full-content h5,
.post-full-content h6 {
    color: #1f2937;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

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

.post-full-content blockquote {
    border-left: 4px solid #661da8;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #6b7280;
}

/* ==========================================================================
   SCROLL TO TOP BUTTON - PERFECT ALIGNMENT
   ========================================================================== */

.scroll-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: #661da8;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.scroll-to-top svg {
    width: 20px;
    height: 20px;
    margin: 0; /* PERFECT CENTERING */
    padding: 0;
}

.scroll-to-top:hover {
    background: #501683;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 12px -2px rgba(0, 0, 0, 0.15), 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   RESPONSIVE DESIGN - MOBILE FIRST APPROACH
   ========================================================================== */

@media (max-width: 768px) {
    .content-container {
        padding: 1rem;
    }
    
    /* COMPACT MOBILE HEADER - SINGLE LINE */
    .header-container {
        padding: 0 1rem;
        gap: 0.75rem;
        height: 64px;
    }
    
    .header-left {
        gap: 0.75rem;
        min-width: 0;
    }
    
    .site-title {
        font-size: 1.125rem;
        white-space: nowrap;
    }
    
    .header-search {
        flex: 1;
        min-width: 120px;
    }
    
    .search-field {
        padding: 6px 10px 6px 32px;
        font-size: 13px;
        border-radius: 20px;
    }
    
    .search-icon {
        left: 10px;
        width: 16px;
        height: 16px;
    }
    
    .user-actions {
        flex-shrink: 0;
    }
    
    .login-button,
    .logout-button {
        padding: 6px 14px;
        font-size: 13px;
        border-radius: 16px;
    }
    
    .user-name {
        font-size: 13px;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* POST EDITOR MOBILE RESPONSIVENESS */
    .post-editor-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .post-editor-tools {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .post-button {
        width: 100%;
        justify-content: center;
    }
    
    /* CATEGORY DROPDOWN MOBILE POSITIONING */
    .category-dropdown-menu {
        position: fixed;
        top: auto !important;
        left: 50% !important;
        transform: translateX(-50%);
        bottom: 120px;
        min-width: 280px;
        max-width: calc(100vw - 2rem);
    }
    
    .post-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .post-actions-left {
        justify-content: space-around;
    }
    
    .footer-menu,
    .footer-menu ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    .children {
        margin-left: 1.5rem;
    }
    
    .carousel-nav {
        width: 32px;
        height: 32px;
    }
    
    .carousel-nav.prev {
        left: 8px;
    }
    
    .carousel-nav.next {
        right: 8px;
    }
    
    .modal-content {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
    
    .modal-header,
    .modal-form {
        padding: 1.5rem;
    }
    
    .post-editor-content,
    .post-content,
    .post-actions,
    .comment-editor,
    .comment {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 480px) {
    /* ULTRA COMPACT MOBILE */
    .header-container {
        padding: 0 0.75rem;
        gap: 0.5rem;
    }
    
    .site-title {
        font-size: 1rem;
    }
    
    .header-search {
        min-width: 100px;
    }
    
    .search-field {
        padding: 5px 8px 5px 28px;
        font-size: 12px;
    }
    
    .search-icon {
        left: 8px;
        width: 14px;
        height: 14px;
    }
    
    .login-button,
    .logout-button {
        padding: 5px 12px;
        font-size: 12px;
    }
    
    .user-name {
        font-size: 12px;
        max-width: 60px;
    }
    
    /* CATEGORY DROPDOWN ULTRA MOBILE */
    .category-dropdown-menu {
        min-width: 260px;
        bottom: 100px;
    }
    
    .post-editor-tools {
        gap: 0.25rem;
    }
    
    .category-dropdown-trigger {
        min-width: 80px;
        font-size: 12px;
        padding: 6px 8px;
    }
    
    .image-upload-button {
        width: 36px;
        height: 36px;
    }
    
    .post-button {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ==========================================================================
   WORDPRESS SPECIFIC
   ========================================================================== */

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 13px;
    color: #6b7280;
    text-align: center;
    margin-top: 0.5rem;
}

.alignleft {
    float: left;
    margin: 0 1rem 1rem 0;
}

.alignright {
    float: right;
    margin: 0 0 1rem 1rem;
}

.aligncenter {
    display: block;
    margin: 0 auto;
}

.sticky {
    /* Styles for sticky posts */
}

.bypostauthor {
    /* Styles for posts by the post author */
}

/* Clear floats */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* ==========================================================================
   MODERN ENHANCEMENTS
   ========================================================================== */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
*:focus-visible {
    outline: 2px solid #661da8;
    outline-offset: 2px;
}

/* Selection styles */
::selection {
    background: rgba(102, 29, 168, 0.2);
    color: #1f2937;
}

/* Scrollbar styles for webkit browsers */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}