﻿/* Community Desktop Layout - Modern Social Media Inspired */
:root {
    --brand-red: #DC2626;
    --brand-red-dark: #B91C1C;
    --brand-red-light: #FEE2E2;
    --accent-purple: #8B5CF6;
    --accent-orange: #F97316;
    --sidebar-width: 280px;
    --main-content-width: 600px;
    --right-sidebar-width: 320px;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Desktop Layout Container */
.desktop-layout {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    gap: 0;
    padding: 0;
    min-height: 100vh;
    background: var(--bg-secondary);
}

/* Left Sidebar */
.left-sidebar {
    width: var(--sidebar-width);
    position: sticky;
    top: 100px;
    /* Account for fixed header */
    height: calc(100vh - 100px);
    /* Full height minus header */
    overflow-y: auto;
    background: var(--bg-primary);
    border-radius: 0;
    padding: 1.5rem 1rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    border-left: none;
    border-top: none;
    border-bottom: none;
    margin-top: 0;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.025em;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: block;
    visibility: visible;
}

.sidebar-nav-item {
    margin-bottom: 0.25rem;
    display: block;
    visibility: visible;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 0.9375rem;
    position: relative;
    overflow: hidden;
}

.sidebar-nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--brand-red), var(--accent-purple));
    transition: width 0.3s ease;
    z-index: -1;
}

.sidebar-nav-link:hover {
    color: var(--brand-red);
    background: var(--brand-red-light);
    transform: translateX(4px);
}

.sidebar-nav-link:hover::before {
    width: 4px;
}

.sidebar-nav-link.active {
    background: linear-gradient(135deg, var(--brand-red), var(--brand-red-dark));
    color: white;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.sidebar-nav-link.active::before {
    width: 100%;
}

.sidebar-nav-link.active .sidebar-nav-icon {
    color: white;
}

.sidebar-nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Sidebar Navigation - Horizontal Chips */
.sidebar-nav-horizontal {
    display: flex !important;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    visibility: visible !important;
    opacity: 1 !important;
}

.sidebar-nav-chip {
    display: inline-flex !important;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    visibility: visible !important;
    opacity: 1 !important;
}

.sidebar-nav-chip::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--brand-red), var(--accent-purple));
    transition: width 0.3s ease;
    z-index: -1;
}

.sidebar-nav-chip:hover {
    color: var(--brand-red);
    background: var(--brand-red-light);
    border-color: var(--brand-red);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.sidebar-nav-chip:hover::before {
    width: 100%;
}

.sidebar-nav-chip.active {
    background: linear-gradient(135deg, var(--brand-red), var(--brand-red-dark));
    color: white;
    font-weight: 600;
    border-color: var(--brand-red);
    box-shadow: var(--shadow-md);
}

.sidebar-nav-chip.active::before {
    width: 100%;
}

/* Responsive adjustments for horizontal navigation */
@media (max-width: 1200px) {
    .sidebar-nav-horizontal {
        gap: 0.375rem;
    }

    .sidebar-nav-chip {
        padding: 0.375rem 0.75rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 768px) {
    .sidebar-nav-horizontal {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
    }

    .sidebar-nav-chip {
        justify-content: center;
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* Main Content Area */
.main-content {
    flex: 1;
    max-width: var(--main-content-width);
    min-width: 0;
    background: transparent;
    padding: 0;
}

/* Right Sidebar */
.right-sidebar {
    width: var(--right-sidebar-width);
    position: sticky;
    top: 0;
    height: fit-content;
}

.widget {
    background: var(--bg-primary);
    border-radius: 0;
    padding: 1.5rem 1rem;
    margin-bottom: 0;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    border-right: none;
    border-top: none;
    border-bottom: none;
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.025em;
}

/* Mobile Header Styles */
.mobile-header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.875rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.mobile-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    max-width: 100%;
    margin: 0 auto;
    flex-wrap: nowrap;
}

.mobile-logo {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--brand-red);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    letter-spacing: -0.025em;
    flex-shrink: 0;
}

.mobile-search {
    flex: 1;
    position: relative;
    max-width: 250px;
    min-width: 120px;
}

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

.mobile-search input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 50px;
    font-size: 0.875rem;
    outline: none;
    transition: all 0.2s;
    background: #f8fafc;
}

.mobile-search input:focus {
    border-color: var(--brand-red);
    background: white;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.mobile-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    width: 16px;
    height: 16px;
    pointer-events: none;
}

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

.mobile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
    border: 2px solid var(--border-light);
    background: white;
    color: var(--text-secondary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mobile-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    border-color: var(--brand-red);
    color: var(--brand-red);
}

.mobile-btn.primary {
    background: linear-gradient(135deg, var(--brand-red), var(--brand-red-dark));
    color: white;
    border-color: var(--brand-red);
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

.mobile-btn.primary:hover {
    background: linear-gradient(135deg, var(--brand-red-dark), #991B1B);
    box-shadow: 0 3px 8px rgba(220, 38, 38, 0.4);
    color: white;
}

/* Responsive adjustments for mobile header */
@media (max-width: 640px) {
    .mobile-header {
        padding: 0.75rem 0.875rem;
    }

    .mobile-header-content {
        gap: 0.5rem;
    }

    .mobile-search {
        max-width: 180px;
        min-width: 100px;
    }

    .mobile-search input {
        padding: 0.5rem 0.75rem 0.5rem 2rem;
        font-size: 0.8125rem;
    }

    .mobile-search-icon {
        width: 14px;
        height: 14px;
        left: 0.625rem;
    }

    .mobile-logo {
        font-size: 1rem;
    }

    .mobile-btn {
        width: 36px;
        height: 36px;
    }
}

/* Mobile Story Header (for story detail page) */
.mobile-story-header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.875rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-story-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.2s;
}

.mobile-story-logo:hover {
    color: var(--brand-red);
}

.mobile-story-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-story-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
    border: 2px solid var(--border-light);
    background: white;
    color: var(--text-secondary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.mobile-story-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    border-color: var(--brand-red);
    color: var(--brand-red);
}

.mobile-story-btn.primary {
    background: linear-gradient(135deg, var(--brand-red), var(--brand-red-dark));
    color: white;
    border-color: var(--brand-red);
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

.mobile-story-btn.primary:hover {
    background: linear-gradient(135deg, var(--brand-red-dark), #991B1B);
    box-shadow: 0 3px 8px rgba(220, 38, 38, 0.4);
    color: white;
}

@media (max-width: 640px) {
    .mobile-story-header {
        padding: 0.75rem 0.875rem;
    }

    .mobile-story-btn {
        width: 36px;
        height: 36px;
    }
}

/* Bottom Navigation (Mobile) */
.bottom-nav {
    background: white;
    border-top: 1px solid #e2e8f0;
    padding: 0.875rem 1rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.bottom-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: 50px;
    background: transparent;
    border: 2px solid var(--border-medium);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
    flex: 1;
    justify-content: center;
}

.bottom-nav-btn:hover:not([style*="cursor: not-allowed"]) {
    color: var(--brand-red);
    background: var(--brand-red-light);
    border-color: var(--brand-red);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.2);
}

.bottom-nav-btn.nav-center {
    flex: 1.5;
}

@media (max-width: 640px) {
    .bottom-nav {
        padding: 0.75rem 0.875rem;
        gap: 0.5rem;
    }

    .bottom-nav-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }
}

@media (min-width: 1024px) {

    .mobile-story-header,
    .bottom-nav {
        display: none !important;
    }
}

@media (max-width: 640px) {
    .mobile-header {
        padding: 0.75rem 0.875rem;
    }

    .mobile-header-content {
        gap: 0.5rem;
    }

    .mobile-search {
        max-width: 180px;
        min-width: 100px;
    }

    .mobile-search input {
        padding: 0.5rem 0.75rem 0.5rem 2rem;
        font-size: 0.8125rem;
    }

    .mobile-search-icon {
        width: 14px;
        height: 14px;
        left: 0.625rem;
    }

    .mobile-logo {
        font-size: 1rem;
    }

    .mobile-btn {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 400px) {
    .mobile-header-content {
        gap: 0.375rem;
    }

    .mobile-search {
        max-width: 140px;
        min-width: 80px;
    }

    .mobile-logo {
        font-size: 0.9375rem;
    }
}

/* Desktop Header Navigation */
.desktop-header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 0;
    margin-bottom: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.header-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--brand-red);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-search {
    flex: 1;
    max-width: 500px;
    margin: 0 2rem;
    position: relative;
}

.header-search input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 0.9375rem;
    outline: none;
    transition: all 0.2s;
}

.header-search input:focus {
    border-color: var(--brand-red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.header-search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    width: 18px;
    height: 18px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-btn {
    padding: 0.625rem 1.25rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-btn.primary {
    background: linear-gradient(135deg, var(--brand-red), var(--brand-red-dark));
    color: white;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.header-btn.secondary {
    background: transparent;
    color: var(--brand-red);
    border: 2px solid var(--brand-red);
}

.header-btn:hover {
    transform: translateY(-1px);
}

/* Story Cards - Modern Social Media Style - Compact Desktop Layout */
.story-card,
.story-card-desktop {
    background: var(--bg-primary);
    border-radius: 0;
    padding: 1rem;
    margin-bottom: 0;
    box-shadow: none;
    border: 1px solid var(--border-light);
    border-top: none;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.story-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-red), var(--accent-purple), var(--accent-orange));
    transform: scaleX(0);
    transition: transform 0.3s ease;
    z-index: 1;
}

.story-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-red-light);
    transform: translateY(-2px);
}

.story-card:hover::before {
    transform: scaleX(1);
}

.story-card.featured {
    border: 2px solid var(--accent-orange);
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.05), rgba(139, 92, 246, 0.05));
}

