.ast-page-builder-template .site-content>.ast-container {
    margin: 0;
}

select:focus {
    border: 1.5px solid #046bd2 !important;
}

/* Contenedor de los filtros del foro */
.forum-filter-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 30px 5px 0 5px;
    padding: 10px 12px;
    border: 1px solid var(--vm-border);
    background: var(--vm-soft);
    border-radius: var(--vm-radius-md);
}

/* Estilos para los selectores del foro */
.forum-filter-controls select {
    width: 100%;
    border: 1px solid var(--vm-border);
    border-radius: 6px;
    background-color: #ffffff;
    font-size: 15px;
    color: var(--vm-brand);
    transition: all 0.3s ease;
    outline: none;
}
.forum-filter-controls select:hover {
    border: 1px solid var(--vm-border-dark);
}

.forum-filter-controls select:focus,
.forum-filter-controls select:active {
    border: 1.5px solid #046bd2 !important;
}

/* Estilo para el título de la sección */
.forum-section > h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 15px;
    border-left: 5px solid #046bd2;
    padding-left: 12px;
}

/* Contenedor de la sección */
.forum-section {
    margin: 20px 0;
}

/* Contenedor principal del ítem (Preguntas y Respuestas) */
.forum-item {
    padding: 17px;
    background-color: #ffffff;
    border: 1px solid #e1e1e1;
    margin-bottom: 30px;
    border-radius: 10px;
    position: relative;
}

/* Primera línea: Post relacionado y detalles del autor */
.forum-item-header {
    display: flex;
    align-items: flex-start;
    overflow: hidden;
}

.forum-item-post-info {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
}

.forum-item-post-thumbnail {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    object-fit: cover;
    border-radius: 5px;
}

.forum-item-post-thumbnail:hover {
    opacity: 0.8;
}

.forum-item-post-details {
    flex: 1;
    display: flex;
    align-items: baseline;
    gap: 7px;
    overflow: hidden; 
}

.forum-item-post-title {
    font-weight: bold;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
}

.forum-item-post-title:hover {
    text-decoration: underline;
}

.forum-item-post-excerpt {
    margin: 5px 0;
    color: #555;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.forum-item-parent-author {
    font-size: 13px;
    color: #555;
}

a.forum-item-parent-author {
    font-weight: 500;
    color: #1e293b;
}

a.forum-item-parent-author:hover {
    text-decoration: underline;
}

/* Segunda línea: Meta info (fecha) */
.forum-item-meta {
    margin: 5px 0 0 3px;
    font-size: 13px;
    color: #777;
}

.forum-item-meta-question {
    margin: 5px 0 0 3px;
    font-size: 13px;
    color: #777;
    display: flex;
    justify-content: flex-start;
    align-items: baseline;
    gap: 4px;
}

.forum-item-meta a {
    color: #1e293b;
    font-weight: 500;
}

.forum-item-meta a:hover {
    text-decoration: underline;
}

.forum-item-date {
    color: #777;
}

/* Tercera línea: Contenido */
.forum-item-content {
    margin: -12px 0 -12px 3px;
    font-size: 15px;
    line-height: 1.5;
    color: #333;
}

/* Cuarta línea: Opciones (Votaciones, Responder y Compartir) */
.forum-user-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    white-space: nowrap;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: -18px 0 -6px 1px;
    gap: 20px;
}

.forum-item-usefulness,
.forum-item-reply-button,
.forum-share-container{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    border-radius: 999px;
    min-height: 38px;
    padding: 6px 10px;
    background: transparent;
    color: var(--vm-brand) !important;
    transition: background .15s ease, transform .10s ease, box-shadow .15s ease;
    font-weight: 600;
    font-size: 13px;
}

.forum-item-usefulness:focus,
.forum-item-reply-button:focus,
.forum-share-container:focus{
  background: transparent;
}

.forum-item-usefulness:hover,
.forum-item-reply-button:hover,
.forum-share-container:hover{
  background: var(--vm-soft);
}

