/* INfoY Cursos - Fórum Stylesheet */

/* Fórum Layout */
.forum-section {
    padding: 3rem 0;
}

.forum-header {
    text-align: center;
    margin-bottom: 3rem;
}

.forum-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--heading-color);
}

.forum-header p {
    font-size: 1.2rem;
    color: var(--gray);
    max-width: 800px;
    margin: 0 auto;
}

.forum-content {
    display: grid;
    grid-template-columns: 250px 1fr 300px;
    gap: 2rem;
}

/* Sidebar */
.user-profile {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.user-profile img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 3px solid var(--orange);
}

.user-profile h3 {
    margin-bottom: 0.3rem;
}

.user-profile p {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.user-stats {
    display: flex;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-weight: 700;
    color: var(--orange);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--gray);
}

.forum-categories {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.forum-categories h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--heading-color);
}

.forum-categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.forum-categories li {
    margin-bottom: 0.5rem;
}

.forum-categories a {
    display: block;
    padding: 0.7rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.forum-categories a:hover {
    background-color: rgba(255, 140, 66, 0.1);
    color: var(--orange);
}

.forum-categories a.active {
    background-color: var(--orange);
    color: white;
}

.popular-tags {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.popular-tags h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--heading-color);
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background-color: rgba(255, 140, 66, 0.1);
    color: var(--orange);
    border-radius: 50px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s;
}

.tag:hover {
    background-color: var(--orange);
    color: white;
}

/* Main Forum Area */
.forum-main {
    flex: 1;
}

.forum-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.forum-search {
    display: flex;
    width: 300px;
    position: relative;
}

.forum-search input {
    flex: 1;
    padding: 0.7rem 1rem 0.7rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.9rem;
    background-color: var(--card-bg);
    color: var(--text-color);
}

.forum-search button {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
}

.forum-filters select {
    padding: 0.7rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: var(--card-bg);
    color: var(--text-color);
}

.topics-list {
    margin-bottom: 2rem;
}

.topic-item {
    display: flex;
    background-color: var(--card-bg);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.topic-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.topic-status {
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    background-color: #f5f5f5;
    color: var(--gray);
}

body.dark-mode .topic-status {
    background-color: #333;
}

.topic-status.solved {
    color: #4CAF50;
}

.topic-status.pinned {
    color: #2196F3;
}

.topic-status.hot {
    color: #F44336;
}

.topic-content {
    flex: 1;
    padding: 1.2rem 1.5rem;
}

.topic-title {
    margin-bottom: 0.8rem;
}

.topic-title a {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--heading-color);
    text-decoration: none;
    transition: color 0.3s;
}

.topic-title a:hover {
    color: var(--orange);
}

.topic-tags {
    margin-top: 0.5rem;
}

.topic-tags .tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
}

.topic-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--gray);
}

.topic-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.topic-author img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.topic-author.admin span {
    color: var(--orange);
    font-weight: 500;
}