.story-card.featured::before {
    background: linear-gradient(90deg, var(--accent-orange), var(--accent-purple));
    transform: scaleX(1);
    z-index: 1;
}

.story-header,
.story-header-desktop {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 2;
}

.story-avatar,
.story-avatar-desktop {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-red), var(--accent-purple));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
    border: 3px solid white;
}

.story-author-info,
.story-meta {
    flex: 1;
    min-width: 0;
}

.story-author-name,
.desktop-layout .story-meta h3 {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.9375rem;
    margin: 0 0 0.25rem 0;
    letter-spacing: -0.01em;
}

.story-date,
.story-date-desktop {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
    font-weight: 400;
}

.story-title,
.story-title-desktop {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.4;
    letter-spacing: -0.025em;
    position: relative;
    z-index: 2;
}

.story-content-desktop,
.story-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
    letter-spacing: -0.01em;
    position: relative;
    z-index: 2;
}

/* Story Read More Section - Below Content */
.story-read-more {
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
    margin-top: 1rem;
    text-align: right;
}

.story-read-more .read-more-link {
    color: var(--brand-red);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8125rem;
    padding: 0.375rem 0.5rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 102;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
}

.story-read-more .read-more-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--brand-red);
    transition: width 0.3s ease;
    z-index: -1;
}

.story-read-more .read-more-link:hover {
    color: white;
    transform: translateX(4px);
    z-index: 103;
}

.story-read-more .read-more-link:hover::before {
    width: 100%;
}

/* Story Actions at Top - Compact Layout */
.story-actions-top {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 100;
    background: var(--bg-primary);
}

.story-actions-top .story-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    z-index: 101;
}

.story-actions-top .action-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.8125rem;
    cursor: pointer;
    padding: 0.375rem 0.5rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    z-index: 102;
    min-height: 36px;
    min-width: 36px;
    white-space: nowrap;
}

.story-actions-top .action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--brand-red-light);
    transition: width 0.3s ease;
    z-index: -1;
}

.story-actions-top .action-btn:hover {
    color: var(--brand-red);
    background: var(--brand-red-light);
    transform: translateY(-1px);
    z-index: 103;
}

.story-actions-top .action-btn:hover::before {
    width: 100%;
}

.story-actions-top .read-more-link {
    color: var(--brand-red);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8125rem;
    padding: 0.375rem 0.5rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 102;
    min-height: 36px;
    display: flex;
    align-items: center;
}

.story-actions-top .read-more-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--brand-red);
    transition: width 0.3s ease;
    z-index: -1;
}

.story-actions-top .read-more-link:hover {
    color: white;
    transform: translateX(4px);
    z-index: 103;
}

.story-actions-top .read-more-link:hover::before {
    width: 100%;
}

/* Ensure forms in top actions work properly */
.story-actions-top form {
    display: inline-block;
    position: relative;
    z-index: 102;
}

.story-actions-top form button {
    position: relative;
    z-index: 103;
    pointer-events: auto !important;
}

/* Fixed Desktop Story Footer and Actions - Enhanced Z-Index */
.story-actions-desktop,
.story-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-light);
    position: relative;
    z-index: 100;
    background: var(--bg-primary);
}

.story-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    z-index: 101;
}

/* Desktop Action Buttons - Fixed Positioning with High Z-Index */
.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.625rem 1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    z-index: 102;
    min-height: 44px;
    min-width: 44px;
    white-space: nowrap;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--brand-red-light);
    transition: width 0.3s ease;
    z-index: -1;
}

.action-btn:hover {
    color: var(--brand-red);
    background: var(--brand-red-light);
    transform: translateY(-1px);
    z-index: 103;
}

.action-btn:hover::before {
    width: 100%;
}

.action-btn.liked {
    color: var(--brand-red);
    background: var(--brand-red-light);
}

.action-btn.liked::before {
    width: 100%;
}

/* Read More Link - Fixed Positioning with High Z-Index */
.read-more-link {
    color: var(--brand-red);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 102;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.read-more-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--brand-red);
    transition: width 0.3s ease;
    z-index: -1;
}

