/* ===== SISTEMA DE PREGUNTAS Y RESPUESTAS ===== */

/* Logo con ícono de pensamiento */
.custom-logo {
    position: relative;
    transition: all 0.3s ease;
}

.thought-icon {
    position: absolute;
    top: -10px;
    left: -5px;
    background: var(--gradient-secondary);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: pulse 2s infinite;
}

.thought-icon i:first-child {
    font-size: 0.9rem;
    margin-right: 2px;
}

.thought-icon i:last-child {
    font-size: 1.1rem;
}

/* Animación de agitación */
@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* Botón flotante de preguntas */
.floating-question-btn {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: var(--gradient-secondary);
    color: var-(--primary);
    padding: 12px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: var(--transition);
    z-index: 999;
    border: 2px solid var(--secondary);
    animation: float 3s ease-in-out infinite;
}

.floating-question-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.25);
    background: linear-gradient(135deg, #2d5a8f 0%, #1a365d 100%);
}

.floating-question-btn i {
    font-size: 1.2rem;
}

.floating-question-btn span {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Modal de preguntas */
.questions-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.questions-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.questions-modal {
    background: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-heavy);
    transform: translateY(20px);
    transition: var(--transition);
}

.questions-modal-overlay.active .questions-modal {
    transform: translateY(0);
}

.questions-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.questions-modal-header h3 {
    color: white;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.questions-modal-header h3 i {
    color: var(--secondary);
}

.close-questions-modal {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.close-questions-modal:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.questions-modal-body {
    padding: 2rem;
}

/* Sección de hacer pregunta */
.ask-question-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.ask-question-section h4 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.ask-question-section textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Raleway', sans-serif;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.ask-question-section textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

/* Lista de preguntas */
.questions-list-section h4 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.questions-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.question-card {
    background: var(--light);
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid var(--secondary);
    transition: var(--transition);
}

.question-card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateX(5px);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.question-author {
    color: var(--primary);
    font-weight: 600;
}

.question-author i {
    color: var(--secondary);
    margin-right: 5px;
}

.question-date {
    color: #666;
}

.question-content p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Respuestas */
.question-answers {
    margin: 1rem 0;
    padding-left: 1rem;
    border-left: 3px solid #ddd;
}

.answer-card {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 0.8rem;
}

.answer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.answer-author {
    color: var(--accent);
    font-weight: 600;
}

.answer-author i {
    margin-right: 5px;
}

.answer-content p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

.no-answers {
    color: #999;
    font-style: italic;
    padding: 0.5rem 0;
}

/* Footer de pregunta */
.question-footer {
    margin-top: 1rem;
    display: flex;
    gap: 0.8rem;
}

.btn-answer, .btn-edit, .btn-delete {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-answer {
    background: #27ae60;
    color: white;
}

.btn-answer:hover {
    background: #219a52;
    transform: translateY(-2px);
}

.btn-edit {
    background: #3498db;
    color: white;
}

.btn-edit:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-delete {
    background: #e74c3c;
    color: white;
}

.btn-delete:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.login-to-answer {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.login-to-answer i {
    color: #f39c12;
}

.loading-questions, .no-questions {
    text-align: center;
    padding: 2rem;
    color: #666;
}

/* Responsive */
@media (max-width: 1428px) {
    .questions-modal {
        width: 95%;
        margin: 1rem;
    }
    
    .questions-modal-header {
        padding: 1rem 1.5rem;
    }
    
    .questions-modal-body {
        padding: 1.5rem;
    }
    
    .question-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .floating-question-btn {
        bottom: 80px;
        right: 15px;
        padding: 10px 15px;
    }
    
    .floating-question-btn span {
        display: none;
    }
    
    .floating-question-btn i {
        font-size: 1.3rem;
    }
}

@media (max-width: 336px) {
    .thought-icon {
        width: 30px;
        height: 30px;
        top: -8px;
        right: -8px;
    }
    
    .thought-icon i {
        font-size: 0.8rem;
    }
}
/* Agregar al final del archivo */

/* ===== MODAL DE RESPUESTA ===== */
.answer-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3500;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.answer-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.answer-modal {
    background: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-heavy);
    transform: translateY(20px);
    transition: var(--transition);
}

.answer-modal-overlay.active .answer-modal {
    transform: translateY(0);
}

.answer-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.answer-modal-header h3 {
    color: white;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.answer-modal-header h3 i {
    color: var(--secondary);
}

.close-answer-modal {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.close-answer-modal:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.answer-modal-body {
    padding: 2rem;
}

.original-question {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--secondary);
}

.original-question strong {
    color: var(--primary);
    display: block;
    margin-bottom: 0.5rem;
}

.original-question p {
    margin-bottom: 0;
    font-size: 1.1rem;
}

.write-answer label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary);
}

.write-answer textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Raleway', sans-serif;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.write-answer textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

.answer-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* ===== TIMER MESSAGES ===== */
.timer-message {
    padding: 0.8rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.timer-message.success {
    background: #d4f8e8;
    color: #0a7b4a;
    border-left: 4px solid #0a7b4a;
}

.timer-message.warning {
    background: #fff4e6;
    color: #e67e22;
    border-left: 4px solid #e67e22;
}

.timer-message i {
    font-size: 1rem;
}

/* Botones deshabilitados */
#submitQuestionBtn:disabled,
#newQuestionInput:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Selector de título (Hermano/Pastor) */
.title-selector {
    margin-bottom: 10px;
}

.title-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Raleway', sans-serif;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
}

.title-select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

/* Sección de búsqueda de nombres */
.name-search-section {
    background: var(--light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.name-search-section label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--dark);
}

.required-field:after {
    content: " *";
    color: #e74c3c;
}