.topic-stats {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.topic-stats i, 
.topic-time i {
    font-size: 0.8rem;
    margin-right: 0.3rem;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.page-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--text-color);
    font-size: 0.9rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.page-btn:hover {
    background-color: #f5f5f5;
}

body.dark-mode .page-btn:hover {
    background-color: #333;
}

.page-btn.active {
    background-color: var(--orange);
    border-color: var(--orange);
    color: white;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Activity Sidebar */
.forum-activity {
    width: 300px;
}

.activity-header {
    margin-bottom: 1rem;
}

.activity-header h3 {
    font-size: 1.2rem;
    color: var(--heading-color);
}

.activity-list {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1.2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.activity-item {
    display: flex;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(141, 141, 141, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--gray);
}

.activity-icon.reply {
    background-color: rgba(33, 150, 243, 0.1);
    color: #2196F3;
}

.activity-icon.topic {
    background-color: rgba(255, 140, 66, 0.1);
    color: var(--orange);
}

.activity-icon.solved {
    background-color: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.activity-content {
    flex: 1;
}

.activity-content p {
    margin: 0 0 0.3rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.activity-content a {
    color: var(--heading-color);
    text-decoration: none;
    transition: color 0.3s;
}

.activity-content a:hover {
    color: var(--orange);
}

.activity-time {
    font-size: 0.8rem;
    color: var(--gray);
}

.stats-section {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.stats-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--heading-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--bg-color);
    border-radius: 8px;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: rgba(255, 140, 66, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--orange);
}

.stat-details {
    flex: 1;
}

.stat-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray);
}

/* Responsive */
@media (max-width: 1200px) {
    .forum-content {
        grid-template-columns: 220px 1fr 250px;
    }
}

@media (max-width: 992px) {
    .forum-content {
        grid-template-columns: 1fr;
    }
    
    .forum-sidebar {
        display: none;
    }
    
    .forum-activity {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .forum-header h1 {
        font-size: 2rem;
    }
    
    .forum-header p {
        font-size: 1rem;
    }
    
    .forum-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .forum-search {
        width: 100%;
    }
    
    .topic-meta {
        flex-wrap: wrap;
        gap: 1rem;
    }
}

/* Topic Detail Page Styles */
.topic-detail-header {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.topic-detail-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.topic-detail-title h1 {
    font-size: 1.8rem;
    color: var(--heading-color);
}

.topic-detail-title .status {
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
}

.topic-detail-title .status.solved {
    background-color: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.topic-detail-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--gray);
}

.topic-detail-author {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.topic-detail-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.topic-detail-stats {
    display: flex;
    gap: 1.2rem;
}

.topic-detail-content {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    line-height: 1.7;
}

.topic-detail-tags {
    margin-top: 1.5rem;
}

.post-list {
    margin-bottom: 2rem;
}

.post-item {
    background-color: var(--card-bg);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.post-header {
    display: flex;
    justify-content: space-between;
    padding: 1.2rem 1.5rem;
    background-color: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid var(--border-color);
}

body.dark-mode .post-header {
    background-color: rgba(255, 255, 255, 0.02);
}

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

.post-author img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.post-author .author-info {
    display: flex;
    flex-direction: column;
}

.post-author .author-name {
    font-weight: 500;
    color: var(--heading-color);
}

.author-role {
    font-size: 0.8rem;
    color: var(--orange);
}

.post-meta {
    font-size: 0.9rem;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-content {
    padding: 1.5rem;
    line-height: 1.7;
}

.post-actions {
    display: flex;
    justify-content: space-between;
    padding: 0 1.5rem 1.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: 1rem;
    padding-top: 1rem;
}

.post-buttons {
    display: flex;
    gap: 1rem;
}

.post-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--gray);
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.3s;
}

.post-btn:hover {
    color: var(--orange);
}

.post-util {
    font-size: 0.9rem;
    color: var(--gray);
}

.post-util a {
    color: var(--orange);
    text-decoration: none;
}

.best-answer {
    border-left: 4px solid #4CAF50;
}

.best-answer .post-header {
    background-color: rgba(76, 175, 80, 0.05);
}

.reply-form {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.reply-form h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    color: var(--heading-color);
}

.editor-container {
    margin-bottom: 1.5rem;
}

.editor-toolbar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.editor-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.3s;
}

.editor-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--orange);
}

.editor-content {
    min-height: 200px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.related-topics-sidebar {
    margin-top: 2rem;
}

.related-topics-sidebar h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--heading-color);
}

.related-topic-list {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1.2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.related-topic-item {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}

.related-topic-item:last-child {
    border-bottom: none;
}

.related-topic-item a {
    display: block;
    color: var(--heading-color);
    text-decoration: none;
    margin-bottom: 0.3rem;
    font-weight: 500;
    transition: color 0.3s;
}

.related-topic-item a:hover {
    color: var(--orange);
}

.related-topic-meta {
    font-size: 0.85rem;
    color: var(--gray);
}

/* New Topic Form Page */
.new-topic-form {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.new-topic-form h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--heading-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--heading-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    background-color: var(--card-bg);
    color: var(--text-color);
}

.form-group textarea {
    min-height: 200px;
    resize: vertical;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row > div {
    flex: 1;
}

.guidelines {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.guidelines h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--heading-color);
}

.guidelines ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.guidelines li {
    margin-bottom: 0.5rem;
}