.read-more-link:hover {
    color: white;
    transform: translateX(4px);
    z-index: 103;
}

.read-more-link:hover::before {
    width: 100%;
}

/* Engagement Buttons - Modern Interactive Design - Fixed Desktop */
.story-engagement,
.engagement-btn,
.mobile-engagement-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.625rem 1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    z-index: 12;
    min-height: 44px;
    min-width: 44px;
    white-space: nowrap;
}

.engagement-btn::before,
.mobile-engagement-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--brand-red-light);
    transition: width 0.3s ease;
    z-index: -1;
}

.engagement-btn:hover,
.mobile-engagement-btn:hover {
    color: var(--brand-red);
    background: var(--brand-red-light);
    transform: translateY(-1px);
}

.engagement-btn:hover::before,
.mobile-engagement-btn:hover::before {
    width: 100%;
}

.engagement-btn.liked {
    color: var(--brand-red);
    background: var(--brand-red-light);
}

.engagement-btn.liked::before {
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-btn,
.bottom-nav-btn {
    flex-shrink: 0;
    min-width: 44px;
    min-height: 44px;
    white-space: nowrap;
}

@media (max-width: 640px) {

    .story-nav,
    .bottom-nav {
        justify-content: center;
        gap: 0.75rem;
    }

    .nav-btn,
    .bottom-nav-btn {
        padding: 0.625rem 1rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {

    .nav-btn,
    .bottom-nav-btn {
        /* Remove circular pill look on very small screens */
        padding: 0.5rem 0.75rem;
        min-width: auto;
        max-width: none;
        border-radius: 8px;
    }

    .nav-text,
    .bottom-nav-text {
        /* Keep labels visible on mobile so buttons look like normal links */
        display: inline;
    }
}

/* Comment action fixes */
.comment-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.comment-action-btn {
    flex-shrink: 0;
    min-width: 36px;
    min-height: 36px;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .comment-actions {
        gap: 0.5rem;
    }

    .comment-action-btn {
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
        min-width: 60px;
    }
}

/* Prevent text overflow in buttons */
.action-btn,
.mobile-engagement-btn,
.engagement-btn,
.nav-btn,
.bottom-nav-btn,
.comment-action-btn {
    text-overflow: ellipsis;
    overflow: hidden;
}

/* Ensure proper touch targets */
@media (max-width: 768px) {

    .action-btn,
    .mobile-engagement-btn,
    .engagement-btn,
    .nav-btn,
    .bottom-nav-btn,
    .comment-action-btn {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
}

/* Fix author info layout on mobile */
.story-author-info,
.mobile-story-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .story-author-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* Fix navigation tab overlapping issues */
.mobile-nav {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
    padding: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
    z-index: 10;
}

.mobile-nav::-webkit-scrollbar {
    display: none;
}

.mobile-nav-tabs {
    display: flex;
    min-width: max-content;
    padding: 0 1rem;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0;
    list-style: none;
}

.mobile-nav-tab {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    min-width: max-content;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    background: transparent;
    position: relative;
}

.mobile-nav-tab.active {
    border-bottom-color: var(--brand-red);
    color: var(--brand-red);
    font-weight: 600;
    background: rgba(220, 38, 38, 0.05);
}

.mobile-nav-tab:hover {
    color: var(--brand-red);
    background: rgba(220, 38, 38, 0.05);
}

/* Mobile navigation responsive fixes */
@media (max-width: 640px) {
    .mobile-nav-tabs {
        padding: 0 0.75rem;
        justify-content: flex-start;
        gap: 0.125rem;
    }

    .mobile-nav-tab {
        padding: 0.875rem 0.75rem;
        font-size: 0.8125rem;
        min-width: auto;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .mobile-nav-tabs {
        padding: 0 0.5rem;
        justify-content: flex-start;
        gap: 0.125rem;
    }

    .mobile-nav-tab {
        padding: 0.875rem 0.625rem;
        font-size: 0.8125rem;
        min-width: auto;
        flex-shrink: 0;
    }
}

@media (max-width: 360px) {
    .mobile-nav-tabs {
        padding: 0 0.25rem;
        gap: 0;
    }

    .mobile-nav-tab {
        padding: 0.75rem 0.5rem;
        font-size: 0.75rem;
        min-width: auto;
        flex-shrink: 0;
    }
}

/* Ensure proper scrolling behavior */
.mobile-nav {
    position: relative;
    z-index: 99;
}

.mobile-nav-tabs {
    scroll-behavior: smooth;
}

/* Add scroll indicators for better UX */
.mobile-nav::before,
.mobile-nav::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20px;
    pointer-events: none;
    z-index: 1;
}

.mobile-nav::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-primary), transparent);
}

.mobile-nav::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-primary), transparent);
}

/* Fix header search overlapping */
.mobile-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    max-width: 600px;
    margin: 0 auto;
    flex-wrap: nowrap;
}

.mobile-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--brand-red);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.025em;
    flex-shrink: 0;
}

.mobile-search {
    flex: 1;
    position: relative;
    max-width: 250px;
    min-width: 150px;
}

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

@media (max-width: 640px) {
    .mobile-header-content {
        gap: 0.5rem;
    }

    .mobile-search {
        max-width: 200px;
        min-width: 120px;
    }

    .mobile-logo {
        font-size: 1.375rem;
    }
}

@media (max-width: 480px) {
    .mobile-header-content {
        gap: 0.375rem;
        padding: 0 0.5rem;
    }

    .mobile-search {
        max-width: 160px;
        min-width: 100px;
    }

    .mobile-logo {
        font-size: 1.25rem;
    }

    .mobile-actions {
        gap: 0.375rem;
    }

    .mobile-btn {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }
}

@media (max-width: 360px) {
    .mobile-header-content {
        gap: 0.25rem;
    }

    .mobile-search {
        max-width: 120px;
        min-width: 80px;
    }

    .mobile-search input {
        padding: 0.5rem 0.75rem 0.5rem 2rem;
        font-size: 0.75rem;
    }

    .mobile-search-icon {
        left: 0.75rem;
        width: 16px;
        height: 16px;
    }

    .mobile-logo {
        font-size: 1.125rem;
    }

    .mobile-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8125rem;
    }
}

/* Desktop fix: keep sort chips / filter buttons above story cards */
@media (min-width: 1024px) {
    .stories-sort-chips {
        display: flex;
        position: relative;
        z-index: 5;
        margin-bottom: 1.5rem;
    }

    .stories-list .story-card {
        position: relative;
        z-index: 1;
    }
}

/* =========================================
   Mobile Story Card Styles
   ========================================= */

.mobile-story-container {
    background: var(--bg-secondary);
    width: 100%;
}

.mobile-story-header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 1rem;
}

.mobile-story-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-red), var(--accent-purple));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
    border: 2px solid white;
}

.mobile-story-meta {
    flex: 1;
    min-width: 0;
}

.mobile-story-author {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.9375rem;
    margin: 0 0 0.25rem 0;
}