.forum-item-usefulness:active,
.forum-item-reply-button:active,
.forum-share-container:active{
  background: var(--vm-soft-active);
}

.forum-item-votes {
    display: flex;
    align-items: center;
    margin: 0;
}

/* Botones de votación */
.forum-item-vote-up, .forum-item-vote-down {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    color: #999;
    box-shadow: none;
}

.forum-item-vote-up:focus, .forum-item-vote-down:focus {
    color: #999;
    background: none;
}

.forum-item-vote-up:hover, .forum-item-vote-down:hover {
    color: #ff4500;
    background: none;
}

.forum-item-vote-up.vote-active,
.forum-item-vote-down.vote-active {
    color: #ff4500;
    background: none;
}

.forum-item-votes .vote-count {
    font-size: 16px;
    font-weight: bold;
    color: var(--vm-brand-900);
    margin: 0 4px;
}

/* Botones de utilidad */
.forum-item-usefulness {
    gap: 6px;
}

.forum-vote-count {
    font-size: 15px;
    font-weight: bolder;
    color: #1e293b;
}

.forum-item-usefulness-vote {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    padding: 0;
    color: #1e293b;
    box-shadow: none;
}

.forum-item-usefulness-vote:hover, .forum-item-usefulness-vote:focus {
    background: none;
    color: #1e293b;
}

/* Íconos de "Voto Útil" */
.forum-like-icon {
    display: none;
}

.forum-like-icon.forum-default {
    fill: #ffffff;
    stroke: #1e293b;
    display: block;
    stroke-width: 0.7;
}

.forum-like-icon.forum-active {
    fill: #1e293b;
    stroke: #1e293b;
}

/* Íconos cuando el voto está activo */
.forum-item-usefulness-vote.usefulness-active .forum-like-icon.forum-default {
    display: none; /* Ocultar cuando está activo */
}

.forum-item-usefulness-vote.usefulness-active .forum-like-icon.forum-active {
    display: block; /* Mostrar cuando está activo */
}

/* Botón e icono de Responder */
.forum-item-reply-button {

}

/* Botón e icono de Compartir */
.forum-share-container {
    position: relative;
}

.forum-share-button {
    border: none;
    background: none;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    font-size: 13px;
    font-weight: 500;
    gap: 4px;
    padding: 5px;
}

.forum-share-button:hover, .forum-share-button:focus {
    background: none;
}

.forum-share-button span {
    font-size: 13px;
    color: #1e293b;
}

/* Mensajes temporales */
.forum-temporary-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #1e293b;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 16px;
    z-index: 1100;
    text-align: center;
}

/* Mensaje de no preguntas/respuestas */
.no-questions-message,
.no-answers-message {
    font-style: italic;
    color: #666;
    margin: 20px 0;
}

/* Estilos generales para el mensaje de carga del foro */
.forum-loading-message {
    font-size: 20px;
    font-weight: 600;
    color: #046bd2;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px 0;
}

/* Spinner moderno para el foro */
.forum-loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #046bd2;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    margin-right: 7px;
    animation: forum-spin 1s linear infinite;
}

@keyframes forum-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Ajustes responsive */
@media (max-width: 600px) {
    .forum-item-header {
        align-items: flex-start;
    }

    .forum-item-post-info {
        flex-direction: row;
        align-items: center;
    }

    .forum-item-post-details {
        display: block;
        text-overflow: ellipsis;
    }

    .dot-separator {
        display: none;
    }

    button.qna-options-toggle {
        padding: 0;
    }

    .forum-share-options {
        left: calc(100% - 225px);
    }
}


@media (max-width: 400px) {
    .forum-filter-controls { flex-direction: column; }
    
    .forum-share-button span { display: none; }
    .forum-user-options { gap: 12px; }
}

@media (max-width: 330px) {
    .forum-user-options { gap: 4px; }
}