.foro-page {
    padding: 100px 0 50px;
    min-height: 100vh;
    background: var(--bg-primary);
}

.foro-page .container {
    max-width: 1400px;
    padding: 0 10px;
}

.foro-container {
    display: grid;
    grid-template-columns: 260px 1fr 300px;
    gap: 30px;
    margin-top: 20px;
    width: 100%;
}

/* Sidebar izquierdo - Menú */
.foro-sidebar {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.foro-menu {
    list-style: none;
}

.foro-menu-item {
    padding: 12px 15px;
    margin-bottom: 5px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
}

.foro-menu-item i {
    width: 24px;
    font-size: 1.2rem;
}

.foro-menu-item:hover {
    background: rgba(255, 59, 156, 0.1);
    color: var(--accent-pink);
}

.foro-menu-item.active {
    background: var(--gradient);
    color: white;
}

.foro-menu-item .badge {
    margin-left: auto;
    background: var(--accent-pink);
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* Sección de tendencias */
.trending-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.trending-title {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.trending-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.trending-item:last-child {
    border-bottom: none;
}

.trending-tag {
    color: var(--accent-pink);
    font-weight: 600;
    margin-bottom: 3px;
}

.trending-stats {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Feed principal */
.foro-feed {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
}

/* Crear publicación */
.create-post {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.create-post-header {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.post-avatar {
    width: 48px;
    height: 48px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.create-post-input {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 12px 20px;
    color: white;
    font-size: 0.95rem;
    resize: none;
    min-height: 60px;
}

.create-post-input:focus {
    outline: none;
    border-color: var(--accent-pink);
}

.create-post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-left: 63px;
}

.post-actions {
    display: flex;
    gap: 15px;
}

.post-action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s;
}

.post-action-btn:hover {
    color: var(--accent-pink);
    background: rgba(255, 59, 156, 0.1);
}

.btn-post {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 8px 25px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-post:hover {
    transform: scale(1.05);
}

.btn-post:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Publicaciones */
.post {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s;
}

.post:hover {
    background: rgba(255, 255, 255, 0.02);
}

.post-header {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.post-author-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #ff3b9c, #9b4dff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.post-author-info {
    flex: 1;
}

.post-author-name {
    font-weight: 600;
    color: white;
    text-decoration: none;
}

.post-author-name:hover {
    color: var(--accent-pink);
}

.post-meta {
    display: flex;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 3px;
}

.post-badge {
    background: var(--accent-colombia-yellow);
    color: black;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.post-content {
    margin-left: 63px;
    margin-bottom: 15px;
    line-height: 1.6;
}

.post-media {
    margin-left: 63px;
    margin-bottom: 15px;
    background: var(--bg-primary);
    border-radius: 15px;
    overflow: hidden;
}

.post-media img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

.post-stats {
    margin-left: 63px;
    display: flex;
    gap: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.post-actions-bar {
    margin-left: 63px;
    display: flex;
    gap: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
}

.post-action {
    background: none;
    border: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 20px;
    transition: all 0.3s;
}

.post-action:hover {
    color: var(--accent-pink);
    background: rgba(255, 59, 156, 0.1);
}

.post-action.liked {
    color: var(--accent-pink);
}

/* Comentarios en el post */
.post-comments-section {
    margin-left: 63px;
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
    display: none;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.comment-item {
    display: flex;
    gap: 12px;
    position: relative;
}

.comment-item.nested {
    margin-left: 44px;
    padding-left: 15px;
    border-left: 2px solid var(--border-color);
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--gradient);
    flex-shrink: 0;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-body {
    background: var(--bg-primary);
    padding: 8px 12px;
    border-radius: 12px;
    flex: 1;
}

.comment-author {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 2px;
    display: block;
}

.comment-text {
    font-size: 0.9rem;
    line-height: 1.4;
}

.comment-footer {
    display: flex;
    gap: 15px;
    margin-top: 4px;
}

.comment-date {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.btn-reply-comment {
    background: none;
    border: none;
    color: var(--accent-pink);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.btn-reply-comment:hover {
    text-decoration: underline;
}

.reply-input-container {
    margin-top: 8px;
    display: none;
}

.comment-input-area {
    display: flex;
    gap: 10px;
    align-items: center;
}

.comment-input {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 15px;
    color: white;
    font-size: 0.9rem;
}

.btn-send-comment {
    background: none;
    border: none;
    color: var(--accent-pink);
    cursor: pointer;
    font-size: 1.1rem;
    transition: transform 0.2s;
}

.btn-send-comment:hover {
    transform: scale(1.1);
}

/* Sidebar derecho - Amigos/Contactos */
.foro-right-sidebar {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.contacts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.contacts-title {
    font-weight: 600;
    color: white;
}

.contacts-search {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 15px;
    color: white;
    width: 100%;
    margin-bottom: 15px;
}

.contacts-list {
    list-style: none;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 1px solid var(--border-color);
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-item:hover {
    background: rgba(255, 59, 156, 0.05);
}

.contact-avatar {
    width: 40px;
    height: 40px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    position: relative;
}

.contact-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    background: #00C851;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}

.contact-status.offline {
    background: var(--text-secondary);
}

.contact-info {
    flex: 1;
}

.contact-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.contact-last-seen {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.contact-unread {
    background: var(--accent-pink);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
}

/* ===== DM / MENSAJERÍA ===== */
.dm-page {
    padding: 100px 0 50px;
    min-height: 100vh;
    background: var(--bg-primary);
}

.dm-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 25px;
    height: calc(100vh - 150px);
    min-height: 600px;
}

/* Lista de conversaciones */
.dm-list {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.dm-list-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.dm-list-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.dm-search {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 10px 15px;
    color: white;
    width: 100%;
}

.dm-conversations {
    flex: 1;
    overflow-y: auto;
    list-style: none;
}

.dm-conversation {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 1px solid var(--border-color);
}

.dm-conversation:hover {
    background: rgba(255, 59, 156, 0.05);
}

.dm-conversation.active {
    background: rgba(255, 59, 156, 0.1);
    border-left: 3px solid var(--accent-pink);
}

.dm-conversation-avatar {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
    flex-shrink: 0;
}

.dm-conversation-info {
    flex: 1;
    min-width: 0;
}

.dm-conversation-name {
    font-weight: 600;
    margin-bottom: 3px;
    display: flex;
    justify-content: space-between;
}

.dm-conversation-time {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.dm-conversation-last {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dm-conversation-unread {
    background: var(--accent-pink);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    margin-left: 8px;
}

/* Chat principal */
.dm-chat {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.dm-chat-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 15px;
}

.dm-chat-avatar {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.dm-chat-info h3 {
    margin-bottom: 3px;
}

.dm-chat-status {
    font-size: 0.85rem;
    color: #00C851;
}

.dm-chat-status.offline {
    color: var(--text-secondary);
}

.dm-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: var(--bg-primary);
}

.message {
    display: flex;
    gap: 10px;
    max-width: 70%;
}

.message.own {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.message-content {
    background: var(--bg-card);
    padding: 12px 16px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    position: relative;
}

.message.own .message-content {
    background: var(--accent-pink);
    border-bottom-right-radius: 4px;
    border-bottom-left-radius: 18px;
}

.message-text {
    margin-bottom: 5px;
    line-height: 1.4;
}

.message-time {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-align: right;
}

.message.own .message-time {
    color: rgba(255, 255, 255, 0.7);
}

.message-image {
    max-width: 200px;
    border-radius: 10px;
    margin-top: 8px;
}

/* Input de mensaje */
.dm-input-container {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.dm-input {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 12px 20px;
    color: white;
    resize: none;
    max-height: 100px;
    min-height: 50px;
}

.dm-input:focus {
    outline: none;
    border-color: var(--accent-pink);
}

.dm-attach-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s;
}

.dm-attach-btn:hover {
    color: var(--accent-pink);
    background: rgba(255, 59, 156, 0.1);
}

.dm-send-btn {
    background: var(--gradient);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.dm-send-btn:hover {
    transform: scale(1.1);
}

.dm-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Notificaciones */
.notification-badge {
    position: relative;
}

.notification-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-pink);
    color: white;
    font-size: 0.6rem;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Responsive */
@media (max-width: 1024px) {
    .foro-container {
        grid-template-columns: 1fr;
    }

    .foro-sidebar,
    .foro-right-sidebar {
        display: none;
    }

    .dm-container {
        grid-template-columns: 1fr;
    }

    .dm-list {
        display: none;
    }

    .dm-list.active {
        display: flex;
    }

    .dm-chat {
        display: none;
    }

    .dm-chat.active {
        display: flex;
    }

    .dm-back-btn {
        position: fixed;
        bottom: 20px;
        left: 20px;
        z-index: 200;
        padding: 10px 15px;
        background: var(--accent-pink);
        color: white;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        font-size: 0.9rem;
        display: none;
    }

    .dm-back-btn:hover {
        opacity: 0.9;
    }
}

@media (max-width: 768px) {

    .post-content,
    .post-media,
    .post-stats,
    .post-actions-bar,
    .post-comments-section {
        margin-left: 0;
    }

    .post-header {
        flex-wrap: wrap;
    }

    /* Make all post action buttons visible by allowing wrap */
    .post-actions-bar {
        flex-wrap: wrap;
        gap: 4px;
        padding-top: 8px;
    }

    .post-action {
        font-size: 0.8rem;
        padding: 5px 8px;
        gap: 5px;
        flex: 1;
        justify-content: center;
        min-width: fit-content;
    }

    /* Fix create post footer on mobile */
    .create-post-footer {
        margin-left: 0;
        flex-wrap: wrap;
        gap: 10px;
    }

    .post-actions {
        flex: 1;
    }

    /* Hide avatar on very small screens to give textarea more space */
    .create-post-header .post-avatar {
        display: none;
    }

    .create-post-input {
        width: 100%;
    }
}

/* Card de Donación en Sidebar */
.sidebar-donation-card {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(255, 59, 156, 0.1), rgba(155, 77, 255, 0.1));
    border: 1px solid rgba(255, 59, 156, 0.3);
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s;
}

.sidebar-donation-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-pink);
    box-shadow: 0 10px 20px rgba(255, 59, 156, 0.2);
}

.sidebar-donation-card i {
    font-size: 2.5rem;
    color: var(--accent-pink);
    margin-bottom: 15px;
}

.sidebar-donation-card h4 {
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: white;
}

.sidebar-donation-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.4;
}

.btn-sidebar-donate {
    width: 100%;
    padding: 12px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.btn-sidebar-donate:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 59, 156, 0.4);
}