.mobile-story-date {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
}

.mobile-story-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.875rem;
    line-height: 1.4;
    letter-spacing: -0.02em;
}

.mobile-story-content {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.9375rem;
}

.mobile-story-image {
    margin-bottom: 1rem;
}

.mobile-quick-post {
    background: var(--bg-primary);
    padding: 1rem;
    border-bottom: 8px solid var(--bg-secondary);
    margin-bottom: 0;
}

.mobile-quick-post-trigger {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-quick-post-trigger:hover {
    background: var(--border-light);
}

.mobile-quick-post-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-red), var(--accent-purple));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9375rem;
    flex-shrink: 0;
}

.mobile-quick-post-placeholder {
    flex: 1;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

/* =========================================
   Laptop Layout Adjustments (1024px - 1366px)
   ========================================= */

@media (min-width: 1024px) and (max-width: 1366px) {
    .desktop-layout {
        max-width: 100%;
        padding: 0 1rem;
    }

    .left-sidebar {
        width: 220px;
    }

    .main-content {
        max-width: 520px;
    }

    /* Optionally hide right sidebar on smaller laptops */
    .right-sidebar {
        width: 280px;
    }
}

/* =========================================
   Mobile/Desktop Toggle Visibility
   ========================================= */

/* Mobile-first: Show mobile, hide desktop by default */
@media (max-width: 1023px) {

    .desktop-header,
    .desktop-layout,
    .desktop-nav-tabs {
        display: none !important;
    }

    .mobile-header,
    .mobile-story-container,
    .mobile-quick-post,
    .mobile-nav {
        display: block !important;
    }
}

/* Desktop: Hide mobile, show desktop */
@media (min-width: 1024px) {

    .mobile-header,
    .mobile-story-container,
    .mobile-quick-post,
    .mobile-nav {
        display: none !important;
    }

    .desktop-header {
        display: block !important;
    }

    .desktop-layout {
        display: flex !important;
    }
}

/* =========================================
   Story Detail Page Layout
   ========================================= */

.story-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-primary);
    /* Slightly tighter padding to reduce excess vertical space */
    padding: 1.5rem 1.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    border-radius: 0;
}

@media (max-width: 768px) {
    .story-container {
        /* Compact mobile padding so content sits closer together */
        padding: 1.125rem 0.875rem;
        margin: 0;
        border-left: none;
        border-right: none;
        box-shadow: none;
    }
}

/* Story Navigation */
.story-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
    gap: 1rem;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    border: 2px solid var(--border-medium);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-btn:hover {
    color: var(--brand-red);
    background: var(--bg-tertiary);
    border-color: var(--brand-red);
    transform: scale(1.05);
}

.nav-btn.nav-back {
    border-color: var(--brand-red);
    color: var(--brand-red);
}

.nav-btn.nav-back:hover {
    background: var(--brand-red);
    color: white;
}

@media (max-width: 640px) {
    .story-nav {
        padding: 0.5rem 0;
        margin-bottom: 0.75rem;
        gap: 0.5rem;
    }

    .nav-btn {
        width: 36px;
        height: 36px;
    }
}

/* Story Header */
.story-header {
    margin-bottom: 2rem;
}

.story-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
}

@media (max-width: 768px) {
    .story-title {
        font-size: 1.625rem;
        margin-bottom: 1.25rem;
    }
}

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

.author-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-red), var(--accent-purple));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.375rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
    border: 3px solid white;
}

.author-details h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

.author-details p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

@media (max-width: 640px) {
    .author-avatar {
        width: 48px;
        height: 48px;
        font-size: 1.125rem;
    }

    .author-details h3 {
        font-size: 0.9375rem;
    }

    .author-details p {
        font-size: 0.8125rem;
    }
}

/* Story Image */
.story-image {
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.story-image img {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 768px) {
    .story-image {
        margin: 1.5rem 0;
        border-radius: 8px;
    }
}

.story-content {
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 1.0625rem;
    margin: 2rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

@media (max-width: 768px) {
    .story-content {
        font-size: 1rem;
        margin: 1.5rem 0;
        padding: 1rem 0;
    }
}

/* Comments Section */
.comments-section {
    margin-top: 0;
    padding: 2rem 0 0 0;
    border-top: 2px solid var(--border-light);
    width: 100%;
}

@media (max-width: 768px) {
    .comments-section {
        margin-top: 0;
        padding: 1.5rem 0 0 0;
    }
}

/* =========================================
   Story Action Containers
   ========================================= */

.mobile-story-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    margin-top: 1rem;
}

.story-actions-bottom {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-light);
    margin-top: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 100;
}

.story-actions-bottom>div {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
}

/* Ensure action buttons are properly styled and clickable */
.story-actions-bottom .action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 2px solid var(--border-medium);
    color: var(--text-secondary);
    padding: 0.625rem 1rem;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 102;
    min-height: 44px;
    white-space: nowrap;
    flex-shrink: 0;
}

.story-actions-bottom .action-btn:hover {
    color: var(--brand-red);
    background: var(--brand-red-light);
    border-color: var(--brand-red);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.2);
}

.story-actions-bottom .action-btn.liked,
.story-actions-bottom .action-btn.active {
    color: var(--brand-red);
    background: var(--brand-red-light);
    border-color: var(--brand-red);
}

.story-actions-bottom .action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .story-actions-bottom {
        padding: 1rem 0;
        margin-top: 1rem;
    }

    .story-actions-bottom .action-btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.875rem;
        min-height: 40px;
    }
}

/* =========================================
   Laravel Pagination Styles
   ========================================= */

.pagination-container {
    padding: 2rem 1rem;
    display: flex;
    justify-content: center;
}

/* Pagination wrapper */
nav[role="navigation"] {
    width: 100%;
}

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

/* Pagination links */
.pagination li,
.pagination .page-item {
    display: inline-block;
}

.pagination a,
.pagination span,
.pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid var(--border-light);
    background: white;
    color: var(--text-secondary);
}

.pagination a:hover,
.pagination .page-link:hover {
    background: var(--brand-red-light);
    border-color: var(--brand-red);
    color: var(--brand-red);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2);
}

/* Active page */
.pagination .active span,
.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--brand-red), var(--brand-red-dark));
    border-color: var(--brand-red);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

/* Disabled state */
.pagination .disabled span,
.pagination .page-item.disabled .page-link {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination .page-item.disabled .page-link:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-light);
    color: var(--text-muted);
    transform: none;
    box-shadow: none;
}

/* Previous/Next labels */
.pagination a[rel="prev"],
.pagination a[rel="next"],
.pagination .disabled span {
    padding: 0 1rem;
}

/* SVG arrows in pagination */
.pagination svg {
    width: 16px;
    height: 16px;
}

/* Mobile pagination adjustments */
@media (max-width: 640px) {
    .pagination {
        gap: 0.375rem;
    }

    .pagination a,
    .pagination span,
    .pagination .page-link {
        min-width: 36px;
        height: 36px;
        padding: 0 0.5rem;
        font-size: 0.875rem;
    }

    .pagination a[rel="prev"],
    .pagination a[rel="next"],
    .pagination .page-link[rel="prev"],
    .pagination .page-link[rel="next"] {
        padding: 0 0.75rem;
    }
}

/* Hide page numbers on very small screens, keep prev/next */
@media (max-width: 480px) {

    .pagination li:not(:first-child):not(:last-child),
    .pagination .page-item:not(:first-child):not(:last-child) {
        display: none;
    }

    .pagination li:first-child,
    .pagination li:last-child,
    .pagination .page-item:first-child,
    .pagination .page-item:last-child {
        display: inline-block;
    }

    /* Show current page and adjacent pages */
    .pagination li.active,
    .pagination li.active+li,
    .pagination li:has(+ li.active),
    .pagination .page-item.active,
    .pagination .page-item.active+.page-item,
    .pagination .page-item:has(+ .page-item.active) {
        display: inline-block !important;
    }
}

/* =========================================
   Comment Section Styles
   ========================================= */

.comment-section {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    border: 1px solid var(--border-light);
}

.comment-header {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comment-form {
    margin-bottom: 2rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-light);
}

.comment-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.875rem;
    border: 1.5px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.9375rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.2s;
    background: white;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--brand-red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.comment-form button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--brand-red), var(--brand-red-dark));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.75rem;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

.comment-form button:hover {
    background: linear-gradient(135deg, var(--brand-red-dark), #991B1B);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(220, 38, 38, 0.4);
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.comment-item {
    background: white;
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    transition: all 0.2s;
}

.comment-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: var(--border-medium);
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 0.875rem;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-red), var(--accent-purple));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.comment-author-info {
    flex: 1;
}

.comment-author-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.9375rem;
    margin: 0;
}

.comment-date {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
}

.comment-content {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9375rem;
    margin-bottom: 0.875rem;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
}

.comment-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.375rem 0.75rem;
    border-radius: 50px;
    transition: all 0.2s;
    font-weight: 500;
}

.comment-action-btn:hover {
    color: var(--brand-red);
    background: var(--brand-red-light);
}

.comment-action-btn.liked {
    color: var(--brand-red);
}

.comment-reply {
    margin-left: 3rem;
    margin-top: 1rem;
    padding-left: 1.25rem;
    border-left: 3px solid var(--border-light);
}

/* View all comments link */
.view-all-comments {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--brand-red);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    transition: all 0.2s;
    margin-top: 1rem;
}

.view-all-comments:hover {
    background: var(--brand-red-light);
    transform: translateX(4px);
}

/* Mobile comment adjustments */
@media (max-width: 640px) {
    .comment-section {
        padding: 1rem;
        border-radius: 8px;
    }

    .comment-form {
        padding: 1rem;
    }

    .comment-item {
        padding: 1rem;
    }

    .comment-reply {
        margin-left: 1.5rem;
        padding-left: 0.75rem;
    }

    .comment-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.9375rem;
    }
}
/* =========================================
   Comment Section Redesign - Social Media Style
   ========================================= */

/* Override for cleaner horizontal layout */
.space-y-6 { margin-top: 0 !important; }

.bg-white.rounded-lg.shadow-sm.border.border-gray-200.p-6 {
    background: white !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 1rem !important;
    box-shadow: none !important;
    margin-bottom: 1.5rem !important;
}

.bg-white h3.text-lg { font-size: 1rem !important; font-weight: 600 !important; margin-bottom: 0.75rem !important; }
.bg-white textarea { min-height: 80px !important; padding: 0.75rem !important; border-radius: 8px !important; font-size: 0.9375rem !important; }
.bg-white button[type='submit'] { background: #dc2626 !important; padding: 0.625rem 1.25rem !important; border-radius: 50px !important; font-size: 0.875rem !important; box-shadow: none !important; margin-top: 0.75rem !important; }
.bg-white button[type='submit']:hover { background: #b91c1c !important; }

h3.text-xl.font-bold.text-gray-900 { font-size: 1.125rem !important; font-weight: 700 !important; margin-bottom: 1rem !important; padding-bottom: 0.75rem !important; border-bottom: 1px solid #e2e8f0 !important; }

.space-y-4 { display: flex !important; flex-direction: column !important; gap: 0 !important; }

.bg-white.rounded-lg.shadow-sm.border.border-gray-200.p-6.transition-all {
    background: transparent !important;
    padding: 1rem 0 !important;
    border: none !important;
    border-radius: 0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: none !important;
    display: flex !important;
    gap: 0.75rem !important;
    align-items: flex-start !important;
    transition: background 0.15s !important;
}

.bg-white.rounded-lg.shadow-sm.border.border-gray-200.p-6.transition-all:hover { background: #f8fafc !important; box-shadow: none !important; }
.bg-white.rounded-lg.shadow-sm.border.border-gray-200.p-6.transition-all:last-child { border-bottom: none !important; }

.w-10.h-10.rounded-full.bg-gradient-to-br { width: 40px !important; height: 40px !important; min-width: 40px !important; flex-shrink: 0 !important; font-size: 1rem !important; }

.flex.items-start.justify-between.mb-3 { display: block !important; margin-bottom: 0 !important; flex: 1 !important; min-width: 0 !important; }
.flex.items-center.gap-3 { display: inline-flex !important; align-items: center !important; gap: 0.5rem !important; margin-bottom: 0.375rem !important; }
.flex.items-center.gap-3 .w-10.h-10 { display: none !important; }

p.font-semibold.text-gray-900 { display: inline !important; font-weight: 700 !important; font-size: 0.9375rem !important; margin: 0 !important; }
p.font-semibold.text-gray-900::after { content: ''; margin: 0 0.5rem; color: #94a3b8; font-weight: 400; }
p.text-sm.text-gray-500 { display: inline !important; font-size: 0.8125rem !important; color: #94a3b8 !important; margin: 0 0 0 0.5rem !important; }

.text-gray-700.leading-relaxed.whitespace-pre-wrap { color: #334155 !important; line-height: 1.5 !important; font-size: 0.9375rem !important; margin: 0.375rem 0 0.5rem 0 !important; }

button.text-gray-400.hover\:text-red-600 { position: absolute !important; right: 0 !important; top: 0 !important; color: #94a3b8 !important; padding: 0.25rem !important; }
button.text-gray-400.hover\:text-red-600:hover { color: #ef4444 !important; }

.bg-gray-50.rounded-lg.border.border-gray-200.p-8 { background: #f8fafc !important; border: 1px solid #e2e8f0 !important; border-radius: 12px !important; padding: 3rem 1.5rem !important; }
.bg-gray-50.rounded-lg.border.border-gray-200.p-6.text-center { background: #f8fafc !important; border: 1px solid #e2e8f0 !important; border-radius: 12px !important; padding: 1.5rem !important; }

@media (max-width: 640px) {
    .bg-white.rounded-lg.shadow-sm.border.border-gray-200.p-6.transition-all { padding: 0.875rem 0 !important; gap: 0.625rem !important; }
    .w-10.h-10.rounded-full { width: 36px !important; height: 36px !important; min-width: 36px !important; font-size: 0.9375rem !important; }
    p.font-semibold.text-gray-900::after { display: none !important; }
    p.text-sm.text-gray-500 { display: block !important; margin: 0.125rem 0 0 0 !important; }
}

/* =========================================
   COMMENTS SECTION - WIDTH CONSTRAINTS
   ========================================= */

.comments-section {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

.comments-section > div {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.comments-section .space-y-6 {
    width: 100% !important;
    max-width: 100% !important;
}

.comments-section .bg-white,
.comments-section .bg-gray-50 {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.comments-section textarea,
.comments-section input {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Ensure comment form doesn't overflow */
.comments-section form {
    width: 100% !important;
    max-width: 100% !important;
}

/* Ensure comment cards don't overflow */
.comments-section .space-y-4 > div {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 768px) {
    .comments-section {
        padding: 1rem 0 !important;
    }
}



/* Compact X.com-style comment spacing */
.bg-white.rounded-lg.shadow-sm.border.border-gray-200.p-6.transition-all {
    padding: 0.75rem 0 !important;
}

.flex.items-start.justify-between.mb-3 {
    margin-bottom: 0.25rem !important;
}

.text-gray-700.leading-relaxed.whitespace-pre-wrap {
    margin: 0.25rem 0 0.375rem 0 !important;
    line-height: 1.4 !important;
}

/* Reduce space in comment form */
.bg-white.rounded-lg.shadow-sm.border.border-gray-200.p-6 {
    padding: 0.875rem !important;
    margin-bottom: 1rem !important;
}

.bg-white h3.text-lg {
    margin-bottom: 0.5rem !important;
    font-size: 0.9375rem !important;
}

.bg-white textarea {
    min-height: 70px !important;
}

/* Compact avatar */
.w-10.h-10.rounded-full.bg-gradient-to-br {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    font-size: 0.9375rem !important;
}

/* Reduce gap between avatar and content */
.bg-white.rounded-lg.shadow-sm.border.border-gray-200.p-6.transition-all {
    gap: 0.625rem !important;
}

/* Make font sizes slightly smaller */
p.font-semibold.text-gray-900 {
    font-size: 0.875rem !important;
}

p.text-sm.text-gray-500 {
    font-size: 0.75rem !important;
}

.text-gray-700.leading-relaxed.whitespace-pre-wrap {
    font-size: 0.875rem !important;
}

/* Compact comments header */
h3.text-xl.font-bold.text-gray-900 {
    font-size: 1rem !important;
    margin-bottom: 0.75rem !important;
    padding-bottom: 0.5rem !important;
}

/* =========================================
   ULTRA COMPACT COMMENT SECTION
   ========================================= */

/* Make comment cards more compact */
.comments-section .bg-white,
.comments-section [style*="background: white"] {
    padding: 0.75rem !important;
}

/* Reduce avatar sizes */
.comments-section [style*="width: 2.5rem"] {
    width: 2rem !important;
    height: 2rem !important;
    font-size: 0.75rem !important;
}

/* Reduce reply avatar sizes */
.comments-section [style*="width: 2rem"][style*="height: 2rem"] {
    width: 1.75rem !important;
    height: 1.75rem !important;
    font-size: 0.7rem !important;
}

/* Tighter gaps between elements */
.comments-section [style*="gap: 0.75rem"] {
    gap: 0.5rem !important;
}

/* Reduce margins */
.comments-section [style*="margin-bottom: 0.75rem"] {
    margin-bottom: 0.5rem !important;
}

/* Compact comment form */
.comments-section form {
    padding: 1rem !important;
}

.comments-section textarea {
    min-height: 60px !important;
    padding: 0.5rem 0.75rem !important;
}

/* Reduce reply section padding */
.comments-section [style*="padding-left: 3rem"] {
    padding-left: 2rem !important;
}

/* Tighter line height */
.comments-section [style*="line-height: 1.6"] {
    line-height: 1.4 !important;
}

/* Compact buttons */
.comments-section button[type="submit"],
.comments-section button[type="button"] {
    padding: 0.4rem 1rem !important;
    font-size: 0.8125rem !important;
}

/* Reduce space between comments */
.comments-section > div > div[style*="gap: 1rem"] {
    gap: 0.625rem !important;
}

/* Compact reply forms */
.comments-section form[style*="margin-top: 1rem"] {
    margin-top: 0.625rem !important;
    padding: 0.75rem !important;
}

/* Smaller action buttons */
.comments-section [style*="padding: 0.25rem"] {
    padding: 0.125rem !important;
}

.comments-section svg[style*="width: 1.25rem"] {
    width: 1rem !important;
    height: 1rem !important;
}

/* Compact empty state */
.comments-section [style*="padding: 3rem"] {
    padding: 2rem !important;
}

/* Reduce comment section top margin */
.comments-section {
    margin-top: 1rem !important;
}

/* Compact success messages */
.comments-section [style*="padding: 1rem"][style*="background: #dcfce7"] {
    padding: 0.625rem !important;
    font-size: 0.8125rem !important;
}

/* =========================================
   X.COM STYLE COMMENTS - EXACT MATCH
   ========================================= */

/* Remove card styling - make it flat like X */
.comments-section .bg-white,
.comments-section [style*="background: white"] {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0.75rem 0 !important;
    border-bottom: 1px solid var(--border-light) !important;
}

/* Remove hover effects on comments */
.comments-section [style*="background: white"]:hover {
    box-shadow: none !important;
}

/* Compact header spacing */
.comments-section [style*="margin-bottom: 0.75rem"] {
    margin-bottom: 0.5rem !important;
}

/* Smaller avatars - X style */
.comments-section [style*="width: 2.5rem"] {
    width: 2.25rem !important;
    height: 2.25rem !important;
    font-size: 0.75rem !important;
}

/* Even smaller reply avatars */
.comments-section [style*="width: 2rem"][style*="height: 2rem"] {
    width: 1.875rem !important;
    height: 1.875rem !important;
}

/* Tighter gaps */
.comments-section [style*="gap: 0.75rem"] {
    gap: 0.5rem !important;
}

/* Reduce comment content margin */
.comments-section [style*="margin-bottom: 0.75rem"][style*="line-height"] {
    margin-bottom: 0.375rem !important;
}

/* Compact reply section */
.comments-section [style*="padding-left: 3rem"] {
    padding-left: 2.5rem !important;
    margin-top: 0.5rem !important;
}

/* Flat reply cards */
.comments-section [style*="background: var(--bg-tertiary)"] {
    background: transparent !important;
    border: none !important;
    border-left: 2px solid var(--border-light) !important;
    border-radius: 0 !important;
    padding: 0.5rem 0 0.5rem 0.75rem !important;
}

/* Remove gaps between comments */
.comments-section > div > div[style*="gap: 1rem"] {
    gap: 0 !important;
}

/* Compact forms */
.comments-section form {
    padding: 0.75rem 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.comments-section textarea {
    min-height: 50px !important;
    padding: 0.5rem !important;
    font-size: 0.875rem !important;
}

/* Smaller buttons */
.comments-section button[type="submit"],
.comments-section button[type="button"] {
    padding: 0.375rem 0.875rem !important;
    font-size: 0.8125rem !important;
}

/* Compact action buttons */
.comments-section [style*="padding: 0.25rem"] {
    padding: 0.125rem !important;
}

/* Remove comment form card styling */
.comments-section > div > div:first-child {
    background: transparent !important;
    border: 1px solid var(--border-light) !important;
    box-shadow: none !important;
    padding: 0.875rem !important;
    margin-bottom: 0.5rem !important;
}

/* Compact title */
.comments-section h3[style*="font-size: 1.25rem"] {
    font-size: 1.125rem !important;
    margin-bottom: 0.5rem !important;
}

/* Remove top margin from comments section */
.comments-section {
    margin-top: 0.5rem !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Ensure all child divs don't add extra margins */
.comments-section > div {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* =========================================
   ULTRA COMPACT - 3/4 SPACING REDUCTION
   ========================================= */

/* Minimal padding on comments */
.comments-section .bg-white,
.comments-section [style*="background: white"],
.comments-section [style*="background: transparent"] {
    padding: 0.5rem 0 !important;
}

/* Tiny gaps everywhere */
.comments-section [style*="gap: 0.75rem"],
.comments-section [style*="gap: 0.5rem"] {
    gap: 0.25rem !important;
}

/* Minimal margins */
.comments-section [style*="margin-bottom: 0.75rem"],
.comments-section [style*="margin-bottom: 0.5rem"] {
    margin-bottom: 0.25rem !important;
}

.comments-section [style*="margin-bottom: 0.375rem"] {
    margin-bottom: 0.125rem !important;
}

/* Compact avatars */
.comments-section [style*="width: 2.5rem"],
.comments-section [style*="width: 2.25rem"] {
    width: 1.75rem !important;
    height: 1.75rem !important;
    font-size: 0.7rem !important;
}

/* Tiny reply avatars */
.comments-section [style*="width: 2rem"][style*="height: 2rem"],
.comments-section [style*="width: 1.875rem"] {
    width: 1.5rem !important;
    height: 1.5rem !important;
    font-size: 0.65rem !important;
}

/* Minimal reply padding */
.comments-section [style*="padding-left: 3rem"],
.comments-section [style*="padding-left: 2.5rem"] {
    padding-left: 1.75rem !important;
    margin-top: 0.25rem !important;
}

/* Compact reply cards */
.comments-section [style*="padding: 0.5rem 0 0.5rem 0.75rem"] {
    padding: 0.25rem 0 0.25rem 0.5rem !important;
}

/* Tiny forms */
.comments-section form {
    padding: 0.5rem 0 !important;
}

.comments-section textarea {
    min-height: 40px !important;
    padding: 0.375rem !important;
    font-size: 0.8125rem !important;
}

/* Compact buttons */
.comments-section button[type="submit"],
.comments-section button[type="button"] {
    padding: 0.25rem 0.625rem !important;
    font-size: 0.75rem !important;
}

/* Minimal form card padding */
.comments-section > div > div:first-child {
    padding: 0.625rem !important;
    margin-bottom: 0.375rem !important;
}

/* Compact title */
.comments-section h3[style*="font-size: 1.25rem"],
.comments-section h3[style*="font-size: 1.125rem"] {
    font-size: 1rem !important;
    margin-bottom: 0.375rem !important;
    font-weight: 600 !important;
}

/* Minimal section margin */
.comments-section {
    margin-top: 0.375rem !important;
}

/* Tighter line height */
.comments-section [style*="line-height: 1.6"],
.comments-section [style*="line-height: 1.4"] {
    line-height: 1.3 !important;
}

/* Smaller fonts */
.comments-section [style*="font-size: 0.9375rem"] {
    font-size: 0.8125rem !important;
}

.comments-section [style*="font-size: 0.875rem"] {
    font-size: 0.75rem !important;
}

.comments-section [style*="font-size: 0.8125rem"] {
    font-size: 0.7rem !important;
}

.comments-section [style*="font-size: 0.75rem"] {
    font-size: 0.6875rem !important;
}

/* Compact action buttons */
.comments-section [style*="padding: 0.25rem"],
.comments-section [style*="padding: 0.125rem"] {
    padding: 0.0625rem !important;
}

.comments-section svg[style*="width: 1.25rem"],
.comments-section svg[style*="width: 1rem"] {
    width: 0.875rem !important;
    height: 0.875rem !important;
}

/* Minimal character counter */
.comments-section [style*="font-size: 0.875rem"][style*="color: var(--text-muted)"] {
    font-size: 0.7rem !important;
}

/* Ultra-compact spacing between comments (X.com style) */
.bg-white.rounded-lg.shadow-sm.border.border-gray-200.p-6.transition-all {
    padding: 0.5rem 0 !important;
}

/* Even tighter for nested replies */
.bg-white.rounded-lg.shadow-sm.border.border-gray-200.p-6.transition-all .bg-white.rounded-lg {
    padding: 0.375rem 0 !important;
}

/* X.com-style comment action buttons */
/* Hide reply button since we're showing it inline */
button[onclick*='toggleReply'],
a[onclick*='toggleReply'],
.comment-reply-btn {
    display: none !important;
}

/* Action buttons container - horizontal, evenly spaced */
.flex.items-center.gap-4.mt-3,
.flex.items-center.gap-3.mt-2 {
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
    justify-content: flex-start !important;
    margin-top: 0.5rem !important;
    padding-top: 0 !important;
    border-top: none !important;
}

/* Individual action buttons - icon only, minimal */
.flex.items-center.gap-4.mt-3 > *,
.flex.items-center.gap-3.mt-2 > * {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    padding: 0 !important;
    margin-right: 2.5rem !important;
    background: transparent !important;
    border: none !important;
    color: #536471 !important;
    font-size: 0.8125rem !important;
    cursor: pointer !important;
    transition: color 0.2s !important;
}

.flex.items-center.gap-4.mt-3 > *:last-child,
.flex.items-center.gap-3.mt-2 > *:last-child {
    margin-right: 0 !important;
}

.flex.items-center.gap-4.mt-3 > *:hover,
.flex.items-center.gap-3.mt-2 > *:hover {
    color: #1d9bf0 !important;
    background: transparent !important;
}

/* Icon sizing */
.flex.items-center.gap-4.mt-3 svg,
.flex.items-center.gap-3.mt-2 svg {
    width: 1.125rem !important;
    height: 1.125rem !important;
}

/* Comment text alignment - tight to top */
.text-gray-700.leading-relaxed.whitespace-pre-wrap {
    margin: 0.125rem 0 0.25rem 0 !important;
}

/* Remove padding/margin so comments start from the edge */
.space-y-4 {
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.bg-white.rounded-lg.shadow-sm.border.border-gray-200.p-6.transition-all {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* Remove container padding */
.space-y-6 {
    padding: 0 !important;
}

/* Comment section container */
div[class*='space-y'] {
    padding-left: 0 !important;
    margin-left: 0 !important;
}

/* =========================================
   COMPACT STORY ACTIONS - 3/4 REDUCTION
   ========================================= */

/* Reduce action section height */
.story-actions-bottom,
.mobile-story-actions {
    padding: 0.375rem 0 !important;
    margin-top: 0.375rem !important;
}

/* Tighter button spacing */
.story-actions {
    gap: 0.25rem !important;
}

/* Smaller buttons */
.story-actions button,
.story-actions a {
    padding: 0.375rem !important;
    min-width: 36px !important;
    min-height: 36px !important;
}

/* Smaller icons */
.story-actions svg {
    width: 16px !important;
    height: 16px !important;
}

/* Smaller counts */
.story-actions span {
    font-size: 0.75rem !important;
}

/* Reduce gap between icon and count */
.story-actions button,
.story-actions a {
    gap: 0.25rem !important;
}

/* Compact Story Card Actions - Reduce Height by 3/4 */
.story-actions,
.mobile-story-actions,
.story-actions-bottom {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.25rem !important;
    padding: 0.375rem 0 !important;
    margin-top: 0.5rem !important;
    border-top: 1px solid var(--border-light) !important;
}

/* Compact action buttons - single line, smaller */
.action-btn,
.mobile-engagement-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    padding: 0.375rem 0.75rem !important;
    font-size: 0.75rem !important;
    color: #536471 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 50px !important;
    transition: all 0.15s !important;
    cursor: pointer !important;
    height: 36px !important;
}

.action-btn:hover,
.mobile-engagement-btn:hover {
    background: rgba(29, 155, 240, 0.1) !important;
    color: #1d9bf0 !important;
}

/* Icon sizing */
.action-btn svg,
.mobile-engagement-btn svg {
    width: 16px !important;
    height: 16px !important;
}

/* Hide "Recent Comments" heading if present */
.recent-comments-header,
h3:contains('Recent Comments'),
.comment-preview-header {
    display: none !important;
}

/* Better alignment for action buttons */
.action-btn,
.mobile-engagement-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.375rem !important;
    padding: 0.5rem 0.875rem !important;
    font-size: 0.8125rem !important;
    vertical-align: middle !important;
}

/* Ensure icons and text are perfectly aligned */
.action-btn svg,
.mobile-engagement-btn svg {
    width: 18px !important;
    height: 18px !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

/* Text alignment */
.action-btn span,
.mobile-engagement-btn span {
    line-height: 1 !important;
    vertical-align: middle !important;
}

/* =========================================
   REDUCE STORY CARD WIDTH BY 3/4
   ========================================= */

/* Narrow story cards */
.story-card,
.story-card-desktop {
    max-width: 600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Reduce padding inside cards */
.story-card {
    padding: 0.75rem !important;
}

/* Compact story header */
.story-header {
    margin-bottom: 0.5rem !important;
}

/* Smaller story title */
.story-title {
    font-size: 1.125rem !important;
    margin-bottom: 0.5rem !important;
}

/* Compact story excerpt */
.story-excerpt {
    font-size: 0.875rem !important;
    line-height: 1.4 !important;
    margin-bottom: 0.5rem !important;
}

/* Smaller avatar */
.story-avatar {
    width: 2.25rem !important;
    height: 2.25rem !important;
    font-size: 0.875rem !important;
}

/* Compact meta info */
.story-meta h3 {
    font-size: 0.875rem !important;
}

.story-date {
    font-size: 0.75rem !important;
}

/* Reduce gap between stories */
.stories-list {
    gap: 0.5rem !important;
}

@media (min-width: 769px) {
    .desktop-story-container {
        max-width: 600px !important;
        margin: 0 auto !important;
    }
}

/* =========================================
   FIX ICON ALIGNMENT & REDUCE WIDTH MORE
   ========================================= */

/* Further reduce story card width */
.story-card,
.story-card-desktop {
    max-width: 450px !important;
}

@media (min-width: 769px) {
    .desktop-story-container {
        max-width: 450px !important;
    }
}

/* Fix button alignment - all buttons same height */
.story-actions button,
.story-actions a,
.story-actions > div {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
    height: 36px !important;
    line-height: 1 !important;
}

/* Ensure all icons are centered */
.story-actions svg {
    display: block !important;
    margin: 0 !important;
}

/* Fix comment button specifically */
.story-actions a[href*="comments"] {
    display: inline-flex !important;
    align-items: center !important;
    height: 36px !important;
}

/* Align all action items on same baseline */
.story-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

/* Remove any extra spacing that might cause misalignment */
.story-actions > div {
    margin: 0 !important;
    padding: 0 !important;
}

/* =========================================
   RESTORE WIDTH & REDUCE ACTION HEIGHT ONLY
   ========================================= */

/* Restore original card width */
.story-card,
.story-card-desktop {
    max-width: none !important;
}

@media (min-width: 769px) {
    .desktop-story-container {
        max-width: none !important;
    }
}

/* Ultra compact action section height */
.story-actions-bottom,
.mobile-story-actions {
    padding: 0.25rem 0 !important;
    margin-top: 0.25rem !important;
    min-height: auto !important;
}

/* Smaller buttons */
.story-actions button,
.story-actions a {
    padding: 0.25rem !important;
    height: 32px !important;
    min-height: 32px !important;
}

/* Smaller icons */
.story-actions svg {
    width: 14px !important;
    height: 14px !important;
}

/* Smaller text */
.story-actions span {
    font-size: 0.7rem !important;
}

/* Minimal gap */
.story-actions {
    gap: 0.125rem !important;
}


/* =========================================
   LEFT ALIGN STORY CONTENT TEXT
   ========================================= */

/* Ensure story content text starts from the left edge */
.story-excerpt,
.story-content,
.story-content-desktop,
.mobile-story-content {
    text-align: left !important;
}

/* Also ensure story title is left-aligned */
.story-title,
.mobile-story-title {
    text-align: left !important;
}


/* =========================================
   ALIGN COMMENTS TO LEFT EDGE
   ========================================= */

/* Remove padding from comment cards so text starts at edge */
.comments-section [style*="padding: 1rem"] {
    padding: 0.5rem 0 !important;
}

/* Ensure comment content aligns to left */
.comments-section [style*="display: flex; flex-direction: column"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Remove card background and borders for flat design */
.comments-section [style*="background: white"] {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-bottom: 1px solid var(--border-light) !important;
    border-radius: 0 !important;
}
